quiz editing: MDL-17284 fix infinite redirect bug.

This commit is contained in:
tjhunt 2009-01-07 07:12:37 +00:00
parent a733c4b98b
commit b4a2e41313
2 changed files with 4 additions and 2 deletions

View File

@ -62,7 +62,7 @@ function module_specific_actions($pageurl, $questionid, $cmid, $canuse, $cmoptio
* (which is called from showbank())
* Displays button in form with checkboxes for each question.
*/
function module_specific_buttons($cmid,$cmoptions){
function module_specific_buttons($cmid, $cmoptions){
if($cmoptions->hasattempts){
$disabled='disabled="disabled"';
}else{
@ -540,7 +540,7 @@ if ($significantchangemade) {
}
}
quiz_update_sumgrades($quiz);
redirect($qcobject->pageurl->out());
redirect($thispageurl->out());
}
question_showbank_actions($thispageurl, $cm);

View File

@ -604,6 +604,8 @@ function question_edit_setup($edittab, $requirecmid = false, $requirecourseid =
//$thispageurl is used to construct urls for all question edit pages we link to from this page. It contains an array
//of parameters that are passed from page to page.
$thispageurl = new moodle_url();
$thispageurl->remove_params(); // We are going to explicity add back everything important - this avoids unwanted params from being retained.
if ($requirecmid){
$cmid =required_param('cmid', PARAM_INT);
} else {