ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
assNumericRange Class Reference

Class for numeric ranges of questions. More...

+ Collaboration diagram for assNumericRange:

Public Member Functions

 assNumericRange ($lowerlimit=0.0, $upperlimit=0.0, $points=0.0, $order=0)
 assNumericRange constructor
 getLowerLimit ()
 Get the lower limit.
 getUpperLimit ()
 Get the upper limit.
 getPoints ()
 Get the points.
 getOrder ()
 Get the order of the range.
 setLowerLimit ($limit)
 Set the lower limit.
 setUpperLimit ($limit)
 Set the upper limit.
 setPoints ($points)
 Set the points.
 setOrder ($order)
 Set the order.
 contains ($value)
 Checks for a given value within the range.

Data Fields

 $lowerlimit
 $upperlimit
 $points
 $order

Detailed Description

Class for numeric ranges of questions.

assNumericRange is a class for numeric ranges of questions

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:
class.assNumericRange.php 22616 2009-12-21 11:15:35Z hschottm
See Also
assNumeric

Definition at line 37 of file class.assNumericRange.php.

Member Function Documentation

assNumericRange::assNumericRange (   $lowerlimit = 0.0,
  $upperlimit = 0.0,
  $points = 0.0,
  $order = 0 
)

assNumericRange constructor

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

Parameters
double$lowerlimitThe lower limit of the range
double$upperlimitThe upper limit of the range
double$pointsThe number of points given for the correct range
integer$orderA nonnegative value representing a possible display or sort order public

Definition at line 87 of file class.assNumericRange.php.

References $lowerlimit, $order, $points, and $upperlimit.

{
$this->lowerlimit = $lowerlimit;
$this->upperlimit = $upperlimit;
$this->points = $points;
$this->order = $order;
}
assNumericRange::contains (   $value)

Checks for a given value within the range.

Checks for a given value within the range

Parameters
double$valueThe value to check
Returns
boolean TRUE if the value is in the range, FALSE otherwise public
See Also
$upperlimit
$lowerlimit

Definition at line 216 of file class.assNumericRange.php.

References $result.

{
include_once "./Services/Math/classes/class.EvalMath.php";
$eval = new EvalMath();
$eval->suppress_errors = TRUE;
$result = $eval->e($value);
if (($result === FALSE) || ($result === TRUE)) return FALSE;
if (($result >= $eval->e($this->lowerlimit)) && ($result <= $eval->e($this->upperlimit)))
{
return TRUE;
}
else
{
return FALSE;
}
}
assNumericRange::getLowerLimit ( )

Get the lower limit.

Returns the lower limit of the range

Returns
double The lower limit public
See Also
$lowerlimit

Definition at line 109 of file class.assNumericRange.php.

References $lowerlimit.

{
}
assNumericRange::getOrder ( )

Get the order of the range.

Returns the order of the range

Returns
integer order public
See Also
$order

Definition at line 148 of file class.assNumericRange.php.

References $order.

{
return $this->order;
}
assNumericRange::getPoints ( )

Get the points.

Returns the points of the range

Returns
double The points public
See Also
$points

Definition at line 135 of file class.assNumericRange.php.

References $points.

{
return $this->points;
}
assNumericRange::getUpperLimit ( )

Get the upper limit.

Returns the upper limit of the range

Returns
double The upper limit public
See Also
$upperlimit

Definition at line 122 of file class.assNumericRange.php.

References $upperlimit.

{
}
assNumericRange::setLowerLimit (   $limit)

Set the lower limit.

Sets the lower limit of the range

Parameters
double$limitThe lower limit public
See Also
$lowerlimit

Definition at line 161 of file class.assNumericRange.php.

{
$this->lowerlimit = $limit;
}
assNumericRange::setOrder (   $order)

Set the order.

Sets the order of the range

Parameters
integer$orderThe order public
See Also
$order

Definition at line 200 of file class.assNumericRange.php.

References $order.

{
$this->order = $order;
}
assNumericRange::setPoints (   $points)

Set the points.

Sets the points of the range

Parameters
double$pointsThe points public
See Also
$points

Definition at line 187 of file class.assNumericRange.php.

References $points.

{
$this->points = $points;
}
assNumericRange::setUpperLimit (   $limit)

Set the upper limit.

Sets the upper limit of the range

Parameters
double$limitThe upper limit public
See Also
$upperlimit

Definition at line 174 of file class.assNumericRange.php.

{
$this->upperlimit = $limit;
}

Field Documentation

assNumericRange::$lowerlimit

Definition at line 46 of file class.assNumericRange.php.

Referenced by assNumericRange(), and getLowerLimit().

assNumericRange::$order

Definition at line 73 of file class.assNumericRange.php.

Referenced by assNumericRange(), getOrder(), and setOrder().

assNumericRange::$points

Definition at line 64 of file class.assNumericRange.php.

Referenced by assNumericRange(), getPoints(), and setPoints().

assNumericRange::$upperlimit

Definition at line 55 of file class.assNumericRange.php.

Referenced by assNumericRange(), and getUpperLimit().


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