mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 00:42:54 +02:00
return to the proper page after editing a question in the question bank.
This commit is contained in:
parent
d340fde6c4
commit
561fe61df3
@ -321,7 +321,10 @@ function question_list($course, $pageurl, $categoryid, $cm = null,
|
||||
|
||||
// edit, hide, delete question, using question capabilities, not quiz capabilieies
|
||||
if ($canedit) {
|
||||
echo "<a title=\"$stredit\" href=\"$CFG->wwwroot/question/question.php?id=$question->id\"><img
|
||||
$questionparams = (($cm !== null)? array('cmid' => $cm->id) : array()) +
|
||||
(array('returnurl' => $pageurl->out(), 'id'=>$question->id));
|
||||
$questionurl = new moodle_url("$CFG->wwwroot/question/question.php", $questionparams);
|
||||
echo "<a title=\"$stredit\" href=\"".$questionurl->out()."\"><img
|
||||
src=\"$CFG->pixpath/t/edit.gif\" alt=\"$stredit\" /></a> ";
|
||||
// hide-feature
|
||||
if($question->hidden) {
|
||||
|
@ -51,7 +51,6 @@ if (!$category = get_record('question_categories', 'id', $question->category)) {
|
||||
}
|
||||
if (!$returnurl) {
|
||||
$returnurl = "{$CFG->wwwroot}/question/edit.php?courseid={$category->course}";
|
||||
$SESSION->fromurl = $returnurl;
|
||||
}
|
||||
|
||||
// Validate the question type.
|
||||
@ -99,7 +98,7 @@ if ($mform->is_cancelled()){
|
||||
notify(get_string('changessaved'), '');
|
||||
close_window(3);
|
||||
} else {
|
||||
redirect($SESSION->returnurl);
|
||||
redirect($returnurl);
|
||||
}
|
||||
die;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user