ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.assAnswerMatching.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
5
16{
24 public $points;
25
34
42 public $term_id;
43
52
64 public function __construct(
65 $points = 0.0,
66 $term_id = 0,
69 ) {
70 $this->term_id = $term_id;
71 $this->picture_or_definition = $picture_or_definition;
72 $this->picture_or_definition_id = $picture_or_definition_id;
73 $this->points = $points;
74 }
75
84 public function getPoints()
85 {
86 return $this->points;
87 }
88
97 public function getTermId()
98 {
99 return $this->term_id;
100 }
101
110 public function getPicture()
111 {
113 }
114
123 public function getDefinition()
124 {
126 }
127
136 public function getPictureId()
137 {
139 }
140
149 public function getDefinitionId()
150 {
152 }
153
163 public function setTermId($term_id = 0)
164 {
165 if ($term_id >= 0) {
166 $this->term_id = $term_id;
167 }
168 }
169
179 public function setPictureId($picture_id = 0)
180 {
181 if ($picture_id >= 0) {
182 $this->picture_or_definition_id = $picture_id;
183 }
184 }
185
195 public function setDefinitionId($definition_id = 0)
196 {
197 if ($definition_id >= 0) {
198 $this->picture_or_definition_id = $definition_id;
199 }
200 }
201
211 public function setPicture($picture = "")
212 {
213 $this->picture_or_definition = $picture;
214 }
215
225 public function setDefinition($definition = "")
226 {
227 $this->picture_or_definition = $definition;
228 }
229
230
240 public function setPoints($points = 0.0)
241 {
242 $this->points = $points;
243 }
244}
Class for matching question answers.
__construct( $points=0.0, $term_id=0, $picture_or_definition="", $picture_or_definition_id=0)
ASS_AnswerMatching constructor.
setPoints($points=0.0)
Sets the points.
getTermId()
Gets the term id.
setDefinition($definition="")
Sets the definition.
getPictureId()
Gets the picture identifier.
getPicture()
Gets the picture.
getPoints()
Gets the points.
setPictureId($picture_id=0)
Sets the picture id.
setDefinitionId($definition_id=0)
Sets the definition id.
getDefinition()
Gets the definition.
setTermId($term_id=0)
Sets the term id.
getDefinitionId()
Gets the definition identifier.
setPicture($picture="")
Sets the picture.
An exception for terminatinating execution or to throw for unit testing.