]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-13690 activity outcome items do not support calculation - remove calc icon; merge...
authorskodak <skodak>
Wed, 27 Feb 2008 10:11:22 +0000 (10:11 +0000)
committerskodak <skodak>
Wed, 27 Feb 2008 10:11:22 +0000 (10:11 +0000)
grade/edit/tree/calculation.php
grade/lib.php

index 0c718fabd05c3c90587d74274461b8941c4161b3..1b7145d4fb4b77b77103ceca03827a6acafb0341 100644 (file)
@@ -49,9 +49,8 @@ if (!$grade_item = grade_item::fetch(array('id'=>$id, 'courseid'=>$course->id)))
     error('Incorect item id');
 }
 
-// module items and items without grade can not have calculation
-if (($grade_item->is_external_item() and !$grade_item->is_outcome_item())
-  or ($grade_item->gradetype != GRADE_TYPE_VALUE and $grade_item->gradetype != GRADE_TYPE_SCALE)) {
+// activity items and items without grade can not have calculation
+if ($grade_item->is_external_item() or ($grade_item->gradetype != GRADE_TYPE_VALUE and $grade_item->gradetype != GRADE_TYPE_SCALE)) {
     redirect($returnurl, get_string('errornocalculationallowed', 'grades')); 
 }
 
index dfe586116f2d9e8c2576b6a6b17eabe616e06eb2..2948aab9bb09c24164fa8ac2e925b6e63bb95a78 100644 (file)
@@ -1096,8 +1096,7 @@ class grade_structure {
             $streditcalculation = get_string('editcalculationverbose', 'grades', $strparams);
 
             // show calculation icon only when calculation possible
-            if ((!$object->is_external_item() or $object->is_outcome_item())
-              and ($object->gradetype == GRADE_TYPE_SCALE or $object->gradetype == GRADE_TYPE_VALUE)) {
+            if (!$object->is_external_item() and ($object->gradetype == GRADE_TYPE_SCALE or $object->gradetype == GRADE_TYPE_VALUE)) {
                 if ($object->is_calculated()) {
                     $icon = 'calc.gif';
                 } else {