/**
* Strings for component 'qformat_aiken', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_aiken
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage aiken
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['aiken'] = 'Aiken format';
/**
* Strings for component 'qformat_blackboard', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_blackboard
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage blackboard
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['blackboard'] = 'Blackboard';
/**
* Strings for component 'qformat_blackboard_six', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_blackboard_six
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage blackboard_six
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['blackboard_six'] = 'Blackboard V6+';
/**
* Strings for component 'qformat_examview', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_examview
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage examview
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['examview'] = 'Examview';
/**
* Strings for component 'qformat_gift', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_gift
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage gift
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['nohandler'] = 'No handler for question type {$a}';
/**
* Unit tests for the Moodle GIFT format.
*
- * @package qformat_xml
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage gift
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir . '/questionlib.php');
/**
* Strings for component 'qformat_learnwise', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_learnwise
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage learnwise
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['learnwise'] = 'Learnwise format';
/**
* Strings for component 'qformat_missingword', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_missingword
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage missingword
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['missingword'] = 'Missing word format';
/**
* Embedded answer (Cloze) question importer.
*
- * @package qformat
- * @subpackage qformat_multianswer
- * @copyright 2003 Henrik Kaipe
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage multianswer
+ * @copyright 2003 Henrik Kaipe
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* Importer that imports a text file containing a single Multianswer question
* from a text file.
*
- * @copyright 2003 Henrik Kaipe
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2003 Henrik Kaipe
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qformat_multianswer extends qformat_default {
/**
* Strings for component 'qformat_multianswer', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_multianswer
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage multianswer
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['multianswer'] = 'Embedded answers (Cloze)';
/**
* Strings for component 'qformat_qti_two', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_qti_two
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage qti_two
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['qti_two'] = 'IMS QTI 2.0 format';
* @param int courseid
* @return array containing filenames
* @calledfrom type/<typename>/editquestion.php
- * @package questionbank
- * @subpackage importexport
*/
-function get_course_media_files($courseid)
-{
+function get_course_media_files($courseid) {
// this code lifted from mod/quiz/question.php and modified
throw new coding_exception('qti_two not converted to new fil api yet, sorry');
/*global $CFG;
/**
* Strings for component 'qformat_webct', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_webct
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage webct
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['webct'] = 'WebCT format';
/**
* Strings for component 'qformat_xhtml', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_xhtml
- * @copyright 2010 Helen Foster
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage xhtml
+ * @copyright 2010 Helen Foster
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['xhtml'] = 'XHTML format';
/**
* Code for exporting questions as Moodle XML.
*
- * @package qformat
+ * @package qformat
* @subpackage xml
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* See http://docs.moodle.org/en/Moodle_XML_format for a description of the format.
*
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qformat_xml extends qformat_default {
/**
* Strings for component 'qformat_xml', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qformat_xml
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage xml
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['invalidxml'] = 'Invalid XML file - string expected (use CDATA?)';
/**
* Unit tests for the Moodle XML format.
*
- * @package qformat_xml
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qformat
+ * @subpackage xml
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir . '/questionlib.php');
/**
* Unit tests for the matching question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qformat_xml_test extends UnitTestCase {
public function assert_same_xml($expectedxml, $xml) {
* than in the database.
*
* @package moodlecore
- * @subpackage questionbank
+ * @subpackage questionengine
* @copyright Alex Smith {@link http://maths.york.ac.uk/serving_maths} and
* numerous contributors.
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Strings for component 'qtype_calculated', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_calculated
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage calculated
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingcalculated'] = 'Adding a calculated question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage calculated
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for calculated questions.
*/
function qtype_calculated_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $CFG;
/**
* Strings for component 'qtype_calculatedmulti', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_calculatedmulti
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage calculatedmulti
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingcalculatedmulti'] = 'Adding a Calculated multichoice question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage calculatedmulti
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for calculated multiple-choice questions.
*/
function qtype_calculatedmulti_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $DB, $CFG;
/**
* Strings for component 'qtype_calculatedsimple', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_calculatedsimple
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage calculatedsimple
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingcalculatedsimple'] = 'Adding a Simple calculated question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage calculatedsimple
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for simple calculated questions.
*/
function qtype_calculatedsimple_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $CFG;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Defines the editing form for the drag-and-drop words into sentences question type.
*
- * @package qtype_ddwtos
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/gapselect/edit_form_base.php');
/**
* Drag-and-drop words into sentences editing form definition.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_edit_form extends qtype_gapselect_edit_form_base {
function qtype() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
- * Language strings for the select missing words question type.
*
- * @package qtype
- * @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-
$string['addingddwtos'] = 'Adding drag and drop: words in text';
$string['addmorechoiceblanks'] = 'Blanks for {no} More Choices';
$string['answer'] = 'Answer';
/**
* Drag-and-drop words into sentences question definition class.
*
- * @package qtype_ddwtos
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/type/gapselect/questionbase.php');
/**
* Represents a drag-and-drop words into sentences question.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_question extends qtype_gapselect_question_base {
-//is actually exactly the same.
+ // Is actually exactly the same.
}
/**
* Represents one of the choices (draggable boxes).
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_choice {
public $text;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Question type class for the drag-and-drop words into sentences question type.
*
- * @package qtype_ddwtos
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->dirroot . '/question/engine/lib.php');
require_once($CFG->dirroot . '/question/format/xml/format.php');
-
require_once($CFG->dirroot . '/question/type/gapselect/questiontypebase.php');
+
/**
* The drag-and-drop words into sentences question type class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos extends qtype_gapselect_base {
protected function choice_group_key(){
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Drag-and-drop words into sentences question renderer class.
*
- * @package qtype_ddwtos
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/gapselect/rendererbase.php');
/**
* Generates the output for drag-and-drop words into sentences questions.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_renderer extends qtype_elements_embedded_in_question_text_renderer {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Test helpers for the drag-and-drop words into sentences question type.
+ *
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
/**
* Test helper class for the drag-and-drop words into sentences question type.
*
- * @package qtype_ddwtos
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_test_helper {
/**
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the drag-and-drop words into sentences question definition class.
*
- * @package qtype_ddwtos
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php');
/**
* Unit tests for the matching question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_question_test extends UnitTestCase {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the drag-and-drop words into sentences question definition class.
*
- * @package qtype_ddwtos
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Unit tests for the drag-and-drop words into sentences question definition class.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_ddwtos_test extends UnitTestCase {
/** @var qtype_ddwtos instance of the question type class to test. */
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
- * This file contains tests that walks a question through the interactive
- * behaviour.
+ * Unit tests for the drag-and-drop words into sentences question type.
*
- * @package qtype_ddwtos
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage ddwtos
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/type/ddwtos/simpletest/helper.php');
+/**
+ * Unit tests for the drag-and-drop words into sentences question type.
+ *
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class qtype_ddwtos_walkthrough_test extends qbehaviour_walkthrough_test_base {
protected function get_contains_drop_box_expectation($place, $group, $readonly, $stateclass = '0') {
/**
* Strings for component 'qtype_description', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_description
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage description
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingdescription'] = 'Adding a description';
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Description 'question' definition class.
*
- * @package qtype_description
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage description
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Represents a description 'question'.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_description_question extends question_information_item {
}
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Question type class for the description 'question' type.
*
- * @package qtype
+ * @package qtype
* @subpackage description
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->libdir . '/questionlib.php');
+
/**
* The description 'question' type.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_description extends question_type {
public function is_real_question_type() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Description 'question' renderer class.
*
- * @package qtype_description
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage description
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Generates the output for description 'question's.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_description_renderer extends qtype_renderer {
public function formulation_and_controls(question_attempt $qa,
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the description question type class.
*
- * @package qtype_description
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage description
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/description/questiontype.php');
+
/**
* Unit tests for the description question type class.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_description_test extends UnitTestCase {
var $qtype;
/**
* A base class for question editing forms.
*
- * @package core
+ * @package moodlecore
* @subpackage questiontypes
* @copyright 2006 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* class that inherits from this one, and implements the definition_inner()
* method.
*
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
abstract class question_edit_form extends moodleform {
const DEFAULT_NUM_HINTS = 2;
/**
* Strings for component 'qtype_essay', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_essay
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage essay
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingessay'] = 'Adding an Essay question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage essay
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for essay questions.
*/
function qtype_essay_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $CFG;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Essay question definition class.
*
- * @package qtype_essay
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage essay
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Represents an essay question.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_essay_question extends question_with_responses {
public function make_behaviour(question_attempt $qa, $preferredbehaviour) {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Essay question renderer class.
*
- * @package qtype_essay
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage essay
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Generates the output for essay questions.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_essay_renderer extends qtype_renderer {
public function formulation_and_controls(question_attempt $qa,
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the essay question definition class.
*
- * @package qtype_essay
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage essay
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
/**
* Unit tests for the matching question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_essay_question_test extends UnitTestCase {
public function test_get_question_summary() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the essay question type class.
*
- * @package qtype_essay
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage essay
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/essay/questiontype.php');
+
/**
* Unit tests for the essay question type class.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_essay_test extends UnitTestCase {
var $qtype;
/**
* Base class for editing question types like this one.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Elements embedded in question text editing form definition.
*
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect_edit_form_base extends question_edit_form {
const MAX_GROUPS = 8;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Defines the editing form for the select missing words question type.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/gapselect/edit_form_base.php');
/**
* Select from drop down list question editing form definition.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect_edit_form extends qtype_gapselect_edit_form_base {
// HTML tags allowed in answers (choices).
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Language strings for the sdrag-and-drop words into sentences question type.
*
- * @package qtype
- * @subpackage ddwtos
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage gapselect
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-
$string['addinggapselect'] = 'Adding a select missing words question';
$string['addmorechoiceblanks'] = 'Blanks for {no} more choices';
$string['answer'] = 'Answer';
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Select from drop down list question definition class.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/gapselect/questionbase.php');
+
/**
* Represents select missing words question.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect_question extends qtype_gapselect_question_base {
//is actually exactly the same.
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Definition class for embedded element in question text question. Parent of
* gap-select, drag and drop and possibly others.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* Represents embedded element in question text question. Parent of drag and drop and select from
* drop down list and ?others?
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_gapselect_question_base extends question_graded_automatically_with_countback {
/** @var boolean Whether the question stems should be shuffled. */
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Question type class for the select missing words question type.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->libdir . '/questionlib.php');
require_once($CFG->dirroot . '/question/engine/lib.php');
require_once($CFG->dirroot . '/question/format/xml/format.php');
-
require_once($CFG->dirroot . '/question/type/gapselect/questiontypebase.php');
+
/**
* The select missing words question type class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect extends qtype_gapselect_base {
protected function choice_options_to_feedback($choice) {
/**
* Question type class for the embedded element in question text question types.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* The embedded element in question text question type class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_gapselect_base extends question_type {
/**
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Select from drop down list question renderer class.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/gapselect/rendererbase.php');
/**
* Generates the output for select missing words questions.
*
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect_renderer extends qtype_elements_embedded_in_question_text_renderer {
protected function embedded_element(question_attempt $qa, $place, question_display_options $options) {
/**
* Base class for rendering question types like this one.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* Generates the output for question types where the question includes embedded interactive elements in the
* question text.
*
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_elements_embedded_in_question_text_renderer extends qtype_with_combined_feedback_renderer {
public function formulation_and_controls(question_attempt $qa,
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Contains the helper class for the select missing words question type tests.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Test helper class for the select missing words question type.
*
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect_test_helper {
/**
/**
* Unit tests for the select missing words question definition class.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
/**
- * Unit tests for the matching question definition class.
+ * Unit tests for the select missing words question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect_question_test extends UnitTestCase {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the select missing words question question definition class.
*
- * @package qtype_gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage gapselect
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Unit tests for the select missing words question definition class.
*
- * @package qtype
- * @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapselect_test extends UnitTestCase {
/** @var qtype_gapselect instance of the question type class to test. */
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* This file contains tests that walks a question through the interactive
* behaviour.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/type/gapselect/simpletest/helper.php');
+/**
+ * Unit tests for the gap-select question type.
+ *
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class qtype_gapselect_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_interactive_behaviour() {
/**
* Version information for the select missing words question type.
*
- * @package qtype
+ * @package qtype
* @subpackage gapselect
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$plugin->version = 2011020100;
/**
* Strings for component 'qtype_match', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_match
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage match
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingmatch'] = 'Adding a Matching question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage match
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for matching questions.
*/
function qtype_match_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $DB, $CFG;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Matching question renderer class.
*
- * @package qtype_match
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage match
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Generates the output for matching questions.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_match_renderer extends qtype_with_combined_feedback_renderer {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the matching question definition classes.
*
- * @package qtype_match
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage match
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
/**
* Unit tests for the matching question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_match_question_test extends UnitTestCase {
/**
* Unit tests for the matching question definition class.
*
- * @package qtype_match
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage match
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Unit tests for the matching question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_match_test extends UnitTestCase {
/** @var qtype_match instance of the question type class to test. */
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* This file contains tests that walks a question through the interactive
* behaviour.
*
- * @package qtype_ddwtos
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage match
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
+/**
+ * Unit tests for the matching question type.
+ *
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class qtype_match_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_deferred_feedback_unanswered() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Defines the editing form for the 'missingtype' question type.
*
- * @package qtype
+ * @package qtype
* @subpackage missingtype
- * @copyright 2007 Jamie Pratt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 Jamie Pratt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* This question renderer class is used when the actual question type of this
* question cannot be found.
*
- * @copyright 2007 Jamie Pratt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 Jamie Pratt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_missingtype_edit_form extends question_edit_form {
public function __construct($submiturl, $question, $category, $contexts, $formeditable = true) {
/**
* Strings for component 'qtype_missingtype', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_missingtype
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage missingtype
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-
$string['addingmissingtype'] = 'Adding a question of a type that is not installed on this system';
$string['answerno'] = 'Answer {$a}';
$string['cannotchangeamissingqtype'] = 'You cannot make any changes to a question of a missing type.';
/**
* Defines the 'qtype_missingtype' question definition class.
*
- * @package qtype_missingtype
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage missingtype
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* sure at the moment. Perhaps it is important for it to work with as many
* behaviours as possible.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_missingtype_question extends question_definition implements question_automatically_gradable {
public function get_expected_data() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Question type class for the 'missingtype' type.
*
- * @package qtype_missingtype
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage missingtype
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* we use this question type class instead so that some of the information about
* this question can be seen, and the rest of the system keeps working.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_missingtype extends question_type {
public function menu_name() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Defines the 'missingtype' question renderer class.
*
- * @package qtype_missingtype
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage missingtype
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* This question renderer class is used when the actual question type of this
* question cannot be found.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_missingtype_renderer extends qtype_renderer {
}
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* This file contains tests for the 'missing' question type.
*
- * @package qtype_missing
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage missingtype
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../behaviour/deferredfeedback/behaviour.php');
require_once(dirname(__FILE__) . '/../question.php');
+
+/**
+ * Unit tests for the 'missing' question type.
+ *
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class qtype_missing_test extends UnitTestCase {
protected function get_unknown_questiondata() {
/**
* Strings for component 'qtype_multianswer', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_multianswer
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage multianswer
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingmultianswer'] = 'Adding an Embedded answers (Cloze) question';
/**
* Strings for component 'qtype_multichoice', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_multichoice
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage multichoice
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingmultichoice'] = 'Adding a Multiple choice question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage multichoice
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for multiple choice questions.
*/
function qtype_multichoice_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $CFG;
/**
* Multiple choice question definition classes.
*
- * @package qtype_multichoice
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage multichoice
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* Base class for multiple choice questions. The parts that are common to
* single select and multiple select.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_multichoice_base extends question_graded_automatically {
const LAYOUT_DROPDOWN = 0;
/**
* Represents a multiple choice question where only one choice should be selected.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice_single_question extends qtype_multichoice_base {
public function get_renderer() {
/**
* Represents a multiple choice question where multiple choices can be selected.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice_multi_question extends qtype_multichoice_base {
public function get_renderer() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* The questiontype class for the multiple choice question type.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
/**
* The multiple choice question type.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice extends question_type {
public function get_question_options($question) {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Multiple choice question renderer classes.
*
- * @package qtype_multichoice
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage multichoice
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* Base class for generating the bits of output common to multiple choice
* single and multiple questions.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_multichoice_renderer_base extends qtype_with_combined_feedback_renderer {
abstract protected function get_input_type();
* Subclass for generating the bits of output specific to multiple choice
* single questions.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice_single_renderer extends qtype_multichoice_renderer_base {
protected function get_input_type() {
* Subclass for generating the bits of output specific to multiple choice
* multi=select questions.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice_multi_renderer extends qtype_multichoice_renderer_base {
protected function get_input_type() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the multiple choice question definition classes.
*
- * @package qtype_multichoice
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage multichoice
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
/**
* Unit tests for the multiple choice, multiple response question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice_single_question_test extends UnitTestCase {
/**
* Unit tests for the multiple choice, single response question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice_multi_question_test extends UnitTestCase {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the mulitple choice question definition class.
*
- * @package qtype_multichoice
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage multichoice
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/multichoice/questiontype.php');
+
/**
* Unit tests for the multiple choice question definition class.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_multichoice_test extends UnitTestCase {
var $qtype;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* This file contains tests that walk mutichoice questions through various behaviours.
*
* tests. (Search for test_question_maker::make_a_multichoice.) This file only
* contains a few additional tests for problems that were found during testing.
*
- * @package qtype_multichoice
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage multichoice
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/engine/lib.php');
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
+
+/**
+ * Unit tests for the mutiple choice question type.
+ *
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class qtype_multichoice_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_deferredfeedback_feedback_multichoice_single() {
/**
* Strings for component 'qtype_numerical', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_numerical
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage numerical
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingnumerical'] = 'Adding a Numerical question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage numerical
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for numerical questions.
*/
function qtype_numerical_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $CFG;
/**
* Numerical question definition class.
*
- * @package qtype_numerical
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage numerical
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/type/numerical/questiontype.php');
/**
* Represents a numerical question.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_numerical_question extends question_graded_by_strategy
implements question_response_answer_comparer {
* Subclass of {@link question_answer} with the extra information required by
* the numerical question type.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_numerical_answer extends question_answer {
/** @var float allowable margin of error. */
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
- * @author Martin Dougiamas and many others. Tim Hunt.
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
- * @subpackage questiontypes
+ * @package qtype
+ * @subpackage numerical
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once("$CFG->dirroot/question/type/shortanswer/questiontype.php");
+
/**
* NUMERICAL QUESTION TYPE CLASS
*
*
* This question type behaves like shortanswer in most cases.
* Therefore, it extends the shortanswer question type...
- * @package questionbank
- * @subpackage questiontypes
+ *
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_numerical_qtype extends qtype_shortanswer {
/**
* Page for editing the configuration of a particular Opaque engine.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Form definition class.
*
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_engine_edit_form extends moodleform {
public function definition() {
/**
* Defines the editing form for the Opaque question type.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* class that inherits from this one, and implements the definition_inner()
* method.
*
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_edit_form extends question_edit_form {
function definition() {
/**
* Page for editing the configuration of a particular Opaque engine.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* This page lets admins manage the list of known remote Opaque engines.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Serves files from the Opaque resource cache.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2007 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Library routines used by the Opaque question type.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Manages loading and saving question engine definitions to and from the database.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_engine_manager {
/**
return '';
}
+
/**
* This class caches the resources belonging a particular question.
*
* There are synchronisation issues if two students are doing the same question at the same time.
+ *
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_resource_cache {
protected $folder; // Path to the folder where resources for this question are cached.
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Opaque question definition class.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Represents an Opaque question.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_question extends question_definition {
/** @var integer the ID of the question engine that serves this question. */
/**
* The Opaque question type.
*
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque extends question_type {
/** @var qtype_opaque_engine_manager */
/**
* Opaque question renderer class.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Generates the output for Opaque questions.
*
- * // TODO if we delete this class, does it cause any errors?
- *
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_renderer extends qtype_renderer {
}
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for (some of) ../locallib.php.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page.
}
require_once($CFG->dirroot . '/mod/quiz/locallib.php');
+
/**
* Unit tests for (some of) ../locallib.php.
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_locallib_test extends UnitTestCase {
function test_is_same_engine() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the opaque question type class.
*
- * @package qtype_opaque
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage opaque
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/format/xml/format.php');
+/**
+ * Mock {@link qtype_opaque_engine_manager} for use in tests.
+ *
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class qtype_opaque_engine_manager_mock extends qtype_opaque_engine_manager {
protected $knownengines = array();
/**
* Unit tests for the opaque question type class.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_opaque_test extends UnitTestCase {
var $qtype;
/**
* Page for testing that Moodle can connect to a particular Opaque engine.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once(dirname(__FILE__) . '/../../../config.php');
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Version information for the Opaque question type.
*
- * @package qtype
+ * @package qtype
* @subpackage opaque
- * @copyright 2006 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2006 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
$plugin->version = 2011011400;
$plugin->requires = 2011011200;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Editing form for the OU multiple response question type class.
*
- * @package qtype_oumultiresponse
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Editing form for the oumultiresponse question type.
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_oumultiresponse_edit_form extends question_edit_form {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* OU multiple response question type language strings.
*
- * @package qtype_oumultiresponse
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-
$string['addingoumultiresponse'] = 'Adding an OU multiple response question';
$string['choices'] = 'Available choices';
$string['correctanswer'] = 'Correct';
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* OU multiple response question definition class.
*
- * @package qtype_oumultiresponse
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Represents an OU multiple response question.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_oumultiresponse_question extends qtype_multichoice_multi_question
implements question_automatically_gradable_with_countback {
/**
* OU multiple response question type class.
*
- * @package qtype_oumultiresponse
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* 2. The correct answer is just indicated on the editing form by a indicating
* which choices are correct. There is no complex but flexible scoring system.
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_oumultiresponse extends question_type {
public function has_html_answers() {
* An extension of {@link question_hint_with_parts} for oumultirespone questions
* with an extra option for whether to show the feedback for each choice.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_oumultiresponse_hint extends question_hint_with_parts {
/** @var boolean whether to show the feedback for each choice. */
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+/**
+ * Test helper code for the OU multiple response question type.
+ *
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
/**
* Test helper class for the OU multiple response question type.
*
- * @package qtype_oumultiresponse
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_oumultiresponse_test_helper {
/**
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the OU multiple response question class.
*
- * @package qtype_oumultiresponse
+ * @package qtype
+ * @subpackage oumultiresponse
* @copyright 2008 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Unit tests for (some of) question/type/oumultiresponse/questiontype.php.
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_oumultiresponse_question_test extends UnitTestCase {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the OU multiple response question type class.
*
- * @package qtype_oumultiresponse
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Unit tests for (some of) question/type/oumultiresponse/questiontype.php.
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-
class qtype_oumultiresponse_test extends UnitTestCase {
/**
* @var qtype_oumultiresponse
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* This file contains tests that walks a OU multiple response question through
* various interaction models.
*
- * @package qtype_oumultiresponse
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/type/oumultiresponse/simpletest/helper.php');
+/**
+ * Unit tests ofr the OU multiple response question type.
+ *
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class qtype_oumultiresponse_walkthrough_test extends qbehaviour_walkthrough_test_base {
public function test_interactive_behaviour() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* OU multiple response question type version file.
*
- * @package qtype_oumultiresponse
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage oumultiresponse
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-
$plugin->version = 2011011800;
$plugin->requires = 2011011200;
* more specific classes {@link question_with_responses},
* {@link question_graded_automatically} or {@link question_information_item}.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class question_definition {
/** @var integer id of the question in the datase, or null if this question
* This class represents a 'question' that actually does not allow the student
* to respond, like the description 'question' type.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_information_item extends question_definition {
public function __construct() {
* Interface that a {@link question_definition} must implement to be usable by
* the manual graded behaviour.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
interface question_manually_gradable {
/**
* This class is used in the return value from
* {@link question_manually_gradable::classify_response()}.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_classified_response {
/**
* Interface that a {@link question_definition} must implement to be usable by
* the various automatic grading behaviours.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
interface question_automatically_gradable extends question_manually_gradable {
/**
* Interface that a {@link question_definition} must implement to be usable by
* the interactivecountback behaviour.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
interface question_automatically_gradable_with_countback extends question_automatically_gradable {
/**
* This class represents a real question. That is, one that is not a
* {@link question_information_item}.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class question_with_responses extends question_definition
implements question_manually_gradable {
/**
* This class represents a question that can be graded automatically.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class question_graded_automatically extends question_with_responses
implements question_automatically_gradable {
* This class represents a question that can be graded automatically with
* countback grading in interactive mode.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class question_graded_automatically_with_countback
extends question_graded_automatically
* This class represents a question that can be graded automatically by using
* a {@link question_grading_strategy}.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class question_graded_by_strategy extends question_graded_automatically {
/** @var question_grading_strategy the strategy to use for grading. */
* Class to represent a question answer, loaded from the question_answers table
* in the database.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_answer {
/** @var integer the answer id. */
* Class to represent a hint associated with a question.
* Used by iteractive mode, etc. A question has an array of these.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_hint {
/** @var integer The hint id. */
* choice with multile answers, where there are options for whether to show the
* number of parts right at each stage, and to reset the wrong parts.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_hint_with_parts extends question_hint {
/** @var boolean option to show the number of sub-parts of the question that were right. */
* This question_grading_strategy interface. Used to share grading code between
* questions that that subclass {@link question_graded_by_strategy}.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
interface question_grading_strategy {
/**
* implement if it is to be graded by the
* {@link question_first_matching_answer_grading_strategy}.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
interface question_response_answer_comparer {
/** @return array of {@link question_answers}. */
* that matches the given response. It returns the first answer with fraction 1.0
* when asked for the correct answer.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_first_matching_answer_grading_strategy implements question_grading_strategy {
/**
/**
* The default questiontype class.
*
- * @author Martin Dougiamas and many others. This has recently been completely
- * rewritten by Alex Smith, Julian Sedding and Gustav Delius as part of
- * the Serving Mathematics project
- * {@link http://maths.york.ac.uk/serving_maths}
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- * @package questionbank
+ * @package moodlecore
* @subpackage questiontypes
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* interface to meet their needs, rather the freeze the API prematurely and
* condem everyone to working round a clunky interface for ever afterwards.
*
- * @package questionbank
- * @subpackage questiontypes
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_type {
protected $fileoptions = array(
* This class is used in the return value from
* {@link question_type::get_possible_responses()}.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_possible_response {
/**
/**
* Question type class for the random question type.
*
- * @package qtype_random
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage random
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
* renderers. When you load a question of this type, it actually loads a
* question chosen randomly from a particular category in the question bank.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_random extends question_type {
/** @var string comma-separated list of qytpe names not to select, can be used in SQL. */
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the random question type class.
*
- * @package qtype_random
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage random
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/random/questiontype.php');
+
/**
* Unit tests for the random question type class.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_random_test extends UnitTestCase {
var $qtype;
/**
* Strings for component 'qtype_randomsamatch', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_randomsamatch
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage randomsamatch
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingrandomsamatch'] = 'Adding a Random short-answer matching question';
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Defines the renderer base classes for question types.
*
- * @package moodlecore
+ * @package moodlecore
* @subpackage questiontypes
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Renderer base classes for question types.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_renderer extends plugin_renderer_base {
/**
/**
* Renderer base classes for question types.
*
- * @copyright 2010 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2010 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class qtype_with_combined_feedback_renderer extends qtype_renderer {
protected function combined_feedback(question_attempt $qa) {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-defined('MOODLE_INTERNAL') || die();
-
/**
* Defines the editing form for the shortanswer question type.
*
- * @package qtype_shortanswer
- * @copyright 2007 Jamie Pratt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage shortanswer
+ * @copyright 2007 Jamie Pratt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
+defined('MOODLE_INTERNAL') || die();
+
+
/**
* Short answer question editing form definition.
*
- * @copyright 2007 Jamie Pratt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 Jamie Pratt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_shortanswer_edit_form extends question_edit_form {
/**
/**
* Strings for component 'qtype_shortanswer', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_shortanswer
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage shortanswer
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingshortanswer'] = 'Adding a short answer question';
/**
* Serve question type files
*
- * @since 2.0
- * @package questionbank
- * @subpackage questiontypes
- * @author Dongsheng Cai <dongsheng@moodle.com>
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage shortanswer
+ * @copyright Dongsheng Cai <dongsheng@moodle.com>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for short answer questions.
*/
function qtype_shortanswer_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $DB, $CFG;
/**
* Short answer question definition class.
*
- * @package qtype_shortanswer
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage shortanswer
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Represents a short answer question.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_shortanswer_question extends question_graded_by_strategy
implements question_response_answer_comparer {
/**
* Question type class for the short answer question type.
*
- * @package qtype_shortanswer
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage shortanswer
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* The short answer question type.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_shortanswer extends question_type {
public function extra_question_fields() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Short answer question renderer class.
*
- * @package qtype_shortanswer
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage shortanswer
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Generates the output for short answer questions.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_shortanswer_renderer extends qtype_renderer {
public function formulation_and_controls(question_attempt $qa,
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the short answer question definition class.
*
- * @package qtype_shortanswer
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage shortanswer
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/shortanswer/question.php');
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
+
/**
* Unit tests for the short answer question definition class.
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_shortanswer_question_test extends UnitTestCase {
public function test_compare_string_with_wildcard() {
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the shortanswer question type class.
*
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
if (!defined('MOODLE_INTERNAL')) {
die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
}
require_once($CFG->dirroot . '/question/type/shortanswer/questiontype.php');
+
/**
* Unit tests for the shortanswer question type class.
*
- * @copyright 2007 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_shortanswer_test extends UnitTestCase {
public static $includecoverage = array('question/type/questiontype.php', 'question/type/shortanswer/questiontype.php');
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* Unit tests for the question definition base classes.
*
- * @package moodlecore
+ * @package moodlecore
* @subpackage questiontypes
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+
require_once($CFG->dirroot . '/question/type/questiontype.php');
+/**
+ * Unit tests for the question definition base classes.
+ *
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
class test_response_answer_comparer implements question_response_answer_comparer {
protected $answers = array();
/**
* Unit tests for the question type base class.
*
- * @package moodlecore
+ * @package moodlecore
* @subpackage questiontypes
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Tests for some of ../questionbase.php
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class question_type_test extends UnitTestCase {
public static $includecoverage = array('question/type/questiontype.php');
/**
* True-false question editing form definition.
*
- * @copyright 2007 Jamie Pratt
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 Jamie Pratt
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_truefalse_edit_form extends question_edit_form {
/**
/**
* Strings for component 'qtype_truefalse', language 'en', branch 'MOODLE_20_STABLE'
*
- * @package qtype_truefalse
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage truefalse
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
$string['addingtruefalse'] = 'Adding a True/False question';
/**
* Serve question type files
*
- * @since 2.0
- * @package qtype
- * @subpackage qtype_truefalse
- * @copyright The Open Unviersity
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @since 2.0
+ * @package qtype
+ * @subpackage truefalse
+ * @copyright 2010 The Open Unviersity
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+
+/**
+ * Checks file access for true-false questions.
*/
function qtype_truefalse_pluginfile($course, $cm, $context, $filearea, $args, $forcedownload) {
global $CFG;
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
-
/**
* True-false question definition class.
*
- * @package qtype_truefalse
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage truefalse
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Represents a true-false question.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_truefalse_question extends question_graded_automatically {
public $rightanswer;
/**
* Question type class for the true-false question type.
*
- * @package qtype_truefalse
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage truefalse
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* The true-false question type class.
*
- * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_truefalse extends question_type {
public function save_question_options($question) {
/**
* True-false question renderer class.
*
- * @package qtype_truefalse
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage truefalse
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
* Generates the output for true-false questions.
*
- * @copyright 2009 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2009 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_truefalse_renderer extends qtype_renderer {
public function formulation_and_controls(question_attempt $qa,
/**
* Unit tests for the true-false question definition class.
*
- * @package qtype_truefalse
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage truefalse
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/engine/simpletest/helpers.php');
/**
* Unit tests for the true-false question definition class.
*
- * @copyright 2008 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2008 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_truefalse_question_test extends UnitTestCase {
public function test_is_complete_response() {
/**
* Unit tests for the true-false question definition class.
*
- * @package qtype_truefalse
- * @copyright 2007 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package qtype
+ * @subpackage truefalse
+ * @copyright 2007 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once($CFG->dirroot . '/question/type/shortanswer/questiontype.php');
/**
* Unit tests for the true-false question definition class.
*
- * @copyright 2007 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @copyright 2007 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_truefalse_test extends UnitTestCase {
protected $qtype;