ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 public function __construct(
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 if (($minimum_level >= 0) && ($minimum_level <= 100))
180 {
181 $this->minimum_level = $minimum_level;
182 }
183 else
184 {
185 throw new Exception ('Markstep: minimum level must be between 0 and 100');
186 }
187 }
188}
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.