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