diff --git a/lang/en/block.php b/lang/en/block.php index 8ee7aa67fa897..65b4fce962375 100644 --- a/lang/en/block.php +++ b/lang/en/block.php @@ -32,7 +32,7 @@ $string['contexts'] = 'Page contexts'; $string['contexts_help'] = 'Contexts are more specific types of pages where this block can be displayed within the original block location. You will have different options here depending on the original block location and your current location. For example, you can restrict a block to only appearing on forum pages in a course by adding the block to the course (making it appear on all sub-pages), then going into a forum and editing the block settings again to restrict display to just forum pages.'; $string['createdat'] = 'Original block location'; -$string['createdat_help'] = 'This is the original location where the block was created, even though other block settings may cause it to appear in other locations (contexts) within this original location. For example, a block created in a course could be displayed on one or more pages within that course only. A block created on the front page, however, could be displayed throughout the site.'; +$string['createdat_help'] = 'The original location where the block was created. Block settings may cause it to appear in other locations (contexts) within the original location. For example, a block created on a course page could be displayed in activities within that course. A block created on the front page can be displayed throughout the site.'; $string['defaultregion'] = 'Default region'; $string['defaultregion_help'] = 'Themes may define one or more named block regions where blocks are displayed. This setting defines which of these you want this block to appear in by default. The region may be overridden on specific pages if required.'; $string['defaultweight'] = 'Default weight'; diff --git a/lib/blocklib.php b/lib/blocklib.php index 5474440f57182..c6ef4b63bcf25 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -1629,6 +1629,8 @@ function default_pagetypelist($pagetype, $parentcontext = null, $currentcontext * @return array */ function plugin_pagetypelist($pagetype, $parentcontext = null, $currentcontext = null) { + global $CFG; + // for modules $bits = explode('-', $pagetype); $plugintype = $bits[0]; @@ -1647,7 +1649,7 @@ function plugin_pagetypelist($pagetype, $parentcontext = null, $currentcontext = if ($parentcontext->contextlevel == CONTEXT_COURSE) { // including course page type require_once("$CFG->dirroot/course/lib.php"); - $patterns = array_merge(course_pagetypelist($pagetype, $parentcontext, $currentcontext), $module_pagetype); + $patterns = array_merge(course_pagetypelist($pagetype, $parentcontext, $currentcontext), $patterns); } return $patterns; }