Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/quiz/edit.php
Go to the documentation of this file.
00001 <?php
00002 // This file is part of Moodle - http://moodle.org/
00003 //
00004 // Moodle is free software: you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation, either version 3 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // Moodle is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00016 
00017 
00045 require_once('../../config.php');
00046 require_once($CFG->dirroot . '/mod/quiz/editlib.php');
00047 require_once($CFG->dirroot . '/mod/quiz/addrandomform.php');
00048 require_once($CFG->dirroot . '/question/category_class.php');
00049 
00050 
00056 function module_specific_buttons($cmid, $cmoptions) {
00057     global $OUTPUT;
00058     if ($cmoptions->hasattempts) {
00059         $disabled = 'disabled="disabled" ';
00060     } else {
00061         $disabled = '';
00062     }
00063     $out = '<input type="submit" name="add" value="' . $OUTPUT->larrow() . ' ' .
00064             get_string('addtoquiz', 'quiz') . '" ' . $disabled . "/>\n";
00065     return $out;
00066 }
00067 
00072 function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmoptions) {
00073     global $OUTPUT;
00074     $out = '';
00075     $catcontext = get_context_instance_by_id($category->contextid);
00076     if (has_capability('moodle/question:useall', $catcontext)) {
00077         if ($cmoptions->hasattempts) {
00078             $disabled = ' disabled="disabled"';
00079         } else {
00080             $disabled = '';
00081         }
00082         $randomusablequestions =
00083                 question_bank::get_qtype('random')->get_available_questions_from_category(
00084                         $category->id, $recurse);
00085         $maxrand = count($randomusablequestions);
00086         if ($maxrand > 0) {
00087             for ($i = 1; $i <= min(10, $maxrand); $i++) {
00088                 $randomcount[$i] = $i;
00089             }
00090             for ($i = 20; $i <= min(100, $maxrand); $i += 10) {
00091                 $randomcount[$i] = $i;
00092             }
00093         } else {
00094             $randomcount[0] = 0;
00095             $disabled = ' disabled="disabled"';
00096         }
00097 
00098         $out = '<strong><label for="menurandomcount">'.get_string('addrandomfromcategory', 'quiz').
00099                 '</label></strong><br />';
00100         $attributes = array();
00101         $attributes['disabled'] = $disabled ? 'disabled' : null;
00102         $select = html_writer::select($randomcount, 'randomcount', '1', null, $attributes);
00103         $out .= get_string('addrandom', 'quiz', $select);
00104         $out .= '<input type="hidden" name="recurse" value="'.$recurse.'" />';
00105         $out .= '<input type="hidden" name="categoryid" value="' . $category->id . '" />';
00106         $out .= ' <input type="submit" name="addrandom" value="'.
00107                 get_string('addtoquiz', 'quiz').'"' . $disabled . ' />';
00108         $out .= $OUTPUT->help_icon('addarandomquestion', 'quiz');
00109     }
00110     return $out;
00111 }
00112 
00113 //these params are only passed from page request to request while we stay on
00114 //this page otherwise they would go in question_edit_setup
00115 $quiz_reordertool = optional_param('reordertool', -1, PARAM_BOOL);
00116 $quiz_qbanktool = optional_param('qbanktool', -1, PARAM_BOOL);
00117 $scrollpos = optional_param('scrollpos', '', PARAM_INT);
00118 
00119 list($thispageurl, $contexts, $cmid, $cm, $quiz, $pagevars) =
00120         question_edit_setup('editq', '/mod/quiz/edit.php', true);
00121 $quiz->questions = quiz_clean_layout($quiz->questions);
00122 
00123 $defaultcategoryobj = question_make_default_categories($contexts->all());
00124 $defaultcategory = $defaultcategoryobj->id . ',' . $defaultcategoryobj->contextid;
00125 
00126 if ($quiz_qbanktool > -1) {
00127     $thispageurl->param('qbanktool', $quiz_qbanktool);
00128     set_user_preference('quiz_qbanktool_open', $quiz_qbanktool);
00129 } else {
00130     $quiz_qbanktool = get_user_preferences('quiz_qbanktool_open', 0);
00131 }
00132 
00133 if ($quiz_reordertool > -1) {
00134     $thispageurl->param('reordertool', $quiz_reordertool);
00135     set_user_preference('quiz_reordertab', $quiz_reordertool);
00136 } else {
00137     $quiz_reordertool = get_user_preferences('quiz_reordertab', 0);
00138 }
00139 
00140 //will be set further down in the code
00141 $quizhasattempts = quiz_has_attempts($quiz->id);
00142 
00143 $PAGE->set_url($thispageurl);
00144 
00145 $pagetitle = get_string('editingquiz', 'quiz');
00146 if ($quiz_reordertool) {
00147     $pagetitle = get_string('orderingquiz', 'quiz');
00148 }
00149 // Get the course object and related bits.
00150 $course = $DB->get_record('course', array('id' => $quiz->course));
00151 if (!$course) {
00152     print_error('invalidcourseid', 'error');
00153 }
00154 
00155 $questionbank = new quiz_question_bank_view($contexts, $thispageurl, $course, $cm, $quiz);
00156 $questionbank->set_quiz_has_attempts($quizhasattempts);
00157 
00158 // Log this visit.
00159 add_to_log($cm->course, 'quiz', 'editquestions',
00160             "view.php?id=$cm->id", "$quiz->id", $cm->id);
00161 
00162 // You need mod/quiz:manage in addition to question capabilities to access this page.
00163 require_capability('mod/quiz:manage', $contexts->lowest());
00164 
00165 if (empty($quiz->grades)) {
00166     $quiz->grades = quiz_get_all_question_grades($quiz);
00167 }
00168 
00169 // Process commands ============================================================
00170 if ($quiz->shufflequestions) {
00171     // Strip page breaks before processing actions, so that re-ordering works
00172     // as expected when shuffle questions is on.
00173     $quiz->questions = quiz_repaginate($quiz->questions, 0);
00174 }
00175 
00176 // Get the list of question ids had their check-boxes ticked.
00177 $selectedquestionids = array();
00178 $params = (array) data_submitted();
00179 foreach ($params as $key => $value) {
00180     if (preg_match('!^s([0-9]+)$!', $key, $matches)) {
00181         $selectedquestionids[] = $matches[1];
00182     }
00183 }
00184 
00185 $afteractionurl = new moodle_url($thispageurl);
00186 if ($scrollpos) {
00187     $afteractionurl->param('scrollpos', $scrollpos);
00188 }
00189 if (($up = optional_param('up', false, PARAM_INT)) && confirm_sesskey()) {
00190     $quiz->questions = quiz_move_question_up($quiz->questions, $up);
00191     $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00192     quiz_delete_previews($quiz);
00193     redirect($afteractionurl);
00194 }
00195 
00196 if (($down = optional_param('down', false, PARAM_INT)) && confirm_sesskey()) {
00197     $quiz->questions = quiz_move_question_down($quiz->questions, $down);
00198     $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00199     quiz_delete_previews($quiz);
00200     redirect($afteractionurl);
00201 }
00202 
00203 if (optional_param('repaginate', false, PARAM_BOOL) && confirm_sesskey()) {
00204     // Re-paginate the quiz
00205     $questionsperpage = optional_param('questionsperpage', $quiz->questionsperpage, PARAM_INT);
00206     $quiz->questions = quiz_repaginate($quiz->questions, $questionsperpage );
00207     $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00208     quiz_delete_previews($quiz);
00209     redirect($afteractionurl);
00210 }
00211 
00212 if (($addquestion = optional_param('addquestion', 0, PARAM_INT)) && confirm_sesskey()) {
00213     // Add a single question to the current quiz
00214     $addonpage = optional_param('addonpage', 0, PARAM_INT);
00215     quiz_add_quiz_question($addquestion, $quiz, $addonpage);
00216     quiz_delete_previews($quiz);
00217     quiz_update_sumgrades($quiz);
00218     $thispageurl->param('lastchanged', $addquestion);
00219     redirect($afteractionurl);
00220 }
00221 
00222 if (optional_param('add', false, PARAM_BOOL) && confirm_sesskey()) {
00223     // Add selected questions to the current quiz
00224     $rawdata = (array) data_submitted();
00225     foreach ($rawdata as $key => $value) { // Parse input for question ids
00226         if (preg_match('!^q([0-9]+)$!', $key, $matches)) {
00227             $key = $matches[1];
00228             quiz_add_quiz_question($key, $quiz);
00229         }
00230     }
00231     quiz_delete_previews($quiz);
00232     quiz_update_sumgrades($quiz);
00233     redirect($afteractionurl);
00234 }
00235 
00236 if ((optional_param('addrandom', false, PARAM_BOOL)) && confirm_sesskey()) {
00237     // Add random questions to the quiz
00238     $recurse = optional_param('recurse', 0, PARAM_BOOL);
00239     $addonpage = optional_param('addonpage', 0, PARAM_INT);
00240     $categoryid = required_param('categoryid', PARAM_INT);
00241     $randomcount = required_param('randomcount', PARAM_INT);
00242     quiz_add_random_questions($quiz, $addonpage, $categoryid, $randomcount, $recurse);
00243 
00244     quiz_delete_previews($quiz);
00245     quiz_update_sumgrades($quiz);
00246     redirect($afteractionurl);
00247 }
00248 
00249 if (optional_param('addnewpagesafterselected', null, PARAM_CLEAN) &&
00250         !empty($selectedquestionids) && confirm_sesskey()) {
00251     foreach ($selectedquestionids as $questionid) {
00252         $quiz->questions = quiz_add_page_break_after($quiz->questions, $questionid);
00253     }
00254     $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00255     quiz_delete_previews($quiz);
00256     redirect($afteractionurl);
00257 }
00258 
00259 $addpage = optional_param('addpage', false, PARAM_INT);
00260 if ($addpage !== false && confirm_sesskey()) {
00261     $quiz->questions = quiz_add_page_break_at($quiz->questions, $addpage);
00262     $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00263     quiz_delete_previews($quiz);
00264     redirect($afteractionurl);
00265 }
00266 
00267 $deleteemptypage = optional_param('deleteemptypage', false, PARAM_INT);
00268 if (($deleteemptypage !== false) && confirm_sesskey()) {
00269     $quiz->questions = quiz_delete_empty_page($quiz->questions, $deleteemptypage);
00270     $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00271     quiz_delete_previews($quiz);
00272     redirect($afteractionurl);
00273 }
00274 
00275 $remove = optional_param('remove', false, PARAM_INT);
00276 if (($remove = optional_param('remove', false, PARAM_INT)) && confirm_sesskey()) {
00277     quiz_remove_question($quiz, $remove);
00278     quiz_delete_previews($quiz);
00279     quiz_update_sumgrades($quiz);
00280     redirect($afteractionurl);
00281 }
00282 
00283 if (optional_param('quizdeleteselected', false, PARAM_BOOL) &&
00284         !empty($selectedquestionids) && confirm_sesskey()) {
00285     foreach ($selectedquestionids as $questionid) {
00286         quiz_remove_question($quiz, $questionid);
00287     }
00288     quiz_delete_previews($quiz);
00289     quiz_update_sumgrades($quiz);
00290     redirect($afteractionurl);
00291 }
00292 
00293 if (optional_param('savechanges', false, PARAM_BOOL) && confirm_sesskey()) {
00294     $deletepreviews = false;
00295     $recomputesummarks = false;
00296 
00297     $oldquestions = explode(',', $quiz->questions); // the questions in the old order
00298     $questions = array(); // for questions in the new order
00299     $rawdata = (array) data_submitted();
00300     $moveonpagequestions = array();
00301     $moveselectedonpage = optional_param('moveselectedonpagetop', 0, PARAM_INT);
00302     if (!$moveselectedonpage) {
00303         $moveselectedonpage = optional_param('moveselectedonpagebottom', 0, PARAM_INT);
00304     }
00305 
00306     foreach ($rawdata as $key => $value) {
00307         if (preg_match('!^g([0-9]+)$!', $key, $matches)) {
00308             // Parse input for question -> grades
00309             $questionid = $matches[1];
00310             $quiz->grades[$questionid] = clean_param($value, PARAM_FLOAT);
00311             quiz_update_question_instance($quiz->grades[$questionid], $questionid, $quiz);
00312             $deletepreviews = true;
00313             $recomputesummarks = true;
00314 
00315         } else if (preg_match('!^o(pg)?([0-9]+)$!', $key, $matches)) {
00316             // Parse input for ordering info
00317             $questionid = $matches[2];
00318             // Make sure two questions don't overwrite each other. If we get a second
00319             // question with the same position, shift the second one along to the next gap.
00320             $value = clean_param($value, PARAM_INTEGER);
00321             while (array_key_exists($value, $questions)) {
00322                 $value++;
00323             }
00324             if ($matches[1]) {
00325                 // This is a page-break entry.
00326                 $questions[$value] = 0;
00327             } else {
00328                 $questions[$value] = $questionid;
00329             }
00330             $deletepreviews = true;
00331         }
00332     }
00333 
00334     // If ordering info was given, reorder the questions
00335     if ($questions) {
00336         ksort($questions);
00337         $questions[] = 0;
00338         $quiz->questions = implode(',', $questions);
00339         $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00340         $deletepreviews = true;
00341     }
00342 
00343     //get a list of questions to move, later to be added in the appropriate
00344     //place in the string
00345     if ($moveselectedonpage) {
00346         $questions = explode(',', $quiz->questions);
00347         $newquestions = array();
00348         //remove the questions from their original positions first
00349         foreach ($questions as $questionid) {
00350             if (!in_array($questionid, $selectedquestionids)) {
00351                 $newquestions[] = $questionid;
00352             }
00353         }
00354         $questions = $newquestions;
00355 
00356         //move to the end of the selected page
00357         $pagebreakpositions = array_keys($questions, 0);
00358         $numpages = count($pagebreakpositions);
00359 
00360         // Ensure the target page number is in range.
00361         for ($i = $moveselectedonpage; $i > $numpages; $i--) {
00362             $questions[] = 0;
00363             $pagebreakpositions[] = count($questions) - 1;
00364         }
00365         $moveselectedpos = $pagebreakpositions[$moveselectedonpage - 1];
00366 
00367         // Do the move.
00368         array_splice($questions, $moveselectedpos, 0, $selectedquestionids);
00369         $quiz->questions = implode(',', $questions);
00370 
00371         // Update the database.
00372         $DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
00373         $deletepreviews = true;
00374     }
00375 
00376     // If rescaling is required save the new maximum
00377     $maxgrade = optional_param('maxgrade', -1, PARAM_FLOAT);
00378     if ($maxgrade >= 0) {
00379         quiz_set_grade($maxgrade, $quiz);
00380     }
00381 
00382     if ($deletepreviews) {
00383         quiz_delete_previews($quiz);
00384     }
00385     if ($recomputesummarks) {
00386         quiz_update_sumgrades($quiz);
00387         quiz_update_all_attempt_sumgrades($quiz);
00388         quiz_update_all_final_grades($quiz);
00389         quiz_update_grades($quiz, 0, true);
00390     }
00391     redirect($afteractionurl);
00392 }
00393 
00394 $questionbank->process_actions($thispageurl, $cm);
00395 
00396 // End of process commands =====================================================
00397 
00398 $PAGE->requires->yui2_lib('container');
00399 $PAGE->requires->yui2_lib('dragdrop');
00400 $PAGE->requires->skip_link_to('questionbank',
00401         get_string('skipto', 'access', get_string('questionbank', 'question')));
00402 $PAGE->requires->skip_link_to('quizcontentsblock',
00403         get_string('skipto', 'access', get_string('questionsinthisquiz', 'quiz')));
00404 $PAGE->set_title($pagetitle);
00405 $PAGE->set_heading($course->fullname);
00406 $node = $PAGE->settingsnav->find('mod_quiz_edit', navigation_node::TYPE_SETTING);
00407 if ($node) {
00408     $node->make_active();
00409 }
00410 echo $OUTPUT->header();
00411 
00412 // Initialise the JavaScript.
00413 $quizeditconfig = new stdClass();
00414 $quizeditconfig->url = $thispageurl->out(true, array('qbanktool' => '0'));
00415 $quizeditconfig->dialoglisteners = array();
00416 $numberoflisteners = max(quiz_number_of_pages($quiz->questions), 1);
00417 for ($pageiter = 1; $pageiter <= $numberoflisteners; $pageiter++) {
00418     $quizeditconfig->dialoglisteners[] = 'addrandomdialoglaunch_' . $pageiter;
00419 }
00420 $PAGE->requires->data_for_js('quiz_edit_config', $quizeditconfig);
00421 $PAGE->requires->js('/question/qengine.js');
00422 $PAGE->requires->js('/mod/quiz/edit.js');
00423 $PAGE->requires->js_init_call('quiz_edit_init');
00424 
00425 // Print the tabs to switch mode.
00426 if ($quiz_reordertool) {
00427     $currenttab = 'reorder';
00428 } else {
00429     $currenttab = 'edit';
00430 }
00431 $tabs = array(array(
00432     new tabobject('edit', new moodle_url($thispageurl,
00433             array('reordertool' => 0)), get_string('editingquiz', 'quiz')),
00434     new tabobject('reorder', new moodle_url($thispageurl,
00435             array('reordertool' => 1)), get_string('orderingquiz', 'quiz')),
00436 ));
00437 print_tabs($tabs, $currenttab);
00438 
00439 if ($quiz_qbanktool) {
00440     $bankclass = '';
00441     $quizcontentsclass = '';
00442 } else {
00443     $bankclass = 'collapsed ';
00444     $quizcontentsclass = 'quizwhenbankcollapsed';
00445 }
00446 
00447 echo '<div class="questionbankwindow ' . $bankclass . 'block">';
00448 echo '<div class="header"><div class="title"><h2>';
00449 echo get_string('questionbankcontents', 'quiz') .
00450         ' <a href="' . $thispageurl->out(true, array('qbanktool' => '1')) .
00451        '" id="showbankcmd">[' . get_string('show').
00452        ']</a>
00453        <a href="' . $thispageurl->out(true, array('qbanktool' => '0')) .
00454        '" id="hidebankcmd">[' . get_string('hide').
00455        ']</a>';
00456 echo '</h2></div></div><div class="content">';
00457 
00458 echo '<span id="questionbank"></span>';
00459 echo '<div class="container">';
00460 echo '<div id="module" class="module">';
00461 echo '<div class="bd">';
00462 $questionbank->display('editq',
00463         $pagevars['qpage'],
00464         $pagevars['qperpage'],
00465         $pagevars['cat'], $pagevars['recurse'], $pagevars['showhidden'],
00466         $pagevars['qbshowtext']);
00467 echo '</div>';
00468 echo '</div>';
00469 echo '</div>';
00470 
00471 echo '</div></div>';
00472 
00473 echo '<div class="quizcontents ' . $quizcontentsclass . '" id="quizcontentsblock">';
00474 if ($quiz->shufflequestions) {
00475     $repaginatingdisabledhtml = 'disabled="disabled"';
00476     $repaginatingdisabled = true;
00477     $quiz->questions = quiz_repaginate($quiz->questions, $quiz->questionsperpage);
00478 } else {
00479     $repaginatingdisabledhtml = '';
00480     $repaginatingdisabled = false;
00481 }
00482 if ($quiz_reordertool) {
00483     echo '<div class="repaginatecommand"><button id="repaginatecommand" ' .
00484             $repaginatingdisabledhtml.'>'.
00485             get_string('repaginatecommand', 'quiz').'...</button>';
00486     echo '</div>';
00487 }
00488 
00489 if ($quiz_reordertool) {
00490     echo $OUTPUT->heading_with_help(get_string('orderingquiz', 'quiz') . ': ' . $quiz->name,
00491             'orderandpaging', 'quiz');
00492 } else {
00493     echo $OUTPUT->heading(get_string('editingquiz', 'quiz') . ': ' . $quiz->name, 2);
00494     echo $OUTPUT->help_icon('editingquiz', 'quiz', get_string('basicideasofquiz', 'quiz'));
00495 }
00496 quiz_print_status_bar($quiz);
00497 
00498 $tabindex = 0;
00499 quiz_print_grading_form($quiz, $thispageurl, $tabindex);
00500 
00501 $notifystrings = array();
00502 if ($quizhasattempts) {
00503     $reviewlink = quiz_attempt_summary_link_to_reports($quiz, $cm, $contexts->lowest());
00504     $notifystrings[] = get_string('cannoteditafterattempts', 'quiz', $reviewlink);
00505 }
00506 if ($quiz->shufflequestions) {
00507     $updateurl = new moodle_url("$CFG->wwwroot/course/mod.php",
00508             array('return' => 'true', 'update' => $quiz->cmid, 'sesskey' => sesskey()));
00509     $updatelink = '<a href="'.$updateurl->out().'">' . get_string('updatethis', '',
00510             get_string('modulename', 'quiz')) . '</a>';
00511     $notifystrings[] = get_string('shufflequestionsselected', 'quiz', $updatelink);
00512 }
00513 if (!empty($notifystrings)) {
00514     echo $OUTPUT->box('<p>' . implode('</p><p>', $notifystrings) . '</p>', 'statusdisplay');
00515 }
00516 
00517 if ($quiz_reordertool) {
00518     $perpage = array();
00519     $perpage[0] = get_string('allinone', 'quiz');
00520     for ($i = 1; $i <= 50; ++$i) {
00521         $perpage[$i] = $i;
00522     }
00523     $gostring = get_string('go');
00524     echo '<div id="repaginatedialog"><div class="hd">';
00525     echo get_string('repaginatecommand', 'quiz');
00526     echo '</div><div class="bd">';
00527     echo '<form action="edit.php" method="post">';
00528     echo '<fieldset class="invisiblefieldset">';
00529     echo html_writer::input_hidden_params($thispageurl);
00530     echo '<input type="hidden" name="sesskey" value="'.sesskey().'" />';
00531     //YUI does not submit the value of the submit button so
00532             //we need to add the value:
00533     echo '<input type="hidden" name="repaginate" value="'.$gostring.'" />';
00534     $attributes = array();
00535     $attributes['disabled'] = $repaginatingdisabledhtml ? 'disabled' : null;
00536     $select = html_writer::select(
00537             $perpage, 'questionsperpage', $quiz->questionsperpage, null, $attributes);
00538     print_string('repaginate', 'quiz', $select);
00539     echo '<div class="quizquestionlistcontrols">';
00540     echo ' <input type="submit" name="repaginate" value="'. $gostring . '" ' .
00541             $repaginatingdisabledhtml.' />';
00542     echo '</div></fieldset></form></div></div>';
00543 }
00544 
00545 if ($quiz_reordertool) {
00546     echo '<div class="reorder">';
00547 } else {
00548     echo '<div class="editq">';
00549 }
00550 
00551 quiz_print_question_list($quiz, $thispageurl, true,
00552         $quiz_reordertool, $quiz_qbanktool, $quizhasattempts, $defaultcategoryobj);
00553 echo '</div>';
00554 
00555 // Close <div class="quizcontents">:
00556 echo '</div>';
00557 
00558 if (!$quiz_reordertool) {
00559     $randomform = new quiz_add_random_form(new moodle_url('/mod/quiz/addrandom.php'), $contexts);
00560     $randomform->set_data(array(
00561         'category' => $pagevars['cat'],
00562         'returnurl' => str_replace($CFG->wwwroot, '', $thispageurl->out(false)),
00563         'cmid' => $cm->id,
00564     ));
00565     ?>
00566     <div id="randomquestiondialog">
00567     <div class="hd"><?php print_string('addrandomquestiontoquiz', 'quiz', $quiz->name); ?>
00568     <span id="pagenumber"><!-- JavaScript will insert the page number here. -->
00569     </span>
00570     </div>
00571     <div class="bd"><?php
00572     $randomform->display();
00573     ?></div>
00574     </div>
00575     <?php
00576 }
00577 echo $OUTPUT->footer();
 All Data Structures Namespaces Files Functions Variables Enumerations