25 include_once(
"./Services/Container/classes/class.ilContainerContentGUI.php");
68 if($a_objective_id == $this->force_details)
83 global
$lng,$ilTabs,$ilAccess;
88 include_once
'./classes/class.ilObjectListGUIFactory.php';
90 $tpl =
new ilTemplate (
"tpl.container_page.html",
true,
true,
"Services/Container");
96 if($ilAccess->checkAccess(
'write',
'',$this->getContainerObject()->getRefId()) or 1)
98 $this->
showButton(
'askReset',$lng->txt(
'crs_reset_results'));
128 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
130 $tpl->setCurrentBlock(
'cont_page_content');
136 $info_tpl =
new ilTemplate(
'tpl.crs_objectives_view_info_table.html',
true,
true,
'Modules/Course');
137 $info_tpl->setVariable(
"INFO_STRING",$lng->txt(
'crs_objectives_info_'.$status));
139 $tpl->setVariable(
'CONTAINER_PAGE_CONTENT',$info_tpl->get());
140 $tpl->parseCurrentBlock();
159 if ($output_html !=
"")
167 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
173 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveListGUI.php');
175 $this->objective_list_gui->setContainerObject($this->
getContainerGUI());
176 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
178 $this->objective_list_gui->enableIcon(
true);
182 $item_html = array();
183 foreach($objective_ids as $objective_id)
187 $item_html[] = $html;
192 if (count($item_html) > 0)
195 foreach($item_html as $h)
203 $output_html .=
$tpl->get();
204 $a_tpl->setCurrentBlock(
'cont_page_content');
205 $a_tpl->setVariable(
"CONTAINER_PAGE_CONTENT", $output_html);
206 $a_tpl->parseCurrentBlock();
220 $tpl->setCurrentBlock(
'details_img');
222 $append = $this->details_level == self::DETAILS_TITLE ?
'off' :
'';
223 $tpl->setCurrentBlock(
'details_img');
225 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 2');
226 $tpl->setVariable(
'DETAILS_LINK',
'repository.php?ref_id='.$this->
getContainerObject()->getRefId().
'&details_level=1');
227 $tpl->parseCurrentBlock();
229 $append = $this->details_level == self::DETAILS_ALL ?
'off' :
'';
230 $tpl->setCurrentBlock(
'details_img');
232 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 3');
233 $tpl->setVariable(
'DETAILS_LINK',
'repository.php?ref_id='.$this->
getContainerObject()->getRefId().
'&details_level=2');
234 $tpl->parseCurrentBlock();
236 $tpl->setCurrentBlock(
'container_details_row');
237 $tpl->setVariable(
'TXT_DETAILS',$this->lng->txt(
'details'));
238 $tpl->parseCurrentBlock();
252 global $ilAccess,
$lng;
259 if ($output_html !=
"")
265 if (is_array($this->items[
"_all"]))
268 $item_html = array();
271 foreach($this->items[
"_all"] as $k => $item_data)
273 if($a_mode == self::MATERIALS_TESTS and $item_data[
'type'] !=
'tst')
278 if($this->rendered_items[$item_data[
"child"]] !==
true)
280 $this->rendered_items[$item_data[
'child']] =
true;
283 $html = $this->
renderItem($item_data,$position++,$a_mode == self::MATERIALS_TESTS ?
false :
true);
286 $item_html[] = $html;
292 if (count($item_html) > 0)
296 case self::MATERIALS_TESTS:
297 $txt = $lng->txt(
'objs_tst');
300 case self::MATERIALS_OTHER:
301 $txt = $lng->txt(
'crs_other_resources');
305 $this->
addHeaderRow(
$tpl,$a_mode == self::MATERIALS_TESTS ?
'tst' :
'',$txt);
306 foreach($item_html as $h)
313 $output_html .=
$tpl->get();
314 $a_tpl->setCurrentBlock(
'cont_page_content');
315 $a_tpl->setVariable(
"CONTAINER_PAGE_CONTENT", $output_html);
316 $a_tpl->parseCurrentBlock();
330 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
333 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
334 $items = $this->
getContainerObject()->getCourseItemObject()->getItemsByObjective($a_objective_id);
337 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
341 foreach($items as $item)
348 $chapters = $objectives_lm_obj->getChapters();
351 $item_list_gui2->enableIcon(
true);
356 $has_sections =
false;
357 foreach($chapters as $chapter)
359 if($chapter[
'ref_id'] != $item[
'child'])
363 $has_sections =
true;
364 include_once
'./Modules/LearningModule/classes/class.ilLMObject.php';
366 $details[$num][
'desc'] = $lng->txt(
'obj_'.$chapter[
'type']).
' -> ';
367 $details[$num][
'target'] =
'_top';
368 $details[$num][
'link'] =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$chapter[
'ref_id'].
'&obj_id='.$chapter[
'obj_id'];
374 $item_list_gui2->enableItemDetailLinks(
true);
375 $item_list_gui2->setItemDetailLinks($details,$lng->txt(
'crs_suggested_sections').
': ');
381 $item_list_gui2->enableCheckbox(
true);
384 $item_list_gui2->setPositionInputField(
"[lobj][".$a_objective_id.
"][".$item[
"ref_id"].
"]",
385 sprintf(
'%.1f', $pos));
390 $this->rendered_items[$item[
'child']] =
true;
391 $sub_item_html = $item_list_gui2->getListItemHTML($item[
'ref_id'],
392 $item[
'obj_id'], $item[
'title'], $item[
'description']);
395 $item_list_gui2->adminCommandsIncluded());
396 $this->objective_list_gui->addSubItemHTML($sub_item_html);
401 $this->objective_list_gui->enableCommands(
false);
405 $this->objective_list_gui->enableCommands(
true);
408 $html = $this->objective_list_gui->getListItemHTML(
411 $objective->getTitle(),
412 $objective->getDescription());
428 if(isset(
$_GET[
'details_level']))
430 $this->details_level = (int)
$_GET[
'details_level'];
435 $this->details_level = $ilUser->getPref(
'crs_objectives_details') ? $ilUser->getPref(
'crs_objectives_details') :
self::DETAILS_TITLE;
437 if(isset(
$_GET[
'objective_details']))
439 $this->force_details = (int)
$_GET[
'objective_details'];
442 elseif($details_id = $ilUser->getPref(
'crs_objectives_force_details_'.$this->getContainerObject()->getId()))
444 $this->force_details = $details_id;
448 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
449 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
454 $this->force_details = $objective_id;
473 $tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
476 $tpl->setCurrentBlock(
"btn_cell");
477 $tpl->setVariable(
"BTN_LINK",$ilCtrl->getLinkTarget($this->getContainerGUI(),$a_cmd));
478 $tpl->setVariable(
"BTN_TXT",$a_text);
482 $tpl->setVariable(
"BTN_TARGET",$a_target);
485 $tpl->parseCurrentBlock();