]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13050 Reverting, it's not working out as well as planned
authornicolasconnault <nicolasconnault>
Mon, 21 Jan 2008 13:40:47 +0000 (13:40 +0000)
committernicolasconnault <nicolasconnault>
Mon, 21 Jan 2008 13:40:47 +0000 (13:40 +0000)
mod/assignment/lib.php
mod/exercise/submissions.php
mod/glossary/view.php
mod/hotpot/report.php
mod/quiz/report/default.php
mod/workshop/view.php

index be5f1ef4c7a4733ddebafaa14c11c7d003866eae..c8a9c773505286b9eab0cd9eecd5f71e75818b3d 100644 (file)
@@ -1020,26 +1020,7 @@ class assignment_base {
 
         add_to_log($course->id, 'assignment', 'view submission', 'submissions.php?id='.$this->assignment->id, $this->assignment->id, $this->cm->id);
 
-        $navlinks = array();
-        $navlinks[] = array(
-                'name' => get_string('grades'),
-                'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
-                'type' => 'link');
-        $navlinks[] = array(
-                'name' => get_string('modulenameplural', $cm->modname),
-                'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
-                'type' => 'activity');
-        $navlinks[] = array(
-                'name' => format_string($cm->name),
-                'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
-                'type' => 'activityinstance');
-        $navlinks[] = array(
-                'name' => $this->strsubmissions,
-                'link' => '',
-                'type' => 'link');
-        
-        $navigation = build_navigation($navlinks);
-
+        $navigation = build_navigation($this->strsubmissions, $this->cm);
         print_header_simple(format_string($this->assignment->name,true), "", $navigation,
                 '', '', true, update_module_button($cm->id, $course->id, $this->strassignment), navmenu($course, $cm));
 
index 14fb63477084658d618c4cf8b81626817959f603..68d5bb4d9b3f4f115b07d5770bbc19cb070a08eb 100644 (file)
     $strsubmissions = get_string("submissions", "exercise");
 
     // ... print the header and...
-    $navlinks = array();
-    $navlinks[] = array(
-            'name' => get_string('grades'),
-            'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
-            'type' => 'link');
-    $navlinks[] = array(
-            'name' => get_string('modulenameplural', $cm->modname),
-            'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
-            'type' => 'activity');
-    $navlinks[] = array(
-            'name' => format_string($cm->name),
-            'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
-            'type' => 'activityinstance');
-    $navlinks[] = array(
-            'name' => $strsubmissions,
-            'link' => '',
-            'type' => 'title');
-    
-    $navigation = build_navigation($navlinks);
+    $navigation = build_navigation($strsubmissions, $cm);
     print_header_simple(format_string($exercise->name), "", $navigation,
                   "", "", true);
 
index 3dadb7c6d6fe5cfb183b04de5aec37db1110698a..af508f2bca1b1e13bbca65d3c25a19acd2595b3a 100644 (file)
     $strwaitingapproval = get_string('waitingapproval', 'glossary');
 
 /// If we are in approval mode, prit special header
-    $navlinks = array();
-    $navlinks[] = array(
-            'name' => get_string('grades'),
-            'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
-            'type' => 'link');
-    $navlinks[] = array(
-            'name' => get_string('modulenameplural', $cm->modname),
-            'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
-            'type' => 'activity');
-    $navlinks[] = array(
-            'name' => format_string($cm->name),
-            'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
-            'type' => 'activityinstance');
-    
     if ($tab == GLOSSARY_APPROVAL_VIEW) {
         require_capability('mod/glossary:approve', $context);
 
-        $navlinks[] = array(
-                'name' => $strwaitingapproval,
-                'link' => '',
-                'type' => 'title');
-        
-        $navigation = build_navigation($navlinks);
+        $navigation = build_navigation($strwaitingapproval, $cm);
         print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
             update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
 
         print_heading($strwaitingapproval);
     } else { /// Print standard header
-        $navigation = build_navigation($navlinks);
+        $navigation = build_navigation('', $cm);
         print_header_simple(format_string($glossary->name), "", $navigation, "", "", true,
             update_module_button($cm->id, $course->id, $strglossary), navmenu($course, $cm));
     }
index db8c0fc65c6ad936a5708376b88a28a8ee37a816..8b9029f4338d7397fcdc4d5d740324b1411b8841 100644 (file)
@@ -408,7 +408,6 @@ function hotpot_delete_selected_attempts(&$hotpot, $del) {
 /// report selector menus
 
 function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
-    global $CFG;
     $strmodulenameplural = get_string("modulenameplural", "hotpot");
     $strmodulename  = get_string("modulename", "hotpot");
 
@@ -416,22 +415,6 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
     $heading = $course->fullname;
     
     $modulecontext = get_context_instance(CONTEXT_MODULE, $cm->id);
-    
-    $navlinks = array();
-    $navlinks[] = array(
-            'name' => get_string('grades'),
-            'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
-            'type' => 'link');
-    $navlinks[] = array(
-            'name' => get_string('modulenameplural', $cm->modname),
-            'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
-            'type' => 'activity');
-    $navlinks[] = array(
-            'name' => format_string($cm->name),
-            'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
-            'type' => 'activityinstance');
-    
-
     if (has_capability('mod/hotpot:viewreport',$modulecontext)) {
         if ($mode=='overview' || $mode=='simplestat' || $mode=='fullstat') {
             $module = "quiz";
@@ -439,18 +422,10 @@ function hotpot_print_report_heading(&$course, &$cm, &$hotpot, &$mode) {
             $module = "hotpot";
         }
 
-        $navlinks[] = array(
-                'name' => get_string("report$mode", $module),
-                'link' => '',
-                'type' => 'title');
+        $navigation = build_navigation(get_string("report$mode", $module), $cm);
     } else {
-        $navlinks[] = array(
-                'name' => get_string("report", "quiz"),
-                'link' => '',
-                'type' => 'title');
+        $navigation = build_navigation(get_string("report", "quiz"), $cm);
     }
-    
-    $navigation = build_navigation($navlinks);
 
     $button = update_module_button($cm->id, $course->id, $strmodulename);
     print_header($title, $heading, $navigation, "", "", true, $button, navmenu($course, $cm));
index 19545c930085e887cba212bcc8b4a1736c112eca..a5a05c07aa13118cf33c5510f4a791a6102b84b6 100644 (file)
@@ -27,21 +27,7 @@ class quiz_default_report {
         $strquizzes = get_string("modulenameplural", "quiz");
         $strquiz  = get_string("modulename", "quiz");
     /// Print the page header
-        $navlinks = array();
-        $navlinks[] = array(
-                'name' => get_string('grades'),
-                'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
-                'type' => 'link');
-        $navlinks[] = array(
-                'name' => get_string('modulenameplural', $cm->modname),
-                'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
-                'type' => 'activity');
-        $navlinks[] = array(
-                'name' => format_string($cm->name),
-                'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
-                'type' => 'activityinstance');
-        
-        $navigation = build_navigation($navlinks);
+        $navigation = build_navigation('', $cm);
         
         print_header_simple(format_string($quiz->name), "", $navigation,
                      '', $meta, true, update_module_button($cm->id, $course->id, $strquiz), navmenu($course, $cm));
index a9ce44aaeb27077fe93ae8aaf44c13af9bb6d83f..49266aa43380e623128e0313e3c47999d5e3b884 100644 (file)
     }
 
     // ...display header...
-
-    if ($action == 'teachersview') {
-        $navlinks = array();
-        $navlinks[] = array(
-                'name' => get_string('grades'),
-                'link' => $CFG->wwwroot . '/grade/report/index.php?id=' . $cm->course,
-                'type' => 'link');
-        $navlinks[] = array(
-                'name' => get_string('modulenameplural', $cm->modname),
-                'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/index.php?id=' . $cm->course,
-                'type' => 'activity');
-        $navlinks[] = array(
-                'name' => format_string($cm->name),
-                'link' => $CFG->wwwroot . '/mod/' . $cm->modname . '/view.php?id=' . $cm->id,
-                'type' => 'activityinstance');
-        $navlinks[] = array(
-                'name' => $action,
-                'link' => '',
-                'type' => 'title');
-        
-
-        $navigation = build_navigation($navlinks);    
-    } else {
     $navigation = build_navigation($action, $cm);    
-    }
-
     print_header_simple(format_string($workshop->name), "", $navigation,
                   "", "", true, update_module_button($cm->id, $course->id, $strworkshop), navmenu($course, $cm));