25 include_once(
"./Services/Container/classes/class.ilContainerContentGUI.php");
70 if($a_objective_id == $this->force_details)
85 global
$lng,$ilTabs,$ilAccess;
91 include_once
'Services/Object/classes/class.ilObjectListGUIFactory.php';
93 $tpl =
new ilTemplate (
"tpl.container_page.html",
true,
true,
"Services/Container");
99 if($ilAccess->checkAccess(
'write',
'',$this->getContainerObject()->getRefId()) or 1)
101 $this->
showButton(
'askReset',$lng->txt(
'crs_reset_results'));
111 $tpl->setVariable(
'CONTAINER_PAGE_CONTENT',$this->output_html);
112 #$tpl->setVariable('cont_page_content',$info_tpl->get());
113 #$tpl->parseCurrentBlock('CONTAINER_PAGE_CONTENT',$this->output_html);
114 #$tpl->parseCurrentBlock();
130 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
137 $info_tpl =
new ilTemplate(
'tpl.crs_objectives_view_info_table.html',
true,
true,
'Modules/Course');
138 $info_tpl->setVariable(
"INFO_STRING",$lng->txt(
'crs_objectives_info_'.$status));
141 $this->output_html .= $info_tpl->get();
168 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
174 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveListGUI.php');
176 $this->objective_list_gui->setContainerObject($this->
getContainerGUI());
177 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
179 $this->objective_list_gui->enableIcon(
true);
183 $item_html = array();
184 foreach($objective_ids as $objective_id)
188 $item_html[] = $html;
193 if (count($item_html) > 0)
196 foreach($item_html as $h)
215 $tpl->setCurrentBlock(
'details_img');
217 $append = $this->details_level == self::DETAILS_TITLE ?
'off' :
'';
218 $tpl->setCurrentBlock(
'details_img');
220 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 2');
221 $tpl->setVariable(
'DETAILS_LINK',
'repository.php?ref_id='.$this->
getContainerObject()->getRefId().
'&details_level=1');
222 $tpl->parseCurrentBlock();
224 $append = $this->details_level == self::DETAILS_ALL ?
'off' :
'';
225 $tpl->setCurrentBlock(
'details_img');
227 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 3');
228 $tpl->setVariable(
'DETAILS_LINK',
'repository.php?ref_id='.$this->
getContainerObject()->getRefId().
'&details_level=2');
229 $tpl->parseCurrentBlock();
231 $tpl->setCurrentBlock(
'container_details_row');
232 $tpl->setVariable(
'TXT_DETAILS',$this->lng->txt(
'details'));
233 $tpl->parseCurrentBlock();
247 global $ilAccess,
$lng;
251 #$output_html = $this->getContainerGUI()->getContainerPageHTML();
260 if (is_array($this->items[
"_all"]))
266 foreach($this->items[
"_all"] as $k => $item_data)
268 if($a_mode == self::MATERIALS_TESTS and $item_data[
'type'] !=
'tst')
273 if($this->rendered_items[$item_data[
"child"]] !==
true)
275 $this->rendered_items[$item_data[
'child']] =
true;
278 $html = $this->
renderItem($item_data,$position++,$a_mode == self::MATERIALS_TESTS ?
false :
true);
281 $item_r[] = array(
"html" => $html,
"id" => $item_data[
"child"]);
287 if (count($item_r) > 0)
291 case self::MATERIALS_TESTS:
292 $txt = $lng->txt(
'objs_tst');
295 case self::MATERIALS_OTHER:
296 $txt = $lng->txt(
'crs_other_resources');
300 $this->
addHeaderRow(
$tpl,$a_mode == self::MATERIALS_TESTS ?
'tst' :
'',$txt);
301 foreach($item_r as $h)
308 #$output_html .= $tpl->get();
309 $this->output_html .=
$tpl->get();
310 #$a_tpl->setCurrentBlock('cont_page_content');
311 #$a_tpl->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
312 #$a_tpl->parseCurrentBlock();
326 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
329 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
330 $items = $this->
getContainerObject()->getCourseItemObject()->getItemsByObjective($a_objective_id);
333 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
337 foreach($items as $item)
344 $chapters = $objectives_lm_obj->getChapters();
347 $item_list_gui2->enableIcon(
true);
352 $has_sections =
false;
353 foreach($chapters as $chapter)
355 if($chapter[
'ref_id'] != $item[
'child'])
359 $has_sections =
true;
360 include_once
'./Modules/LearningModule/classes/class.ilLMObject.php';
362 $details[$num][
'desc'] = $lng->txt(
'obj_'.$chapter[
'type']).
' -> ';
363 $details[$num][
'target'] =
'_top';
364 $details[$num][
'link'] =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$chapter[
'ref_id'].
'&obj_id='.$chapter[
'obj_id'];
370 $item_list_gui2->enableItemDetailLinks(
true);
371 $item_list_gui2->setItemDetailLinks($details,$lng->txt(
'crs_suggested_sections').
': ');
377 $item_list_gui2->enableCheckbox(
true);
380 $item_list_gui2->setPositionInputField(
"[lobj][".$a_objective_id.
"][".$item[
"ref_id"].
"]",
381 sprintf(
'%.1f',
$pos));
386 $this->rendered_items[$item[
'child']] =
true;
387 $sub_item_html = $item_list_gui2->getListItemHTML($item[
'ref_id'],
388 $item[
'obj_id'], $item[
'title'], $item[
'description']);
391 $item_list_gui2->adminCommandsIncluded());
392 $this->objective_list_gui->addSubItemHTML($sub_item_html);
397 $this->objective_list_gui->enableCommands(
false);
401 $this->objective_list_gui->enableCommands(
true);
404 $html = $this->objective_list_gui->getListItemHTML(
407 $objective->getTitle(),
408 $objective->getDescription());
424 if(isset(
$_GET[
'details_level']))
426 $this->details_level = (int)
$_GET[
'details_level'];
431 $this->details_level = $ilUser->getPref(
'crs_objectives_details') ? $ilUser->getPref(
'crs_objectives_details') :
self::DETAILS_TITLE;
433 if(isset(
$_GET[
'objective_details']))
435 $this->force_details = (int)
$_GET[
'objective_details'];
438 elseif($details_id = $ilUser->getPref(
'crs_objectives_force_details_'.$this->getContainerObject()->getId()))
440 $this->force_details = $details_id;
444 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
445 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
450 $this->force_details = $objective_id;
469 $tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
472 $tpl->setCurrentBlock(
"btn_cell");
473 $tpl->setVariable(
"BTN_LINK",$ilCtrl->getLinkTarget($this->getContainerGUI(),$a_cmd));
474 $tpl->setVariable(
"BTN_TXT",$a_text);
478 $tpl->setVariable(
"BTN_TARGET",$a_target);
481 $tpl->parseCurrentBlock();