mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
When editing old outcomes when outcomes are switched off, just treat them like an ordinary scale item
This commit is contained in:
parent
f3b783f407
commit
9988d1b7a7
2 changed files with 2 additions and 2 deletions
|
@ -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.'&courseid='.$courseid;
|
||||
redirect($gpr->add_url_params($url));
|
||||
}
|
||||
|
|
|
@ -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.'&id='.$object->id;
|
||||
} else {
|
||||
$url = $CFG->wwwroot.'/grade/edit/tree/outcomeitem.php?courseid='.$this->courseid.'&id='.$object->id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue