25 include_once(
"./Services/Container/classes/class.ilContainerContentGUI.php");
56 parent::__construct($a_container_gui);
70 if($a_objective_id == $this->force_details)
72 return self::DETAILS_ALL;
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;
494 $ilToolbar->addButton($a_text,
495 $ilCtrl->getLinkTarget($this->getContainerGUI(),$a_cmd),
determineAdminCommands($a_ref_id, $a_admin_com_included_in_list=false)
determin admin commands
newBlockTemplate()
returns a new list block template
getMainContent()
Impementation of abstract method getMainContent.
const IL_OBJECTIVE_STATUS_EMPTY
getItemGUI($item_data, $a_show_path=false)
Get ListGUI object for item.
__construct($a_container_gui)
Constructor.
initDetails()
init details
showMaterials($a_tpl, $a_mode)
Show all other (no assigned tests, no assigned materials) materials.
static _lookupTitle($a_obj_id)
Lookup title.
addHeaderRow($a_tpl, $a_type="", $a_text="")
Add header row to block template.
insertPageEmbeddedBlocks($a_output_html)
Insert blocks into container page.
Parent class of all container content GUIs.
class ilCourseObjectiveMaterials
showButton($a_cmd, $a_text, $a_target='')
show action button
getItemGroupsHTML($a_tpl)
Get item groups HTML.
addStandardRow(&$a_tpl, $a_html, $a_ref_id=0)
add item row to template
static isSuggested($a_usr_id, $a_crs_id, $a_objective_id)
check if objective is suggested
getContainerGUI()
Get container GUI object.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
special template class to simplify handling of ITX/PEAR
getContainerObject()
Get container object.
static getStatus($a_usr_id, $a_crs_id)
get status of user
renderObjective($a_objective_id)
render objective
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
renderItem($a_item_data, $a_position=0, $a_force_icon=false, $a_pos_prefix="")
Render an item.
_getObjectiveIds($course_id)
clearAdminCommandsDetermination()
cleaer administration commands determination
static getItemsByObjective($a_objective_id)
Get objective items.
addFooterRow($tpl)
add footer row
showStatus($tpl)
show status
List gui for course objectives.
static _getInstance($a_obj_id)
get instance by obj_id
getDetailsLevel($a_objective_id)
get details level
GUI class for course objective view.
showObjectives($a_tpl)
show objectives