ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilCourseContentGUI Class Reference

Class ilCourseContentGUI. More...

+ Inheritance diagram for ilCourseContentGUI:
+ Collaboration diagram for ilCourseContentGUI:

Public Member Functions

 __construct ($container_gui_obj)
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 __getDefaultCommand ()
 
 __checkStartObjects ()
 
 showStartObjects ()
 
 view ()
 Output course content. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 
 __forwardToColumnGUI ()
 Get columngui output. More...
 
 editTimings ()
 
 __showUserAcceptanceTable ()
 
 saveAcceptance ()
 
 editUserTimings ()
 
 returnToMembers ()
 
 showUserTimings ()
 
 __renderUserItem ($item, $level)
 
 __editAdvancedUserTimings ()
 
 __editUserTimings ()
 
 __renderItem ($item, $level)
 
 __showTimingsPanel ()
 
 timingsOn ()
 
 timingsOff ()
 
 updateUserTimings ()
 
__loadFromPost (&$item)
 
 updateTimings ()
 
 __setSubTabs ()
 
 __initCourseObject ()
 
 __toUnix ($date, $time=array())
 
 __prepareDateSelect ($a_unix_time)
 
 __prepareTimeSelect ($a_unix_time)
 
 __buildPath ($a_ref_id)
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 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 More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 

Data Fields

 $container_gui
 
 $container_obj
 
 $course_obj
 
 $tpl
 
 $ctrl
 
 $lng
 
 $tabs_gui
 
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $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. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 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 More...
 
 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. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $rbacsystem
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Detailed Description

Class ilCourseContentGUI.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

@ilCtrl_Calls ilCourseContentGUI: ilColumnGUI, ilObjectCopyGUI

Definition at line 15 of file class.ilCourseContentGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilCourseContentGUI::__construct (   $container_gui_obj)

Constructor @access public.

Parameters
ilObjectGUI

Definition at line 31 of file class.ilCourseContentGUI.php.

32 {
33 global $tpl,$ilCtrl,$lng,$ilObjDataCache,$ilTabs;
34
35 $this->tpl = $tpl;
36 $this->ctrl = $ilCtrl;
37 $this->lng = $lng;
38 $this->lng->loadLanguageModule('crs');
39 $this->tabs_gui = $ilTabs;
40
41 $this->container_gui =&$container_gui_obj;
42 $this->container_obj =&$this->container_gui->object;
43
44 $this->__initCourseObject();
45 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, $lng, $tpl, and __initCourseObject().

+ Here is the call graph for this function:

Member Function Documentation

◆ __buildPath()

ilCourseContentGUI::__buildPath (   $a_ref_id)

Definition at line 1181 of file class.ilCourseContentGUI.php.

1182 {
1183 global $tree;
1184
1185 $path_arr = $tree->getPathFull($a_ref_id, $this->course_obj->getRefId());
1186 $counter = 0;
1187 foreach ($path_arr as $data) {
1188 if ($counter++) {
1189 $path .= " -> ";
1190 }
1191 $path .= $data['title'];
1192 }
1193
1194 return $path;
1195 }
$counter

References $counter, ilObjectGUI\$data, $path, and ilObjectGUI\$tree.

◆ __checkStartObjects()

ilCourseContentGUI::__checkStartObjects ( )

Definition at line 117 of file class.ilCourseContentGUI.php.

118 {
119 include_once './Modules/Course/classes/class.ilCourseStart.php';
120
121 global $ilAccess,$ilUser;
122
123 if ($ilAccess->checkAccess('write', '', $this->course_obj->getRefId())) {
124 return true;
125 }
126 $this->start_obj = new ilCourseStart($this->course_obj->getRefId(), $this->course_obj->getId());
127 if (count($this->start_obj->getStartObjects()) and !$this->start_obj->allFullfilled($ilUser->getId())) {
128 return false;
129 }
130 return true;
131 }
Class ilObj<module_name>
$ilUser
Definition: imgupload.php:18

References $ilUser.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ __editAdvancedUserTimings()

ilCourseContentGUI::__editAdvancedUserTimings ( )

Definition at line 755 of file class.ilCourseContentGUI.php.

756 {
757 $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.crs_usr_edit_timings_adv.html', 'Modules/Course');
758 $this->__showTimingsPanel();
760
761 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
762 $this->tpl->setVariable("HEADER_IMG", ilUtil::getImagePath('icon_crs.svg'));
763 $this->tpl->setVariable("HEADER_ALT", $this->lng->txt('obj_crs'));
764 $this->tpl->setVariable("BLOCK_HEADER_CONTENT", $this->lng->txt('timings_usr_edit'));
765
766 if (!$_SESSION['crs_timings_user_hidden']) {
767 $this->tpl->setVariable("SHOW_HIDE_TEXT", $this->lng->txt('show_details'));
768 $this->ctrl->setParameter($this, 'show_details', 1);
769 $this->tpl->setVariable("SHOW_HIDE_LINK", $this->ctrl->getLinkTarget($this, 'editUserTimings'));
770 } else {
771 $this->tpl->setVariable("SHOW_HIDE_TEXT", $this->lng->txt('hide_details'));
772 $this->ctrl->setParameter($this, 'show_details', 0);
773 $this->tpl->setVariable("SHOW_HIDE_LINK", $this->ctrl->getLinkTarget($this, 'editUserTimings'));
774 }
775 $this->ctrl->clearParameters($this);
776 $this->tpl->setVariable("TXT_TITLE", $this->lng->txt('title'));
777 $this->tpl->setVariable("TXT_START_END", $this->lng->txt('crs_timings_short_start_end'));
778 $this->tpl->setVariable("TXT_INFO_START_END", $this->lng->txt('crs_timings_start_end_info'));
779
780 $this->tpl->setVariable("TXT_LIMIT", $this->lng->txt('crs_timings_short_limit_start_end'));
781 $this->tpl->setVariable("TXT_INFO_LIMIT", $this->lng->txt('crs_timings_from_until'));
782
783 $this->tpl->setVariable("TXT_OWN_PRESETTING", $this->lng->txt('crs_timings_planed_start'));
784 $this->tpl->setVariable("TXT_INFO_OWN_PRESETTING", $this->lng->txt('crs_timings_start_end_info'));
785
786 $this->tpl->setVariable("TXT_DURATION", $this->lng->txt('crs_timings_time_frame'));
787 $this->tpl->setVariable("TXT_INFO_DURATION", $this->lng->txt('crs_timings_in_days'));
788
789 $this->tpl->setVariable("TXT_BTN_UPDATE", $this->lng->txt('save'));
790 $this->tpl->setVariable("TXT_CANCEL", $this->lng->txt('cancel'));
791
792 include_once 'Services/Object/classes/class.ilObjectActivation.php';
793 $sorted_items = ilObjectActivation::getTimingsItems($this->course_obj->getRefId());
794
795 $this->counter = 0;
796 foreach ($sorted_items as $item) {
797 switch ($item['type']) {
798 case 'itgr':
799 break;
800
801 default:
802 $this->__renderItem($item, 0);
803 break;
804 }
805 }
806 }
$_SESSION["AccountId"]
static getTimingsItems($a_container_ref_id)
Get (sub) item data for timings view (no session material, no side blocks)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References $_SESSION, __renderItem(), __showTimingsPanel(), __showUserAcceptanceTable(), ilUtil\getImagePath(), and ilObjectActivation\getTimingsItems().

Referenced by editUserTimings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __editUserTimings()

ilCourseContentGUI::__editUserTimings ( )

Definition at line 808 of file class.ilCourseContentGUI.php.

809 {
810 $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.crs_usr_edit_timings.html', 'Modules/Course');
811
812 $this->__showTimingsPanel();
814
815 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
816 $this->tpl->setVariable("HEADER_IMG", ilUtil::getImagePath('icon_crs.svg'));
817 $this->tpl->setVariable("HEADER_ALT", $this->lng->txt('obj_crs'));
818
819 if (!$_SESSION['crs_timings_user_hidden']) {
820 $this->tpl->setVariable("SHOW_HIDE_TEXT", $this->lng->txt('show_details'));
821 $this->ctrl->setParameter($this, 'show_details', 1);
822 $this->tpl->setVariable("SHOW_HIDE_LINK", $this->ctrl->getLinkTarget($this, 'editUserTimings'));
823 } else {
824 $this->tpl->setVariable("SHOW_HIDE_TEXT", $this->lng->txt('hide_details'));
825 $this->ctrl->setParameter($this, 'show_details', 0);
826 $this->tpl->setVariable("SHOW_HIDE_LINK", $this->ctrl->getLinkTarget($this, 'editUserTimings'));
827 }
828 $this->ctrl->clearParameters($this);
829
830 $this->tpl->setVariable("BLOCK_HEADER_CONTENT", $this->lng->txt('timings_timings'));
831 $this->tpl->setVariable("TXT_TITLE", $this->lng->txt('title'));
832 $this->tpl->setVariable("TXT_START", $this->lng->txt('crs_timings_sug_begin'));
833 $this->tpl->setVariable("TXT_END", $this->lng->txt('crs_timings_sug_end'));
834
835 include_once 'Services/Object/classes/class.ilObjectActivation.php';
836 $sorted_items = ilObjectActivation::getTimingsItems($this->course_obj->getRefId());
837
838 $this->counter = 0;
839 foreach ($sorted_items as $item) {
840 switch ($item['type']) {
841 case 'itgr':
842 break;
843
844 default:
845 $this->__renderItem($item, 0);
846 break;
847 }
848 }
849 }

References $_SESSION, __renderItem(), __showTimingsPanel(), __showUserAcceptanceTable(), ilUtil\getImagePath(), and ilObjectActivation\getTimingsItems().

Referenced by editUserTimings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __forwardToColumnGUI()

ilCourseContentGUI::__forwardToColumnGUI ( )

Get columngui output.

Definition at line 348 of file class.ilCourseContentGUI.php.

349 {
350 global $ilCtrl, $ilAccess;
351
352 include_once("Services/Block/classes/class.ilColumnGUI.php");
353
354 $obj_id = ilObject::_lookupObjId($this->container_obj->getRefId());
355 $obj_type = ilObject::_lookupType($obj_id);
356
357 if (!$ilCtrl->isAsynch()) {
358 //if ($column_gui->getScreenMode() != IL_SCREEN_SIDE)
360 // right column wants center
362 $column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
363 $this->setColumnSettings($column_gui);
364 $html = $ilCtrl->forwardCommand($column_gui);
365 }
366 // left column wants center
368 $column_gui = new ilColumnGUI($obj_type, IL_COL_LEFT);
369 $this->setColumnSettings($column_gui);
370 $html = $ilCtrl->forwardCommand($column_gui);
371 }
372 } else {
373 {
374 $this->getDefaultView();
375 }
376 }
377 }
378
379 return $html;
380 }
const IL_SCREEN_SIDE
const IL_COL_RIGHT
const IL_COL_LEFT
Column user interface class.
static getScreenMode()
Get Screen Mode for current command.
static getCmdSide()
Get Column Side of Current Command.
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
$html
Definition: example_001.php:87

