Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
00025
00037 class assNumericRange
00038 {
00046 var $lowerlimit;
00047
00055 var $upperlimit;
00056
00064 var $points;
00065
00073 var $order;
00074
00075
00087 function assNumericRange (
00088 $lowerlimit = 0.0,
00089 $upperlimit = 0.0,
00090 $points = 0.0,
00091 $order = 0
00092 )
00093 {
00094 $this->lowerlimit = $lowerlimit;
00095 $this->upperlimit = $upperlimit;
00096 $this->points = $points;
00097 $this->order = $order;
00098 }
00099
00100
00109 function getLowerLimit()
00110 {
00111 return $this->lowerlimit;
00112 }
00113
00123 function getUpperLimit()
00124 {
00125 return $this->upperlimit;
00126 }
00127
00136 function getPoints()
00137 {
00138 return $this->points;
00139 }
00140
00149 function getOrder()
00150 {
00151 return $this->order;
00152 }
00153
00162 function setLowerLimit($limit)
00163 {
00164 $this->lowerlimit = $limit;
00165 }
00166
00175 function setUpperLimit($limit)
00176 {
00177 $this->upperlimit = $limit;
00178 }
00179
00189 function setPoints($points)
00190 {
00191 $this->points = $points;
00192 }
00193
00202 function setOrder($order)
00203 {
00204 $this->order = $order;
00205 }
00206
00218 function contains($value)
00219 {
00220 include_once "./Services/Math/classes/class.EvalMath.php";
00221 $eval = new EvalMath();
00222 $eval->suppress_errors = TRUE;
00223 $result = $eval->e($value);
00224 if (($result === FALSE) || ($result === TRUE)) return FALSE;
00225 if (($result >= $eval->e($this->lowerlimit)) && ($result <= $eval->e($this->upperlimit)))
00226 {
00227 return TRUE;
00228 }
00229 else
00230 {
00231 return FALSE;
00232 }
00233 }
00234 }
00235
00236 ?>