Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/admin/tool/qeupgradehelper/extracttestcase_form.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 
00027 defined('MOODLE_INTERNAL') || die();
00028 
00029 require_once($CFG->libdir . '/formslib.php');
00030 
00031 
00037 class tool_qeupgradehelper_extract_options_form extends moodleform {
00038     public function definition() {
00039         $mform = $this->_form;
00040 
00041         $behaviour = array(
00042             'deferredfeedback' => 'Deferred feedback',
00043             'adaptive' => 'Adaptive',
00044             'adaptivenopenalty' => 'Adaptive (no penalties)',
00045         );
00046 
00047         $qtypes = get_plugin_list('qtype');
00048         foreach ($qtypes as $qtype => $notused) {
00049             $qtypes[$qtype] = get_string($qtype, 'qtype_' . $qtype);
00050         }
00051 
00052         $mform->addElement('header', 'h1', 'Either extract a specific question_session');
00053         $mform->addElement('text', 'attemptid', 'Quiz attempt id', array('size' => '10'));
00054         $mform->addElement('text', 'questionid', 'Question id', array('size' => '10'));
00055         $mform->addElement('header', 'h2', 'Or find and extract an example by type');
00056         $mform->addElement('select', 'behaviour', 'Behaviour', $behaviour);
00057         $mform->addElement('text', 'statehistory', 'State history', array('size' => '10'));
00058         $mform->addElement('select', 'qtype', 'Question type', $qtypes);
00059         $mform->addElement('text', 'extratests', 'Extra conditions', array('size' => '50'));
00060         $this->add_action_buttons(false, 'Create test case');
00061     }
00062 }
 All Data Structures Namespaces Files Functions Variables Enumerations