References $html, $ilCtrl, ilObjectGUI\$obj_id, ilObject\_lookupObjId(), ilObject\_lookupType(), ilColumnGUI\getCmdSide(), ilColumnGUI\getScreenMode(), IL_COL_LEFT, IL_COL_RIGHT, IL_SCREEN_SIDE, and setColumnSettings().

+ Here is the call graph for this function:

◆ __getDefaultCommand()

ilCourseContentGUI::__getDefaultCommand ( )

Definition at line 99 of file class.ilCourseContentGUI.php.

100 {
101 global $ilAccess;
102
103 // edit timings if panel is on
104 if ($_SESSION['crs_timings_panel'][$this->course_obj->getId()]) {
105 return 'editTimings';
106 }
107 if ($ilAccess->checkAccess('write', '', $this->container_obj->getRefId())) {
108 return 'view';
109 }
110 if ($this->container_obj->getType() == 'crs' and
111 $this->course_obj->getViewMode() == IL_CRS_VIEW_TIMING) {
112 return 'editUserTimings';
113 }
114 return 'view';
115 }
const IL_CRS_VIEW_TIMING

References $_SESSION, and IL_CRS_VIEW_TIMING.

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ __initCourseObject()

ilCourseContentGUI::__initCourseObject ( )

Definition at line 1147 of file class.ilCourseContentGUI.php.

1148 {
1149 global $tree;
1150
1151 if ($this->container_obj->getType() == 'crs') {
1152 // Container is course
1153 $this->course_obj =&$this->container_obj;
1154 } else {
1155 $course_ref_id = $tree->checkForParentType($this->container_obj->getRefId(), 'crs');
1156 $this->course_obj =&ilObjectFactory::getInstanceByRefId($course_ref_id);
1157 }
1158 return true;
1159 }
static getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id

References $container_obj, ilObjectGUI\$tree, and ilObjectFactory\getInstanceByRefId().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __loadFromPost()

& ilCourseContentGUI::__loadFromPost ( $item)

Definition at line 1057 of file class.ilCourseContentGUI.php.

1058 {
1059 $obj_id = $item['obj_id'];
1060
1061 if (!isset($_POST['item'][$obj_id])) {
1062 return $item;
1063 }
1064 $item['suggestion_start'] = $this->__toUnix($_POST['item'][$obj_id]['sug_start']);
1065 if (isset($_POST['item'][$obj_id]['sug_end'])) {
1066 // #9325
1067 $item['suggestion_end'] = $this->__toUnix($_POST['item'][$obj_id]['sug_end']);
1068 }
1069 $item['earliest_start'] = $this->__toUnix($_POST['item'][$obj_id]['lim_start']);
1070 $item['latest_end'] = $this->__toUnix($_POST['item'][$obj_id]['lim_end']);
1071 $item['changeable'] = $_POST['item'][$obj_id]['change'];
1072 $item['timing_type'] = $_POST['item'][$obj_id]['active'] ? ilObjectActivation::TIMINGS_PRESETTING : $item['timing_type'];
1073 $item['duration_a'] = $_POST['item'][$obj_id]['duration_a'];
1074 $item['duration_b'] = $_POST['item'][$obj_id]['duration_b'];
1075
1076 return $item;
1077 }
$_POST["username"]
__toUnix($date, $time=array())

References $_POST, ilObjectGUI\$obj_id, __toUnix(), and ilObjectActivation\TIMINGS_PRESETTING.

Referenced by editTimings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __prepareDateSelect()

ilCourseContentGUI::__prepareDateSelect (   $a_unix_time)

Definition at line 1166 of file class.ilCourseContentGUI.php.

1167 {
1168 return array('y' => date('Y', $a_unix_time),
1169 'm' => date('m', $a_unix_time),
1170 'd' => date('d', $a_unix_time));
1171 }
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())

References date.

Referenced by __renderItem(), and editTimings().

+ Here is the caller graph for this function:

◆ __prepareTimeSelect()

ilCourseContentGUI::__prepareTimeSelect (   $a_unix_time)

Definition at line 1173 of file class.ilCourseContentGUI.php.

1174 {
1175 return array('h' => date('G', $a_unix_time),
1176 'm' => date('i', $a_unix_time),
1177 's' => date('s', $a_unix_time));
1178 }

References date.

◆ __renderItem()

ilCourseContentGUI::__renderItem (   $item,
  $level 
)

Definition at line 851 of file class.ilCourseContentGUI.php.

