MDL-50318 course: Fix the URL of embedded images at resources overview

Not only mod_resource instances are listed here. All modules that
declare their FEATURE_MOD_ARCHETYPE as MOD_ARCHETYPE_RESOURCE (well, all
but those without own view page, such as mod_label) are listed. So we
must use the real plugin name when rendering the intro field.
This commit is contained in:
David Mudrák
2015-05-21 17:18:05 +02:00
parent 08d1c32b45
commit 2daaae15ea
+1 -1
View File
@@ -134,7 +134,7 @@ foreach ($cms as $cm) {
$icon = '<img src="'.$cm->get_icon_url().'" class="activityicon" alt="'.$cm->get_module_type_name().'" /> ';
if (isset($resource->intro) && isset($resource->introformat)) {
$intro = format_module_intro('resource', $resource, $cm->id);
$intro = format_module_intro($cm->modname, $resource, $cm->id);
} else {
$intro = '';
}