diff --git a/lib/datalib.php b/lib/datalib.php index 9b46954d98c..a1ae05a36ab 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -1480,7 +1480,11 @@ function get_all_instances_in_course($modulename, $course) { foreach ($modinfo as $mod) { if ($mod->mod == $modulename and $mod->visible > $invisible) { - $outputarray[] = $rawmods[$mod->cm]; + $instance = $rawmods[$mod->cm]; + if (!empty($mod->extra)) { + $instance->extra = $mod->extra; + } + $outputarray[] = $instance; } } diff --git a/mod/resource/index.php b/mod/resource/index.php index e855f46536c..2780b628901 100644 --- a/mod/resource/index.php +++ b/mod/resource/index.php @@ -50,25 +50,29 @@ $tt = "$resource->section"; } } else { - $tt = "".userdate($resource->timemodified); + $tt = "".userdate($resource->timemodified); + } + if (!empty($resource->extra)) { + $extra = urldecode($resource->extra); + } else { + $extra = ""; } if (!$resource->visible) { //Show dimmed if the mod is hidden - $table->data[] = array ($tt, "coursemodule\">$resource->name", + $table->data[] = array ($tt, "coursemodule\">$resource->name", text_to_html($resource->summary) ); } else { //Show normal if the mod is visible - $table->data[] = array ($tt, "coursemodule\">$resource->name", + $table->data[] = array ($tt, "coursemodule\">$resource->name", text_to_html($resource->summary) ); } } - echo "
"; + echo "
"; print_table($table); print_footer($course); - ?>