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',
124 'Modules/TestQuestionPool'
131 'COMMON_ELEMENTS_HEADER',
132 $this->lng->txt(
'qpl_lac_legend_header_common')
136 $tpl->setCurrentBlock(
'common_elements');
137 $tpl->setVariable(
'CE_ELEMENT', $element);
139 $tpl->parseCurrentBlock();
146 'QUEST_SPECIFIC_ELEMENTS_HEADER',
147 $this->lng->txt(
'qpl_lac_legend_header_quest_specific')
151 $tpl->setCurrentBlock(
'quest_specific_elements');
152 $tpl->setVariable(
'QSE_ELEMENT', $expression);
154 $tpl->setVariable(
'QSE_OPERATORS_TXT', $this->lng->txt(
'qpl_lac_legend_label_operators'));
155 $tpl->setVariable(
'QSE_OPERATORS', implode(
', ', $this->
getQuestionOBJ()->getOperators($expression)));
156 $tpl->parseCurrentBlock();
163 'QUEST_SPECIFIC_EXAMPLES_HEADER',
164 $this->lng->txt(
'lacex_example_header')
167 $questionTypes = array(
171 foreach ($questionTypes as $questionType) {
179 $langVar =
'lacex_' . $questionType .
'_' . $exampleCode;
180 return array($langVar .
'_e', $langVar .
'_d');
185 $tpl->setCurrentBlock(
'quest_specific_examples');
186 $tpl->setVariable(
'QSEX_ELEMENT', $this->lng->txt($langVarE));
187 $tpl->setVariable(
'QSEX_DESCRIPTION', $this->lng->txt($langVarD));
188 $tpl->parseCurrentBlock();
194 $tpl->
setVariable(
'CSS_DISPLAY_NONE',
'display:none;');
200 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionSkillAssignment.php';
203 'TOGGLE_BTN_SHOW_LABEL',
204 $this->lng->txt(
'ass_lac_show_legend_btn')
208 'TOGGLE_BTN_HIDE_LABEL',
209 $this->lng->txt(
'ass_lac_hide_legend_btn')
213 'SKILL_POINT_EVAL_MODE_BY_RESULT',
218 'SKILL_POINT_EVAL_MODE_BY_SOLUTION',
225 return "<div id=\"qpl_lac_legend_trigger\"><a href=\"#\">" . $this->lng->txt(
"qpl_lac_legend_link") .
"</a></div>";
232 $expressionTypes = array();
234 foreach ($this->
getQuestionOBJ()->getExpressionTypes() as $expressionType) {
235 $expressionTypes[$expressionType] = $availableExpressionTypes[$expressionType];
238 return $expressionTypes;
244 '&' => $this->lng->txt(
'qpl_lac_desc_logical_and'),
245 '|' => $this->lng->txt(
'qpl_lac_desc_logical_or'),
246 '!' => $this->lng->txt(
'qpl_lac_desc_negation'),
247 '()' => $this->lng->txt(
'qpl_lac_desc_brackets'),
250 'R' => $this->lng->txt(
'qpl_lac_desc_res_of_cur_quest'),
251 'R[m]' => $this->lng->txt(
'qpl_lac_desc_res_of_answ_m_of_cur_quest')
271 if (!isset($this->examplesByQuestionType[$questionType])) {
275 return $this->examplesByQuestionType[$questionType];
285 foreach ($examples as $exampleCode) {
An exception for terminatinating execution or to throw for unit testing.
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(ilTemplate $a_main_tpl=null)
Init YUI Overlay module.
Class iQuestionCondition.
const PercentageResultExpression
const OrderingResultExpression
const MatchingResultExpression
const StringResultExpression
const NumericResultExpression
const EmptyAnswerExpression
const ExclusiveResultExpression
const NumberOfResultExpression