ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
4 require_once './Modules/Test/classes/inc.AssessmentConstants.php';
5 
14 class ASS_Mark
15 {
23  public $short_name;
24 
33 
41  public $minimum_level = 0;
42 
50  public $passed;
51 
62  public function __construct(
63  $short_name = "",
64  $official_name = "",
65  $minimum_level = 0,
66  $passed = 0
67  ) {
68  $this->setShortName($short_name);
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  {
113  return $this->official_name;
114  }
115 
125  public function getMinimumLevel()
126  {
127  return $this->minimum_level;
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  {
183  $minimum_level = (float) $minimum_level;
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 }
setOfficialName($official_name="")
Sets the official name of the mark.
__construct( $short_name="", $official_name="", $minimum_level=0, $passed=0)
ASS_Mark constructor.
getShortName()
Returns the short name of the mark.
A class defining marks for assessment test objects.
setPassed($passed=0)
Sets the passed status the mark.
getMinimumLevel()
Returns the minimum level reaching the mark.
setShortName($short_name="")
Sets the short name of the mark.
getOfficialName()
Returns the official name of the mark.
setMinimumLevel($minimum_level)
Sets the minimum level reaching the mark.
getPassed()
Returns passed status of the mark.