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'));
112 $tpl->setVariable(
'CONTAINER_PAGE_CONTENT',$this->output_html);
113 #$tpl->setVariable('cont_page_content',$info_tpl->get());
114 #$tpl->parseCurrentBlock('CONTAINER_PAGE_CONTENT',$this->output_html);
115 #$tpl->parseCurrentBlock();
131 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
138 $info_tpl =
new ilTemplate(
'tpl.crs_objectives_view_info_table.html',
true,
true,
'Modules/Course');
139 $info_tpl->setVariable(
"INFO_STRING",$lng->txt(
'crs_objectives_info_'.$status));
142 $this->output_html .= $info_tpl->get();
169 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
175 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveListGUI.php');
177 $this->objective_list_gui->setContainerObject($this->
getContainerGUI());
178 if ($ilSetting->get(
"icon_position_in_lists") ==
"item_rows")
180 $this->objective_list_gui->enableIcon(
true);
184 $item_html = array();
185 foreach($objective_ids as $objective_id)
189 $item_html[] = $html;
194 if (count($item_html) > 0)
197 foreach($item_html as $h)
218 $tpl->setCurrentBlock(
'details_img');
220 $append = $this->details_level == self::DETAILS_TITLE ?
'off' :
'';
221 $tpl->setCurrentBlock(
'details_img');
223 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 2');
224 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->
getContainerObject()->getRefId());
225 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"details_level",
"1");
226 $tpl->setVariable(
'DETAILS_LINK',
227 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
228 $tpl->parseCurrentBlock();
230 $append = $this->details_level == self::DETAILS_ALL ?
'off' :
'';
231 $tpl->setCurrentBlock(
'details_img');
233 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 3');
234 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"details_level",
"2");
235 $tpl->setVariable(
'DETAILS_LINK',
236 $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
""));
237 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
238 $tpl->parseCurrentBlock();
240 $tpl->setCurrentBlock(
'container_details_row');
241 $tpl->setVariable(
'TXT_DETAILS',$this->lng->txt(
'details'));
242 $tpl->parseCurrentBlock();
256 global $ilAccess,
$lng;
260 #$output_html = $this->getContainerGUI()->getContainerPageHTML();
273 if ($a_mode == self::MATERIALS_OTHER)
279 if (is_array($this->items[
"_all"]))
285 foreach($this->items[
"_all"] as $k => $item_data)
287 if($a_mode == self::MATERIALS_TESTS and $item_data[
'type'] !=
'tst')
291 if ($item_data[
'type'] ==
'itgr')
296 if($this->rendered_items[$item_data[
"child"]] !==
true)
298 $this->rendered_items[$item_data[
'child']] =
true;
301 $html = $this->
renderItem($item_data,$position++,$a_mode == self::MATERIALS_TESTS ?
false :
true);
304 $item_r[] = array(
"html" => $html,
"id" => $item_data[
"child"]);
310 if (count($item_r) > 0)
314 case self::MATERIALS_TESTS:
315 $txt = $lng->txt(
'objs_tst');
318 case self::MATERIALS_OTHER:
319 $txt = $lng->txt(
'crs_other_resources');
323 $this->
addHeaderRow(
$tpl,$a_mode == self::MATERIALS_TESTS ?
'tst' :
'',$txt);
324 foreach($item_r as $h)
331 #$output_html .= $tpl->get();
332 $this->output_html .=
$tpl->get();
333 #$a_tpl->setCurrentBlock('cont_page_content');
334 #$a_tpl->setVariable("CONTAINER_PAGE_CONTENT", $output_html);
335 #$a_tpl->parseCurrentBlock();
349 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
352 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
353 include_once(
'./Services/Object/classes/class.ilObjectActivation.php');
357 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
361 foreach($items as $item)
368 $chapters = $objectives_lm_obj->getChapters();
371 $item_list_gui2->enableIcon(
true);
376 $has_sections =
false;
377 foreach($chapters as $chapter)
379 if($chapter[
'ref_id'] != $item[
'child'])
383 $has_sections =
true;
384 include_once
'./Modules/LearningModule/classes/class.ilLMObject.php';
386 $details[$num][
'desc'] = $lng->txt(
'obj_'.$chapter[
'type']).
' -> ';
387 $details[$num][
'target'] =
'_top';
388 $details[$num][
'link'] =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$chapter[
'ref_id'].
'&obj_id='.$chapter[
'obj_id'];
394 $item_list_gui2->enableItemDetailLinks(
true);
395 $item_list_gui2->setItemDetailLinks($details,$lng->txt(
'crs_suggested_sections').
': ');
401 $item_list_gui2->enableCheckbox(
true);
404 $item_list_gui2->setPositionInputField(
"[lobj][".$a_objective_id.
"][".$item[
"ref_id"].
"]",
405 sprintf(
'%.1f', $pos));
410 $this->rendered_items[$item[
'child']] =
true;
411 $sub_item_html = $item_list_gui2->getListItemHTML($item[
'ref_id'],
412 $item[
'obj_id'], $item[
'title'], $item[
'description']);
415 $item_list_gui2->adminCommandsIncluded());
416 $this->objective_list_gui->addSubItemHTML($sub_item_html);
421 $this->objective_list_gui->enableCommands(
false);
425 $this->objective_list_gui->enableCommands(
true);
428 $html = $this->objective_list_gui->getListItemHTML(
431 $objective->getTitle(),
432 $objective->getDescription());
448 if(isset(
$_GET[
'details_level']))
450 $this->details_level = (int)
$_GET[
'details_level'];
455 $this->details_level = $ilUser->getPref(
'crs_objectives_details') ? $ilUser->getPref(
'crs_objectives_details') :
self::DETAILS_TITLE;
457 if(isset(
$_GET[
'objective_details']))
459 $this->force_details = (int)
$_GET[
'objective_details'];
460 ilObjUser::_writePref($ilUser->getId(),
'crs_objectives_force_details_'.$this->getContainerObject()->getId(),
$this->force_details);
462 elseif($details_id = $ilUser->getPref(
'crs_objectives_force_details_'.$this->getContainerObject()->getId()))
464 $this->force_details = $details_id;
468 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
469 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
474 $this->force_details = $objective_id;
493 $tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
496 $tpl->setCurrentBlock(
"btn_cell");
497 $tpl->setVariable(
"BTN_LINK",$ilCtrl->getLinkTarget($this->getContainerGUI(),$a_cmd));
498 $tpl->setVariable(
"BTN_TXT",$a_text);
502 $tpl->setVariable(
"BTN_TARGET",$a_target);
505 $tpl->parseCurrentBlock();