4include_once
'Modules/TestQuestionPool/interfaces/interface.iQuestionCondition.php';
5include_once
'Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php';
27 'assQuestion' => array(
'PercentageResultExpression',
'EmptyAnswerExpression'),
28 'assSingleChoice' => array(
'NumberOfResultExpression'),
29 'assMultipleChoice' => array(
'NumberOfResultExpression',
'ExclusiveResultExpression'),
30 'assErrorText' => array(
'NumberOfResultExpression',
'ExclusiveResultExpression'),
31 'assImagemapQuestion' => array(
'NumberOfResultExpression',
'ExclusiveResultExpression'),
32 'assNumeric' => array(
'NumericResultExpression'),
33 'assOrderingQuestion' => array(
'OrderingResultExpression'),
34 'assOrderingHorizontal' => array(
'OrderingResultExpression'),
35 'assMatchingQuestion' => array(
'MatchingResultExpression'),
36 'assTextSubset' => array(
'StringResultExpression'),
37 'assFormulaQuestion' => array(
'NumericResultExpression'),
39 'assClozeTest' => array(
40 'StringResultExpression_1',
'StringResultExpression_2',
41 'NumberOfResultExpression',
'NumericResultExpression'
50 $this->initialVisibilityEnabled =
false;
52 $this->questionOBJ =
null;
54 parent::__construct(
'qpl_lac_legend');
101 include_once
'Services/YUI/classes/class.ilYuiUtil.php';
104 $this->tpl->addCss(
'Modules/TestQuestionPool/templates/default/lac_legend.css');
121 'tpl.qpl_logical_answer_compare_legend.html',
true,
true,
'Modules/TestQuestionPool'
128 'COMMON_ELEMENTS_HEADER', $this->lng->txt(
'qpl_lac_legend_header_common')
133 $tpl->setCurrentBlock(
'common_elements');
134 $tpl->setVariable(
'CE_ELEMENT', $element);
135 $tpl->setVariable(
'CE_DESCRIPTION', $description);
136 $tpl->parseCurrentBlock();
143 'QUEST_SPECIFIC_ELEMENTS_HEADER', $this->lng->txt(
'qpl_lac_legend_header_quest_specific')
148 $tpl->setCurrentBlock(
'quest_specific_elements');
149 $tpl->setVariable(
'QSE_ELEMENT', $expression);
150 $tpl->setVariable(
'QSE_DESCRIPTION', $this->lng->txt($description));
151 $tpl->setVariable(
'QSE_OPERATORS_TXT', $this->lng->txt(
'qpl_lac_legend_label_operators'));
152 $tpl->setVariable(
'QSE_OPERATORS', implode(
', ', $this->
getQuestionOBJ()->getOperators($expression)));
153 $tpl->parseCurrentBlock();
160 'QUEST_SPECIFIC_EXAMPLES_HEADER', $this->lng->txt(
'lacex_example_header')
163 $questionTypes = array(
167 foreach($questionTypes as $questionType)
176 $langVar =
'lacex_'.$questionType.
'_'.$exampleCode;
177 return array($langVar.
'_e', $langVar.
'_d');
182 $tpl->setCurrentBlock(
'quest_specific_examples');
183 $tpl->setVariable(
'QSEX_ELEMENT', $this->lng->txt($langVarE));
184 $tpl->setVariable(
'QSEX_DESCRIPTION', $this->lng->txt($langVarD));
185 $tpl->parseCurrentBlock();
192 $tpl->
setVariable(
'CSS_DISPLAY_NONE',
'display:none;');
198 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignment.php';
201 'TOGGLE_BTN_SHOW_LABEL', $this->lng->txt(
'ass_lac_show_legend_btn')
205 'TOGGLE_BTN_HIDE_LABEL', $this->lng->txt(
'ass_lac_hide_legend_btn')
219 return "<div id=\"qpl_lac_legend_trigger\"><a href=\"#\">".$this->lng->txt(
"qpl_lac_legend_link").
"</a></div>";
226 $expressionTypes = array();
228 foreach($this->
getQuestionOBJ()->getExpressionTypes() as $expressionType)
230 $expressionTypes[$expressionType] = $availableExpressionTypes[$expressionType];
233 return $expressionTypes;
239 '&' => $this->lng->txt(
'qpl_lac_desc_logical_and'),
240 '|' => $this->lng->txt(
'qpl_lac_desc_logical_or'),
241 '!' => $this->lng->txt(
'qpl_lac_desc_negation'),
242 '()' => $this->lng->txt(
'qpl_lac_desc_brackets'),
245 'R' => $this->lng->txt(
'qpl_lac_desc_res_of_cur_quest'),
246 'R[m]' => $this->lng->txt(
'qpl_lac_desc_res_of_answ_m_of_cur_quest')
266 if( !isset($this->examplesByQuestionType[$questionType]) )
271 return $this->examplesByQuestionType[$questionType];
281 foreach($examples as $exampleCode)
setVariable($variable, $value='')
Sets a variable value.
populateVisibilityCss(ilTemplate $tpl)
setQuestionOBJ(iQuestionCondition $questionOBJ)
renderQuestSpecificExamples(ilTemplate $tpl)
renderCommonLegendPart(ilTemplate $tpl)
populateTriggerDepencies(ilTemplate $tpl)
buildLangVarsByExampleCode($questionType, $exampleCode)
renderQuestSpecificLegendPart(ilTemplate $tpl)
getExpressionTypeExamplesByQuestionType($questionType)
isInitialVisibilityEnabled()
getQuestionTypeSpecificExpressions()
getAvailableExpressionTypes()
renderExample(ilTemplate $tpl, $langVarE, $langVarD)
__construct(ilLanguage $lng, ilTemplate $tpl)
setInitialVisibilityEnabled($initialVisibilityEnabled)
renderExamples(ilTemplate $tpl, $examples, $questionType)
$initialVisibilityEnabled
const EVAL_MODE_BY_QUESTION_RESULT
const EVAL_MODE_BY_QUESTION_SOLUTION
static get($a_glyph, $a_text="")
Get glyph html.
This is a utility class for the yui overlays.
setVisible($a_visible=true)
Set visible.
setAutoHide($a_val)
Set auto hiding.
add()
Makes an existing HTML element an overlay.
special template class to simplify handling of ITX/PEAR
static initOverlay()
Init YUI Overlay module.
Class iQuestionCondition.
const PercentageResultExpression
const OrderingResultExpression
const MatchingResultExpression
const StringResultExpression
const NumericResultExpression
const EmptyAnswerExpression
const ExclusiveResultExpression
const NumberOfResultExpression