ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ASS_Mark Class Reference

A class defining marks for assessment test objects. More...

+ Collaboration diagram for ASS_Mark:

Public Member Functions

 ASS_Mark ( $short_name="", $official_name="", $minimum_level=0, $passed=0)
 ASS_Mark constructor. More...
 
 getShortName ()
 Returns the short name of the mark. More...
 
 getPassed ()
 Returns passed status of the mark. More...
 
 getOfficialName ()
 Returns the official name of the mark. More...
 
 getMinimumLevel ()
 Returns the minimum level reaching the mark. More...
 
 setShortName ($short_name="")
 Sets the short name of the mark. More...
 
 setPassed ($passed=0)
 Sets the passed status the mark. More...
 
 setOfficialName ($official_name="")
 Sets the official name of the mark. More...
 
 setMinimumLevel ($minimum_level)
 Sets the minimum level reaching the mark. More...
 

Data Fields

 $short_name
 
 $official_name
 
 $minimum_level = 0
 
 $passed
 

Detailed Description

A class defining marks for assessment test objects.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 14 of file class.assMark.php.

Member Function Documentation

◆ ASS_Mark()

ASS_Mark::ASS_Mark (   $short_name = "",
  $official_name = "",
  $minimum_level = 0,
  $passed = 0 
)

ASS_Mark constructor.

The constructor takes possible arguments an creates an instance of the ASS_Mark object.

Parameters
string$short_nameThe short name of the mark
string$official_nameThe official name of the mark
double$minimum_levelThe minimum percentage level reaching the mark public

Definition at line 61 of file class.assMark.php.

References setMinimumLevel(), setOfficialName(), setPassed(), and setShortName().

67  {
68  $this->setShortName($short_name);
71  $this->setPassed($passed);
72  }
setOfficialName($official_name="")
Sets the official name of the mark.
setPassed($passed=0)
Sets the passed status the mark.
setShortName($short_name="")
Sets the short name of the mark.
setMinimumLevel($minimum_level)
Sets the minimum level reaching the mark.
+ Here is the call graph for this function:

◆ getMinimumLevel()

ASS_Mark::getMinimumLevel ( )

Returns the minimum level reaching the mark.

Returns the minimum level reaching the mark

Returns
double The minimum level reaching the mark public
See also
$minimum_level

Definition at line 123 of file class.assMark.php.

References $minimum_level.

123  {
124  return $this->minimum_level;
125  }

◆ getOfficialName()

ASS_Mark::getOfficialName ( )

Returns the official name of the mark.

Returns the official name of the mark

Returns
string The official name of the mark public
See also
$official_name

Definition at line 110 of file class.assMark.php.

References $official_name.

110  {
111  return $this->official_name;
112  }

◆ getPassed()

ASS_Mark::getPassed ( )

Returns passed status of the mark.

Returns the passed status of the mark

Returns
string The passed status of the mark public
See also
$passed

Definition at line 96 of file class.assMark.php.

References $passed.

97  {
98  return $this->passed;
99  }

◆ getShortName()

ASS_Mark::getShortName ( )

Returns the short name of the mark.

Returns the short name of the mark

Returns
string The short name of the mark public
See also
$short_name

Definition at line 83 of file class.assMark.php.

References $short_name.

83  {
84  return $this->short_name;
85  }

◆ setMinimumLevel()

ASS_Mark::setMinimumLevel (   $minimum_level)

Sets the minimum level reaching the mark.

Sets the minimum level reaching the mark

Parameters
string$minimum_levelThe minimum level reaching the mark public
See also
$minimum_level

Definition at line 175 of file class.assMark.php.

References $minimum_level.

Referenced by ASS_Mark().

176  {
177  $minimum_level = (float) $minimum_level;
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  }
+ Here is the caller graph for this function:

◆ setOfficialName()

ASS_Mark::setOfficialName (   $official_name = "")

Sets the official name of the mark.

Sets the official name of the mark

Parameters
string$official_nameThe official name of the mark public
See also
$official_name

Definition at line 162 of file class.assMark.php.

References $official_name.

Referenced by ASS_Mark().

162  {
163  $this->official_name = $official_name;
164  }
+ Here is the caller graph for this function:

◆ setPassed()

ASS_Mark::setPassed (   $passed = 0)

Sets the passed status the mark.

Sets the passed status of the mark

Parameters
integer$passedThe passed status of the mark public
See also
$passed

Definition at line 149 of file class.assMark.php.

References $passed.

Referenced by ASS_Mark().

149  {
150  $this->passed = $passed;
151  }
+ Here is the caller graph for this function:

◆ setShortName()

ASS_Mark::setShortName (   $short_name = "")

Sets the short name of the mark.

Sets the short name of the mark

Parameters
string$short_nameThe short name of the mark public
See also
$short_name

Definition at line 136 of file class.assMark.php.

References $short_name.

Referenced by ASS_Mark().

136  {
137  $this->short_name = $short_name;
138  }
+ Here is the caller graph for this function:

Field Documentation

◆ $minimum_level

ASS_Mark::$minimum_level = 0

Definition at line 40 of file class.assMark.php.

Referenced by getMinimumLevel(), and setMinimumLevel().

◆ $official_name

ASS_Mark::$official_name

Definition at line 31 of file class.assMark.php.

Referenced by getOfficialName(), and setOfficialName().

◆ $passed

ASS_Mark::$passed

Definition at line 49 of file class.assMark.php.

Referenced by getPassed(), and setPassed().

◆ $short_name

ASS_Mark::$short_name

Definition at line 22 of file class.assMark.php.

Referenced by getShortName(), and setShortName().


The documentation for this class was generated from the following file: