MDL-53440 course: Better interface for approving multiple courses
Added another target 'pending' in course/edit.php for redirection This will help administrator/managers approve multiple courses one after another
This commit is contained in:
committed by
Cameron Ball
parent
aeccf4bd94
commit
1b276bfc9d
@@ -55,6 +55,9 @@ if ($returnto === 'url' && confirm_sesskey() && $returnurl) {
|
||||
case 'topcat':
|
||||
$returnurl = new moodle_url($CFG->wwwroot . '/course/');
|
||||
break;
|
||||
case 'pending':
|
||||
$returnurl = new moodle_url($CFG->wwwroot . '/course/pending.php');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ if (!empty($approve) and confirm_sesskey()) {
|
||||
$courseid = $course->approve();
|
||||
|
||||
if ($courseid !== false) {
|
||||
redirect($CFG->wwwroot.'/course/edit.php?id=' . $courseid);
|
||||
redirect(new moodle_url('/course/edit.php', ['id' => $courseid, 'returnto' => 'pending']));
|
||||
} else {
|
||||
print_error('courseapprovedfailed');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user