ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilAssQuestionSolutionComparisonExpression.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4
12{
16 protected $db;
17
21 private $questionId;
22
26 private $skillBaseId;
27
31 private $skillTrefId;
32
36 private $orderIndex;
37
41 private $expression;
42
46 private $points;
47
51 public function __construct()
52 {
53 $this->questionId = null;
54 $this->skillBaseId = null;
55 $this->skillTrefId = null;
56 $this->orderIndex = null;
57 $this->expression = null;
58 $this->points = null;
59 }
60
61 public function save()
62 {
63 $this->db->replace('qpl_qst_skl_sol_expr',
64 array(
65 'question_fi' => array('integer', $this->getQuestionId()),
66 'skill_base_fi' => array('integer', $this->getSkillBaseId()),
67 'skill_tref_fi' => array('integer', $this->getSkillTrefId()),
68 'order_index' => array('integer', $this->getOrderIndex())
69 ),
70 array(
71 'expression' => array('text', $this->getExpression()),
72 'points' => array('integer', $this->getPoints())
73 )
74 );
75 }
76
80 public function getDb()
81 {
82 return $this->db;
83 }
84
88 public function setDb($db)
89 {
90 $this->db = $db;
91 }
92
96 public function getQuestionId()
97 {
98 return $this->questionId;
99 }
100
104 public function setQuestionId($questionId)
105 {
106 $this->questionId = $questionId;
107 }
108
112 public function getSkillBaseId()
113 {
114 return $this->skillBaseId;
115 }
116
121 {
122 $this->skillBaseId = $skillBaseId;
123 }
124
128 public function getSkillTrefId()
129 {
130 return $this->skillTrefId;
131 }
132
137 {
138 $this->skillTrefId = $skillTrefId;
139 }
140
144 public function getOrderIndex()
145 {
146 return $this->orderIndex;
147 }
148
152 public function setOrderIndex($orderIndex)
153 {
154 $this->orderIndex = $orderIndex;
155 }
156
160 public function getExpression()
161 {
162 return $this->expression;
163 }
164
168 public function setExpression($expression)
169 {
170 $this->expression = $expression;
171 }
172
176 public function getPoints()
177 {
178 return $this->points;
179 }
180
184 public function setPoints($points)
185 {
186 $this->points = $points;
187 }
188
193 {
194 $this->setQuestionId($data['question_fi']);
195 $this->setSkillBaseId($data['skill_base_fi']);
196 $this->setSkillTrefId($data['skill_tref_fi']);
197
198 $this->setOrderIndex($data['order_index']);
199 $this->setExpression($data['expression']);
200 $this->setPoints($data['points']);
201 }
202}
$data