ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
assAnswerCloze Class Reference

Class for cloze question numeric answers. More...

+ Inheritance diagram for assAnswerCloze:
+ Collaboration diagram for assAnswerCloze:

Public Member Functions

 assAnswerCloze ($answertext="", $points=0.0, $order=0)
 assAnswerCloze constructor
 setLowerBound ($bound)
 setUpperBound ($bound)
 getLowerBound ()
 getUpperBound ()
- Public Member Functions inherited from ASS_AnswerSimple
 ASS_AnswerSimple ($answertext="", $points=0.0, $order=0, $id=-1)
 ASS_AnswerSimple constructor.
 getId ()
 Gets the answer id.
 getAnswertext ()
 Gets the answer text.
 getPoints ()
 Gets the points.
 checkPoints ($a_points)
 Checks, if the point value is numeric.
 getOrder ()
 Gets the sort/display order.
 setOrder ($order=0)
 Sets the order.
 setId ($id=-1)
 Sets the answer id.
 setAnswertext ($answertext="")
 Sets the answer text.
 setPoints ($points=0.0)
 Sets the points.

Data Fields

 $lowerBound
 $upperBound
- Data Fields inherited from ASS_AnswerSimple
 $answertext
 $points
 $order
 $id

Detailed Description

Class for cloze question numeric answers.

assAnswerCloze is a class for cloze questions numeric answers.

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.assAnswerCloze.php 24763 2010-07-21 09:01:16Z mwarkus
See Also
ASS_AnswerBinaryState

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

Member Function Documentation

assAnswerCloze::assAnswerCloze (   $answertext = "",
  $points = 0.0,
  $order = 0 
)

assAnswerCloze constructor

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

Parameters
string$answertextA string defining the answer text
double$pointsThe number of points given for the selected answer
integer$orderA nonnegative value representing a possible display or sort order public

Definition at line 69 of file class.assAnswerCloze.php.

References ASS_AnswerSimple\$answertext, ASS_AnswerSimple\$order, ASS_AnswerSimple\$points, and ASS_AnswerSimple\ASS_AnswerSimple().

{
$this->lowerBound = NULL;
$this->upperBound = NULL;
}

+ Here is the call graph for this function:

assAnswerCloze::getLowerBound ( )

Definition at line 90 of file class.assAnswerCloze.php.

References $lowerBound.

{
}
assAnswerCloze::getUpperBound ( )

Definition at line 95 of file class.assAnswerCloze.php.

References $upperBound.

{
}
assAnswerCloze::setLowerBound (   $bound)

Definition at line 76 of file class.assAnswerCloze.php.

References ASS_AnswerSimple\getAnswertext().

{
$bound = str_replace(",", ".", $bound);
if ($bound > $this->getAnswertext() || strlen($bound) == 0) $bound = $this->getAnswertext();
$this->lowerBound = is_numeric($bound) ? $bound : $this->getAnswertext();
}

+ Here is the call graph for this function:

assAnswerCloze::setUpperBound (   $bound)

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

References ASS_AnswerSimple\getAnswertext().

{
$bound = str_replace(",", ".", $bound);
if ($bound < $this->getAnswertext() || strlen($bound) == 0) $bound = $this->getAnswertext();
$this->upperBound = is_numeric($bound) ? $bound : $this->getAnswertext();
}

+ Here is the call graph for this function:

Field Documentation

assAnswerCloze::$lowerBound

Definition at line 47 of file class.assAnswerCloze.php.

Referenced by getLowerBound().

assAnswerCloze::$upperBound

Definition at line 57 of file class.assAnswerCloze.php.

Referenced by getUpperBound().


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