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 
4 require_once './Modules/Test/classes/inc.AssessmentConstants.php';
5 
14 class ASS_Mark {
23 
32 
40  var $minimum_level = 0;
41 
49  var $passed;
50 
61  public function __construct(
62  $short_name = "",
63  $official_name = "",
64  $minimum_level = 0,
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() {
111  return $this->official_name;
112  }
113 
123  function getMinimumLevel() {
124  return $this->minimum_level;
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 
162  function setOfficialName($official_name = "") {
163  $this->official_name = $official_name;
164  }
165 
175  function setMinimumLevel($minimum_level)
176  {
177  $minimum_level = (float) $minimum_level;
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 }
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.