quiz editing: MDL-17293 changed how the page number to add on is passed to the form for creating a random question
This commit is contained in:
@@ -67,7 +67,8 @@
|
||||
|
||||
print_heading(get_string("addrandomquestiontoquiz","quiz",$quizname), 'left', 2);
|
||||
|
||||
$qcobject->display_randomquestion_user_interface();
|
||||
$addonpage=optional_param("addonpage_form", 0, PARAM_SEQUENCE);
|
||||
$qcobject->display_randomquestion_user_interface($addonpage);
|
||||
|
||||
print_footer($course);
|
||||
?>
|
||||
@@ -228,8 +228,8 @@ class question_category_object {
|
||||
* Displays the user interface
|
||||
*
|
||||
*/
|
||||
function display_randomquestion_user_interface() {
|
||||
|
||||
function display_randomquestion_user_interface($addonpage) {
|
||||
$this->catform_rand->set_data(array('addonpage'=>$addonpage));
|
||||
/// Interface for adding a new category:
|
||||
$this->output_new_randomquestion_table();
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ class question_category_edit_form_randomquestion extends moodleform {
|
||||
//--------------------------------------------------------------------------------
|
||||
$mform->addElement('hidden', 'id', 0);
|
||||
$mform->setType('id', PARAM_INT);
|
||||
//TODO: Tim: is this questionable? to add a hidden field right from a get parameter?
|
||||
$mform->addElement('hidden', 'addonpage', optional_param("addonpage_form", 0, PARAM_SEQUENCE), 'id="rform_qpage"');
|
||||
$mform->addElement('hidden', 'addonpage', 0, 'id="rform_qpage"');
|
||||
$mform->setType('addonpage', PARAM_SEQUENCE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user