Skip to content

Commit

Permalink
MDL-26105 blocks: fixed some php errors and made a help string better
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjdavis committed Jun 9, 2011
1 parent 32a510d commit fb794ab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lang/en/block.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 3 additions & 1 deletion lib/blocklib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
}
Expand Down

0 comments on commit fb794ab

Please sign in to comment.