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));
141 $tpl->setVariable(
'CONTAINER_PAGE_CONTENT',$info_tpl->get());
142 $tpl->parseCurrentBlock();
161 if ($output_html !=
"")
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)
205 $output_html .=
$tpl->get();
206 $a_tpl->setCurrentBlock(
'cont_page_content');
207 $a_tpl->setVariable(
"CONTAINER_PAGE_CONTENT", $output_html);
208 $a_tpl->parseCurrentBlock();
222 $tpl->setCurrentBlock(
'details_img');
224 $append = $this->details_level == self::DETAILS_TITLE ?
'off' :
'';
225 $tpl->setCurrentBlock(
'details_img');
227 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 2');
228 $tpl->setVariable(
'DETAILS_LINK',
'repository.php?ref_id='.$this->
getContainerObject()->getRefId().
'&details_level=1');
229 $tpl->parseCurrentBlock();
231 $append = $this->details_level == self::DETAILS_ALL ?
'off' :
'';
232 $tpl->setCurrentBlock(
'details_img');
234 $tpl->setVariable(
'DETAILS_ALT',$this->lng->txt(
'details').
' 3');
235 $tpl->setVariable(
'DETAILS_LINK',
'repository.php?ref_id='.$this->
getContainerObject()->getRefId().
'&details_level=2');
236 $tpl->parseCurrentBlock();
238 $tpl->setCurrentBlock(
'container_details_row');
239 $tpl->setVariable(
'TXT_DETAILS',$this->lng->txt(
'details'));
240 $tpl->parseCurrentBlock();
254 global $ilAccess,
$lng;
258 #$output_html = $this->getContainerGUI()->getContainerPageHTML();
262 if ($output_html !=
"")
268 if (is_array($this->items[
"_all"]))
274 foreach($this->items[
"_all"] as $k => $item_data)
276 if($a_mode == self::MATERIALS_TESTS and $item_data[
'type'] !=
'tst')
281 if($this->rendered_items[$item_data[
"child"]] !==
true)
283 $this->rendered_items[$item_data[
'child']] =
true;
286 $html = $this->
renderItem($item_data,$position++,$a_mode == self::MATERIALS_TESTS ?
false :
true);
289 $item_r[] = array(
"html" => $html,
"id" => $item_data[
"child"]);
295 if (count($item_r) > 0)
299 case self::MATERIALS_TESTS:
300 $txt = $lng->txt(
'objs_tst');
303 case self::MATERIALS_OTHER:
304 $txt = $lng->txt(
'crs_other_resources');
308 $this->
addHeaderRow(
$tpl,$a_mode == self::MATERIALS_TESTS ?
'tst' :
'',$txt);
309 foreach($item_r as $h)
316 $output_html .=
$tpl->get();
317 $a_tpl->setCurrentBlock(
'cont_page_content');
318 $a_tpl->setVariable(
"CONTAINER_PAGE_CONTENT", $output_html);
319 $a_tpl->parseCurrentBlock();
333 include_once(
'./Modules/Course/classes/class.ilCourseObjective.php');
336 include_once(
'./Services/Container/classes/class.ilContainerSorting.php');
337 $items = $this->
getContainerObject()->getCourseItemObject()->getItemsByObjective($a_objective_id);
340 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
344 foreach($items as $item)
351 $chapters = $objectives_lm_obj->getChapters();
354 $item_list_gui2->enableIcon(
true);
359 $has_sections =
false;
360 foreach($chapters as $chapter)
362 if($chapter[
'ref_id'] != $item[
'child'])
366 $has_sections =
true;
367 include_once
'./Modules/LearningModule/classes/class.ilLMObject.php';
369 $details[$num][
'desc'] = $lng->txt(
'obj_'.$chapter[
'type']).
' -> ';
370 $details[$num][
'target'] =
'_top';
371 $details[$num][
'link'] =
"ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$chapter[
'ref_id'].
'&obj_id='.$chapter[
'obj_id'];
377 $item_list_gui2->enableItemDetailLinks(
true);
378 $item_list_gui2->setItemDetailLinks($details,$lng->txt(
'crs_suggested_sections').
': ');
384 $item_list_gui2->enableCheckbox(
true);
387 $item_list_gui2->setPositionInputField(
"[lobj][".$a_objective_id.
"][".$item[
"ref_id"].
"]",
388 sprintf(
'%.1f', $pos));
393 $this->rendered_items[$item[
'child']] =
true;
394 $sub_item_html = $item_list_gui2->getListItemHTML($item[
'ref_id'],
395 $item[
'obj_id'], $item[
'title'], $item[
'description']);
398 $item_list_gui2->adminCommandsIncluded());
399 $this->objective_list_gui->addSubItemHTML($sub_item_html);
404 $this->objective_list_gui->enableCommands(
false);
408 $this->objective_list_gui->enableCommands(
true);
411 $html = $this->objective_list_gui->getListItemHTML(
414 $objective->getTitle(),
415 $objective->getDescription());
431 if(isset(
$_GET[
'details_level']))
433 $this->details_level = (int)
$_GET[
'details_level'];
438 $this->details_level = $ilUser->getPref(
'crs_objectives_details') ? $ilUser->getPref(
'crs_objectives_details') :
self::DETAILS_TITLE;
440 if(isset(
$_GET[
'objective_details']))
442 $this->force_details = (int)
$_GET[
'objective_details'];
445 elseif($details_id = $ilUser->getPref(
'crs_objectives_force_details_'.$this->getContainerObject()->getId()))
447 $this->force_details = $details_id;
451 include_once
'./Modules/Course/classes/class.ilCourseObjective.php';
452 include_once(
'./Modules/Course/classes/class.ilCourseObjectiveResultCache.php');
457 $this->force_details = $objective_id;
476 $tpl->addBlockfile(
"BUTTONS",
"buttons",
"tpl.buttons.html");
479 $tpl->setCurrentBlock(
"btn_cell");
480 $tpl->setVariable(
"BTN_LINK",$ilCtrl->getLinkTarget($this->getContainerGUI(),$a_cmd));
481 $tpl->setVariable(
"BTN_TXT",$a_text);
485 $tpl->setVariable(
"BTN_TARGET",$a_target);
488 $tpl->parseCurrentBlock();