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;
}
}
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');
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.