ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilAssLacAnswerOfQuestionExpression 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 ilAssLacAnswerOfQuestionExpression:
+ Collaboration diagram for ilAssLacAnswerOfQuestionExpression:

Public Member Functions

 getQuestionIndex ()
 Get the question index. More...
 
 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\d+)(?=\=|<|>|\s|$)/'
 
static $identifier = "Qn"
 

Protected Member Functions

 setMatches ($matches)
 Sets the result of the parsed value by a specific expression pattern. More...
 
 getPattern ()
 Get the Pattern to match relevant informations for an Expression. 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
 

Additional Inherited Members

- Data Fields inherited from ilAssLacAbstractComposite
 $nodes = []
 

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 AnswerOfQuestionExpression for the expression Qn

Date: 25.03.13 Time: 16:39

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

Definition at line 26 of file ilAssLacAnswerOfQuestionExpression.php.

Member Function Documentation

◆ getDescription()

ilAssLacAnswerOfQuestionExpression::getDescription ( )

Get a human readable description of the Composite element.

Returns
string

Implements ilAssLacCompositeInterface.

Definition at line 91 of file ilAssLacAnswerOfQuestionExpression.php.

91  : string
92  {
93  return "Frage " . $this->question_index . " ";
94  }

◆ getPattern()

ilAssLacAnswerOfQuestionExpression::getPattern ( )
protected

Get the Pattern to match relevant informations for an Expression.

Returns
string

Definition at line 100 of file ilAssLacAnswerOfQuestionExpression.php.

100  : string
101  {
102  return '/-?[0-9]+/';
103  }

◆ getQuestionIndex()

ilAssLacAnswerOfQuestionExpression::getQuestionIndex ( )

Get the question index.

Returns
int

Implements ilAssLacQuestionExpressionInterface.

Definition at line 73 of file ilAssLacAnswerOfQuestionExpression.php.

References $question_index.

◆ getValue()

ilAssLacAnswerOfQuestionExpression::getValue ( )

Get the value of this Expression.

Returns
string

Implements ilAssLacExpressionInterface.

Definition at line 82 of file ilAssLacAnswerOfQuestionExpression.php.

References $question_index.

82  : string
83  {
84  return "Q" . $this->question_index;
85  }

◆ setMatches()

ilAssLacAnswerOfQuestionExpression::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 63 of file ilAssLacAnswerOfQuestionExpression.php.

63  : void
64  {
65  $this->question_index = $matches[0][0];
66  }

Field Documentation

◆ $identifier

ilAssLacAnswerOfQuestionExpression::$identifier = "Qn"
static

Definition at line 47 of file ilAssLacAnswerOfQuestionExpression.php.

◆ $pattern

ilAssLacAnswerOfQuestionExpression::$pattern = '/(Q\d+)(?=\=|<|>|\s|$)/'
static

◆ $question_index

ilAssLacAnswerOfQuestionExpression::$question_index
protected

Definition at line 54 of file ilAssLacAnswerOfQuestionExpression.php.

Referenced by getQuestionIndex(), and getValue().


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