ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
ASS_AnswerMatching Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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 (int $picture_id=0)
 Sets the picture id Sets the nonnegative picture identifier which can be used for sorting or displaying matching pairs. More...
 
 setDefinitionId (int $definition_id=0)
 Sets the definition id Sets the nonnegative definition identifier which can be used for sorting or displaying matching pairs. More...
 
 setPicture (string $picture="")
 Sets the picture Sets the picture. More...
 
 setDefinition (string $definition="")
 Sets the definition Sets the definition. More...
 
 setPoints (float $points=0.0)
 Sets the points Sets the points given for selecting the answer. More...
 

Data Fields

float $points
 
 $picture_or_definition
 
 $term_id
 
 $picture_or_definition_id
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 \

Definition at line 27 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 69 of file class.assAnswerMatching.php.

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

74  {
75  $this->term_id = $term_id;
76  $this->picture_or_definition = $picture_or_definition;
77  $this->picture_or_definition_id = $picture_or_definition_id;
78  $this->points = $points;
79  }

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 128 of file class.assAnswerMatching.php.

References $picture_or_definition.

128  : string
129  {
131  }

◆ 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 154 of file class.assAnswerMatching.php.

References $picture_or_definition_id.

154  : int
155  {
157  }

◆ getPicture()

ASS_AnswerMatching::getPicture ( )

Gets the picture.

Returns the picture

Returns
string picture public
See also
$picture_or_definition

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

References $picture_or_definition.

115  : string
116  {
118  }

◆ 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 141 of file class.assAnswerMatching.php.

References $picture_or_definition_id.

141  : int
142  {
144  }

◆ getPoints()

ASS_AnswerMatching::getPoints ( )

Gets the points.

Returns the points

Returns
double points public
See also
$points

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

References $points.

89  : float
90  {
91  return $this->points;
92  }

◆ 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 102 of file class.assAnswerMatching.php.

References $term_id.

102  : int
103  {
104  return $this->term_id;
105  }

◆ setDefinition()

ASS_AnswerMatching::setDefinition ( string  $definition = "")

Sets the definition Sets the definition.

Parameters
string$definitionDefinition public
See also
$picture_or_definition

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

222  : void
223  {
224  $this->picture_or_definition = $definition;
225  }

◆ setDefinitionId()

ASS_AnswerMatching::setDefinitionId ( int  $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 196 of file class.assAnswerMatching.php.

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

◆ setPicture()

ASS_AnswerMatching::setPicture ( string  $picture = "")

Sets the picture Sets the picture.

Parameters
string$picturePicture public
See also
$picture_or_definition

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

210  : void
211  {
212  $this->picture_or_definition = $picture;
213  }

◆ setPictureId()

ASS_AnswerMatching::setPictureId ( int  $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 182 of file class.assAnswerMatching.php.

182  : void
183  {
184  if ($picture_id >= 0) {
185  $this->picture_or_definition_id = $picture_id;
186  }
187  }

◆ setPoints()

ASS_AnswerMatching::setPoints ( float  $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 235 of file class.assAnswerMatching.php.

References $points.

235  : void
236  {
237  $this->points = $points;
238  }

◆ 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 168 of file class.assAnswerMatching.php.

References $term_id.

168  : void
169  {
170  if ($term_id >= 0) {
171  $this->term_id = $term_id;
172  }
173  }

Field Documentation

◆ $picture_or_definition

ASS_AnswerMatching::$picture_or_definition

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

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

◆ $picture_or_definition_id

ASS_AnswerMatching::$picture_or_definition_id

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

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

◆ $points

float ASS_AnswerMatching::$points

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

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

◆ $term_id

ASS_AnswerMatching::$term_id

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

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


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