852 {
853 global $ilUser,$ilAccess;
854
855 include_once 'Modules/Course/classes/Timings/class.ilTimingPlaned.php';
856 include_once './Services/Link/classes/class.ilLink.php';
857 include_once './Services/MetaData/classes/class.ilMDEducational.php';
858
859 if (!$ilAccess->checkAccess('visible', '', $item['ref_id'])) {
860 return false;
861 }
862
863 $this->lng->loadLanguageModule('meta');
864
865 $usr_planed = new ilTimingPlaned($item['ref_id'], $ilUser->getId());
866
867 for ($i = 0;$i < $level;$i++) {
868 $this->tpl->touchBlock('start_indent');
869 $this->tpl->touchBlock('end_indent');
870 }
871 if (strlen($item['description'])) {
872 $this->tpl->setCurrentBlock("item_description");
873 $this->tpl->setVariable("DESC", $item['description']);
874 $this->tpl->parseCurrentBlock();
875 }
876 if ($tlt = ilMDEducational::_getTypicalLearningTimeSeconds($item['obj_id'])) {
877 $this->tpl->setCurrentBlock("tlt");
878 $this->tpl->setVariable("TXT_TLT", $this->lng->txt('meta_typical_learning_time'));
879 $this->tpl->setVariable("TLT_VAL", ilDatePresentation::secondsToString($tlt));
880 $this->tpl->parseCurrentBlock();
881 }
882
883 if (!$item['title'] &&
884 $item['type'] == 'sess') {
885 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
887 $item['title'] = ilSessionAppointment::_appointmentToString($app_info['start'], $app_info['end'], $app_info['fullday']);
888 }
889
890 if ($ilAccess->checkAccess('read', '', $item['ref_id'])) {
891 $this->tpl->setCurrentBlock("title_as_link");
892 $this->tpl->setVariable("TITLE_LINK", ilLink::_getLink($item['ref_id'], $item['type']));
893 $this->tpl->setVariable("TITLE_NAME", $item['title']);
894 $this->tpl->parseCurrentBlock();
895 } else {
896 $this->tpl->setCurrentBlock("title_plain");
897 $this->tpl->setVariable("TITLE", $item['title']);
898 $this->tpl->parseCurrentBlock();
899 }
900 $this->tpl->setCurrentBlock("container_standard_row");
901
902 if (isset($this->invalid["$item[ref_id]"])) {
903 $this->tpl->setVariable("ROWCLASS", 'tblrowmarked');
904 } else {
905 $this->tpl->setVariable("ROWCLASS", ilUtil::switchColor($this->counter++, 'tblrow1', 'tblrow2'));
906 }
907 #$this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_'.$item['type'].'.svg'));
908 $this->tpl->setVariable('TYPE_IMG', ilUtil::getTypeIconPath($item['type'], $item['obj_id'], 'small'));
909 $this->tpl->setVariable("TYPE_ALT_IMG", $this->lng->txt('obj_' . $item['type']));
910
911
912 if ($item['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING) {
913 $this->tpl->setVariable('SUG_START', ilDatePresentation::formatDate(new ilDate($item['suggestion_start'], IL_CAL_UNIX)));
914 $this->tpl->setVariable('SUG_END', ilDatePresentation::formatDate(new ilDate($item['suggestion_end'], IL_CAL_UNIX)));
915 }
916
917 if ($item['changeable']) {
918 $item_prefix = "item[" . $item['ref_id'] . ']';
919
920 if (is_array($_POST['item']["$item[ref_id]"]['own_start'])) {
921 #echo "Start post<br>";
922 $start = $this->__toUnix($_POST['item']["$item[ref_id]"]['own_start']);
923 } elseif ($usr_planed->getPlanedStartingTime()) {
924 #echo "Own start<br>";
925 $start = $usr_planed->getPlanedStartingTime();
926 } else {
927 #echo "Empfehlung start<br>";
928 $start = $item['suggestion_start'];
929 }
930
931 $date = $this->__prepareDateSelect($start);
932 $this->tpl->setVariable(
933 "OWN_START",
935 $item_prefix . "[own_start]",
936 $date['y'],
937 $date['m'],
938 $date['d'],
939 date('Y', time()),
940 false
941 )
942 );
943
944 if ($usr_planed->getPlanedEndingTime()) {
945 #echo "Own End<br>";
946 $end = $usr_planed->getPlanedEndingTime();
947 } else {
948 #echo "Empfehlung end<br>";
949 $end = $item['suggestion_end'];
950 }
951 $this->tpl->setVariable('OWN_END', ilDatePresentation::formatDate(new ilDate($end, IL_CAL_UNIX)));
952 $this->tpl->setVariable("NAME_DURATION", $item_prefix . "[duration]");
953
954 // Duration
955 if (isset($_POST['item']["$item[ref_id]"]['duration'])) {
956 $this->tpl->setVariable("VAL_DURATION", $_POST['item']["$item[ref_id]"]['duration']);
957 } else {
958 $this->tpl->setVariable("VAL_DURATION", intval(($end - $start) / (60 * 60 * 24)));
959 }
960 $this->tpl->setVariable('LIM_START', ilDatePresentation::formatDate(new ilDate($item['earliest_start'], IL_CAL_UNIX)));
961 $this->tpl->setVariable('LIM_END', ilDatePresentation::formatDate(new ilDate($item['latest_end'], IL_CAL_UNIX)));
962 }
963
964 $this->tpl->parseCurrentBlock();
965
966 if (!$_SESSION['crs_timings_user_hidden']) {
967 return true;
968 }
969
970 foreach (ilObjectActivation::getTimingsItems($item['ref_id']) as $item_data) {
971 $this->__renderItem($item_data, $level+1);
972 }
973 }
const IL_CAL_UNIX
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
Class for single dates.
static _getTypicalLearningTimeSeconds($a_rbac_id, $a_obj_id=0)
static _lookupAppointment($a_obj_id)
lookup appointment
static _appointmentToString($start, $end, $fulltime)
class ilTimingPlaned
static switchColor($a_num, $a_css1, $a_css2)
switches style sheets for each even $a_num (used for changing colors of different result rows)
static makeDateSelect($prefix, $year="", $month="", $day="", $startyear="", $a_long_month=true, $a_further_options=array(), $emptyoption=false)
Creates a combination of HTML selects for date inputs.
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
$i
Definition: disco.tpl.php:19
$end
Definition: saml1-acs.php:18

References $_POST, $_SESSION, $end, $i, $ilUser, __prepareDateSelect(), __renderItem(), __toUnix(), ilSessionAppointment\_appointmentToString(), ilLink\_getLink(), ilMDEducational\_getTypicalLearningTimeSeconds(), ilSessionAppointment\_lookupAppointment(), ilObject\_lookupObjId(), date, ilDatePresentation\formatDate(), ilObjectActivation\getTimingsItems(), ilUtil\getTypeIconPath(), IL_CAL_UNIX, ilUtil\makeDateSelect(), ilDatePresentation\secondsToString(), ilUtil\switchColor(), and ilObjectActivation\TIMINGS_PRESETTING.

Referenced by __editAdvancedUserTimings(), __editUserTimings(), and __renderItem().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __renderUserItem()

ilCourseContentGUI::__renderUserItem (   $item,
  $level 
)

Definition at line 673 of file class.ilCourseContentGUI.php.

