3 // This file is part of Moodle - http://moodle.org/
5 // Moodle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
10 // Moodle is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
19 * Drag-and-drop words into sentences question definition class.
23 * @copyright 2009 The Open University
24 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28 defined('MOODLE_INTERNAL') ||
die();
30 require_once($CFG->dirroot
. '/question/type/gapselect/questionbase.php');
34 * Represents a drag-and-drop words into sentences question.
36 * @copyright 2009 The Open University
37 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39 class qtype_ddwtos_question
extends qtype_gapselect_question_base
{
40 // Is actually exactly the same.
45 * Represents one of the choices (draggable boxes).
47 * @copyright 2009 The Open University
48 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
50 class qtype_ddwtos_choice
{
55 public function __construct($text, $draggroup = 1, $isinfinite = false) {
57 $this->draggroup
= $draggroup;
58 $this->isinfinite
= $isinfinite;
60 public function choice_group() {
61 return $this->draggroup
;