ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.assMark.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4require_once './Modules/Test/classes/inc.AssessmentConstants.php';
5
14class ASS_Mark {
23
32
41
50
61 function ASS_Mark(
62 $short_name = "",
63 $official_name = "",
65 $passed = 0
66 )
67 {
68 $this->setShortName($short_name);
69 $this->setOfficialName($official_name);
70 $this->setMinimumLevel($minimum_level);
71 $this->setPassed($passed);
72 }
73
83 function getShortName() {
84 return $this->short_name;
85 }
86
96 function getPassed()
97 {
98 return $this->passed;
99 }
100
110 function getOfficialName() {
112 }
113
123 function getMinimumLevel() {
125 }
126
136 function setShortName($short_name = "") {
137 $this->short_name = $short_name;
138 }
139
149 function setPassed($passed = 0) {
150 $this->passed = $passed;
151 }
152
163 $this->official_name = $official_name;
164 }
165
176 {
178 /*
179 * Due to a defect in import, non-numeric levels get casted
180 * to zero using the above statement. Accordingly, no exception
181 * is thrown. @todo Get this clean.
182 if (!is_numeric($minimum_level))
183 {
184 throw new Exception ('Markstep: minimum level must be numeric.');
185 }
186 else
187 */
188 if (($minimum_level >= 0) && ($minimum_level <= 100))
189 {
190 $this->minimum_level = $minimum_level;
191 }
192 else
193 {
194 throw new Exception ('Markstep: minimum level must be between 0 and 100');
195 }
196 }
197}
A class defining marks for assessment test objects.
getOfficialName()
Returns the official name of the mark.
setMinimumLevel($minimum_level)
Sets the minimum level reaching the mark.
ASS_Mark( $short_name="", $official_name="", $minimum_level=0, $passed=0)
ASS_Mark constructor.
setPassed($passed=0)
Sets the passed status the mark.
setShortName($short_name="")
Sets the short name of the mark.
getMinimumLevel()
Returns the minimum level reaching the mark.
getPassed()
Returns passed status of the mark.
setOfficialName($official_name="")
Sets the official name of the mark.
getShortName()
Returns the short name of the mark.