]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14045:
authorthepurpleblob <thepurpleblob>
Tue, 13 May 2008 14:56:29 +0000 (14:56 +0000)
committerthepurpleblob <thepurpleblob>
Tue, 13 May 2008 14:56:29 +0000 (14:56 +0000)
Assignment type now links to type/xxxx/all.php if it exists.

mod/assignment/index.php

index 39ac4bc4ecc95a0984d0f9045c57af410e0b3d41..df277d87ebfe3e6916d673597214329647bc3af0 100644 (file)
 
         $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") {