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:
Abhijit A.M
2016-04-07 10:38:42 +08:00
committed by Cameron Ball
parent aeccf4bd94
commit 1b276bfc9d
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -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
View File
@@ -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');
}