Skip to content

Commit

Permalink
Merge branch 'MDL-30395-MOODLE_21_STABLE' of git://github.com/mouneyr…
Browse files Browse the repository at this point in the history
…ac/moodle into MOODLE_21_STABLE
  • Loading branch information
Aparup Banerjee committed Nov 30, 2011
2 parents 98b10df + 17fa731 commit ecbbcd5
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions blocks/community/renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand All @@ -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 . ")";
}
}

Expand Down

0 comments on commit ecbbcd5

Please sign in to comment.