ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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
15{
24
33
41 public $minimum_level = 0;
42
50 public $passed;
51
62 public function __construct(
63 $short_name = "",
64 $official_name = "",
66 $passed = 0
67 ) {
71 $this->setPassed($passed);
72 }
73
83 public function getShortName()
84 {
85 return $this->short_name;
86 }
87
97 public function getPassed()
98 {
99 return $this->passed;
100 }
101
111 public function getOfficialName()
112 {
114 }
115
125 public function getMinimumLevel()
126 {
128 }
129
139 public function setShortName($short_name = "")
140 {
141 $this->short_name = $short_name;
142 }
143
153 public function setPassed($passed = 0)
154 {
155 $this->passed = $passed;
156 }
157
167 public function setOfficialName($official_name = "")
168 {
169 $this->official_name = $official_name;
170 }
171
182 {
184
185 if (($minimum_level >= 0) && ($minimum_level <= 100)) {
186 $this->minimum_level = $minimum_level;
187 } else {
188 throw new Exception('Markstep: minimum level must be between 0 and 100');
189 }
190 }
191}
A class defining marks for assessment test objects.
__construct( $short_name="", $official_name="", $minimum_level=0, $passed=0)
ASS_Mark constructor.
getOfficialName()
Returns the official name of the mark.
setMinimumLevel($minimum_level)
Sets the minimum level reaching the mark.
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.
An exception for terminatinating execution or to throw for unit testing.