4 include_once
'Modules/TestQuestionPool/interfaces/interface.iQuestionCondition.php';
5 include_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')
143 'QUEST_SPECIFIC_ELEMENTS_HEADER', $this->lng->txt(
'qpl_lac_legend_header_quest_specific')
150 $tpl->
setVariable(
'QSE_DESCRIPTION', $this->lng->txt($description));
151 $tpl->
setVariable(
'QSE_OPERATORS_TXT', $this->lng->txt(
'qpl_lac_legend_label_operators'));
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');
183 $tpl->
setVariable(
'QSEX_ELEMENT', $this->lng->txt($langVarE));
184 $tpl->
setVariable(
'QSEX_DESCRIPTION', $this->lng->txt($langVarD));
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)
getExpressionTypeExamplesByQuestionType($questionType)
const PercentageResultExpression
Class iQuestionCondition.
setAutoHide($a_val)
Set auto hiding.
const NumberOfResultExpression
const ExclusiveResultExpression
buildLangVarsByExampleCode($questionType, $exampleCode)
add()
Makes an existing HTML element an overlay.
static get($a_glyph, $a_text="")
Get glyph html.
renderCommonLegendPart(ilTemplate $tpl)
const StringResultExpression
renderExamples(ilTemplate $tpl, $examples, $questionType)
renderQuestSpecificExamples(ilTemplate $tpl)
getAvailableExpressionTypes()
__construct(ilLanguage $lng, ilTemplate $tpl)
setVariable($variable, $value='')
Sets a variable value.
getQuestionTypeSpecificExpressions()
const NumericResultExpression
setInitialVisibilityEnabled($initialVisibilityEnabled)
renderExample(ilTemplate $tpl, $langVarE, $langVarD)
special template class to simplify handling of ITX/PEAR
const MatchingResultExpression
This is a utility class for the yui overlays.
populateVisibilityCss(ilTemplate $tpl)
$initialVisibilityEnabled
const OrderingResultExpression
Create styles array
The data for the language used.
setCurrentBlock($part="DEFAULT")
Überladene Funktion, die sich hier lokal noch den aktuellen Block merkt.
static initOverlay()
Init YUI Overlay module.
setQuestionOBJ(iQuestionCondition $questionOBJ)
const EVAL_MODE_BY_QUESTION_SOLUTION
isInitialVisibilityEnabled()
const EVAL_MODE_BY_QUESTION_RESULT
parseCurrentBlock($part="DEFAULT")
Überladene Funktion, die auf den aktuelle Block vorher noch ein replace ausführt public...
setVisible($a_visible=true)
Set visible.
renderQuestSpecificLegendPart(ilTemplate $tpl)
const EmptyAnswerExpression
populateTriggerDepencies(ilTemplate $tpl)