From 891581dbde9aae802ec8383065da824165eec63d Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 16 May 2004 09:11:17 +0000 Subject: [PATCH] Add a link across to the Files area --- mod/resource/view.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/mod/resource/view.php b/mod/resource/view.php index 37436a2b29..12dcd6b530 100644 --- a/mod/resource/view.php +++ b/mod/resource/view.php @@ -456,14 +456,29 @@ "", "", true, update_module_button($cm->id, $course->id, $strresource), navmenu($course, $cm)); + if (isteacheredit($course->id)) { + echo "
pixpath/i/files.gif\" height=16 width=16 alt=\"\"> ". + "wwwroot/files/index.php?id=$course->id&wdir=/$resource->reference$subdir\">". + get_string("editfiles")."...
"; + } + + if (trim($resource->summary)) { print_simple_box(text_to_html($resource->summary), "center"); print_spacer(10,10); } + $files = get_directory_list("$CFG->dataroot/$relativepath", 'moddata', false, true, true); + + + if (!$files) { + print_heading(get_string("nofilesyet")); + print_footer($course); + exit; + } + print_simple_box_start("center", "", "$THEME->cellcontent", '0' ); - $files = get_directory_list("$CFG->dataroot/$relativepath", 'moddata', false, true, true); $strftime = get_string('strftimedatetime'); $strname = get_string("name"); $strsize = get_string("size"); -- 2.39.5