674 {
675 include_once 'Modules/Course/classes/Timings/class.ilTimingPlaned.php';
676 include_once './Services/MetaData/classes/class.ilMDEducational.php';
677
678 $this->lng->loadLanguageModule('meta');
679
680 $usr_planed = new ilTimingPlaned($item['ref_id'], $_GET['member_id']);
681 for ($i = 0;$i < $level;$i++) {
682 $this->tpl->touchBlock('start_indent');
683 $this->tpl->touchBlock('end_indent');
684 }
685 if (strlen($item['description'])) {
686 $this->tpl->setCurrentBlock("item_description");
687 $this->tpl->setVariable("DESC", $item['description']);
688 $this->tpl->parseCurrentBlock();
689 }
690 if ($tlt = ilMDEducational::_getTypicalLearningTimeSeconds($item['obj_id'])) {
691 $this->tpl->setCurrentBlock("tlt");
692 $this->tpl->setVariable("TXT_TLT", $this->lng->txt('meta_typical_learning_time'));
693 $this->tpl->setVariable("TLT_VAL", ilDatePresentation::secondsToString($tlt));
694 $this->tpl->parseCurrentBlock();
695 }
696
697 if (!$item['title'] &&
698 $item['type'] == 'sess') {
699 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
701 $item['title'] = ilSessionAppointment::_appointmentToString($app_info['start'], $app_info['end'], $app_info['fullday']);
702 }
703
704 $this->tpl->setCurrentBlock("title_plain");
705 $this->tpl->setVariable("TITLE", $item['title']);
706 $this->tpl->parseCurrentBlock();
707
708 $this->tpl->setCurrentBlock("container_standard_row");
709
710 $this->tpl->setVariable("ROWCLASS", ilUtil::switchColor($this->counter++, 'tblrow1', 'tblrow2'));
711 #$this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_'.$item['type'].'.svg'));
712 $this->tpl->setVariable('TYPE_IMG', ilUtil::getTypeIconPath($item['type'], $item['obj_id'], 'tiny'));
713 $this->tpl->setVariable("TYPE_ALT_IMG", $this->lng->txt('obj_' . $item['type']));
714
715 if ($item['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING) {
716 $this->tpl->setVariable('SUG_START', ilDatePresentation::formatDate(new ilDate($item['suggestion_start'], IL_CAL_UNIX)));
717 $this->tpl->setVariable('SUG_END', ilDatePresentation::formatDate(new ilDate($item['suggestion_end'], IL_CAL_UNIX)));
718 }
719
720 if ($item['changeable'] and $item['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING) {
721 if ($usr_planed->getPlanedStartingTime()) {
722 $start = $usr_planed->getPlanedStartingTime();
723 } else {
724 $start = $item['suggestion_start'];
725 }
726 $this->tpl->setVariable('OWN_START', ilDatePresentation::formatDate(new ilDate($start, IL_CAL_UNIX)));
727
728 if ($usr_planed->getPlanedEndingTime()) {
729 $end = $usr_planed->getPlanedEndingTime();
730 } else {
731 $end = $item['suggestion_end'];
732 }
733 if ($start != $item['suggestion_start'] or $end != $item['suggestion_end']) {
734 $this->tpl->setVariable("OK_IMG", ilUtil::getImagePath('icon_ok.svg'));
735 $this->tpl->setVariable("OK_ALT", $this->lng->txt('crs_timings_changed'));
736 } else {
737 $this->tpl->setVariable("OK_IMG", ilUtil::getImagePath('icon_not_ok.svg'));
738 $this->tpl->setVariable("OK_ALT", $this->lng->txt('crs_timings_not_changed'));
739 }
740 $this->tpl->setVariable('OWN_END', ilDatePresentation::formatDate(new ilDate($end, IL_CAL_UNIX)));
741 }
742
743 $this->tpl->parseCurrentBlock();
744
745 foreach (ilObjectActivation::getTimingsAdministrationItems($item['ref_id']) as $item_data) {
746 if (($item_data['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING) or
747 ilObjectActivation::hasChangeableTimings($item_data['ref_id'])) {
748 $this->__renderUserItem($item_data, $level+1);
749 }
750 }
751 }
$_GET["client_id"]
static getTimingsAdministrationItems($a_parent_id)
Get (sub) item data for timings administration view (active/inactive)
static hasChangeableTimings($a_ref_id)
Check if there is any active changeable timing (in subtree)

References $_GET, $end, $i, __renderUserItem(), ilSessionAppointment\_appointmentToString(), ilMDEducational\_getTypicalLearningTimeSeconds(), ilSessionAppointment\_lookupAppointment(), ilObject\_lookupObjId(), ilDatePresentation\formatDate(), ilUtil\getImagePath(), ilObjectActivation\getTimingsAdministrationItems(), ilUtil\getTypeIconPath(), ilObjectActivation\hasChangeableTimings(), IL_CAL_UNIX, ilDatePresentation\secondsToString(), ilUtil\switchColor(), and ilObjectActivation\TIMINGS_PRESETTING.

Referenced by __renderUserItem(), and showUserTimings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __setSubTabs()

ilCourseContentGUI::__setSubTabs ( )

Definition at line 1140 of file class.ilCourseContentGUI.php.

1141 {
1142 if ($this->container_obj->getType() == 'crs') {
1143 $this->container_gui->setContentSubTabs();
1144 }
1145 }

Referenced by executeCommand(), timingsOff(), and timingsOn().

+ Here is the caller graph for this function:

◆ __showTimingsPanel()

ilCourseContentGUI::__showTimingsPanel ( )

Definition at line 975 of file class.ilCourseContentGUI.php.

976 {
977 global $ilAccess, $ilToolbar;
978
979 if (!$ilAccess->checkAccess('write', '', $this->container_obj->getRefId())) {
980 return true;
981 }
982
983 include_once "Services/UIComponent/Button/classes/class.ilLinkButton.php";
985
986 if (!$_SESSION['crs_timings_panel'][$this->course_obj->getId()]) {
987 $btn->setCaption("timings_timings_on");
988 $btn->setUrl($this->ctrl->getLinkTarget($this, 'timingsOn'));
989 } else {
990 $btn->setCaption("timings_timings_off");
991 $btn->setUrl($this->ctrl->getLinkTarget($this, 'timingsOff'));
992 }
993
994 $ilToolbar->addButtonInstance($btn);
995 }
static getInstance()
Factory.

References $_SESSION, and ilLinkButton\getInstance().

Referenced by __editAdvancedUserTimings(), __editUserTimings(), and editTimings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showUserAcceptanceTable()

ilCourseContentGUI::__showUserAcceptanceTable ( )

Definition at line 541 of file class.ilCourseContentGUI.php.

542 {
543 global $ilUser;
544
545 include_once 'Modules/Course/classes/Timings/class.ilTimingAccepted.php';
546 $accept_obj = new ilTimingAccepted($this->course_obj->getId(), $ilUser->getId());
547
548 include_once('Services/Form/classes/class.ilPropertyFormGUI.php');
549 $form = new ilPropertyFormGUI();
550 $form->setFormAction($this->ctrl->getFormAction($this, 'saveAcceptance'));
551 $form->setTitle($this->lng->txt('timing_accept_table'));
552
553 $accept = new ilCheckboxInputGUI($this->lng->txt('timing_user_accept'), "accepted");
554 $accept->setChecked($accept_obj->isAccepted());
555 $form->addItem($accept);
556
557 $remark = new ilTextAreaInputGUI($this->lng->txt('timing_remark'), "remark");
558 $remark->setValue($accept_obj->getRemark());
559 $form->addItem($remark);
560
561 $tutor = new ilCheckboxInputGUI($this->lng->txt('timing_tutor_visible'), "tutor");
562 $tutor->setChecked($accept_obj->isVisible());
563 $form->addItem($tutor);
564
565 $form->addCommandButton('saveAcceptance', $this->lng->txt('save'));
566 $this->tpl->setVariable("FORM", $form->getHTML());
567 }
This class represents a checkbox property in a property form.
This class represents a property form user interface.
This class represents a text area property in a property form.
class ilTimingAccepted
if(isset($_POST['submit'])) $form

References $form, and $ilUser.

Referenced by __editAdvancedUserTimings(), and __editUserTimings().

+ Here is the caller graph for this function:

◆ __toUnix()

ilCourseContentGUI::__toUnix (   $date,
  $time = array() 
)

Definition at line 1161 of file class.ilCourseContentGUI.php.

1162 {
1163 return gmmktime($time['h'], $time['m'], 0, $date['m'], $date['d'], $date['y']);
1164 }
$time
Definition: cron.php:21

References $time.

Referenced by __loadFromPost(), __renderItem(), editTimings(), updateTimings(), and updateUserTimings().

+ Here is the caller graph for this function:

◆ editTimings()

ilCourseContentGUI::editTimings ( )

Definition at line 382 of file class.ilCourseContentGUI.php.

383 {
384 global $ilAccess,$ilErr;
385
386 include_once 'Services/MetaData/classes/class.ilMDEducational.php';
387 include_once './Services/Link/classes/class.ilLink.php';
388
389 $this->lng->loadLanguageModule('meta');
390
391 if (!$ilAccess->checkAccess('write', '', $this->container_obj->getRefId())) {
392 $ilErr->raiseError($this->lng->txt('msg_no_perm_write'), $ilErr->WARNING);
393 }
394 $this->__showTimingsPanel();
395 $this->tabs_gui->setSubTabActive('timings_timings');
396
397 include_once 'Services/Object/classes/class.ilObjectActivation.php';
398 $this->cont_arr = ilObjectActivation::getTimingsAdministrationItems($this->container_obj->getRefId());
399
400 $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.crs_edit_items.html', 'Modules/Course');
401 $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
402 $this->tpl->setVariable("HEADER_IMG", ilUtil::getImagePath('icon_crs.svg'));
403 $this->tpl->setVariable("HEADER_ALT", $this->lng->txt('crs_materials'));
404 $this->tpl->setVariable("BLOCK_HEADER_CONTENT", $this->lng->txt('edit_timings_list'));
405 $this->tpl->setVariable("TXT_TITLE", $this->lng->txt('title'));
406
407
408 $this->tpl->setVariable("TXT_DURATION", $this->lng->txt('crs_timings_time_frame'));
409 $this->tpl->setVariable("TXT_INFO_DURATION", $this->lng->txt('crs_timings_in_days'));
410
411 $this->tpl->setVariable("TXT_START_END", $this->lng->txt('crs_timings_short_start_end'));
412 $this->tpl->setVariable("TXT_INFO_START_END", $this->lng->txt('crs_timings_start_end_info'));
413
414 $this->tpl->setVariable("TXT_CHANGEABLE", $this->lng->txt('crs_timings_short_changeable'));
415
416 $this->tpl->setVariable("TXT_INFO_LIMIT", $this->lng->txt('crs_timings_from_until'));
417 $this->tpl->setVariable("TXT_LIMIT", $this->lng->txt('crs_timings_short_limit_start_end'));
418 $this->tpl->setVariable("TXT_ACTIVE", $this->lng->txt('crs_timings_short_active'));
419 $this->tpl->setVariable("TXT_INFO_ACTIVE", $this->lng->txt('crs_timings_info_active'));
420
421 $counter = 0;
422 foreach ($this->cont_arr as $item) {
423 if ($item['type'] == 'itgr') {
424 continue;
425 }
426 $item = $this->__loadFromPost($item);
427 $item_prefix = "item[$item[ref_id]]";
428 $item_change_prefix = "item_change[$item[ref_id]]";
429 $item_active_prefix = "item_active[$item[ref_id]]";
430
431 if ($item['type'] == 'grp' or
432 $item['type'] == 'fold') {
433 $this->tpl->setVariable("TITLE_LINK", ilLink::_getLink($item['ref_id'], $item['type']));
434 $this->tpl->setVariable("TITLE_FRAME", ilFrameTargetInfo::_getFrame('MainContent', $item['type']));
435 $this->tpl->setVariable("TITLE_LINK_NAME", $item['title']);
436 } else {
437 if (!$item['title'] &&
438 $item['type'] == 'sess') {
439 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
441 $item['title'] = ilSessionAppointment::_appointmentToString($app_info['start'], $app_info['end'], $app_info['fullday']);
442 }
443
444 $this->tpl->setVariable("TITLE", $item['title']);
445 }
446
447 if (strlen($item['description'])) {
448 $this->tpl->setCurrentBlock("item_description");
449 $this->tpl->setVariable("DESC", $item['description']);
450 $this->tpl->parseCurrentBlock();
451 }
452
453 if ($tlt = ilMDEducational::_getTypicalLearningTimeSeconds($item['obj_id'])) {
454 $this->tpl->setCurrentBlock("tlt");
455 $this->tpl->setVariable("TXT_TLT", $this->lng->txt('meta_typical_learning_time'));
456 $this->tpl->setVariable("TLT_VAL", ilDatePresentation::secondsToString($tlt));
457 $this->tpl->parseCurrentBlock();
458 }
459
460 $this->tpl->setCurrentBlock("container_standard_row");
461
462 // Suggested
463 if (is_array($_POST['item']["$item[ref_id]"]['sug_start'])) {
464 $start = $this->__toUnix($_POST['item']["$item[ref_id]"]['sug_start']);
465 } else {
466 $start = $item['suggestion_start'];
467 }
468 $end = $item['suggestion_end'];
469 $date = $this->__prepareDateSelect($start);
470 $this->tpl->setVariable(
471 "SUG_START",
473 $item_prefix . "[sug_start]",
474 $date['y'],
475 $date['m'],
476 $date['d'],
477 date('Y', time()),
478 false
479 )
480 );
481
482 $this->tpl->setVariable("NAME_DURATION_A", $item_prefix . "[duration_a]");
483 if (isset($_POST['item']["$item[ref_id]"]['duration_a'])) {
484 $this->tpl->setVariable("VAL_DURATION_A", abs($_POST['item']["$item[ref_id]"]['duration_a']));
485 } else {
486 $this->tpl->setVariable("VAL_DURATION_A", intval(($end-$start)/(60*60*24)));
487 }
488
489 $this->tpl->setVariable('SUG_END', ilDatePresentation::formatDate(new ilDate($item['suggestion_end'], IL_CAL_UNIX)));
490
491 // Limit
492 if (is_array($_POST['item']["$item[ref_id]"]['lim_end'])) {
493 $end = $this->__toUnix($_POST['item']["$item[ref_id]"]['lim_end']);
494 } else {
495 $end = $item['latest_end'];
496 }
497
498 $date = $this->__prepareDateSelect($end);
499 $this->tpl->setVariable(
500 "LIM_END",
502 $item_prefix . "[lim_end]",
503 $date['y'],
504 $date['m'],
505 $date['d'],
506 date('Y', time()),
507 false
508 )
509 );
510
511 $this->tpl->setVariable("NAME_CHANGE", $item_change_prefix . "[change]");
512 $this->tpl->setVariable("NAME_ACTIVE", $item_active_prefix . "[active]");
513
514 if (isset($_POST['item'])) {
515 $change = $_POST['item_change']["$item[ref_id]"]['change'];
516 $active = $_POST['item_active']["$item[ref_id]"]['active'];
517 } else {
518 $change = $item['changeable'];
519 $active = ($item['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING);
520 }
521
522 $this->tpl->setVariable("CHECKED_ACTIVE", $active ? 'checked="checked"' : '');
523 $this->tpl->setVariable("CHECKED_CHANGE", $change ? 'checked="checked"' : '');
524
525 if (isset($this->failed["$item[ref_id]"])) {
526 $this->tpl->setVariable("ROWCLASS", 'tblrowmarked');
527 } else {
528 $this->tpl->setVariable("ROWCLASS", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
529 }
530 $this->tpl->parseCurrentBlock();
531 }
532
533 // Select all
534 $this->tpl->setVariable("CHECKCLASS", ilUtil::switchColor($counter++, 'tblrow1', 'tblrow2'));
535 $this->tpl->setVariable("SELECT_ALL", $this->lng->txt('select_all'));
536
537 $this->tpl->setVariable("BTN_SAVE", $this->lng->txt('save'));
538 $this->tpl->setVariable("BTN_CANCEL", $this->lng->txt('cancel'));
539 }
static _getFrame($a_class, $a_type='')
Get content frame name.

References $_POST, $counter, $end, ilObjectGUI\$ilErr, __loadFromPost(), __prepareDateSelect(), __showTimingsPanel(), __toUnix(), ilSessionAppointment\_appointmentToString(), ilFrameTargetInfo\_getFrame(), ilLink\_getLink(), ilMDEducational\_getTypicalLearningTimeSeconds(), ilSessionAppointment\_lookupAppointment(), ilObject\_lookupObjId(), date, ilDatePresentation\formatDate(), ilUtil\getImagePath(), ilObjectActivation\getTimingsAdministrationItems(), IL_CAL_UNIX, ilUtil\makeDateSelect(), ilDatePresentation\secondsToString(), ilUtil\switchColor(), and ilObjectActivation\TIMINGS_PRESETTING.

Referenced by editUserTimings(), timingsOn(), and updateTimings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editUserTimings()

ilCourseContentGUI::editUserTimings ( )

Definition at line 584 of file class.ilCourseContentGUI.php.

585 {
586 if ($_SESSION['crs_timings_panel'][$this->course_obj->getId()]) {
587 return $this->editTimings();
588 }
589 global $ilAccess,$ilErr;
590
591 if (!$ilAccess->checkAccess('read', '', $this->container_obj->getRefId())) {
592 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->WARNING);
593 }
594 $this->tabs_gui->setSubTabActive('timings_timings');
595
596 $_SESSION['crs_timings_user_hidden'] = isset($_GET['show_details']) ? $_GET['show_details'] : $_SESSION['crs_timings_user_hidden'];
597
598 include_once 'Services/Object/classes/class.ilObjectActivation.php';
599 if (ilObjectActivation::hasChangeableTimings($this->course_obj->getRefId())) {
601 } else {
602 $this->__editUserTimings();
603 }
604 }

References $_GET, $_SESSION, ilObjectGUI\$ilErr, __editAdvancedUserTimings(), __editUserTimings(), editTimings(), and ilObjectActivation\hasChangeableTimings().

Referenced by saveAcceptance(), timingsOff(), and updateUserTimings().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilCourseContentGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 47 of file class.ilCourseContentGUI.php.

48 {
49 global $ilAccess, $ilErr, $ilTabs, $ilCtrl;
50
51 if (!$ilAccess->checkAccess('read', '', $this->container_obj->getRefId())) {
52 $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->WARNING);
53 }
54
55 // Handle timings view
56 $_SESSION['crs_timings'] = true;
57
58 $this->__setSubTabs();
59 $this->tabs_gui->setTabActive('view_content');
60 $cmd = $this->ctrl->getCmd();
61
62 switch ($this->ctrl->getNextClass($this)) {
63 case 'ilcoursearchivesgui':
64 $this->__forwardToArchivesGUI();
65 break;
66
67 case "ilcolumngui":
68 $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
69 $ilTabs->setSubTabActive("crs_content");
70 $this->view();
71 break;
72
73 default:
74 if (!$this->__checkStartObjects()) {
75 $this->showStartObjects();
76 break;
77 }
78
79 // forward to objective presentation
80 if ((!$this->is_tutor and
81 $this->container_obj->getType() == 'crs' and
82 $this->container_obj->enabledObjectiveView()) ||
83 $_GET["col_return"] == "objectives") {
84 $this->use_objective_presentation = true;
85 $this->view();
86 //$this->__forwardToObjectivePresentation();
87 break;
88 }
89
90
91 if (!$cmd) {
92 $cmd = $this->__getDefaultCommand();
93 }
94 $this->$cmd();
95 break;
96 }
97 }
view()
Output course content.

References $_GET, $_SESSION, $ilCtrl, ilObjectGUI\$ilErr, __checkStartObjects(), __getDefaultCommand(), __setSubTabs(), showStartObjects(), and view().

+ Here is the call graph for this function:

◆ getRightColumnHTML()

ilCourseContentGUI::getRightColumnHTML ( )

Display right column.

Reimplemented from ilObjectGUI.

Definition at line 271 of file class.ilCourseContentGUI.php.

272 {
273 global $ilUser, $lng, $ilCtrl, $ilAccess;
274
275 $ilCtrl->saveParameterByClass("ilcolumngui", "col_return");
276
277 $obj_id = ilObject::_lookupObjId($this->container_obj->getRefId());
278 $obj_type = ilObject::_lookupType($obj_id);
279
280 include_once("Services/Block/classes/class.ilColumnGUI.php");
281 $column_gui = new ilColumnGUI($obj_type, IL_COL_RIGHT);
282
283 if ($column_gui->getScreenMode() == IL_SCREEN_FULL) {
284 return "";
285 }
286
287 $this->setColumnSettings($column_gui);
288
289 if ($ilCtrl->getNextClass() == "ilcolumngui" &&
290 $column_gui->getCmdSide() == IL_COL_RIGHT &&
291 $column_gui->getScreenMode() == IL_SCREEN_SIDE) {
292 $html = $ilCtrl->forwardCommand($column_gui);
293 } else {
294 if (!$ilCtrl->isAsynch()) {
295 $html = $ilCtrl->getHTML($column_gui);
296 }
297 }
298
299 return $html;
300 }
const IL_SCREEN_FULL

References $html, $ilCtrl, $ilUser, $lng, ilObjectGUI\$obj_id, ilObject\_lookupObjId(), ilObject\_lookupType(), IL_COL_RIGHT, IL_SCREEN_FULL, IL_SCREEN_SIDE, and setColumnSettings().

Referenced by view().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ returnToMembers()

ilCourseContentGUI::returnToMembers ( )

Definition at line 606 of file class.ilCourseContentGUI.php.

607 {
608 $this->ctrl->returnToParent($this);
609 }

◆ saveAcceptance()

ilCourseContentGUI::saveAcceptance ( )

Definition at line 569 of file class.ilCourseContentGUI.php.

570 {
571 global $ilUser;
572
573 include_once 'Modules/Course/classes/Timings/class.ilTimingAccepted.php';
574 $accept_obj = new ilTimingAccepted($this->course_obj->getId(), $ilUser->getId());
575
576 $accept_obj->setRemark(ilUtil::stripSlashes($_POST['remark']));
577 $accept_obj->accept($_POST['accepted']);
578 $accept_obj->setVisible($_POST['tutor']);
579 $accept_obj->update();
580 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
581 $this->editUserTimings();
582 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_POST, $ilUser, editUserTimings(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setColumnSettings()

ilCourseContentGUI::setColumnSettings (   $column_gui)

Definition at line 302 of file class.ilCourseContentGUI.php.

303 {
304 global $ilAccess, $lng;
305
306 $column_gui->setRepositoryMode(true);
307 $column_gui->setEnableEdit(false);
308 $column_gui->setBlockProperty(
309 "news",
310 "title",
311 $lng->txt("crs_news")
312 );
313
314 include_once "Services/Object/classes/class.ilObjectActivation.php";
315 $grouped_items = array();
316 foreach (ilObjectActivation::getItems($this->container_obj->getRefId()) as $item) {
317 $grouped_items[$item["type"]][] = $item;
318 }
319
320 $column_gui->setRepositoryItems($grouped_items);
321 if ($ilAccess->checkAccess("write", "", $this->container_obj->getRefId())) {
322 $column_gui->setEnableEdit(true);
323 }
324
325 // Allow movement of blocks for tutors
326 if ($this->is_tutor &&
327 $this->container_gui->isActiveAdministrationPanel()) {
328 $column_gui->setEnableMovement(true);
329 }
330
331 // Configure Settings, if administration panel is on
332 if ($this->is_tutor) {
333 $column_gui->setBlockProperty("news", "settings", true);
334 //$column_gui->setBlockProperty("news", "public_notifications_option", true);
335 $column_gui->setBlockProperty("news", "default_visibility_option", true);
336 $column_gui->setBlockProperty("news", "hide_news_block_option", true);
337 }
338
339 if ($this->container_gui->isActiveAdministrationPanel()) {
340 $column_gui->setAdminCommands(true);
341 }
342 }
static getItems($a_parent_id, $a_with_list_data=true)
Get sub item data.

References $lng, and ilObjectActivation\getItems().

Referenced by __forwardToColumnGUI(), and getRightColumnHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showStartObjects()

ilCourseContentGUI::showStartObjects ( )

Definition at line 133 of file class.ilCourseContentGUI.php.

134 {
135 include_once './Modules/Course/classes/class.ilCourseLMHistory.php';
136 include_once './Services/Repository/classes/class.ilRepositoryExplorer.php';
137 include_once './Services/Link/classes/class.ilLink.php';
138
139 global $rbacsystem,$ilias,$ilUser,$ilAccess,$ilObjDataCache;
140
141 $this->tabs_gui->setSubTabActive('crs_content');
142
143 $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_start_view.html", 'Modules/Course');
144 $this->tpl->setVariable("INFO_STRING", $this->lng->txt('crs_info_start'));
145 $this->tpl->setVariable("TBL_TITLE_START", $this->lng->txt('crs_table_start_objects'));
146 $this->tpl->setVariable("HEADER_NR", $this->lng->txt('crs_nr'));
147 $this->tpl->setVariable("HEADER_DESC", $this->lng->txt('description'));
148 $this->tpl->setVariable("HEADER_EDITED", $this->lng->txt('crs_objective_accomplished'));
149
150
151 $lm_continue = new ilCourseLMHistory($this->course_obj->getRefId(), $ilUser->getId());
152 $continue_data = $lm_continue->getLMHistory();
153
154 $counter = 0;
155 foreach ($this->start_obj->getStartObjects() as $start) {
156 $obj_id = $ilObjDataCache->lookupObjId($start['item_ref_id']);
157 $ref_id = $start['item_ref_id'];
158 $type = $ilObjDataCache->lookupType($obj_id);
159
161
162 $obj_link = ilLink::_getLink($ref_id, $type);
164 $obj_frame = $obj_frame ? $obj_frame : '';
165
166 // Tmp fix for tests
167 $obj_frame = $type == 'tst' ? '' : $obj_frame;
168
169 $contentObj = false;
170
171 if ($ilAccess->checkAccess('read', '', $ref_id)) {
172 $this->tpl->setCurrentBlock("start_read");
173 $this->tpl->setVariable("READ_TITLE_START", $ilObjDataCache->lookupTitle($obj_id));
174 $this->tpl->setVariable("READ_TARGET_START", $obj_frame);
175 $this->tpl->setVariable("READ_LINK_START", $obj_link . '&crs_show_result=' . $this->course_obj->getRefId());
176 $this->tpl->parseCurrentBlock();
177 } else {
178 $this->tpl->setCurrentBlock("start_visible");
179 $this->tpl->setVariable("VISIBLE_LINK_START", $ilObjDataCache->lookupTitle($obj_id));
180 $this->tpl->parseCurrentBlock();
181 }
182
183 // CONTINUE LINK
184 if (isset($continue_data[$ref_id])) {
185 $this->tpl->setCurrentBlock("link");
186 $this->tpl->setVariable("LINK_HREF", ilLink::_getLink($ref_id, '', array('obj_id',
187 $continue_data[$ref_id]['lm_page_id'])));
188 #$this->tpl->setVariable("CONTINUE_LINK_TARGET",$target);
189 $this->tpl->setVariable("LINK_NAME", $this->lng->txt('continue_work'));
190 $this->tpl->parseCurrentBlock();
191 }
192
193 // add to desktop link
194 if (!$ilUser->isDesktopItem($ref_id, $type) and
195 $this->course_obj->getAboStatus()) {
196 if ($ilAccess->checkAccess('read', '', $ref_id)) {
197 $this->tpl->setCurrentBlock("link");
198 $this->ctrl->setParameterByClass(get_class($this->container_gui), 'item_ref_id', $ref_id);
199 $this->ctrl->setParameterByClass(get_class($this->container_gui), 'item_id', $ref_id);
200 $this->ctrl->setParameterByClass(get_class($this->container_gui), 'type', $type);
201
202 $this->tpl->setVariable("LINK_HREF", $this->ctrl->getLinkTarget($this->container_gui, 'addToDesk'));
203 $this->tpl->setVariable("LINK_NAME", $this->lng->txt("to_desktop"));
204 $this->tpl->parseCurrentBlock();
205 }
206 } elseif ($this->course_obj->getAboStatus()) {
207 $this->tpl->setCurrentBlock("link");
208 $this->ctrl->setParameterByClass(get_class($this->container_gui), 'item_ref_id', $ref_id);
209 $this->ctrl->setParameterByClass(get_class($this->container_gui), 'item_id', $ref_id);
210 $this->ctrl->setParameterByClass(get_class($this->container_gui), 'type', $type);
211
212 $this->tpl->setVariable("LINK_HREF", $this->ctrl->getLinkTarget($this->container_gui, 'removeFromDesk'));
213 $this->tpl->setVariable("LINK_NAME", $this->lng->txt("unsubscribe"));
214 $this->tpl->parseCurrentBlock();
215 }
216
217
218 // Description
219 if (strlen($ilObjDataCache->lookupDescription($obj_id))) {
220 $this->tpl->setCurrentBlock("start_description");
221 $this->tpl->setVariable("DESCRIPTION_START", $ilObjDataCache->lookupDescription($obj_id));
222 $this->tpl->parseCurrentBlock();
223 }
224
225
226 if ($this->start_obj->isFullfilled($ilUser->getId(), $ref_id)) {
227 $accomplished = 'accomplished';
228 $icon = ilUtil::getImagePath("icon_ok.svg");
229 } else {
230 $accomplished = 'not_accomplished';
231 $icon = ilUtil::getImagePath("icon_not_ok.svg");
232 }
233 $this->tpl->setCurrentBlock("start_row");
234 $this->tpl->setVariable("EDITED_IMG", $icon);
235 $this->tpl->setVariable("EDITED_ALT", $this->lng->txt('crs_objective_' . $accomplished));
236 $this->tpl->setVariable("ROW_CLASS", 'option_value');
237 $this->tpl->setVariable("ROW_CLASS_CENTER", 'option_value_center');
238 $this->tpl->setVariable("OBJ_NR_START", ++$counter . '.');
239 $this->tpl->parseCurrentBlock();
240 }
241 return true;
242 }
static _checkAllConditionsOfTarget($a_target_ref_id, $a_target_id, $a_target_type="", $a_usr_id=0)
checks wether all conditions of a target object are fulfilled
class ilCourseLMHistory
buildFrameTarget($a_type, $a_child=0, $a_obj_id=0)
STATIC, do not use $this inside!
$type

References $counter, $ilUser, ilObjectGUI\$obj_id, ilObjectGUI\$rbacsystem, ilObjectGUI\$ref_id, $type, ilConditionHandler\_checkAllConditionsOfTarget(), ilLink\_getLink(), ilRepositoryExplorer\buildFrameTarget(), and ilUtil\getImagePath().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showUserTimings()

ilCourseContentGUI::showUserTimings ( )

Definition at line 611 of file class.ilCourseContentGUI.php.

612 {
613 $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.crs_user_timings.html', 'Modules/Course');
614 $this->tabs_gui->clearSubTabs();
615 $this->tabs_gui->setTabActive('members');
616
617 if (!$_GET['member_id']) {
618 ilUtil::sendFailure($this->lng->txt('no_checkbox'), true);
619 $this->ctrl->returnToParent($this);
620 }
621
622
623 // Back button
624 $this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
625 $this->tpl->setCurrentBlock("btn_cell");
626 $this->tpl->setVariable("BTN_LINK", $this->ctrl->getLinkTarget($this, 'returnToMembers'));
627 $this->tpl->setVariable("BTN_TXT", $this->lng->txt("back"));
628 $this->tpl->parseCurrentBlock();
629
630 include_once 'Modules/Course/classes/Timings/class.ilTimingAccepted.php';
631 $usr_accepted = new ilTimingAccepted($this->course_obj->getId(), (int) $_GET['member_id']);
632
633 if ($usr_accepted->isAccepted()) {
634 $this->tpl->setVariable("ACC_IMG", ilUtil::getImagePath('icon_ok.svg'));
635 $this->tpl->setVariable("ACC_ALT", $this->lng->txt('timing_accepted'));
636 } else {
637 $this->tpl->setVariable("ACC_IMG", ilUtil::getImagePath('icon_not_ok.svg'));
638 $this->tpl->setVariable("ACC_ALT", $this->lng->txt('timing_not_accepted'));
639 }
640 if ($usr_accepted->isVisible() and strlen($usr_accepted->getRemark())) {
641 $this->tpl->setVariable("REMARK", nl2br($usr_accepted->getRemark()));
642 } else {
643 $this->tpl->setVariable("REMARK", $this->lng->txt('not_available'));
644 }
645
646 $this->tpl->setVariable("TIMING_ACCEPT", $this->lng->txt('timing_accept_table'));
647 $this->tpl->setVariable("TXT_ACCEPTED", $this->lng->txt('timing_user_accepted'));
648 $this->tpl->setVariable("TXT_REMARK", $this->lng->txt('timing_remark'));
649
650 $this->tpl->setVariable("HEADER_IMG", ilUtil::getImagePath('icon_usr.svg'));
651 $this->tpl->setVariable("HEADER_ALT", $this->lng->txt('obj_usr'));
652 $this->tpl->setVariable("TABLE_HEADER", $this->lng->txt('timings_of'));
653 $name = ilObjUser::_lookupName($_GET['member_id']);
654 $this->tpl->setVariable("USER_NAME", $name['lastname'] . ', ' . $name['firstname']);
655
656 $this->tpl->setVariable("TXT_TITLE", $this->lng->txt('title'));
657 $this->tpl->setVariable("TXT_START_END", $this->lng->txt('crs_timings_short_start_end'));
658 $this->tpl->setVariable("TXT_INFO_START_END", $this->lng->txt('crs_timings_start_end_info'));
659 $this->tpl->setVariable("TXT_CHANGED", $this->lng->txt('crs_timings_changed'));
660 $this->tpl->setVariable("TXT_OWN_PRESETTING", $this->lng->txt('crs_timings_planed_start'));
661 $this->tpl->setVariable("TXT_INFO_OWN_PRESETTING", $this->lng->txt('crs_timings_from_until'));
662
663 include_once 'Services/Object/classes/class.ilObjectActivation.php';
664 $items = ilObjectActivation::getTimingsAdministrationItems($this->course_obj->getRefId());
665 foreach ($items as $item) {
666 if (($item['timing_type'] == ilObjectActivation::TIMINGS_PRESETTING) or
668 $this->__renderUserItem($item, 0);
669 }
670 }
671 }
static _lookupName($a_user_id)
lookup user name
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if($format !==null) $name
Definition: metadata.php:146

References $_GET, $name, __renderUserItem(), ilObjUser\_lookupName(), ilUtil\getImagePath(), ilObjectActivation\getTimingsAdministrationItems(), ilObjectActivation\hasChangeableTimings(), ilUtil\sendFailure(), and ilObjectActivation\TIMINGS_PRESETTING.

+ Here is the call graph for this function:

◆ timingsOff()

ilCourseContentGUI::timingsOff ( )

Definition at line 1007 of file class.ilCourseContentGUI.php.

1008 {
1009 global $ilTabs;
1010 $_SESSION['crs_timings_panel'][$this->course_obj->getId()] = 0;
1011
1012 $ilTabs->clearSubTabs();
1013 $this->__setSubTabs();
1014 $this->editUserTimings();
1015 }

References $_SESSION, __setSubTabs(), and editUserTimings().

+ Here is the call graph for this function:

◆ timingsOn()

ilCourseContentGUI::timingsOn ( )

Definition at line 997 of file class.ilCourseContentGUI.php.

998 {
999 global $ilTabs;
1000 $_SESSION['crs_timings_panel'][$this->course_obj->getId()] = 1;
1001
1002 $ilTabs->clearSubTabs();
1003 $this->__setSubTabs();
1004 $this->editTimings();
1005 }

References $_SESSION, __setSubTabs(), and editTimings().

+ Here is the call graph for this function:

◆ updateTimings()

ilCourseContentGUI::updateTimings ( )

Definition at line 1079 of file class.ilCourseContentGUI.php.

1080 {
1081 include_once 'Services/Object/classes/class.ilObjectActivation.php';
1082
1083 global $ilAccess,$ilErr;
1084
1085 if (!$ilAccess->checkAccess('write', '', $this->container_obj->getRefId())) {
1086 $ilErr->raiseError($this->lng->txt('msg_no_perm_write'), $ilErr->WARNING);
1087 }
1088 $this->failed = array();
1089 // Validate
1090
1091 $_POST['item'] = is_array($_POST['item']) ? $_POST['item'] : array();
1092 $all_items = array();
1093
1094 foreach ($_POST['item'] as $ref_id => $data) {
1095 $item_obj = new ilObjectActivation();
1097
1098 $item_obj->setTimingType($_POST['item_active'][$ref_id]['active'] ?
1101 $item_obj->setTimingStart($old_data['timing_start']);
1102 $item_obj->setTimingEnd($old_data['timing_end']);
1103 $item_obj->setSuggestionStart($this->__toUnix($data["sug_start"]));
1104
1105 // add duration
1106 $data['sug_start']['d'] += abs($data['duration_a']);
1107 $item_obj->setSuggestionEnd($this->__toUnix($data['sug_start'], array('h' => 23,'m' => 55)));
1108
1109 $item_obj->setEarliestStart(time());
1110 $item_obj->setLatestEnd($this->__toUnix($data['lim_end'], array('h' => 23,'m' => 55)));
1111
1112 $item_obj->toggleVisible($old_data['visible']);
1113 $item_obj->toggleChangeable($_POST['item_change'][$ref_id]['change']);
1114
1115 if (!$item_obj->validateActivation()) {
1116 $this->failed[$ref_id] = $old_data['title'];
1117 }
1118 $all_items[$ref_id] =&$item_obj;
1119 unset($item_obj);
1120 }
1121
1122 if (count($this->failed)) {
1123 $message = $this->lng->txt('crs_timings_update_error');
1124 $message .= ("<br />" . $this->lng->txt('crs_materials') . ': ');
1125 $message .= (implode(',', $this->failed));
1127 $this->editTimings();
1128 return false;
1129 }
1130
1131 // No do update
1132 foreach ($all_items as $ref_id => $item_obj_new) {
1133 $item_obj_new->update($ref_id);
1134 }
1135 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
1136 $this->editTimings();
1137 return false;
1138 }
Class ilObjectActivation.
static getItem($a_ref_id)
Get item data.
catch(Exception $e) $message

References $_POST, ilObjectGUI\$data, ilObjectGUI\$ilErr, $message, ilObjectGUI\$ref_id, __toUnix(), editTimings(), ilObjectActivation\getItem(), ilUtil\sendFailure(), ilUtil\sendSuccess(), ilObjectActivation\TIMINGS_DEACTIVATED, and ilObjectActivation\TIMINGS_PRESETTING.

+ Here is the call graph for this function:

◆ updateUserTimings()

ilCourseContentGUI::updateUserTimings ( )

Definition at line 1018 of file class.ilCourseContentGUI.php.

1019 {
1020 global $ilUser,$ilObjDataCache;
1021 include_once 'Modules/Course/classes/Timings/class.ilTimingPlaned.php';
1022
1023 // Validate
1024 $this->invalid = array();
1025 foreach ($_POST['item'] as $ref_id => $data) {
1026 $tmp_planed = new ilTimingPlaned($ref_id, $ilUser->getId());
1027
1028 $tmp_planed->setPlanedStartingTime($this->__toUnix($data['own_start']));
1029 if (isset($data['duration'])) {
1030 $data['own_start']['d'] += $data['duration'];
1031 $tmp_planed->setPlanedEndingTime($this->__toUnix($data['own_start'], array('h' => 23,'m' => 55)));
1032 } else {
1033 $tmp_planed->setPlanedEndingTime($this->__toUnix($data['own_start']), array('h' => 23,'m' => 55));
1034 }
1035 if (!$tmp_planed->validate()) {
1036 $this->invalid[$ref_id] = $ilObjDataCache->lookupTitle($ilObjDataCache->lookupObjId($ref_id));
1037 }
1038 $all_items[] = $tmp_planed;
1039 }
1040 if (count($this->invalid)) {
1041 $message = $this->lng->txt('crs_timings_update_error');
1042 $message .= ("<br />" . $this->lng->txt('crs_materials') . ': ');
1043 $message .= (implode(',', $this->invalid));
1045 $this->editUserTimings();
1046 return false;
1047 }
1048 foreach ($all_items as $new_item_obj) {
1049 $new_item_obj->update();
1050 }
1051 ilUtil::sendSuccess($this->lng->txt('settings_saved'));
1052 $this->editUserTimings();
1053 return true;
1054 }

References $_POST, ilObjectGUI\$data, $ilUser, $message, ilObjectGUI\$ref_id, __toUnix(), editUserTimings(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

+ Here is the call graph for this function:

◆ view()

ilCourseContentGUI::view ( )

Output course content.

Definition at line 247 of file class.ilCourseContentGUI.php.

248 {
249 // BEGIN ChangeEvent: record read event.
250 require_once('Services/Tracking/classes/class.ilChangeEvent.php');
251 global $ilUser;
252 $obj_id = ilObject::_lookupObjId($this->container_obj->getRefId());
254 $this->container_obj->getType(),
255 $this->container_obj->getRefId(),
256 $obj_id,
257 $ilUser->getId()
258 );
259 // END ChangeEvent: record read event.
260
261 $this->getCenterColumnHTML();
262
263 if (!$this->no_right_column) {
264 $this->tpl->setRightContent($this->getRightColumnHTML());
265 }
266 }
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
getRightColumnHTML()
Display right column.
getCenterColumnHTML()
Get center column.

References $ilUser, ilObjectGUI\$obj_id, ilObject\_lookupObjId(), ilChangeEvent\_recordReadEvent(), ilObjectGUI\getCenterColumnHTML(), and getRightColumnHTML().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $container_gui

ilCourseContentGUI::$container_gui

Definition at line 17 of file class.ilCourseContentGUI.php.

◆ $container_obj

ilCourseContentGUI::$container_obj

Definition at line 18 of file class.ilCourseContentGUI.php.

Referenced by __initCourseObject().

◆ $course_obj

ilCourseContentGUI::$course_obj

Definition at line 19 of file class.ilCourseContentGUI.php.

◆ $ctrl

ilCourseContentGUI::$ctrl

Definition at line 22 of file class.ilCourseContentGUI.php.

◆ $lng

ilCourseContentGUI::$lng

Definition at line 23 of file class.ilCourseContentGUI.php.

Referenced by __construct(), getRightColumnHTML(), and setColumnSettings().

◆ $tabs_gui

ilCourseContentGUI::$tabs_gui

Definition at line 24 of file class.ilCourseContentGUI.php.

◆ $tpl

ilCourseContentGUI::$tpl

Definition at line 21 of file class.ilCourseContentGUI.php.

Referenced by __construct().


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