Skip to content
Browse files

Merge branch 'MDL-30395-MOODLE_21_STABLE' of git://github.com/mouneyr…

…ac/moodle into MOODLE_21_STABLE
  • Loading branch information...
2 parents 98b10df + 17fa731 commit ecbbcd5e07405582d082b76d344d62788b2ffe71 @nebgor nebgor committed Nov 30, 2011
Showing with 14 additions and 4 deletions.
  1. +14 −4 blocks/community/renderer.php
View
18 blocks/community/renderer.php
@@ -193,6 +193,8 @@ public function course_list($courses, $huburl, $contextcourseid) {
//Create course content html
+ $blocks = get_plugin_list('block');
+ $activities = get_plugin_list('mod');
if (!empty($course->contents)) {
$activitieshtml = '';
$blockhtml = '';
@@ -202,14 +204,22 @@ public function course_list($courses, $huburl, $contextcourseid) {
if (!empty($blockhtml)) {
$blockhtml .= ' - ';
}
- $blockhtml .= get_string('pluginname', 'block_' . $content->modulename)
- . " (" . $content->contentcount . ")";
+ if (array_key_exists($content->modulename, $blocks)) {
+ $blockname = get_string('pluginname', 'block_' . $content->modulename);
+ } else {
+ $blockname = $content->modulename;
+ }
+ $blockhtml .= $blockname . " (" . $content->contentcount . ")";
} else {
if (!empty($activitieshtml)) {
$activitieshtml .= ' - ';
}
- $activitieshtml .= get_string('modulename', $content->modulename)
- . " (" . $content->contentcount . ")";
+ if (array_key_exists($content->modulename, $activities)) {
+ $activityname = get_string('modulename', $content->modulename);
+ } else {
+ $activityname = $content->modulename;
+ }
+ $activitieshtml .= $activityname . " (" . $content->contentcount . ")";
}
}

0 comments on commit ecbbcd5

Please sign in to comment.
Something went wrong with that request. Please try again.