/
questiontype.php
53 lines (45 loc) · 1.42 KB
/
questiontype.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
// Boolean Question Type
// (C) Binghamton University 2011
//
// author: Kyle Temkin <ktemkin@binghamton.edu>
//
// Modified from Moodle Core Code
///////////////////
/// BOOLEAN ///
///////////////////
/// QUESTION TYPE CLASS //////////////////
///
/// This class contains some special features in order to make the
/// question type embeddable within a multianswer (cloze) question
///
/**
* @package qtype_boolean
* @copyright 2011 Binghamton University
* @author Kyle Temkin <ktemkin@binghamton.edu>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
#require_once("$CFG->dirroot/question/type/questiontype.php");
require_once($CFG->dirroot.'/question/type/shortanswer/questiontype.php');
require_once("$CFG->dirroot/question/type/boolean/LogicExpression.class.php");
require_once("$CFG->dirroot/question/type/boolean/LogicSchematic.class.php");
/**
* Defines the Boolean question type,
*/
class qtype_boolean extends qtype_shortanswer
{
/**
* Returns a list of the class fields which should be stored to the database.
*/
function extra_question_fields()
{
return array('question_boolean', 'answers', 'gate_limit', 'limitgates', 'freeinverters', 'answerform', 'inputmethod');
}
/**
* Returns the name of the database column which stores the question's unique ID number.
*/
function questionid_column_name()
{
return 'question';
}
}