]> git.mjollnir.org Git - moodle.git/commitdiff
Quickly moving old reports into new structure
authormoodler <moodler>
Thu, 9 Mar 2006 08:06:19 +0000 (08:06 +0000)
committermoodler <moodler>
Thu, 9 Mar 2006 08:06:19 +0000 (08:06 +0000)
This one is Outline Report

course/report/outline/index.php [moved from course/outline_rep.php with 86% similarity]

similarity index 86%
rename from course/outline_rep.php
rename to course/report/outline/index.php
index 0ba5f6db1262822646102aae367d301f7a0d3f48..6dae38047761539db33587cb477eab04545484e9 100644 (file)
@@ -2,8 +2,8 @@
 
 // Display user activity reports for a course (totals)
 
-    require_once("../config.php");
-    require_once("lib.php");
+    require_once("../../../config.php");
+    require_once("../../lib.php");
 
     $modes = array("outline", "complete", "todaylogs", "alllogs");
 
     $strcomplete       = get_string("complete");
     $stralllogs        = get_string("alllogs");
     $strtodaylogs      = get_string("todaylogs");
+    $strreports      = get_string("reports");
 
     if ($course->category) {
         print_header("$course->shortname: $stractivityreport", "$course->fullname",
-                 "<a href=\"../course/view.php?id=$course->id\">$course->shortname</a> ->
+                 "<a href=\"../../course/view.php?id=$course->id\">$course->shortname</a> ->
+                  <a href=\"../../report.php?id=$course->id\">$strreports</a> ->
                   $stractivityreport");
     } else {
         print_header("$course->shortname: $stractivityreport ($mode)", "$course->fullname",
-                 "<a href=\"../user/view.php?id=$user->id&amp;course=$course->id\">".fullname($user)."</a> -> 
+                 "<a href=\"../../user/view.php?id=$user->id&amp;course=$course->id\">".fullname($user)."</a> -> 
                   $stractivityreport -> $strmode");
     }
     print_heading("$course->fullname");
 
 
 function print_outline_row($mod, $instance, $result) {
-    $image = "<img src=\"../mod/$mod->modname/icon.gif\" height=\"16\" width=\"16\" alt=\"$mod->modfullname\" />";
+
+    global $CFG;
+
+    $image = "<img src=\"$CFG->modpixpath/$mod->modname/icon.gif\" height=\"16\" width=\"16\" alt=\"$mod->modfullname\" />";
 
     echo "<tr>";
     echo "<td valign=\"top\">$image</td>";
     echo "<td valign=\"top\" width=\"300\">";
     echo "   <a title=\"$mod->modfullname\"";
-    echo "   href=\"../mod/$mod->modname/view.php?id=$mod->id\">$instance->name</a></td>";
+    echo "   href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instance->name</a></td>";
     echo "<td>&nbsp;&nbsp;&nbsp;</td>";
     echo "<td valign=\"top\" bgcolor=\"white\">";
     if (isset($result->info)) {