MDL-20636 Fix @package names in question/behaviour, question/engine and question...
[moodle.git] / question / type / missingtype / question.php
CommitLineData
d1b7e03d
TH
1<?php
2
3// This file is part of Moodle - http://moodle.org/
4//
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.
9//
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.
14//
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/>.
17
18
19/**
20 * Defines the 'qtype_missingtype' question definition class.
21 *
22 * @package qtype_missingtype
23 * @copyright 2009 The Open University
24 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25 */
26
27
28/**
29 * This question definition class is used when the actual question type of this
30 * question cannot be found.
31 *
32 * Why does this this class implement question_automatically_gradable? I am not
33 * sure at the moment. Perhaps it is important for it to work with as many
34 * behaviours as possible.
35 *
36 * @copyright 2009 The Open University
37 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
38 */
39class qtype_missingtype_question extends question_definition implements question_automatically_gradable {
40 public function get_expected_data() {
41 return array();
42 }
43
44 public function get_correct_response() {
45 return array();
46 }
47
48 public function is_complete_response(array $response) {
49 return false;
50 }
51
52 public function is_gradable_response(array $response) {
53 return false;
54 }
55
56 public function get_validation_error(array $response) {
57 return '';
58 }
59
60 public function is_same_response(array $prevresponse, array $newresponse) {
61 return true;
62 }
63
64 public function get_right_answer_summary() {
65 return '';
66 }
67
68 public function summarise_response(array $response) {
69 return null;
70 }
71
72 public function classify_response(array $response) {
73 return array();
74 }
75
76 public function init_first_step(question_attempt_step $step) {
77 }
78
79 public function grade_response(array $response) {
80 throw new Exception('This question is of a type that is not installed on your system. No processing is possible.');
81 }
82
83 public function get_hint($hintnumber, question_attempt $qa) {
84 return null;
85 }
86}