Permalink
Browse files

MDL-26105 blocks: fixed some php errors and made a help string better

  • Loading branch information...
1 parent 32a510d commit fb794ab73cdf294affb3e7539afc7656324adfe6 @andyjdavis andyjdavis committed Jun 9, 2011
Showing with 4 additions and 2 deletions.
  1. +1 −1 lang/en/block.php
  2. +3 −1 lib/blocklib.php
View
@@ -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';
View
@@ -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;
}

0 comments on commit fb794ab

Please sign in to comment.