5 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
6 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
7 include_once
'./Modules/Course/exceptions/class.ilLOInvalidConfiguationException.php';
29 public function __construct($a_parent_obj, $a_parent_cmd, $a_container_id, $a_test_type)
31 $this->test_type = $a_test_type;
32 $this->
setId(
'obj_loc_'.$a_container_id);
53 $this->
addColumn($this->lng->txt(
'title'),
'title');
54 $this->
addColumn($this->lng->txt(
'crs_loc_tbl_tst_type'),
'ttype');
55 $this->
addColumn($this->lng->txt(
'crs_loc_tbl_tst_qst_qpl'),
'qstqpl');
57 $this->
addMultiCommand(
'confirmDeleteTest', $this->lng->txt(
'crs_loc_delete_assignment'));
59 $this->
setRowTemplate(
"tpl.crs_loc_tst_row.html",
"Modules/Course");
74 $this->tpl->setVariable(
'VAL_ID',$set[
'ref_id']);
75 $this->tpl->setVariable(
'VAL_TITLE',$set[
'title']);
76 include_once
'./Services/Link/classes/class.ilLink.php';
78 $ilCtrl->setParameterByClass(
'ilobjtestgui',
'ref_id',$set[
'ref_id']);
79 $ilCtrl->setParameterByClass(
'ilobjtestgui',
'cmd',
'questionsTabGateway');
80 $this->tpl->setVariable(
82 $ilCtrl->getLinkTargetByClass(
'ilobjtestgui')
87 #$this->tpl->setVariable('TITLE_LINK',ilLink::_getLink($set['ref_id']));
88 if(strlen($set[
'description']))
90 $this->tpl->setVariable(
'VAL_DESC',$set[
'description']);
96 $type = $this->lng->txt(
'tst_question_set_type_fixed');
100 $type = $this->lng->txt(
'tst_question_set_type_random');
104 $this->tpl->setVariable(
'VAL_TTYPE',$type);
105 $this->tpl->setVariable(
'VAL_QST_QPL',$set[
'qst_info']);
107 if(count($set[
'qpls']))
109 foreach($set[
'qpls'] as
$title)
111 $this->tpl->setCurrentBlock(
'qpl');
112 $this->tpl->setVariable(
'MAT_TITLE',$title);
113 $this->tpl->parseCurrentBlock();
115 $this->tpl->touchBlock(
'ul_begin');
116 $this->tpl->touchBlock(
'ul_end');
124 public function parse($a_tst_ref_id)
126 include_once
'./Modules/Test/classes/class.ilObjTest.php';
133 $tst_data[
'ref_id'] = $tst->getRefId();
134 $tst_data[
'title'] = $tst->getTitle();
135 $tst_data[
'description'] = $tst->getLongDescription();
136 $tst_data[
'ttype'] = $tst->getQuestionSetType();
138 switch($tst->getQuestionSetType())
141 $tst_data[
'qst_info'] = $this->lng->txt(
'crs_loc_tst_num_qst');
142 $tst_data[
'qst_info'] .= (
' ' . count($tst->getAllQuestions()));
147 include_once
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionFactory.php';
148 include_once
'./Modules/Test/classes/class.ilTestRandomQuestionSetSourcePoolDefinitionList.php';
159 $list->loadDefinitions();
162 include_once
'./Modules/Test/classes/class.ilTestTaxonomyFilterLabelTranslater.php';
164 $translater->loadLabels($list);
166 $tst_data[
'qst_info'] = $this->lng->txt(
'crs_loc_tst_qpls');
168 foreach ($list as $definition)
171 $title = $definition->getPoolTitle();
172 $tax_id = $definition->getMappedFilterTaxId();
175 $title .= (
' -> '. $translater->getTaxonomyTreeLabel($tax_id));
177 $tax_node = $definition->getMappedFilterTaxNodeId();
180 $title .= (
' -> ' .$translater->getTaxonomyNodeLabel($tax_node));
182 $tst_data[
'qpls'][] =
$title;
187 $tst_data[
'qst_info'] .= (
' '. (int) 0);
193 $this->
setData(array($tst_data));