MDL-13690 activity outcome items do not support calculation - remove calc icon

This commit is contained in:
skodak
2008-02-27 10:10:23 +00:00
parent cb8faf0f12
commit ed1b0d012c
2 changed files with 3 additions and 5 deletions
+2 -3
View 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'));
}
+1 -2
View 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 {