ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ASS_AnswerOrdering Class Reference

Class for ordering question answers. More...

+ Inheritance diagram for ASS_AnswerOrdering:
+ Collaboration diagram for ASS_AnswerOrdering:

Public Member Functions

 ASS_AnswerOrdering ($answertext="", $random_id=0, $depth=0)
 ASS_AnswerOrdering constructor.
 getRandomID ()
 Returns the random ID of the answer.
 setRandomID ($random_id=0)
 Sets the random ID of the answer.
 getAdditionalOrderingFieldsByRandomId ($a_random_id)
 setAnswerId ($a_answer_id)
 getAnswerId ()
 setOrderingDepth ($a_ordering_depth)
 getOrderingDepth ()
- Public Member Functions inherited from ASS_AnswerSimple
 __construct ($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

 $answer_id = 0
 $ordering_depth = 0

Protected Attributes

 $random_id
- Protected Attributes inherited from ASS_AnswerSimple
 $answertext
 $points
 $order
 $id

Detailed Description

Class for ordering question answers.

ASS_AnswerOrdering is a class for ordering question answers used in ordering 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.assAnswerOrdering.php 46529 2013-12-02 09:09:24Z mbecker
See Also
ASS_AnswerSimple

Definition at line 17 of file class.assAnswerOrdering.php.

Member Function Documentation

ASS_AnswerOrdering::ASS_AnswerOrdering (   $answertext = "",
  $random_id = 0,
  $depth = 0 
)

ASS_AnswerOrdering constructor.

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

Parameters
string$answertextA string defining the answer text
integer$random_idA random ID public

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

References ASS_AnswerSimple\$answertext, $random_id, ASS_AnswerSimple\__construct(), setOrderingDepth(), and setRandomID().

+ Here is the call graph for this function:

ASS_AnswerOrdering::getAdditionalOrderingFieldsByRandomId (   $a_random_id)

Definition at line 71 of file class.assAnswerOrdering.php.

References $ilDB, $res, $row, setAnswerId(), and setOrderingDepth().

{
global $ilDB;
$res = $ilDB->queryF('SELECT * FROM qpl_a_ordering WHERE random_id = %s',
array('integer'), array($a_random_id));
while($row = $ilDB->fetchAssoc($res))
{
$this->setAnswerId($row['answer_id']);
$this->setOrderingDepth($row['depth']);
}
}

+ Here is the call graph for this function:

ASS_AnswerOrdering::getAnswerId ( )

Definition at line 89 of file class.assAnswerOrdering.php.

References $answer_id.

{
}
ASS_AnswerOrdering::getOrderingDepth ( )

Definition at line 98 of file class.assAnswerOrdering.php.

References $ordering_depth.

{
}
ASS_AnswerOrdering::getRandomID ( )

Returns the random ID of the answer.

Returns
integer Random ID
See Also
$random_id

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

References $random_id.

{
}
ASS_AnswerOrdering::setAnswerId (   $a_answer_id)

Definition at line 85 of file class.assAnswerOrdering.php.

Referenced by getAdditionalOrderingFieldsByRandomId().

{
$this->answer_id = $a_answer_id;
}

+ Here is the caller graph for this function:

ASS_AnswerOrdering::setOrderingDepth (   $a_ordering_depth)

Definition at line 94 of file class.assAnswerOrdering.php.

Referenced by ASS_AnswerOrdering(), and getAdditionalOrderingFieldsByRandomId().

{
$this->ordering_depth = (int)$a_ordering_depth;
}

+ Here is the caller graph for this function:

ASS_AnswerOrdering::setRandomID (   $random_id = 0)

Sets the random ID of the answer.

Parameters
integer$random_idA random integer value
See Also
$random_id

Definition at line 66 of file class.assAnswerOrdering.php.

References $random_id.

Referenced by ASS_AnswerOrdering().

{
$this->random_id = $random_id;
}

+ Here is the caller graph for this function:

Field Documentation

ASS_AnswerOrdering::$answer_id = 0

Definition at line 25 of file class.assAnswerOrdering.php.

Referenced by getAnswerId().

ASS_AnswerOrdering::$ordering_depth = 0

Definition at line 26 of file class.assAnswerOrdering.php.

Referenced by getOrderingDepth().

ASS_AnswerOrdering::$random_id
protected

Definition at line 23 of file class.assAnswerOrdering.php.

Referenced by ASS_AnswerOrdering(), getRandomID(), and setRandomID().


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