ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ASS_AnswerMatching Class Reference

Class for matching question answers. More...

+ Collaboration diagram for ASS_AnswerMatching:

Public Member Functions

 __construct ( $points=0.0, $term_id=0, $picture_or_definition="", $picture_or_definition_id=0)
 ASS_AnswerMatching constructor. More...
 
 getPoints ()
 Gets the points. More...
 
 getTermId ()
 Gets the term id. More...
 
 getPicture ()
 Gets the picture. More...
 
 getDefinition ()
 Gets the definition. More...
 
 getPictureId ()
 Gets the picture identifier. More...
 
 getDefinitionId ()
 Gets the definition identifier. More...
 
 setTermId ($term_id=0)
 Sets the term id. More...
 
 setPictureId ($picture_id=0)
 Sets the picture id. More...
 
 setDefinitionId ($definition_id=0)
 Sets the definition id. More...
 
 setPicture ($picture="")
 Sets the picture. More...
 
 setDefinition ($definition="")
 Sets the definition. More...
 
 setPoints ($points=0.0)
 Sets the points. More...
 

Data Fields

 $points
 
 $picture_or_definition
 
 $term_id
 
 $picture_or_definition_id
 

Detailed Description

Class for matching question answers.

ASS_AnswerSimple is a class for matching question 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$

Definition at line 15 of file class.assAnswerMatching.php.

Constructor & Destructor Documentation

◆ __construct()

ASS_AnswerMatching::__construct (   $points = 0.0,
  $term_id = 0,
  $picture_or_definition = "",
  $picture_or_definition_id = 0 
)

ASS_AnswerMatching constructor.

The constructor takes possible arguments an creates an instance of the ASS_AnswerMatching 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
string$matchingtextA string defining the matching text for the answer text public

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

References $picture_or_definition, $picture_or_definition_id, $points, and $term_id.

69  {
70  $this->term_id = $term_id;
71  $this->picture_or_definition = $picture_or_definition;
72  $this->picture_or_definition_id = $picture_or_definition_id;
73  $this->points = $points;
74  }

Member Function Documentation

◆ getDefinition()

ASS_AnswerMatching::getDefinition ( )

Gets the definition.

Returns the definition

Returns
string definition public
See also
$picture_or_definition

Definition at line 123 of file class.assAnswerMatching.php.

References $picture_or_definition.

124  {
126  }

◆ getDefinitionId()

ASS_AnswerMatching::getDefinitionId ( )

Gets the definition identifier.

Returns the definition identifier

Returns
integer definition identifier public
See also
$picture_or_definition_id

Definition at line 149 of file class.assAnswerMatching.php.

References $picture_or_definition_id.

◆ getPicture()

ASS_AnswerMatching::getPicture ( )

Gets the picture.

Returns the picture

Returns
string picture public
See also
$picture_or_definition

Definition at line 110 of file class.assAnswerMatching.php.

References $picture_or_definition.

111  {
113  }

◆ getPictureId()

ASS_AnswerMatching::getPictureId ( )

Gets the picture identifier.

Returns the picture identifier

Returns
integer picture identifier public
See also
$picture_or_definition_id

Definition at line 136 of file class.assAnswerMatching.php.

References $picture_or_definition_id.

◆ getPoints()

ASS_AnswerMatching::getPoints ( )

Gets the points.

Returns the points

Returns
double points public
See also
$points

Definition at line 84 of file class.assAnswerMatching.php.

References $points.

85  {
86  return $this->points;
87  }

◆ getTermId()

ASS_AnswerMatching::getTermId ( )

Gets the term id.

Returns a nonnegative identifier for the term

Returns
integer order public
See also
$term_id

Definition at line 97 of file class.assAnswerMatching.php.

References $term_id.

98  {
99  return $this->term_id;
100  }

◆ setDefinition()

ASS_AnswerMatching::setDefinition (   $definition = "")

Sets the definition.

Sets the definition

Parameters
string$definitionDefinition public
See also
$picture_or_definition

Definition at line 225 of file class.assAnswerMatching.php.

226  {
227  $this->picture_or_definition = $definition;
228  }

◆ setDefinitionId()

ASS_AnswerMatching::setDefinitionId (   $definition_id = 0)

Sets the definition id.

Sets the nonnegative definition identifier which can be used for sorting or displaying matching pairs

Parameters
integer$definition_idA nonnegative integer public
See also
$picture_or_definition_id

Definition at line 195 of file class.assAnswerMatching.php.

196  {
197  if ($definition_id >= 0) {
198  $this->picture_or_definition_id = $definition_id;
199  }
200  }

◆ setPicture()

ASS_AnswerMatching::setPicture (   $picture = "")

Sets the picture.

Sets the picture

Parameters
string$picturePicture public
See also
$picture_or_definition

Definition at line 211 of file class.assAnswerMatching.php.

212  {
213  $this->picture_or_definition = $picture;
214  }

◆ setPictureId()

ASS_AnswerMatching::setPictureId (   $picture_id = 0)

Sets the picture id.

Sets the nonnegative picture identifier which can be used for sorting or displaying matching pairs

Parameters
integer$picture_idA nonnegative integer public
See also
$picture_or_definition_id

Definition at line 179 of file class.assAnswerMatching.php.

180  {
181  if ($picture_id >= 0) {
182  $this->picture_or_definition_id = $picture_id;
183  }
184  }

◆ setPoints()

ASS_AnswerMatching::setPoints (   $points = 0.0)

Sets the points.

Sets the points given for selecting the answer.

Parameters
double$pointsThe points given for the answer public
See also
$points

Definition at line 240 of file class.assAnswerMatching.php.

References $points.

241  {
242  $this->points = $points;
243  }

◆ setTermId()

ASS_AnswerMatching::setTermId (   $term_id = 0)

Sets the term id.

Sets the nonnegative term identifier which can be used for sorting or displaying matching pairs

Parameters
integer$term_idA nonnegative integer public
See also
$term_id

Definition at line 163 of file class.assAnswerMatching.php.

References $term_id.

164  {
165  if ($term_id >= 0) {
166  $this->term_id = $term_id;
167  }
168  }

Field Documentation

◆ $picture_or_definition

ASS_AnswerMatching::$picture_or_definition

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

Referenced by __construct(), getDefinition(), and getPicture().

◆ $picture_or_definition_id

ASS_AnswerMatching::$picture_or_definition_id

Definition at line 51 of file class.assAnswerMatching.php.

Referenced by __construct(), getDefinitionId(), and getPictureId().

◆ $points

ASS_AnswerMatching::$points

Definition at line 24 of file class.assAnswerMatching.php.

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

◆ $term_id

ASS_AnswerMatching::$term_id

Definition at line 42 of file class.assAnswerMatching.php.

Referenced by __construct(), getTermId(), and setTermId().


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