Skip to content

Commit

Permalink
When editing old outcomes when outcomes are switched off, just treat …
Browse files Browse the repository at this point in the history
…them like an ordinary scale item
  • Loading branch information
moodler committed Aug 1, 2007
1 parent f3b783f commit 9988d1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grade/edit/tree/item.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

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.'&courseid='.$courseid;
redirect($gpr->add_url_params($url));
}
Expand Down
2 changes: 1 addition & 1 deletion grade/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ function get_edit_icon($element, $gpr) {
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.'&id='.$object->id;
} else {
$url = $CFG->wwwroot.'/grade/edit/tree/outcomeitem.php?courseid='.$this->courseid.'&id='.$object->id;
Expand Down

0 comments on commit 9988d1b

Please sign in to comment.