From 62e49765a4cfbb6ca6afd4c0dded1806f84f01c8 Mon Sep 17 00:00:00 2001 From: thepurpleblob <thepurpleblob> Date: Tue, 13 May 2008 14:56:29 +0000 Subject: [PATCH] MDL-14045: Assignment type now links to type/xxxx/all.php if it exists. --- mod/assignment/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mod/assignment/index.php b/mod/assignment/index.php index 39ac4bc4ec..df277d87eb 100644 --- a/mod/assignment/index.php +++ b/mod/assignment/index.php @@ -96,6 +96,13 @@ $type = $types[$cm->assignmenttype]; + // if type has an 'all.php' defined, make this a link + $pathtoall = "{$CFG->dirroot}/mod/assignment/type/{$cm->assignmenttype}/all.php"; + if (file_exists($pathtoall)) { + $type = "<a href=\"{$CFG->wwwroot}/mod/assignment/type/{$cm->assignmenttype}/". + "all.php?id={$course->id}\">$type</a>"; + } + $due = $cm->timedue ? userdate($cm->timedue) : '-'; if ($course->format == "weeks" or $course->format == "topics") { -- 2.39.5