quiz & qbank MDL-24453 some more return URLs that I missed the first time.
Also, fix a double-escaping bug when cancelling the form.
This commit is contained in:
@@ -91,7 +91,7 @@ class quiz_report_statistics_table extends flexible_table {
|
||||
if (!$this->is_downloading()){
|
||||
if ($question->qtype!='random'){
|
||||
$tooltip = get_string('detailedanalysis', 'quiz_statistics');
|
||||
$url = $this->baseurl .'&qid='.$question->id;
|
||||
$url = $this->baseurl .'qid='.$question->id;
|
||||
$html = "<a title=\"$tooltip\" href=\"$url\">".$question->name."</a>";
|
||||
} else {
|
||||
$html = $question->name;
|
||||
@@ -132,7 +132,11 @@ class quiz_report_statistics_table extends flexible_table {
|
||||
}
|
||||
}
|
||||
function col_actions($question){
|
||||
return quiz_question_action_icons($this->quiz, $this->cmid, $question, $this->baseurl);
|
||||
global $CFG;
|
||||
$editreturnurl = str_replace($CFG->wwwroot, '', $this->baseurl);
|
||||
$editreturnurl = str_replace('&', '&', $editreturnurl);
|
||||
$editreturnurl = preg_replace('/&$/', '', $editreturnurl);
|
||||
return quiz_question_action_icons($this->quiz, $this->cmid, $question, $editreturnurl);
|
||||
}
|
||||
function col_qtype($question){
|
||||
return get_string($question->qtype,'quiz');
|
||||
|
||||
@@ -206,11 +206,10 @@ if ($mform->is_cancelled()){
|
||||
if ($inpopup) {
|
||||
close_window();
|
||||
} else {
|
||||
$nexturl = new moodle_url($returnurl);
|
||||
if (!empty($question->id)) {
|
||||
$nexturl->param('lastchanged', $question->id);
|
||||
$returnurl->param('lastchanged', $question->id);
|
||||
}
|
||||
redirect($nexturl->out());
|
||||
redirect($returnurl->out(false));
|
||||
}
|
||||
} elseif ($fromform = $mform->get_data()) {
|
||||
/// If we are saving as a copy, break the connection to the old question.
|
||||
|
||||
Reference in New Issue
Block a user