From: moodler Date: Tue, 26 Aug 2003 13:47:46 +0000 (+0000) Subject: 'Extras' in cached course modinfo activities is now returned. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=7f12f9cdd93aaba36bcd1a950676c1e34501700d;p=moodle.git 'Extras' in cached course modinfo activities is now returned. This means that Resources can now employ them on the index listing. Specifically, Resources that are popup now popup from there too. --- diff --git a/lib/datalib.php b/lib/datalib.php index 9b46954d98..a1ae05a36a 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 e855f46536..2780b62890 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); - ?>