mirror of
https://github.com/moodle/moodle.git
synced 2025-02-15 21:36:58 +01:00
Merge branch 'MDL-30395' of git://github.com/mouneyrac/moodle
This commit is contained in:
commit
2069c52e20
@ -193,6 +193,8 @@ class block_community_renderer extends plugin_renderer_base {
|
||||
|
||||
|
||||
//Create course content html
|
||||
$blocks = get_plugin_list('block');
|
||||
$activities = get_plugin_list('mod');
|
||||
if (!empty($course->contents)) {
|
||||
$activitieshtml = '';
|
||||
$blockhtml = '';
|
||||
@ -202,14 +204,22 @@ class block_community_renderer extends plugin_renderer_base {
|
||||
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 . ")";
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user