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:
pilpi
2008-11-22 16:32:36 +00:00
parent 9fa363896e
commit 5c8505d034
3 changed files with 5 additions and 5 deletions
+2 -1
View File
@@ -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);
?>
+2 -2
View File
@@ -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();
+1 -2
View File
@@ -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);
}
}