ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCourseObjectivePresentationGUI Class Reference

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 ()
 __showTests ()
 __showOtherResources ()
 __getAllTests ()
 __getOtherResources ()
 __showHideLinks ($a_part)
 __initCourseObject ()
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Data Fields

 $container_obj
 $course_obj
 $tpl
 $ctrl
 $lng
 $tabs_gui
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
const CFORM_NEW = 1
const CFORM_IMPORT = 2
const CFORM_CLONE = 3

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 getTabs (&$tabs_gui)
 get tabs abstract method.
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Detailed Description

Member Function Documentation

ilCourseObjectivePresentationGUI::__getAllTests ( )

Definition at line 702 of file class.ilCourseObjectivePresentationGUI.php.

References $tests, and ilObjectActivation\getItems().

Referenced by __showTests().

{
foreach(ilObjectActivation::getItems($this->course_obj->getRefId(), false) as $node)
{
switch($node['type'])
{
case 'tst':
$tests[] = $node['ref_id'];
break;
}
}
return $tests ? $tests : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCourseObjectivePresentationGUI::__getOtherResources ( )

Definition at line 716 of file class.ilCourseObjectivePresentationGUI.php.

References ilCourseObjectiveMaterials\_getAllAssignedMaterials(), and ilObjectActivation\getItems().

Referenced by __showOtherResources().

{
include_once('Modules/Course/classes/class.ilCourseObjectiveMaterials.php');
$assigned = ilCourseObjectiveMaterials::_getAllAssignedMaterials($this->course_obj->getId());
foreach(ilObjectActivation::getItems($this->course_obj->getRefId(), false) 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 765 of file class.ilCourseObjectivePresentationGUI.php.

References $container_obj, 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);
}
include_once "Services/Object/classes/class.ilObjectActivation.php";
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCourseObjectivePresentationGUI::__readObjectivesStatus ( )

Definition at line 190 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 173 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 737 of file class.ilCourseObjectivePresentationGUI.php.

References $_GET, $_SESSION, and ilUtil\getImagePath().

Referenced by __showLearningMaterials(), __showObjectives(), __showOtherResources(), 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.png') :
ilUtil::getImagePath('a_up.png'));
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCourseObjectivePresentationGUI::__showInfo ( )

Definition at line 198 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));
// ilUtil::sendInfo($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 339 of file class.ilCourseObjectivePresentationGUI.php.

References $_SESSION, ilObjectGUI\$ilias, $ilUser, ilObjectGUI\$obj_id, __showHideLinks(), ilConditionHandler\_checkAllConditionsOfTarget(), ilCourseObjectiveMaterials\_getAllAssignedMaterials(), ilLMObject\_lookupTitle(), ilRepositoryExplorer\buildFrameTarget(), ilRepositoryExplorer\buildLinkTarget(), ilDatePresentation\formatDate(), ilUtil\getImagePath(), ilCourseLMHistory\getLMHistory(), IL_CAL_UNIX, and ilRepositoryExplorer\isClickable().

Referenced by view().

{
global $rbacsystem,$ilias,$ilUser,$ilObjDataCache;
include_once './Modules/Course/classes/class.ilCourseObjectiveMaterials.php';
include_once './Services/Repository/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);
$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;
{
$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',ilDatePresentation::formatDate(new ilDateTime($continue_data[$lm_id]['last_access'],IL_CAL_UNIX)));
}
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");
if($lm_obj_data['type'] == 'st')
{
$this->tpl->setVariable("TXT_CHAPTER",$this->lng->txt('chapter'));
}
else
{
$this->tpl->setVariable("TXT_CHAPTER",$this->lng->txt('page'));
}
$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.'.png'));
$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 213 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.png') :
ilUtil::getImagePath('icon_not_ok.png');
$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.png') :
ilUtil::getImagePath('icon_not_ok.png');
$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 604 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;
}
$obj_link = ilRepositoryExplorer::buildLinkTarget($or_id,$obj_type);
$obj_frame = ilRepositoryExplorer::buildFrameTarget($obj_type,$or_id,$obj_id);
$obj_frame = $obj_frame ? $obj_frame : '';
{
$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::__showTests ( )

Definition at line 510 of file class.ilCourseObjectivePresentationGUI.php.

References $_SESSION, ilObjectGUI\$ilias, $ilUser, ilObjectGUI\$obj_id, $tests, __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);
$obj_link = ilRepositoryExplorer::buildLinkTarget($tst_id,$obj_type);
$obj_link = "ilias.php?baseClass=ilObjTestGUI&ref_id=".$tst_id."&cmd=infoScreen";
$obj_frame = '';
{
$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 141 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.

References $cmd.

{
$next_class = $this->ctrl->getNextClass();
switch($next_class)
{
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 91 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, $ilUser, $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());
}

+ Here is the call graph for this function:

ilCourseObjectivePresentationGUI::reset ( )

Definition at line 153 of file class.ilCourseObjectivePresentationGUI.php.

References $ilUser, ilCourseObjectiveResult\reset(), ilUtil\sendSuccess(), and view().

{
global $ilUser;
include_once './Modules/Course/classes/class.ilCourseObjectiveResult.php';
// Debug
ilObjUser::_writePref($ilUser->getId(),'crs_objectives_force_details_'.$this->course_obj->getId(),0);
$tmp_obj_res =& new ilCourseObjectiveResult($ilUser->getId());
$tmp_obj_res->reset($this->course_obj->getId());
ilUtil::sendSuccess($this->lng->txt('crs_objectives_reseted'));
$this->view();
}

+ Here is the call graph for this function:

ilCourseObjectivePresentationGUI::view ( )

Definition at line 96 of file class.ilCourseObjectivePresentationGUI.php.

References $ilBench, $ilUser, __readObjectivesStatus(), __showButton(), __showInfo(), __showLearningMaterials(), __showObjectives(), __showOtherResources(), 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'));
$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');
$ilBench->stop('Objectives','Objectives_lms');
// (4) show tests
$ilBench->start('Objectives','Objectives_tests');
$this->__showTests();
$ilBench->stop('Objectives','Objectives_tests');
// (5) show other resources
$ilBench->start('Objectives','Objectives_or');
$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:

Field Documentation

ilCourseObjectivePresentationGUI::$container_obj

Definition at line 40 of file class.ilCourseObjectivePresentationGUI.php.

Referenced by __initCourseObject().

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
ilCourseObjectivePresentationGUI::$tabs_gui

Definition at line 46 of file class.ilCourseObjectivePresentationGUI.php.

ilCourseObjectivePresentationGUI::$tpl

The documentation for this class was generated from the following file: