1<?php
2/**
3 * Class iQuestionCondition
4 *
5 * Date: 02.12.13
6 * Time: 14:02
7 * @author Thomas Joußen <tjoussen@databay.de>
8 */
9interface iQuestionCondition
10{
11    const StringResultExpression = '~TEXT~';
12    const PercentageResultExpression = '%n%';
13    const NumericResultExpression = '#n#';
14    const MatchingResultExpression = ';n:m;';
15    const OrderingResultExpression = '$n,m,o,p$';
16    const NumberOfResultExpression = '+n+';
17    const ExclusiveResultExpression = '*n,m,o,p*';
18    const EmptyAnswerExpression = "?";
19
20    /**
21     * Get all available operations for a specific question
22     *
23     * @param $expression
24     *
25     * @internal param string $expression_type
26     * @return array
27     */
28    public function getOperators($expression);
29
30    /**
31     * Get all available expression types for a specific question
32     *
33     * @return array
34     */
35    public function getExpressionTypes();
36
37    /**
38     * Get the user solution for a question by active_id and the test pass
39     *
40     * @param int $active_id
41     * @param int $pass
42     *
43     * @return ilUserQuestionResult
44     */
45    public function getUserQuestionResult($active_id, $pass);
46
47    /**
48     * If index is null, the function returns an array with all anwser options
49     * Else it returns the specific answer option
50     *
51     * @param null|int $index
52     *
53     * @return array|ASS_AnswerSimple
54     */
55    public function getAvailableAnswerOptions($index = null);
56}
57