ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ASS_AnswerMultipleResponseImage Class Reference

ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked, set/unset) and an image file. More...

+ Inheritance diagram for ASS_AnswerMultipleResponseImage:
+ Collaboration diagram for ASS_AnswerMultipleResponseImage:

Public Member Functions

 __construct (string $answertext='', float $points=0.0, int $order=0, int $id=-1, int $state=0)
 ASS_AnswerMultipleResponse constructor. More...
 
 getImage ()
 
 setImage (?string $image=null)
 
 hasImage ()
 
- Public Member Functions inherited from ASS_AnswerMultipleResponse
 __construct (string $answertext="", float $points=0.0, int $order=0, int $id=-1, int $state=0)
 ASS_AnswerMultipleResponse constructor. More...
 
 getPointsUnchecked ()
 Returns the points for an unchecked answer. More...
 
 setPointsUnchecked ($points_unchecked=0.0)
 Sets the points for an unchecked answer. More...
 
 setPointsChecked ($points_checked)
 
 getPointsChecked ()
 
- Public Member Functions inherited from ASS_AnswerSimple
 __construct ($answertext="", $points=0.0, $order=0, $id=-1)
 ASS_AnswerSimple constructor. More...
 
 getId ()
 Gets the answer id. More...
 
 getAnswertext ()
 Gets the answer text. More...
 
 getPoints ()
 Gets the points. More...
 
 checkPoints ($a_points)
 Checks, if the point value is numeric. More...
 
 getOrder ()
 Gets the sort/display order. More...
 
 setOrder ($order=0)
 Sets the order. More...
 
 setId ($id=-1)
 Sets the answer id. More...
 
 setAnswertext ($answertext="")
 Sets the answer text. More...
 
 setPoints ($points=0.0)
 Sets the points. More...
 

Data Fields

string $image = null
 
- Data Fields inherited from ASS_AnswerMultipleResponse
 $points_unchecked
 

Additional Inherited Members

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

Detailed Description

ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked, set/unset) and an image file.

ASS_AnswerBinaryStateImage is a class for answers with a binary state indicator (checked/unchecked, set/unset) and an image file

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$ \
See also
ASS_AnswerSimple

Definition at line 33 of file class.assAnswerMultipleResponseImage.php.

Constructor & Destructor Documentation

◆ __construct()

ASS_AnswerMultipleResponseImage::__construct ( string  $answertext = '',
float  $points = 0.0,
int  $order = 0,
int  $id = -1,
int  $state = 0 
)

ASS_AnswerMultipleResponse constructor.

The constructor takes possible arguments an creates an instance of the ASS_AnswerMultipleResponse 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
double$points_uncheckedThe points when the answer is not checked
string$a_imageThe image filename
integer$idThe database id of the answer public

Definition at line 50 of file class.assAnswerMultipleResponseImage.php.

References ASS_AnswerSimple\$answertext, ASS_AnswerSimple\$id, ASS_AnswerSimple\$order, ASS_AnswerSimple\$points, and ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ getImage()

ASS_AnswerMultipleResponseImage::getImage ( )

Definition at line 60 of file class.assAnswerMultipleResponseImage.php.

References $image.

60  : ?string
61  {
62  return $this->image;
63  }

◆ hasImage()

ASS_AnswerMultipleResponseImage::hasImage ( )

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

References null.

73  : bool
74  {
75  return $this->image !== null;
76  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null

◆ setImage()

ASS_AnswerMultipleResponseImage::setImage ( ?string  $image = null)

Definition at line 65 of file class.assAnswerMultipleResponseImage.php.

References $image.

65  : void
66  {
67  if ($image === '') {
68  throw new \Exception('imagename must not be empty');
69  }
70  $this->image = $image;
71  }

Field Documentation

◆ $image

string ASS_AnswerMultipleResponseImage::$image = null

Definition at line 35 of file class.assAnswerMultipleResponseImage.php.

Referenced by getImage(), and setImage().


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