Class ilCourseObjectivePresentationGUI. More...
Inheritance diagram for ilCourseObjectivePresentationGUI:
Collaboration diagram for ilCourseObjectivePresentationGUI:Public Member Functions | |
| ilCourseObjectivePresentationGUI (&$container_gui) | |
| Constructor public. | |
| & | executeCommand () |
| execute command | |
| & | getHTML () |
| Also called from ilCtrl (no command is performed here, just to get standard html). | |
| view () | |
| askReset () | |
| reset () | |
| __showButton ($a_cmd, $a_text, $a_target= '') | |
| __readObjectivesStatus () | |
| __showInfo () | |
| __showObjectives () | |
| __showLearningMaterials () | |
| __showSessions () | |
| __showTests () | |
| __showOtherResources () | |
| __getAllTests () | |
| __getOtherResources () | |
| __showHideLinks ($a_part) | |
| __initCourseObject () | |
Data Fields | |
| $container_obj | |
| $course_obj | |
| $tpl | |
| $ctrl | |
| $lng | |
| $tabs_gui | |
Class ilCourseObjectivePresentationGUI.
ilCourseObjectivePresentationGUI: ilEventAdministrationGUI
Definition at line 38 of file class.ilCourseObjectivePresentationGUI.php.
| ilCourseObjectivePresentationGUI::__getAllTests | ( | ) |
Definition at line 783 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();
}
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__getOtherResources | ( | ) |
Definition at line 797 of file class.ilCourseObjectivePresentationGUI.php.
References ilCourseObjectiveMaterials::_getAllAssignedMaterials().
Referenced by __showOtherResources().
{
include_once('Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
$assigned = ilCourseObjectiveMaterials::_getAllAssignedMaterials($this->course_obj->getId());
foreach($items = $this->course_obj->items_obj->getItems() as $node)
{
if(in_array($node['ref_id'],$assigned))
{
continue;
}
if($node['type'] == 'tst')
{
continue;
}
$all_lms[] = $node['ref_id'];
}
return $all_lms ? $all_lms : array();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__initCourseObject | ( | ) |
Definition at line 846 of file class.ilCourseObjectivePresentationGUI.php.
References ilObjectGUI::$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;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__readObjectivesStatus | ( | ) |
Definition at line 198 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);
}
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showButton | ( | $ | a_cmd, | |
| $ | a_text, | |||
| $ | a_target = '' | |||
| ) |
Reimplemented from ilObjectGUI.
Definition at line 181 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();
}
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showHideLinks | ( | $ | a_part | ) |
Definition at line 818 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;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showInfo | ( | ) |
Definition at line 206 of file class.ilCourseObjectivePresentationGUI.php.
References ilCourseObjective::_getObjectiveIds().
Referenced by view().
{
include_once './Modules/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','Modules/Course');
$this->tpl->setVariable("INFO_STRING",$this->lng->txt('crs_objectives_info_'.$this->status));
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showLearningMaterials | ( | ) |
Definition at line 347 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, ilObjectGUI::$ilias, ilObjectGUI::$obj_id, __showHideLinks(), ilConditionHandler::_checkAllConditionsOfTarget(), ilCourseObjectiveMaterials::_getAllAssignedMaterials(), ilLMObject::_lookupTitle(), ilRepositoryExplorer::buildFrameTarget(), ilRepositoryExplorer::buildLinkTarget(), ilFormat::formatUnixTime(), ilUtil::getImagePath(), and ilRepositoryExplorer::isClickable().
Referenced by view().
{
global $rbacsystem,$ilias,$ilUser,$ilObjDataCache;
include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
include_once './classes/class.ilRepositoryExplorer.php';
include_once './Modules/Course/classes/class.ilCourseLMHistory.php';
if(!count($lms = ilCourseObjectiveMaterials::_getAllAssignedMaterials($this->course_obj->getId())))
{
return false;
}
if($this->details_id)
{
$objectives_lm_obj =& new ilCourseObjectiveMaterials($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','Modules/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->setVariable("TBL_HEADER_LMS_TYPE",$this->lng->txt('type'));
$this->tpl->setVariable("TBL_HEADER_NAME_LMS",$this->lng->txt('description'));
$counter = 1;
foreach($lms as $lm_id)
{
$obj_id = $ilObjDataCache->lookupObjId($lm_id);
$obj_type = $ilObjDataCache->lookupType($obj_id);
$conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($lm_id,$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));
}
elseif($obj_type == 'lm')
{
$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 ilCourseObjectiveMaterials($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 './Modules/LearningModule/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('IMG_TYPE_MAT',ilUtil::getImagePath('icon_'.$obj_type.'.gif'));
$this->tpl->setVariable('TXT_IMG_MAT',$this->lng->txt('obj_'.$obj_type));
$this->tpl->setVariable("OBJ_NR_LMS",$counter.'.');
$this->tpl->parseCurrentBlock();
++$counter;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showObjectives | ( | ) |
Definition at line 221 of file class.ilCourseObjectivePresentationGUI.php.
References $_GET, $_SESSION, $img, __showHideLinks(), ilCourseObjective::_getObjectiveIds(), and ilUtil::getImagePath().
Referenced by view().
{
include_once './Modules/Course/classes/class.ilCourseObjective.php';
if(!count($objective_ids = ilCourseObjective::_getObjectiveIds($this->course_obj->getId())))
{
return false;
}
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','Modules/Course');
$this->tpl->setVariable("TBL_TITLE_OBJECTIVES",$this->lng->txt('crs_objectives'));
$this->__showHideLinks('objectives');
if(isset($_SESSION['crs_hide_objectives']))
{
return true;
}
$this->tpl->setVariable('TBL_HEADER_NAME_OBJECTIVES_A',$this->lng->txt('type'));
$this->tpl->setVariable('TBL_HEADER_NAME_OBJECTIVES_B',$this->lng->txt('description'));
$this->tpl->setVariable('TBL_HEADER_NAME_OBJECTIVES_C',$status);
//$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','');
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showOtherResources | ( | ) |
Definition at line 685 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, ilObjectGUI::$ilias, ilObjectGUI::$obj_id, ilObjectGUI::$objDefinition, __getOtherResources(), __showHideLinks(), ilConditionHandler::_checkAllConditionsOfTarget(), ilRepositoryExplorer::buildFrameTarget(), ilRepositoryExplorer::buildLinkTarget(), ilUtil::getTypeIconPath(), and ilRepositoryExplorer::isClickable().
Referenced by view().
{
global $ilias,$rbacsystem,$ilObjDataCache,$objDefinition;
if(!count($ors = $this->__getOtherResources()))
{
return false;
}
$this->tpl->addBlockfile('RESOURCES_BLOCK','resources_block','tpl.crs_objectives_view_or_table.html','Modules/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);
// do not show side block items
if ($objDefinition->isSideBlock($obj_type))
{
continue;
}
$conditions_ok = ilConditionHandler::_checkAllConditionsOfTarget($or_id,$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::getTypeIconPath($obj_type,$obj_id,'small'));
$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();
++$counter;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showSessions | ( | ) |
Definition at line 509 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, __showHideLinks(), ilEvent::_getEvents(), and ilEventParticipants::_isRegistered().
Referenced by view().
{
global $ilUser;
include_once('./Modules/Course/classes/Event/class.ilEvent.php');
include_once('./Modules/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','Modules/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'));
$this->tpl->setCurrentBlock("session_link");
$this->ctrl->setParameterByClass('ileventadministrationgui','event_id',$event_obj->getEventId());
$this->tpl->setVariable("LINK_SESSION",$this->ctrl->getLinkTargetByClass('ileventadministrationgui','info'));
$this->tpl->setVariable("TXT_LINK_SESSION",$this->lng->txt('info_short'));
$this->tpl->parseCurrentBlock();
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++;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::__showTests | ( | ) |
Definition at line 591 of file class.ilCourseObjectivePresentationGUI.php.
References $_SESSION, ilObjectGUI::$ilias, ilObjectGUI::$obj_id, __getAllTests(), __showHideLinks(), ilConditionHandler::_checkAllConditionsOfTarget(), ilCourseObjectiveQuestion::_isTestAssignedToObjective(), ilRepositoryExplorer::buildLinkTarget(), and ilRepositoryExplorer::isClickable().
Referenced by view().
{
global $ilias,$rbacsystem,$ilObjDataCache,$ilUser;
include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
if(!count($tests = $this->__getAllTests()))
{
return false;
}
$this->tpl->addBlockfile('TEST_BLOCK','test_block','tpl.crs_objectives_view_tst_table.html','Modules/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($tst_id,$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.'.');
// Check if test is assigned to objective
include_once('Modules/Course/classes/class.ilCourseObjectiveQuestion.php');
if($this->details_id and ilCourseObjectiveQuestion::_isTestAssignedToObjective($tst_id,$this->details_id))
{
$this->tpl->setVariable("OBJ_CLASS_CENTER_TST",'option_value_center_details');
$this->tpl->setVariable("OBJ_CLASS_TST",'option_value_details');
}
else
{
$this->tpl->setVariable("OBJ_CLASS_CENTER_TST",'option_value_center');
$this->tpl->setVariable("OBJ_CLASS_TST",'option_value');
}
$this->tpl->parseCurrentBlock();
++$counter;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::askReset | ( | ) |
Definition at line 153 of file class.ilCourseObjectivePresentationGUI.php.
{
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_objectives_ask_reset.html",'Modules/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 | ( | ) |
execute command
Reimplemented from ilObjectGUI.
Definition at line 71 of file class.ilCourseObjectivePresentationGUI.php.
{
$next_class = $this->ctrl->getNextClass();
switch($next_class)
{
case 'ileventadministrationgui':
include_once 'Modules/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::getHTML | ( | ) |
Also called from ilCtrl (no command is performed here, just to get standard html).
Reimplemented from ilObjectGUI.
Definition at line 100 of file class.ilCourseObjectivePresentationGUI.php.
References view().
{
$this->view();
}
Here is the call graph for this function:| ilCourseObjectivePresentationGUI::ilCourseObjectivePresentationGUI | ( | &$ | container_gui | ) |
Constructor public.
Definition at line 52 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();
}
Here is the call graph for this function:| ilCourseObjectivePresentationGUI::reset | ( | ) |
Definition at line 165 of file class.ilCourseObjectivePresentationGUI.php.
References ilUtil::sendInfo(), and view().
{
global $ilUser;
include_once './Modules/Course/classes/class.ilCourseObjectiveResult.php';
$tmp_obj_res =& new ilCourseObjectiveResult($ilUser->getId());
$tmp_obj_res->reset($this->course_obj->getId());
ilUtil::sendInfo($this->lng->txt('crs_objectives_reseted'));
$this->view();
}
Here is the call graph for this function:| ilCourseObjectivePresentationGUI::view | ( | ) |
Definition at line 105 of file class.ilCourseObjectivePresentationGUI.php.
References $ilBench, __readObjectivesStatus(), __showButton(), __showInfo(), __showLearningMaterials(), __showObjectives(), __showOtherResources(), __showSessions(), and __showTests().
Referenced by getHTML(), and reset().
{
global $rbacsystem,$ilUser,$ilBench;
$ilBench->start('Objectives','Objectives_view');
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_objective_view.html",'Modules/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;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilCourseObjectivePresentationGUI::$container_obj |
Definition at line 40 of file class.ilCourseObjectivePresentationGUI.php.
| ilCourseObjectivePresentationGUI::$course_obj |
Definition at line 41 of file class.ilCourseObjectivePresentationGUI.php.
| ilCourseObjectivePresentationGUI::$ctrl |
Definition at line 44 of file class.ilCourseObjectivePresentationGUI.php.
| ilCourseObjectivePresentationGUI::$lng |
Reimplemented from ilObjectGUI.
Definition at line 45 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by ilCourseObjectivePresentationGUI().
| ilCourseObjectivePresentationGUI::$tabs_gui |
Definition at line 46 of file class.ilCourseObjectivePresentationGUI.php.
| ilCourseObjectivePresentationGUI::$tpl |
Reimplemented from ilObjectGUI.
Definition at line 43 of file class.ilCourseObjectivePresentationGUI.php.
Referenced by ilCourseObjectivePresentationGUI().
1.7.1