ILIAS  trunk Revision v5.2.0beta1-34132-g2d4d73d4a0
ilAssLacResultOfAnswerOfQuestionExpression Class Reference

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

+ Inheritance diagram for ilAssLacResultOfAnswerOfQuestionExpression:
+ Collaboration diagram for ilAssLacResultOfAnswerOfQuestionExpression:

Public Member Functions

 getPattern ()
 Get the Pattern to match relevant informations for an Expression. More...
 
 getQuestionIndex ()
 
 getAnswerIndex ()
 
 getValue ()
 Get the value of this Expression. More...
 
 getDescription ()
 Get a human readable description of the Composite element. More...
 
- Public Member Functions inherited from ilAssLacAbstractExpression
 parseValue ($value)
 Parses the delivered Value and sets the relevant information for an Expression as attributes. More...
 
- Public Member Functions inherited from ilAssLacAbstractComposite
 addNode (ilAssLacCompositeInterface $node)
 Adds an ilAssLacCompositeInterface object to the node array which represents the condition tree structure. More...
 
 describe ()
 Describes a Composite tree Structure as human readable string. More...
 

Static Public Attributes

static $pattern = "/Q[0-9]+\\[[0-9]+\\]/"
 
static $identifier = "Qn[m]"
 

Protected Member Functions

 setMatches ($matches)
 Sets the result of the parsed value by a specific expression pattern. More...
 
- Protected Member Functions inherited from ilAssLacAbstractExpression
 getPattern ()
 Get the Pattern to match relevant informations for an Expression. More...
 
 setMatches ($matches)
 Sets the result of the parsed value by a specific expression pattern. More...
 

Protected Attributes

 $question_index
 
 $answer_index
 

Additional Inherited Members

- Data Fields inherited from ilAssLacAbstractComposite
 $nodes = array()
 

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 ResultOfAnswerOfQuestion for the expression Qn[m]

Date: 25.03.13 Time: 16:40

Author
Thomas Joußen tjous.nosp@m.sen@.nosp@m.datab.nosp@m.ay.d.nosp@m.e

Definition at line 26 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

Member Function Documentation

◆ getAnswerIndex()

ilAssLacResultOfAnswerOfQuestionExpression::getAnswerIndex ( )

◆ getDescription()

ilAssLacResultOfAnswerOfQuestionExpression::getDescription ( )

Get a human readable description of the Composite element.

Returns
string

Implements ilAssLacCompositeInterface.

Definition at line 112 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

112  : string
113  {
114  return "Frage " . $this->question_index . " mit Anwort " . $this->answer_index . " beantwortet ";
115  }

◆ getPattern()

ilAssLacResultOfAnswerOfQuestionExpression::getPattern ( )

Get the Pattern to match relevant informations for an Expression.

Returns
string

Definition at line 65 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

65  : string
66  {
67  return '/(\d+)\[(\d+)\]/';
68  }

◆ getQuestionIndex()

ilAssLacResultOfAnswerOfQuestionExpression::getQuestionIndex ( )

◆ getValue()

ilAssLacResultOfAnswerOfQuestionExpression::getValue ( )

Get the value of this Expression.

Returns
string

Implements ilAssLacExpressionInterface.

Definition at line 103 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

103  : string
104  {
105  return "Q" . $this->question_index . '[' . $this->answer_index . ']';
106  }

◆ setMatches()

ilAssLacResultOfAnswerOfQuestionExpression::setMatches (   $matches)
protected

Sets the result of the parsed value by a specific expression pattern.

See also
ExpressionInterface::parseValue()
ExpressionInterface::getPattern()
Parameters
array$matches

Definition at line 77 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

77  : void
78  {
79  $this->question_index = $matches[1][0];
80  $this->answer_index = $matches[2][0];
81  }

Field Documentation

◆ $answer_index

ilAssLacResultOfAnswerOfQuestionExpression::$answer_index
protected

Definition at line 59 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

Referenced by getAnswerIndex().

◆ $identifier

ilAssLacResultOfAnswerOfQuestionExpression::$identifier = "Qn[m]"
static

◆ $pattern

ilAssLacResultOfAnswerOfQuestionExpression::$pattern = "/Q[0-9]+\\[[0-9]+\\]/"
static

◆ $question_index

ilAssLacResultOfAnswerOfQuestionExpression::$question_index
protected

Definition at line 52 of file ilAssLacResultOfAnswerOfQuestionExpression.php.

Referenced by getQuestionIndex().


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