Public Member Functions | |
ilCourseObjectivePresentationGUI (&$container_gui) | |
Constructor public. | |
& | executeCommand () |
view () | |
askReset () | |
reset () | |
__showButton ($a_cmd, $a_text, $a_target= '') | |
__readObjectivesStatus () | |
__showInfo () | |
__showObjectives () | |
__showLearningMaterials () | |
__showSessions () | |
__showTests () | |
__showOtherResources () | |
__getAllTests () | |
__getAllLearningMaterials () | |
__getOtherResources () | |
__showHideLinks ($a_part) | |
__initCourseObject () | |
Data Fields | |
$container_obj | |
$course_obj | |
$tpl | |
$ctrl | |
$lng | |
$tabs_gui |
Definition at line 39 of file class.ilCourseObjectivePresentationGUI.php.
ilCourseObjectivePresentationGUI::__getAllLearningMaterials | ( | ) |
Definition at line 799 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by __showLearningMaterials().
{ foreach($items = $this->course_obj->items_obj->getItems() as $node) { switch($node['type']) { case 'lm': case 'htlm': case 'alm': case 'sahs': $all_lms[] = $node['ref_id']; break; } } return $all_lms ? $all_lms : array(); }
ilCourseObjectivePresentationGUI::__getAllTests | ( | ) |
Definition at line 785 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by __showTests().
{ foreach($items = $this->course_obj->items_obj->getItems() as $node) { switch($node['type']) { case 'tst': $tests[] = $node['ref_id']; break; } } return $tests ? $tests : array(); }
ilCourseObjectivePresentationGUI::__getOtherResources | ( | ) |
Definition at line 816 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by __showOtherResources().
{ foreach($items = $this->course_obj->items_obj->getItems() as $node) { switch($node['type']) { case 'lm': case 'htlm': case 'sahs': case 'tst': continue; default: $all_lms[] = $node['ref_id']; break; } } return $all_lms ? $all_lms : array(); }
ilCourseObjectivePresentationGUI::__initCourseObject | ( | ) |
Definition at line 865 of file class.ilCourseObjectivePresentationGUI.php.
References $tree, and ilObjectFactory::getInstanceByRefId().
Referenced by ilCourseObjectivePresentationGUI().
{ global $tree; if($this->container_obj->getType() == 'crs') { // Container is course $this->course_obj =& $this->container_obj; } else { $course_ref_id = $tree->checkForParentType($this->container_obj->getRefId(),'crs'); $this->course_obj =& ilObjectFactory::getInstanceByRefId($course_ref_id); } $this->course_obj->initCourseItemObject(); return true; }
ilCourseObjectivePresentationGUI::__readObjectivesStatus | ( | ) |
Definition at line 192 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by view().
{ $this->objective_result_obj->readStatus($this->course_obj->getId()); $this->accomplished = $this->objective_result_obj->getAccomplished($this->course_obj->getId()); $this->status = $this->objective_result_obj->getStatus($this->course_obj->getId()); $this->suggested = $this->objective_result_obj->getSuggested($this->course_obj->getId(),$this->status); }
ilCourseObjectivePresentationGUI::__showButton | ( | $ | a_cmd, | |
$ | a_text, | |||
$ | a_target = '' | |||
) |
Definition at line 175 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by view().
{ $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html"); // display button $this->tpl->setCurrentBlock("btn_cell"); $this->tpl->setVariable("BTN_LINK",$this->ctrl->getLinkTarget($this,$a_cmd)); $this->tpl->setVariable("BTN_TXT",$a_text); if($a_target) { $this->tpl->setVariable("BTN_TARGET",$a_target); } $this->tpl->parseCurrentBlock(); }
ilCourseObjectivePresentationGUI::__showHideLinks | ( | $ | a_part | ) |
Definition at line 837 of file class.ilCourseObjectivePresentationGUI.php.
References $_GET, $_SESSION, and ilUtil::getImagePath().
Referenced by __showLearningMaterials(), __showObjectives(), __showOtherResources(), __showSessions(), and __showTests().
{ if($_GET['show_hide_'.$a_part] == 1) { unset($_SESSION['crs_hide_'.$a_part]); } if($_GET['show_hide_'.$a_part] == 2) { $_SESSION['crs_hide_'.$a_part] = true; } $this->ctrl->setParameter($this,'show_hide_'.$a_part,$_SESSION['crs_hide_'.$a_part] ? 1 : 2); $this->tpl->setVariable("LINK_HIDE_SHOW_".strtoupper($a_part),$this->ctrl->getLinkTarget($this,'view')); $this->tpl->setVariable("TXT_HIDE_SHOW_".strtoupper($a_part),$_SESSION['crs_hide_'.$a_part] ? $this->lng->txt('crs_show_link_'.$a_part) : $this->lng->txt('crs_hide_link_'.$a_part)); $this->ctrl->setParameter($this,'show_hide_'.$a_part,''); $this->tpl->setVariable("HIDE_SHOW_IMG_".strtoupper($a_part),$_SESSION['crs_hide_'.$a_part] ? ilUtil::getImagePath('a_down.gif') : ilUtil::getImagePath('a_up.gif')); return true; }
ilCourseObjectivePresentationGUI::__showInfo | ( | ) |
Definition at line 200 of file class.ilCourseObjectivePresentationGUI.php.
References ilCourseObjective::_getObjectiveIds().
Referenced by view().
{ include_once './course/classes/class.ilCourseObjective.php'; if(!count($objective_ids = ilCourseObjective::_getObjectiveIds($this->course_obj->getId()))) { return true; } $this->tpl->addBlockfile('INFO_BLOCK','info_block','tpl.crs_objectives_view_info_table.html','course'); $this->tpl->setVariable("INFO_STRING",$this->lng->txt('crs_objectives_info_'.$this->status)); return true; }
ilCourseObjectivePresentationGUI::__showLearningMaterials | ( | ) |
Definition at line 357 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, $counter, $ilias, $lm_id, $obj_id, $rbacsystem, __getAllLearningMaterials(), __showHideLinks(), ilConditionHandler::_checkAllConditionsOfTarget(), ilLMObject::_lookupTitle(), ilRepositoryExplorer::buildFrameTarget(), ilRepositoryExplorer::buildLinkTarget(), ilFormat::formatUnixTime(), and ilRepositoryExplorer::isClickable().
Referenced by view().
{ global $rbacsystem,$ilias,$ilUser,$ilObjDataCache; include_once './course/classes/class.ilCourseObjectiveLM.php'; include_once './classes/class.ilRepositoryExplorer.php'; include_once './course/classes/class.ilCourseLMHistory.php'; if(!count($lms = $this->__getAllLearningMaterials())) { return false; } if($this->details_id) { $objectives_lm_obj =& new ilCourseObjectiveLM($this->details_id); } $lm_continue =& new ilCourseLMHistory($this->course_obj->getRefId(),$ilUser->getId()); $continue_data = $lm_continue->getLMHistory(); $this->tpl->addBlockfile('LM_BLOCK','lm_block','tpl.crs_objectives_view_lm_table.html','course'); $this->tpl->setVariable("TBL_TITLE_LMS",$this->lng->txt('crs_learning_materials')); $this->__showHideLinks('lms'); if(isset($_SESSION['crs_hide_lms'])) { return true; } $this->tpl->setCurrentBlock("tbl_header_columns_lms"); $this->tpl->setVariable("TBL_HEADER_WIDTH_LMS","5%"); $this->tpl->setVariable("TBL_HEADER_NAME_LMS",$this->lng->txt('crs_nr')); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_header_columns_lms"); $this->tpl->setVariable("TBL_HEADER_WIDTH_LMS","75%"); $this->tpl->setVariable("TBL_HEADER_NAME_LMS",$this->lng->txt('description')); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_header_columns_lms"); $this->tpl->setVariable("TBL_HEADER_WIDTH_LMS","25%"); $this->tpl->setVariable("TBL_HEADER_NAME_LMS",$this->lng->txt('actions')); $this->tpl->parseCurrentBlock(); $counter = 1; foreach($lms as $lm_id) { $obj_id = $ilObjDataCache->lookupObjId($lm_id); $obj_type = $ilObjDataCache->lookupType($obj_id); $conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($obj_id); $obj_link = ilRepositoryExplorer::buildLinkTarget($lm_id,$ilObjDataCache->lookupType($obj_id)); $obj_frame = ilRepositoryExplorer::buildFrameTarget($ilObjDataCache->lookupType($obj_id),$lm_id,$obj_id); $obj_frame = $obj_frame ? $obj_frame : ''; $contentObj = false; if(ilRepositoryExplorer::isClickable($obj_type,$lm_id,$obj_id)) { $this->tpl->setCurrentBlock("lm_read"); $this->tpl->setVariable("READ_TITLE_LMS",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->setVariable("READ_TARGET_LMS",$obj_frame); $this->tpl->setVariable("READ_LINK_LMS", $obj_link); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock("lm_visible"); $this->tpl->setVariable("VISIBLE_LINK_LMS",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->parseCurrentBlock(); } // add to desktop link if(!$ilUser->isDesktopItem($lm_id,$obj_type) and ($this->course_obj->getAboStatus() == $this->course_obj->ABO_ENABLED)) { if ($rbacsystem->checkAccess('read',$lm_id)) { $this->tpl->setCurrentBlock("lm_desklink"); $this->ctrl->setParameterByClass(get_class($this->container_gui),'item_ref_id',$lm_id); $this->ctrl->setParameterByClass(get_class($this->container_gui),'item_id',$lm_id); $this->ctrl->setParameterByClass(get_class($this->container_gui),'type',$obj_type); $this->tpl->setVariable("DESK_LINK_LMS",$this->ctrl->getLinkTarget($this->container_gui,'addToDesk')); $this->tpl->setVariable("TXT_DESK_LMS", $this->lng->txt("to_desktop")); $this->tpl->parseCurrentBlock(); } } // CONTINUE LINK if(isset($continue_data[$lm_id])) { $this->tpl->setCurrentBlock("lm_continuelink"); $this->tpl->setVariable("CONTINUE_LINK_LMS",'ilias.php?baseClass=ilLMPresentationGUI&ref_id='.$lm_id.'&obj_id='. $continue_data[$lm_id]['lm_page_id']); $target = ''; $this->tpl->setVariable("CONTINUE_LINK_TARGET",$obj_frame); $this->tpl->setVariable("TXT_CONTINUE_LMS",$this->lng->txt('continue_work')); $this->tpl->parseCurrentBlock(); } // Description if(strlen($ilObjDataCache->lookupDescription($obj_id))) { $this->tpl->setCurrentBlock("lms_description"); $this->tpl->setVariable("DESCRIPTION_LMS",$ilObjDataCache->lookupDescription($obj_id)); $this->tpl->parseCurrentBlock(); } // LAST ACCESS if(isset($continue_data["$lm_id"])) { $this->tpl->setVariable("TEXT_INFO_LMS",$this->lng->txt('last_access')); $this->tpl->setVariable("INFO_LMS",ilFormat::formatUnixTime($continue_data["$lm_id"]['last_access'],true)); } else { $this->tpl->setVariable("INFO_LMS",$this->lng->txt('not_accessed')); } if($this->details_id) { $objectives_lm_obj->setLMRefId($lm_id); if($objectives_lm_obj->checkExists()) { $objectives_lm_obj =& new ilCourseObjectiveLM($this->details_id); if($conditions_ok) { foreach($objectives_lm_obj->getChapters() as $lm_obj_data) { if($lm_obj_data['ref_id'] != $lm_id) { continue; } include_once './content/classes/class.ilLMObject.php'; $this->tpl->setCurrentBlock("chapters"); $this->tpl->setVariable("TXT_CHAPTER",$this->lng->txt('chapter')); $this->tpl->setVariable("CHAPTER_LINK_LMS","ilias.php?baseClass=ilLMPresentationGUI&ref_id=". $lm_obj_data['ref_id']. '&obj_id='.$lm_obj_data['obj_id']); $this->tpl->setVariable("CHAPTER_LINK_TARGET_LMS",$obj_frame); $this->tpl->setVariable("CHAPTER_TITLE",ilLMObject::_lookupTitle($lm_obj_data['obj_id'])); $this->tpl->parseCurrentBlock(); } } $this->tpl->setVariable("OBJ_CLASS_CENTER_LMS",'option_value_center_details'); $this->tpl->setVariable("OBJ_CLASS_LMS",'option_value_details'); } else { $this->tpl->setVariable("OBJ_CLASS_CENTER_LMS",'option_value_center'); $this->tpl->setVariable("OBJ_CLASS_LMS",'option_value'); } } else { $this->tpl->setVariable("OBJ_CLASS_CENTER_LMS",'option_value_center'); $this->tpl->setVariable("OBJ_CLASS_LMS",'option_value'); } $this->tpl->setCurrentBlock("lm_row"); $this->tpl->setVariable("OBJ_NR_LMS",$counter.'.'); $this->tpl->parseCurrentBlock(); ++$counter; } }
ilCourseObjectivePresentationGUI::__showObjectives | ( | ) |
Definition at line 215 of file class.ilCourseObjectivePresentationGUI.php.
References $_GET, $_SESSION, $img, __showHideLinks(), ilCourseObjective::_getObjectiveIds(), and ilUtil::getImagePath().
Referenced by view().
{ include_once './course/classes/class.ilCourseObjective.php'; if(!count($objective_ids = ilCourseObjective::_getObjectiveIds($this->course_obj->getId()))) { return false; } // TODO if($_GET['details']) { $_SESSION['crs_details_id'] = $_GET['details']; } $this->details_id = $_SESSION['crs_details_id'] ? $_SESSION['crs_details_id'] : $objective_ids[0]; // TODO get status for table header switch($this->status) { case 'none': $status = $this->lng->txt('crs_objective_accomplished'); break; case 'pretest': case 'pretest_non_suggest': $status = $this->lng->txt('crs_objective_pretest'); break; default: $status = $this->lng->txt('crs_objective_result'); } // show table $this->tpl->addBlockfile('OBJECTIVE_BLOCK','objective_block','tpl.crs_objectives_view_table.html','course'); $this->tpl->setVariable("TBL_TITLE_OBJECTIVES",$this->lng->txt('crs_objectives')); $this->__showHideLinks('objectives'); if(isset($_SESSION['crs_hide_objectives'])) { return true; } // show table header for($i = 0; $i < 1; ++$i) { $this->tpl->setCurrentBlock("tbl_header_columns"); $this->tpl->setVariable("ALIGN",'center'); $this->tpl->setVariable("TBL_HEADER_WIDTH_OBJECTIVES","5%"); $this->tpl->setVariable("TBL_HEADER_NAME_OBJECTIVES",$this->lng->txt('crs_nr')); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_header_columns"); $this->tpl->setVariable("ALIGN",'left'); $this->tpl->setVariable("TBL_HEADER_WIDTH_OBJECTIVES","35%"); $this->tpl->setVariable("TBL_HEADER_NAME_OBJECTIVES",$this->lng->txt('description')); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_header_columns"); $this->tpl->setVariable("ALIGN",'center'); $this->tpl->setVariable("TBL_HEADER_WIDTH_OBJECTIVES","10%"); $this->tpl->setVariable("TBL_HEADER_NAME_OBJECTIVES",$status); $this->tpl->parseCurrentBlock(); } //$max = count($objective_ids) % 2 ? count($objective_ids) + 1 : count($objective_ids); $max = count($objective_ids); for($i = 0; $i < $max; ++$i) { $tmp_objective =& new ilCourseObjective($this->course_obj,$objective_ids[$i]); $this->tpl->setCurrentBlock("objective_row"); if($this->details_id == $objective_ids[$i]) { $this->tpl->setVariable("OBJ_CLASS_1_OBJECTIVES",'option_value_details'); $this->tpl->setVariable("OBJ_CLASS_1_CENTER_OBJECTIVES",'option_value_center_details'); } else { $this->tpl->setVariable("OBJ_CLASS_1_OBJECTIVES",'option_value'); $this->tpl->setVariable("OBJ_CLASS_1_CENTER_OBJECTIVES",'option_value_center'); } $this->tpl->setVariable("OBJ_NR_1_OBJECTIVES",($i + 1).'.'); $this->ctrl->setParameter($this,'details',$objective_ids[$i]); $this->tpl->setVariable("OBJ_LINK_1_OBJECTIVES",$this->ctrl->getLinkTarget($this,'view')); $this->tpl->setVariable("OBJ_TITLE_1_OBJECTIVES",$tmp_objective->getTitle()); $img = !in_array($objective_ids[$i],$this->suggested) ? ilUtil::getImagePath('icon_ok.gif') : ilUtil::getImagePath('icon_not_ok.gif'); $txt = !in_array($objective_ids[$i],$this->suggested) ? $this->lng->txt('crs_objective_accomplished') : $this->lng->txt('crs_objective_not_accomplished'); $this->tpl->setVariable("OBJ_STATUS_IMG_1_OBJECTIVES",$img); $this->tpl->setVariable("OBJ_STATUS_ALT_1_OBJECTIVES",$txt); if(isset($objective_ids[$i + $max / 2])) { $tmp_objective =& new ilCourseObjective($this->course_obj,$objective_ids[$i + $max / 2]); $this->tpl->setCurrentBlock("objective_row"); if($this->details_id == $objective_ids[$i + $max / 2]) { $this->tpl->setVariable("OBJ_CLASS_2_OBJECTIVES",'option_value_details'); $this->tpl->setVariable("OBJ_CLASS_2_CENTER_OBJECTIVES",'option_value_center_details'); } else { $this->tpl->setVariable("OBJ_CLASS_2_OBJECTIVES",'option_value'); $this->tpl->setVariable("OBJ_CLASS_2_CENTER_OBJECTIVES",'option_value_center'); } $this->tpl->setVariable("OBJ_NR_2_OBJECTIVES",($i + $max / 2 + 1).'.'); $this->ctrl->setParameter($this,'details',$objective_ids[$i + $max / 2]); $this->tpl->setVariable("OBJ_LINK_2_OBJECTIVES",$this->ctrl->getLinkTarget($this,'view')); $this->tpl->setVariable("OBJ_TITLE_2_OBJECTIVES",$tmp_objective->getTitle()); $objective_id = $objective_ids[$i + $max / 2]; $img = !in_array($objective_id,$this->suggested) ? ilUtil::getImagePath('icon_ok.gif') : ilUtil::getImagePath('icon_not_ok.gif'); $txt = !in_array($objective_id,$this->suggested) ? $this->lng->txt('crs_objective_accomplished') : $this->lng->txt('crs_objective_not_accomplished'); $this->tpl->setVariable("OBJ_STATUS_IMG_2_OBJECTIVES",$img); $this->tpl->setVariable("OBJ_STATUS_ALT_2_OBJECTIVES",$txt); } $this->tpl->parseCurrentBlock(); unset($tmp_objective); } $this->ctrl->setParameter($this,'details',''); }
ilCourseObjectivePresentationGUI::__showOtherResources | ( | ) |
Definition at line 691 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, $counter, $ilias, $obj_id, $rbacsystem, __getOtherResources(), __showHideLinks(), ilConditionHandler::_checkAllConditionsOfTarget(), ilRepositoryExplorer::buildFrameTarget(), ilRepositoryExplorer::buildLinkTarget(), ilUtil::getImagePath(), and ilRepositoryExplorer::isClickable().
Referenced by view().
{ global $ilias,$rbacsystem,$ilObjDataCache; if(!count($ors = $this->__getOtherResources())) { return false; } $this->tpl->addBlockfile('RESOURCES_BLOCK','resources_block','tpl.crs_objectives_view_or_table.html','course'); $this->tpl->setVariable("TBL_TITLE_OR",$this->lng->txt('crs_other_resources')); $this->__showHideLinks('or'); if(isset($_SESSION['crs_hide_or'])) { return true; } $this->tpl->setCurrentBlock("tbl_header_columns_or"); $this->tpl->setVariable("TBL_HEADER_WIDTH_OR","5%"); $this->tpl->setVariable("TBL_HEADER_NAME_OR",$this->lng->txt('type')); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_header_columns_or"); $this->tpl->setVariable("TBL_HEADER_WIDTH_OR","75%"); $this->tpl->setVariable("TBL_HEADER_NAME_OR",$this->lng->txt('description')); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("tbl_header_columns_or"); $this->tpl->setVariable("TBL_HEADER_WIDTH_OR","20%"); $this->tpl->setVariable("TBL_HEADER_NAME_OR",''); $this->tpl->parseCurrentBlock(); $counter = 1; foreach($ors as $or_id) { $obj_id = $ilObjDataCache->lookupObjId($or_id); $obj_type = $ilObjDataCache->lookupType($obj_id); $conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($obj_id); $obj_link = ilRepositoryExplorer::buildLinkTarget($or_id,$obj_type); $obj_frame = ilRepositoryExplorer::buildFrameTarget($obj_type,$or_id,$obj_id); $obj_frame = $obj_frame ? $obj_frame : ''; if(ilRepositoryExplorer::isClickable($obj_type,$or_id,$obj_id)) { $this->tpl->setCurrentBlock("or_read"); $this->tpl->setVariable("READ_TITLE_OR",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->setVariable("READ_TARGET_OR",$obj_frame); $this->tpl->setVariable("READ_LINK_OR", $obj_link); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock("or_visible"); $this->tpl->setVariable("VISIBLE_LINK_OR",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->parseCurrentBlock(); } // add to desktop link if(!$ilias->account->isDesktopItem($or_id,$obj_type) and ($this->course_obj->getAboStatus() == $this->course_obj->ABO_ENABLED)) { if ($rbacsystem->checkAccess('read',$or_id)) { $this->tpl->setCurrentBlock("or_desklink"); $this->ctrl->setParameterByClass(get_class($this->container_gui),'item_ref_id',$or_id); $this->ctrl->setParameterByClass(get_class($this->container_gui),'item_id',$or_id); $this->ctrl->setParameterByClass(get_class($this->container_gui),'type',$obj_type); $this->tpl->setVariable("DESK_LINK_OR",$this->ctrl->getLinkTarget($this->container_gui,'addToDesk')); $this->tpl->setVariable("TXT_DESK_OR", $this->lng->txt("to_desktop")); $this->tpl->parseCurrentBlock(); } } $this->tpl->setCurrentBlock("or_row"); $this->tpl->setVariable("OBJ_TITLE_OR",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->setVariable("IMG_TYPE_OR",ilUtil::getImagePath('icon_'.$obj_type.'.gif')); $this->tpl->setVariable("TXT_IMG_OR",$this->lng->txt('obj_'.$obj_type)); $this->tpl->setVariable("OBJ_CLASS_CENTER_OR",'option_value_center'); $this->tpl->setVariable("OBJ_CLASS_OR",'option_value'); $this->tpl->parseCurrentBlock(); unset($tmp_or); ++$counter; } }
ilCourseObjectivePresentationGUI::__showSessions | ( | ) |
Definition at line 529 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, $counter, __showHideLinks(), ilEvent::_getEvents(), and ilEventParticipants::_isRegistered().
{ global $ilUser; include_once('./course/classes/Event/class.ilEvent.php'); include_once('./course/classes/Event/class.ilEventParticipants.php'); if(!count($event_objs = ilEvent::_getEvents($this->container_obj->getId()))) { return true; } $this->tpl->addBlockfile('SESSION_BLOCK','session_block','tpl.crs_objectives_view_session_table.html','course'); $this->tpl->setVariable("TBL_TITLE_SESSION",$this->lng->txt('events')); $this->__showHideLinks('session'); if(isset($_SESSION['crs_hide_session'])) { return true; } $this->tpl->setVariable("TBL_HEADER_WIDTH_SESSION_1","75%"); $this->tpl->setVariable("TBL_HEADER_NAME_SESSION_1",$this->lng->txt('description')); $this->tpl->setVariable("TBL_HEADER_WIDTH_SESSION","5%"); $this->tpl->setVariable("TBL_HEADER_NAME_SESSION",$this->lng->txt('crs_nr')); $this->tpl->setVariable("TBL_HEADER_WIDTH_SESSION_2","20%"); $this->tpl->setVariable("TBL_HEADER_NAME_SESSION_2",''); $counter = 1; foreach($event_objs as $event_obj) { if(strlen($event_obj->getDescription())) { $this->tpl->setCurrentBlock('session_desc_block'); $this->tpl->setVariable('SESSION_DESC',$event_obj->getDescription()); $this->tpl->parseCurrentBlock(); } $this->tpl->setVariable("READ_TITLE_SESSION",$event_obj->getTitle()); $this->tpl->setVariable("READ_TARGET_SESSION",''); $this->ctrl->setParameterByClass('ileventadministrationgui','event_id',$event_obj->getEventId()); $this->tpl->setVariable("READ_LINK_SESSION",$this->ctrl->getLinkTargetByClass('ileventadministrationgui','info')); if($event_obj->enabledRegistration() and ilEventParticipants::_isRegistered($ilUser->getId(),$event_obj->getEventId())) { $this->tpl->setCurrentBlock("session_link"); $this->ctrl->setParameterByClass('ileventadministrationgui','event_id',$event_obj->getEventId()); $this->tpl->setVariable("LINK_SESSION",$this->ctrl->getLinkTargetByClass('ileventadministrationgui','unregister')); $this->tpl->setVariable("TXT_LINK_SESSION",$this->lng->txt('event_unregister')); $this->tpl->parseCurrentBlock(); } elseif($event_obj->enabledRegistration()) { $this->tpl->setCurrentBlock("session_link"); $this->ctrl->setParameterByClass('ileventadministrationgui','event_id',$event_obj->getEventId()); $this->tpl->setVariable("LINK_SESSION",$this->ctrl->getLinkTargetByClass('ileventadministrationgui','register')); $this->tpl->setVariable("TXT_LINK_SESSION",$this->lng->txt('event_register')); $this->tpl->parseCurrentBlock(); } $this->tpl->setCurrentBlock("session_row"); $this->tpl->setVariable('TXT_EVENT_DATE',$this->lng->txt('event_date')); $first_appointment =& $event_obj->getFirstAppointment(); $this->tpl->setVariable('EVENT_DATE',$first_appointment->appointmentToString()); $this->tpl->setVariable("OBJ_NR_SESSION",$counter.'.'); $this->tpl->setVariable("OBJ_CLASS_CENTER_SESSION",'option_value_center'); $this->tpl->setVariable("OBJ_CLASS_SESSION",'option_value'); $this->tpl->parseCurrentBlock(); $counter++; } }
ilCourseObjectivePresentationGUI::__showTests | ( | ) |
Definition at line 605 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, $counter, $ilias, $obj_id, $rbacsystem, __getAllTests(), __showHideLinks(), ilConditionHandler::_checkAllConditionsOfTarget(), ilRepositoryExplorer::buildLinkTarget(), and ilRepositoryExplorer::isClickable().
Referenced by view().
{ global $ilias,$rbacsystem,$ilObjDataCache,$ilUser; include_once './course/classes/class.ilCourseObjectiveLM.php'; if(!count($tests = $this->__getAllTests())) { return false; } $this->tpl->addBlockfile('TEST_BLOCK','test_block','tpl.crs_objectives_view_tst_table.html','course'); $this->tpl->setVariable("TBL_TITLE_TST",$this->lng->txt('tests')); $this->__showHideLinks('tst'); if(isset($_SESSION['crs_hide_tst'])) { return true; } $this->tpl->setVariable("TBL_HEADER_WIDTH_TST_1","75%"); $this->tpl->setVariable("TBL_HEADER_NAME_TST_1",$this->lng->txt('description')); $this->tpl->setVariable("TBL_HEADER_WIDTH_TST","5%"); $this->tpl->setVariable("TBL_HEADER_NAME_TST",$this->lng->txt('crs_nr')); $this->tpl->setVariable("TBL_HEADER_WIDTH_TST_2","20%"); $this->tpl->setVariable("TBL_HEADER_NAME_TST_2",''); $counter = 1; foreach($tests as $tst_id) { $obj_id = $ilObjDataCache->lookupObjId($tst_id); $obj_type = $ilObjDataCache->lookupType($obj_id); $conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($obj_id); $obj_link = ilRepositoryExplorer::buildLinkTarget($tst_id,$obj_type); $obj_link = "ilias.php?baseClass=ilObjTestGUI&ref_id=".$tst_id."&cmd=infoScreen"; $obj_frame = ''; if(ilRepositoryExplorer::isClickable($obj_type,$tst_id,$obj_id)) { $this->tpl->setCurrentBlock("tst_read"); $this->tpl->setVariable("READ_TITLE_TST",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->setVariable("READ_TARGET_TST",$obj_frame); $this->tpl->setVariable("READ_LINK_TST", $obj_link.'&crs_show_result='.$this->course_obj->getRefId()); $this->tpl->parseCurrentBlock(); } else { $this->tpl->setCurrentBlock("tst_visible"); $this->tpl->setVariable("VISIBLE_LINK_TST",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->parseCurrentBlock(); } // add to desktop link if(!$ilUser->isDesktopItem($tst_id,$obj_type) and ($this->course_obj->getAboStatus() == $this->course_obj->ABO_ENABLED)) { if ($rbacsystem->checkAccess('read',$tst_id)) { $this->tpl->setCurrentBlock("tst_desklink"); $this->ctrl->setParameterByClass(get_class($this->container_gui),'item_ref_id',$tst_id); $this->ctrl->setParameterByClass(get_class($this->container_gui),'item_id',$tst_id); $this->ctrl->setParameterByClass(get_class($this->container_gui),'type',$obj_type); $this->tpl->setVariable("DESK_LINK_TST",$this->ctrl->getLinkTarget($this->container_gui,'addToDesk')); $this->tpl->setVariable("TXT_DESK_TST", $this->lng->txt("to_desktop")); $this->tpl->parseCurrentBlock(); } } $this->tpl->setCurrentBlock("tst_row"); $this->tpl->setVariable("OBJ_TITLE_TST",$ilObjDataCache->lookupTitle($obj_id)); $this->tpl->setVariable("OBJ_NR_TST",$counter.'.'); $this->tpl->setVariable("OBJ_CLASS_CENTER_TST",'option_value_center'); $this->tpl->setVariable("OBJ_CLASS_TST",'option_value'); $this->tpl->parseCurrentBlock(); unset($tmp_tst); ++$counter; } }
ilCourseObjectivePresentationGUI::askReset | ( | ) |
Definition at line 147 of file class.ilCourseObjectivePresentationGUI.php.
{ $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_objectives_ask_reset.html","course"); $this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this)); $this->tpl->setVariable("INFO_STRING",$this->lng->txt('crs_objectives_reset_sure')); $this->tpl->setVariable("TXT_CANCEL",$this->lng->txt('cancel')); $this->tpl->setVariable("TXT_RESET",$this->lng->txt('reset')); return true; }
& ilCourseObjectivePresentationGUI::executeCommand | ( | ) |
Definition at line 72 of file class.ilCourseObjectivePresentationGUI.php.
{ #$next_class = $this->ctrl->getNextClass(); $next_class = ''; switch($next_class) { case 'ileventadministrationgui': include_once 'course/classes/Event/class.ilEventAdministrationGUI.php'; $this->ctrl->setReturn($this,''); $event_gui = new ilEventAdministrationGUI($this->container_gui,(int) $_GET['event_id']); $this->ctrl->forwardCommand($event_gui); break; default: $cmd = $this->ctrl->getCmd(); if (!$cmd = $this->ctrl->getCmd()) { $cmd = "view"; } $this->$cmd(); break; } }
ilCourseObjectivePresentationGUI::ilCourseObjectivePresentationGUI | ( | &$ | container_gui | ) |
Constructor public.
Definition at line 53 of file class.ilCourseObjectivePresentationGUI.php.
References $ilCtrl, $lng, $tpl, and __initCourseObject().
{ global $tpl,$ilCtrl,$lng,$ilObjDataCache,$ilTabs,$ilUser; $this->tpl =& $tpl; $this->ctrl =& $ilCtrl; $this->lng =& $lng; $this->tabs_gui =& $ilTabs; $this->container_gui =& $container_gui; $this->container_obj =& $this->container_gui->object; $this->objective_result_obj = new ilCourseObjectiveResult($ilUser->getId()); $this->__initCourseObject(); }
ilCourseObjectivePresentationGUI::reset | ( | ) |
Definition at line 159 of file class.ilCourseObjectivePresentationGUI.php.
References sendInfo(), and view().
{ global $ilUser; include_once './course/classes/class.ilCourseObjectiveResult.php'; $tmp_obj_res =& new ilCourseObjectiveResult($ilUser->getId()); $tmp_obj_res->reset($this->course_obj->getId()); sendInfo($this->lng->txt('crs_objectives_reseted')); $this->view(); }
ilCourseObjectivePresentationGUI::view | ( | ) |
Definition at line 98 of file class.ilCourseObjectivePresentationGUI.php.
References $ilBench, $rbacsystem, __readObjectivesStatus(), __showButton(), __showInfo(), __showLearningMaterials(), __showObjectives(), __showOtherResources(), and __showTests().
Referenced by reset().
{ global $rbacsystem,$ilUser,$ilBench; $ilBench->start('Objectives','Objectives_view'); $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_objective_view.html","course"); $this->__showButton('askReset',$this->lng->txt('crs_reset_results')); $this->__readObjectivesStatus(); $ilBench->stop('Objectives','Objectives_read'); // (1) show infos $this->__showInfo(); // (2) show objectives $ilBench->start('Objectives','Objectives_objectives'); $this->__showObjectives(); $ilBench->stop('Objectives','Objectives_objectives'); // (3) show lm's $ilBench->start('Objectives','Objectives_lms'); $this->__showLearningMaterials(); $ilBench->stop('Objectives','Objectives_lms'); // (4) show tests $ilBench->start('Objectives','Objectives_tests'); $this->__showTests(); $ilBench->stop('Objectives','Objectives_tests'); /* $ilBench->start('Objectives','Objectives_sessions'); $this->__showSessions(); $ilBench->stop('Objectives','Objectives_sessions'); */ // (5) show other resources $ilBench->start('Objectives','Objectives_or'); $this->__showOtherResources(); $ilBench->stop('Objectives','Objectives_or'); $ilBench->stop('Objectives','Objectives_view'); $ilBench->save(); return true; }
ilCourseObjectivePresentationGUI::$container_obj |
Definition at line 41 of file class.ilCourseObjectivePresentationGUI.php.
ilCourseObjectivePresentationGUI::$course_obj |
Definition at line 42 of file class.ilCourseObjectivePresentationGUI.php.
ilCourseObjectivePresentationGUI::$ctrl |
Definition at line 45 of file class.ilCourseObjectivePresentationGUI.php.
ilCourseObjectivePresentationGUI::$lng |
Definition at line 46 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by ilCourseObjectivePresentationGUI().
ilCourseObjectivePresentationGUI::$tabs_gui |
Definition at line 47 of file class.ilCourseObjectivePresentationGUI.php.
ilCourseObjectivePresentationGUI::$tpl |
Definition at line 44 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by ilCourseObjectivePresentationGUI().