]> git.mjollnir.org Git - moodle.git/commitdiff
When editing old outcomes when outcomes are switched off, just treat them like an...
authormoodler <moodler>
Wed, 1 Aug 2007 04:50:39 +0000 (04:50 +0000)
committermoodler <moodler>
Wed, 1 Aug 2007 04:50:39 +0000 (04:50 +0000)
grade/edit/tree/item.php
grade/lib.php

index 08c38cd8e0bf3972da416217018db494301d6474..24675d9b9b1972161ae45b165bd9ad3a2056355e 100644 (file)
@@ -28,7 +28,7 @@ if ($mform->is_cancelled()) {
 
 if ($item = get_record('grade_items', 'id', $id, 'courseid', $course->id)) {
     // redirect if outcomeid present
-    if (!empty($item->outcomeid)) {
+    if (!empty($item->outcomeid) && !empty($CFG->enableoutcomes)) {
         $url = $CFG->wwwroot.'/grade/edit/tree/outcome.php?id='.$id.'&amp;courseid='.$courseid;
         redirect($gpr->add_url_params($url));
     }
index a63e3a34d71306022b4c16c65ccccc9cda51400b..d44a65442b2fa17276bac360fa6e765bf50cc9eb 100644 (file)
@@ -601,7 +601,7 @@ class grade_tree {
             case 'item':
             case 'categoryitem':
             case 'courseitem':
-                if (empty($object->outcomeid)) {
+                if (empty($object->outcomeid) || empty($CFG->enableoutcomes)) {
                     $url = $CFG->wwwroot.'/grade/edit/tree/item.php?courseid='.$this->courseid.'&amp;id='.$object->id;
                 } else {
                     $url = $CFG->wwwroot.'/grade/edit/tree/outcomeitem.php?courseid='.$this->courseid.'&amp;id='.$object->id;