ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilQTIRenderChoice.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 define("SHUFFLE_NO", "0");
25 define("SHUFFLE_YES", "1");
26 
36 {
37  public $shuffle;
38  public $minnumber;
39  public $maxnumber;
41  public $material;
42 
43  public function __construct()
44  {
45  $this->shuffle = SHUFFLE_NO;
46  $this->minnumber = null;
47  $this->maxnumber = null;
48  $this->response_labels = array();
49  $this->material = array();
50  }
51 
52  public function setShuffle($a_shuffle)
53  {
54  switch (strtolower($a_shuffle)) {
55  case "0":
56  case "no":
57  $this->shuffle = SHUFFLE_NO;
58  break;
59  case "1":
60  case "yes":
61  $this->shuffle = SHUFFLE_YES;
62  break;
63  }
64  }
65 
66  public function getShuffle()
67  {
68  return $this->shuffle;
69  }
70 
71  public function setMinnumber($a_minnumber)
72  {
73  $this->minnumber = $a_minnumber;
74  }
75 
76  public function getMinnumber()
77  {
78  return $this->minnumber;
79  }
80 
81  public function setMaxnumber($a_maxnumber)
82  {
83  $this->maxnumber = $a_maxnumber;
84  }
85 
86  public function getMaxnumber()
87  {
88  return $this->maxnumber;
89  }
90 
91  public function addResponseLabel($a_response_label)
92  {
93  array_push($this->response_labels, $a_response_label);
94  }
95 
96  public function addMaterial($a_material)
97  {
98  array_push($this->material, $a_material);
99  }
100 }
const SHUFFLE_NO
Create styles array
The data for the language used.
const SHUFFLE_YES
addResponseLabel($a_response_label)