ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilObjCourseGUI Class Reference

Class ilObjCourseGUI. More...

+ Inheritance diagram for ilObjCourseGUI:
+ Collaboration diagram for ilObjCourseGUI:

Public Member Functions

 __construct ()
 Constructor public. More...
 
 gatewayObject ()
 
 renderObject ()
 
 viewObject ()
 
 renderContainer ()
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 saveNotificationObject ()
 :TEMP: Save notification setting (from infoscreen) More...
 
 editInfoObject (ilPropertyFormGUI $a_form=null)
 Edit info page informations. More...
 
 confirmDeleteInfoFilesObject ()
 show info file donfimation table More...
 
 deleteInfoFilesObject ()
 Delete info files. More...
 
 initInfoEditor ()
 init info editor More...
 
 updateInfoObject ()
 
 updateObject ()
 Update course settings type $ilUser. More...
 
 editObject (ilPropertyFormGUI $form=null)
 edit object More...
 
 sendFileObject ()
 
 setSubTabs ($a_tab)
 set sub tabs More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 setShowHidePrefs ()
 set preferences (show/hide tabel content) More...
 
 readMemberData ($ids, $selected_columns=null)
 
 updateLPFromStatus ($a_member_id, $a_has_passed)
 sync course status and lp status More...
 
 autoFillObject ()
 
 leaveObject ()
 
 unsubscribeObject ()
 DEPRECATED? More...
 
 performUnsubscribeObject ()
 
 addContentTab ()
 Add content tab. More...
 
 getTabs ()
 Get tabs. More...
 
 executeCommand ()
 
 addLocatorItems ()
 
 editMapSettingsObject ()
 Edit Map Settings. More...
 
 saveMapSettingsObject ()
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container. More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 askResetObject ()
 ask reset test results More...
 
 resetObject ()
 
 __checkStartObjects ()
 
 prepareOutput ($a_show_subobjects=true)
 Handle member view. More...
 
 createMailSignature ()
 Create a course mail signature. More...
 
 deliverCertificateObject ()
 
 saveSortingObject ()
 
 getLocalRoles ($a_exclude=array())
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- Public Member Functions inherited from ilContainerGUI
 __construct ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
 executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 renderBlockAsynchObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel ()
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink ()
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs ()
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 show clipboard More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 public More...
 
 cloneWizardPageListObject ()
 public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify list gui for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ()
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 
 setSideColumnReturn ()
 Set return point for side column actions. More...
 
- 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 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...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 

Static Public Member Functions

static _forwards ()
 
static _goto ($a_target, $a_add="")
 goto target course More...
 
static _modifyItemGUI ( $a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
 We need a static version of this, e.g. More...
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 
- 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...
 

Data Fields

const BREADCRUMB_DEFAULT = 0
 
const BREADCRUMB_CRS_ONLY = 1
 
const BREADCRUMB_FULL_PATH = 2
 
- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 
 $multi_download_enabled = false
 
- 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
 

Protected Member Functions

 afterImport (ilObject $a_new_object)
 add course admin after import file More...
 
 confirmLPSync ()
 
 setLPSyncObject ()
 
 initEditForm ()
 init form More...
 
 getEditFormValues ()
 
 afterSave (ilObject $a_new_object)
 save object public More...
 
 getAgreementTabs ()
 Get tabs for member agreement. More...
 
 membersObject ()
 Called from goto? More...
 
 loadDate ($a_field)
 load date More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 
 afterSaveCallback ()
 
 redirectLocToTestConfirmedObject ()
 
 redirectLocToTestObject ($a_force_new_run=null)
 Test redirection will be moved lo adapter. More...
 
 redirectLocToTestConfirmation ($a_objective_id, $a_test_id)
 Show confirmation whether user wants to start a new run or resume a previous run. More...
 
 hasAdminPermission ()
 user has admin permission or "edit permission" permission on this course More...
 
 jump2UsersGalleryObject ()
 
- Protected Member Functions inherited from ilContainerGUI
 getEditFormValues ()
 Get values for edit form. More...
 
 afterUpdate ()
 
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction. More...
 
 initFormPasswordInstruction ()
 Init password form. More...
 
 savePasswordObject ()
 Save password. More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link. More...
 
 fileManagerLaunchObject ()
 Launch jnlp. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initSortingForm (ilPropertyFormGUI $form, array $a_sorting_settings)
 Append sorting settings to property form. More...
 
 initListPresentationForm (ilPropertyFormGUI $form)
 Add list presentation settings to form. More...
 
 saveListPresentation (ilPropertyFormGUI $form)
 Save list presentation setting. More...
 
 initSortingDirectionForm (ilContainerSortingSettings $sorting_settings, $element, $a_prefix)
 Add sorting direction. More...
 
 initManualSortingOptionForm (ilContainerSortingSettings $settings, $element, $a_prefix, $a_sorting_settings)
 Add manual sorting options. More...
 
 saveSortingSettings (ilPropertyFormGUI $form)
 Save sorting settings. More...
 
 getTreeSelectorGUI ($cmd)
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 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 public More...
 
 setAdminTabs ()
 set admin tabs 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...
 

Private Member Functions

 checkAgreement ()
 Check agreement and redirect if it is not accepted. More...
 

Additional Inherited Members

- Protected Attributes inherited from ilContainerGUI
 $rbacsystem
 
 $tabs
 
 $settings
 
 $user
 
 $db
 
 $access
 
 $error
 
 $obj_definition
 
 $rbacadmin
 
 $rbacreview
 
 $log
 
 $obj_data_cache
 
 $toolbar
 
 $plugin_admin
 
 $app_event_handler
 
 $ui
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjCourseGUI::__construct ( )

Constructor public.

Definition at line 41 of file class.ilObjCourseGUI.php.

References $_GET, $DIC, and $ilCtrl.

42  {
43  global $DIC;
44 
45  $ilCtrl = $DIC['ilCtrl'];
46  $ilHelp = $DIC['ilHelp'];
47 
48  // CONTROL OPTIONS
49  $this->ctrl = $ilCtrl;
50  $this->ctrl->saveParameter($this, array("ref_id","cmdClass"));
51 
52  $this->type = "crs";
53  parent::__construct('', (int) $_GET['ref_id'], true, false);
54 
55  $this->lng->loadLanguageModule('crs');
56  $this->lng->loadLanguageModule('cert');
57  $this->lng->loadLanguageModule('obj');
58 
59  $this->SEARCH_USER = 1;
60  $this->SEARCH_GROUP = 2;
61  $this->SEARCH_COURSE = 3;
62  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ __checkStartObjects()

ilObjCourseGUI::__checkStartObjects ( )

Definition at line 3111 of file class.ilObjCourseGUI.php.

References $DIC, and $ilUser.

Referenced by viewObject().

3112  {
3113  global $DIC;
3114 
3115  $ilAccess = $DIC['ilAccess'];
3116  $ilUser = $DIC['ilUser'];
3117 
3118  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
3119  return true;
3120  }
3121 
3122  include_once './Services/Container/classes/class.ilContainerStartObjects.php';
3123  $this->start_obj = new ilContainerStartObjects(
3124  $this->object->getRefId(),
3125  $this->object->getId()
3126  );
3127  if (count($this->start_obj->getStartObjects()) &&
3128  !$this->start_obj->allFullfilled($ilUser->getId())) {
3129  return false;
3130  }
3131 
3132  return true;
3133  }
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
+ Here is the caller graph for this function:

◆ _forwards()

static ilObjCourseGUI::_forwards ( )
static

Definition at line 2745 of file class.ilObjCourseGUI.php.

2746  {
2747  return array("ilCourseRegisterGUI",'ilConditionHandlerGUI');
2748  }

◆ _goto()

static ilObjCourseGUI::_goto (   $a_target,
  $a_add = "" 
)
static

goto target course

Definition at line 2773 of file class.ilObjCourseGUI.php.

References $_GET, $DIC, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilMembershipRegistrationCodeUtils\handleCode(), ilUtil\redirect(), and ilUtil\sendFailure().

Referenced by ilObjCourseReferenceGUI\_goto().

2774  {
2775  global $DIC;
2776 
2777  $ilAccess = $DIC['ilAccess'];
2778  $ilErr = $DIC['ilErr'];
2779  $lng = $DIC['lng'];
2780  $ilUser = $DIC['ilUser'];
2781 
2782  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
2783  if (substr($a_add, 0, 5) == 'rcode') {
2784  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
2785  // Redirect to login for anonymous
2787  "login.php?target=" . $_GET["target"] . "&cmd=force_login&lang=" .
2788  $ilUser->getCurrentLanguage()
2789  );
2790  }
2791 
2792  // Redirects to target location after assigning user to course
2794  $a_target,
2796  substr($a_add, 5)
2797  );
2798  }
2799 
2800  if ($a_add == "mem" && $ilAccess->checkAccess("manage_members", "", $a_target)) {
2801  ilObjectGUI::_gotoRepositoryNode($a_target, "members");
2802  }
2803 
2804  if ($ilAccess->checkAccess("read", "", $a_target)) {
2806  } else {
2807  // to do: force flat view
2808  if ($ilAccess->checkAccess("visible", "", $a_target)) {
2809  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
2810  } else {
2811  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
2812  ilUtil::sendFailure(sprintf(
2813  $lng->txt("msg_no_perm_read_item"),
2815  ), true);
2817  }
2818  }
2819  }
2820  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
2821  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static handleCode($a_ref_id, $a_type, $a_code)
Handle target parameter.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
$ilUser
Definition: imgupload.php:18
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static redirect($a_script)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _modifyItemGUI()

static ilObjCourseGUI::_modifyItemGUI (   $a_item_list_gui,
  $a_cmd_class,
  $a_item_data,
  $a_show_path,
  $a_abo_status,
  $a_course_ref_id,
  $a_course_obj_id,
  $a_parent_ref_id = 0 
)
static

We need a static version of this, e.g.

in folders of the course

Definition at line 2928 of file class.ilObjCourseGUI.php.

References $DIC, ilObjectGUI\$lng, ilObjCourse\_lookupViewMode(), and ilContainer\VIEW_OBJECTIVE.

Referenced by ilObjSessionGUI\modifyItemGUI(), ilObjGroupGUI\modifyItemGUI(), ilObjFolderGUI\modifyItemGUI(), and modifyItemGUI().

2937  {
2938  global $DIC;
2939 
2940  $lng = $DIC['lng'];
2941  $ilAccess = $DIC['ilAccess'];
2942 
2943  // this is set for folders within the course
2944  if ($a_parent_ref_id == 0) {
2945  $a_parent_ref_id = $a_course_ref_id;
2946  }
2947 
2948  // Special handling for tests in courses with learning objectives
2949  if ($a_item_data['type'] == 'tst' and
2951  $a_item_list_gui->addCommandLinkParameter(array('crs_show_result' => $a_course_ref_id));
2952  }
2953 
2954  $a_item_list_gui->enableSubscribe($a_abo_status);
2955 
2956  $is_tutor = ($ilAccess->checkAccess(
2957  'write',
2958  '',
2959  $a_course_ref_id,
2960  'crs',
2961  $a_course_obj_id
2962  ));
2963 
2964  if ($a_show_path and $is_tutor) {
2965  $a_item_list_gui->addCustomProperty(
2966  $lng->txt('path'),
2967  ilContainer::_buildPath($a_item_data['ref_id'], $a_course_ref_id),
2968  false,
2969  true
2970  );
2971  }
2972  }
global $DIC
Definition: saml.php:7
static _lookupViewMode($a_id)
lookup view mode of container
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addContentTab()

ilObjCourseGUI::addContentTab ( )

Add content tab.

Parameters

Definition at line 1972 of file class.ilObjCourseGUI.php.

Referenced by getTabs().

1973  {
1974  $this->tabs_gui->addTab(
1975  "view_content",
1976  $this->lng->txt("content"),
1977  $this->ctrl->getLinkTarget($this, "view")
1978  );
1979  }
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjCourseGUI::addLocatorItems ( )

Definition at line 2750 of file class.ilObjCourseGUI.php.

References $DIC.

2751  {
2752  global $DIC;
2753 
2754  $ilLocator = $DIC['ilLocator'];
2755  switch ($this->ctrl->getCmd()) {
2756  default:
2757  #$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
2758  break;
2759  }
2760  }
global $DIC
Definition: saml.php:7

◆ afterImport()

ilObjCourseGUI::afterImport ( ilObject  $a_new_object)
protected

add course admin after import file

Returns

Definition at line 95 of file class.ilObjCourseGUI.php.

References $DIC, $ilSetting, $ilUser, ilCourseParticipants\_getInstanceByObjId(), ilCourseConstants\CRS_ADMIN, and ilObject\getId().

96  {
97  global $DIC;
98 
99  $ilUser = $DIC['ilUser'];
100  $ilSetting = $DIC['ilSetting'];
101 
102  // #11895
103  include_once './Modules/Course/classes/class.ilCourseParticipants.php';
104  $part = ilCourseParticipants::_getInstanceByObjId($a_new_object->getId());
105  $part->add($ilUser->getId(), ilCourseConstants::CRS_ADMIN);
106  $part->updateNotification($ilUser->getId(), $ilSetting->get('mail_crs_admin_notification', true));
107 
108  parent::afterImport($a_new_object);
109  }
global $DIC
Definition: saml.php:7
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
getId()
get object id public
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
+ Here is the call graph for this function:

◆ afterSave()

ilObjCourseGUI::afterSave ( ilObject  $a_new_object)
protected

save object public

Definition at line 1670 of file class.ilObjCourseGUI.php.

References $DIC, $ilSetting, $ilUser, ilContainerGUI\$rbacadmin, ilChangeEvent\_recordWriteEvent(), ilObject\getId(), ilObject\getRefId(), ilObjectGUI\getReturnLocation(), IL_CRS_ADMIN, ilUtil\redirect(), and ilObject\update().

1671  {
1672  global $DIC;
1673 
1674  $rbacadmin = $DIC['rbacadmin'];
1675  $ilUser = $DIC['ilUser'];
1676  $ilSetting = $DIC['ilSetting'];
1677 
1678  $a_new_object->getMemberObject()->add($ilUser->getId(), IL_CRS_ADMIN);
1679  $a_new_object->getMemberObject()->updateNotification($ilUser->getId(), $ilSetting->get('mail_crs_admin_notification', true));
1680  // cognos-blu-patch: begin
1681  $a_new_object->getMemberObject()->updateContact($ilUser->getId(), 1);
1682  // cognos-blu-patch: end
1683  $a_new_object->update();
1684 
1685  // BEGIN ChangeEvent: Record write event.
1686  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
1687  global $DIC;
1688 
1689  $ilUser = $DIC['ilUser'];
1690  ilChangeEvent::_recordWriteEvent($a_new_object->getId(), $ilUser->getId(), 'create');
1691  // END ChangeEvent: Record write event.
1692 
1693  // always send a message
1694  ilUtil::sendSuccess($this->lng->txt("crs_added"), true);
1695 
1696  $this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
1698  "save",
1699  $this->ctrl->getLinkTarget($this, "edit", "", false, false)
1700  ));
1701  }
global $DIC
Definition: saml.php:7
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
getId()
get object id public
$ilUser
Definition: imgupload.php:18
const IL_CRS_ADMIN
Base class for course and group participants.
global $ilSetting
Definition: privfeed.php:17
getRefId()
get reference id public
update()
update object in db
static redirect($a_script)
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
+ Here is the call graph for this function:

◆ afterSaveCallback()

ilObjCourseGUI::afterSaveCallback ( )
protected

Definition at line 3275 of file class.ilObjCourseGUI.php.

3276  {
3277  $this->ctrl->redirectByClass(array('ilrepositorygui','ilobjcoursegui','illoeditorgui'), 'materials');
3278  }

◆ askResetObject()

ilObjCourseGUI::askResetObject ( )

ask reset test results

public

Parameters

Definition at line 3068 of file class.ilObjCourseGUI.php.

References $GLOBALS, and ilUtil\sendQuestion().

3069  {
3070  ilUtil::sendQuestion($this->lng->txt('crs_objectives_reset_sure'));
3071 
3072  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
3073  $confirm = new ilConfirmationGUI();
3074  $confirm->setFormAction($this->ctrl->getFormAction($this));
3075  $confirm->setConfirm($this->lng->txt('reset'), 'reset');
3076  $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
3077 
3078  $GLOBALS['DIC']['tpl']->setContent($confirm->getHTML());
3079  return true;
3080  }
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Confirmation screen class.
+ Here is the call graph for this function:

◆ autoFillObject()

ilObjCourseGUI::autoFillObject ( )

Definition at line 1864 of file class.ilObjCourseGUI.php.

References $DIC, ilContainerGUI\$rbacsystem, ilObjectGUI\checkPermission(), membersObject(), and ilUtil\sendFailure().

1865  {
1866  global $DIC;
1867 
1868  $rbacsystem = $DIC['rbacsystem'];
1869 
1870  $this->checkPermission('write');
1871 
1872  if ($this->object->isSubscriptionMembershipLimited() and $this->object->getSubscriptionMaxMembers() and
1873  $this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers()) {
1874  ilUtil::sendFailure($this->lng->txt("crs_max_members_reached"));
1875  $this->membersObject();
1876 
1877  return false;
1878  }
1879  if ($number = $this->object->getMembersObject()->autoFillSubscribers()) {
1880  ilUtil::sendSuccess($this->lng->txt("crs_number_users_added") . " " . $number);
1881  } else {
1882  ilUtil::sendFailure($this->lng->txt("crs_no_users_added"));
1883  }
1884  $this->membersObject();
1885 
1886  return true;
1887  }
global $DIC
Definition: saml.php:7
membersObject()
Called from goto?
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ checkAgreement()

ilObjCourseGUI::checkAgreement ( )
private

Check agreement and redirect if it is not accepted.

private

Definition at line 2704 of file class.ilObjCourseGUI.php.

References $DIC, $GLOBALS, $ilUser, ilCourseUserData\_checkRequired(), ilPrivacySettings\_getInstance(), ilMemberAgreement\_hasAccepted(), ilCourseDefinedFieldDefinition\_hasFields(), and ilMemberViewSettings\getInstance().

Referenced by viewObject().

2705  {
2706  global $DIC;
2707 
2708  $ilUser = $DIC['ilUser'];
2709  $ilAccess = $DIC['ilAccess'];
2710 
2711  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
2712  return true;
2713  }
2714 
2715  // Disable aggrement if is not member of course
2716  if (!$this->object->getMemberObject()->isAssigned()) {
2717  return true;
2718  }
2719 
2720  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
2721  if (ilMemberViewSettings::getInstance()->isActive()) {
2722  return true;
2723  }
2724 
2725  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
2726  include_once('Services/Membership/classes/class.ilMemberAgreement.php');
2727  $privacy = ilPrivacySettings::_getInstance();
2728 
2729  // Check agreement
2730  if (($privacy->courseConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
2731  and !ilMemberAgreement::_hasAccepted($ilUser->getId(), $this->object->getId())) {
2732  $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Missing course confirmation.');
2733  return false;
2734  }
2735  // Check required fields
2736  include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
2737  if (!ilCourseUserData::_checkRequired($ilUser->getId(), $this->object->getId())) {
2738  $GLOBALS['DIC']['ilLog']->write(__METHOD__ . ': Missing required fields');
2739  return false;
2740  }
2741  return true;
2742  }
global $DIC
Definition: saml.php:7
static _hasAccepted($a_usr_id, $a_obj_id)
Check if user has accepted agreement.
$ilUser
Definition: imgupload.php:18
static _checkRequired($a_usr_id, $a_obj_id)
Check required fields.
static _hasFields($a_container_id)
Check if there are any define fields.
static getInstance()
Get instance.
static _getInstance()
Get instance of ilPrivacySettings.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmDeleteInfoFilesObject()

ilObjCourseGUI::confirmDeleteInfoFilesObject ( )

show info file donfimation table

public

Parameters

Definition at line 577 of file class.ilObjCourseGUI.php.

References $_POST, editInfoObject(), ilUtil\sendFailure(), and setSubTabs().

578  {
579  if (!count($_POST['file_id'])) {
580  ilUtil::sendFailure($this->lng->txt('select_one'));
581  $this->editInfoObject();
582  return false;
583  }
584 
585  $this->setSubTabs('properties');
586  $this->tabs_gui->setTabActive('settings');
587  $this->tabs_gui->setSubTabActive('crs_info_settings');
588 
589  include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
590  $c_gui = new ilConfirmationGUI();
591 
592  // set confirm/cancel commands
593  $c_gui->setFormAction($this->ctrl->getFormAction($this, "deleteInfoFiles"));
594  $c_gui->setHeaderText($this->lng->txt("info_delete_sure"));
595  $c_gui->setCancel($this->lng->txt("cancel"), "editInfo");
596  $c_gui->setConfirm($this->lng->txt("confirm"), "deleteInfoFiles");
597 
598  // add items to delete
599  include_once('Modules/Course/classes/class.ilCourseFile.php');
600  foreach ($_POST["file_id"] as $file_id) {
601  $file = new ilCourseFile($file_id);
602  $c_gui->addItem("file_id[]", $file_id, $file->getFileName());
603  }
604 
605  $this->tpl->setContent($c_gui->getHTML());
606  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
setSubTabs($a_tab)
set sub tabs
editInfoObject(ilPropertyFormGUI $a_form=null)
Edit info page informations.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ confirmLPSync()

ilObjCourseGUI::confirmLPSync ( )
protected

Definition at line 1011 of file class.ilObjCourseGUI.php.

References $DIC, and ilObjectGUI\$tpl.

Referenced by updateObject().

1012  {
1013  global $DIC;
1014 
1015  $tpl = $DIC['tpl'];
1016 
1017  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1018  $cgui = new ilConfirmationGUI();
1019  $cgui->setFormAction($this->ctrl->getFormAction($this, "setLPSync"));
1020  $cgui->setHeaderText($this->lng->txt("crs_status_determination_sync"));
1021  $cgui->setCancel($this->lng->txt("cancel"), "edit");
1022  $cgui->setConfirm($this->lng->txt("confirm"), "setLPSync");
1023 
1024  $tpl->setContent($cgui->getHTML());
1025  }
global $DIC
Definition: saml.php:7
Confirmation screen class.
+ Here is the caller graph for this function:

◆ createMailSignature()

ilObjCourseGUI::createMailSignature ( )

Create a course mail signature.

Returns
string

Definition at line 3159 of file class.ilObjCourseGUI.php.

References ilLink\_getLink().

Referenced by infoScreen().

3160  {
3161  $link = chr(13) . chr(10) . chr(13) . chr(10);
3162  $link .= $this->lng->txt('crs_mail_permanent_link');
3163  $link .= chr(13) . chr(10) . chr(13) . chr(10);
3164  include_once './Services/Link/classes/class.ilLink.php';
3165  $link .= ilLink::_getLink($this->object->getRefId());
3166  return rawurlencode(base64_encode($link));
3167  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deleteInfoFilesObject()

ilObjCourseGUI::deleteInfoFilesObject ( )

Delete info files.

public

Definition at line 614 of file class.ilObjCourseGUI.php.

References $_POST, editInfoObject(), and ilUtil\sendFailure().

615  {
616  if (!count($_POST['file_id'])) {
617  ilUtil::sendFailure($this->lng->txt('select_one'));
618  $this->editInfoObject();
619  return false;
620  }
621  include_once('Modules/Course/classes/class.ilCourseFile.php');
622 
623  foreach ($_POST['file_id'] as $file_id) {
624  $file = new ilCourseFile($file_id);
625  if ($this->object->getId() == $file->getCourseId()) {
626  $file->delete();
627  }
628  }
629  ilUtil::sendSuccess($this->lng->txt('settings_saved'));
630  $this->editInfoObject();
631  return true;
632  }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
editInfoObject(ilPropertyFormGUI $a_form=null)
Edit info page informations.
$_POST["username"]
+ Here is the call graph for this function:

◆ deliverCertificateObject()

ilObjCourseGUI::deliverCertificateObject ( )

Definition at line 3235 of file class.ilObjCourseGUI.php.

References $DIC, $ilUser, ilCertificatePdfAction\downloadPdf(), and ilUtil\sendFailure().

3236  {
3237  global $DIC;
3238 
3239  $ilUser = $DIC['ilUser'];
3240  $ilAccess = $DIC['ilAccess'];
3241 
3242  $user_id = null;
3243  if ($ilAccess->checkAccess('manage_members', '', $this->ref_id)) {
3244  $user_id = $_REQUEST["member_id"];
3245  }
3246  if (!$user_id) {
3247  $user_id = $ilUser->getId();
3248  }
3249 
3250  $objId = (int) $this->object->getId();
3251 
3252  $validator = new ilCertificateDownloadValidator();
3253 
3254  if (false === $validator->isCertificateDownloadable($user_id, $objId)) {
3255  ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
3256  $this->ctrl->redirect($this);
3257  }
3258 
3259  $repository = new ilUserCertificateRepository();
3260 
3261  $certLogger = $DIC->logger()->cert();
3262  $pdfGenerator = new ilPdfGenerator($repository, $certLogger);
3263 
3264  $pdfAction = new ilCertificatePdfAction(
3265  $certLogger,
3266  $pdfGenerator,
3268  $this->lng->txt('error_creating_certificate_pdf')
3269  );
3270 
3271  $pdfAction->downloadPdf((int) $user_id, $objId);
3272  }
Class ilPdfGeneratorConstantsTest.
global $DIC
Definition: saml.php:7
Validates if an active certificate is stored in the database and can be downloaded by the user...
$ilUser
Definition: imgupload.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
Just a wrapper class to create Unit Test for other classes.
downloadPdf(int $userId, int $objectId)
+ Here is the call graph for this function:

◆ editInfoObject()

ilObjCourseGUI::editInfoObject ( ilPropertyFormGUI  $a_form = null)

Edit info page informations.

public

Definition at line 519 of file class.ilObjCourseGUI.php.

References $DIC, $files, ilObjectGUI\$ilErr, $rows, ilCourseFile\_readFilesByCourse(), ilObjectGUI\checkPermission(), initInfoEditor(), and setSubTabs().

Referenced by confirmDeleteInfoFilesObject(), deleteInfoFilesObject(), and updateInfoObject().

520  {
521  include_once 'Modules/Course/classes/class.ilCourseFile.php';
522 
523  global $DIC;
524 
525  $ilErr = $DIC['ilErr'];
526  $ilAccess = $DIC['ilAccess'];
527 
528  $this->checkPermission('write');
529  /*
530  if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
531  {
532  $ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
533  }
534  */
535  $this->setSubTabs('properties');
536  $this->tabs_gui->setTabActive('settings');
537  $this->tabs_gui->setSubTabActive('crs_info_settings');
538 
539  if (!$a_form) {
540  $a_form = $this->initInfoEditor();
541  }
542  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.edit_info.html', 'Modules/Course');
543  $this->tpl->setVariable('INFO_TABLE', $a_form->getHTML());
544 
545  if (!count($files = ilCourseFile::_readFilesByCourse($this->object->getId()))) {
546  return true;
547  }
548  $rows = array();
549  foreach ($files as $file) {
550  $table_data['id'] = $file->getFileId();
551  $table_data['filename'] = $file->getFileName();
552  $table_data['filetype'] = $file->getFileType();
553  $table_data['filesize'] = $file->getFileSize();
554 
555  $rows[] = $table_data;
556  }
557 
558  include_once("./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
559  $table_gui = new ilCourseInfoFileTableGUI($this, "edit");
560  $table_gui->setTitle($this->lng->txt("crs_info_download"));
561  $table_gui->setData($rows);
562  $table_gui->addCommandButton("cancel", $this->lng->txt("cancel"));
563  $table_gui->addMultiCommand("confirmDeleteInfoFiles", $this->lng->txt("delete"));
564  $table_gui->setSelectAllCheckbox("file_id");
565  $this->tpl->setVariable('INFO_FILE_TABLE', $table_gui->getHTML());
566 
567  return true;
568  }
$files
Definition: metarefresh.php:49
global $DIC
Definition: saml.php:7
static _readFilesByCourse($a_course_id)
$rows
Definition: xhr_table.php:10
setSubTabs($a_tab)
set sub tabs
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
initInfoEditor()
init info editor
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ editMapSettingsObject()

ilObjCourseGUI::editMapSettingsObject ( )

Edit Map Settings.

Definition at line 2827 of file class.ilObjCourseGUI.php.

References $def, $DIC, $form, $ilCtrl, $ilUser, ilMapUtil\getDefaultSettings(), ilMapUtil\isActivated(), ilLocationInputGUI\setLatitude(), setSubTabs(), and ilCheckboxInputGUI\setValue().

2828  {
2829  global $DIC;
2830 
2831  $ilUser = $DIC['ilUser'];
2832  $ilCtrl = $DIC['ilCtrl'];
2833  $ilUser = $DIC['ilUser'];
2834  $ilAccess = $DIC['ilAccess'];
2835 
2836  $this->setSubTabs("properties");
2837  $this->tabs_gui->activateTab('settings');
2838  $this->tabs_gui->activateSubTab('crs_map_settings');
2839 
2840  if (!ilMapUtil::isActivated() ||
2841  !$ilAccess->checkAccess("write", "", $this->object->getRefId())) {
2842  return;
2843  }
2844 
2845  $latitude = $this->object->getLatitude();
2846  $longitude = $this->object->getLongitude();
2847  $zoom = $this->object->getLocationZoom();
2848 
2849  // Get Default settings, when nothing is set
2850  if ($latitude == 0 && $longitude == 0 && $zoom == 0) {
2852  $latitude = $def["latitude"];
2853  $longitude = $def["longitude"];
2854  $zoom = $def["zoom"];
2855  }
2856 
2857  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
2858  $form = new ilPropertyFormGUI();
2859  $form->setFormAction($ilCtrl->getFormAction($this));
2860 
2861  $form->setTitle($this->lng->txt("crs_map_settings"));
2862 
2863  // enable map
2864  $public = new ilCheckboxInputGUI(
2865  $this->lng->txt("crs_enable_map"),
2866  "enable_map"
2867  );
2868  $public->setValue("1");
2869  $public->setChecked($this->object->getEnableCourseMap());
2870  $form->addItem($public);
2871 
2872  // map location
2873  $loc_prop = new ilLocationInputGUI(
2874  $this->lng->txt("crs_map_location"),
2875  "location"
2876  );
2877  $loc_prop->setLatitude($latitude);
2878  $loc_prop->setLongitude($longitude);
2879  $loc_prop->setZoom($zoom);
2880  $form->addItem($loc_prop);
2881 
2882  $form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
2883 
2884  $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
2885  //$this->tpl->show();
2886  }
setLatitude($a_latitude)
Set Latitude.
This class represents a property form user interface.
global $DIC
Definition: saml.php:7
This class represents a checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
setValue($a_value)
Set Value.
static getDefaultSettings()
Get default longitude, latitude and zoom.
This class represents a location property in a property form.
$ilUser
Definition: imgupload.php:18
static isActivated()
Checks whether Map feature is activated.
setSubTabs($a_tab)
set sub tabs
$def
Definition: croninfo.php:21
+ Here is the call graph for this function:

◆ editObject()

ilObjCourseGUI::editObject ( ilPropertyFormGUI  $form = null)

edit object

public

Returns

Definition at line 1044 of file class.ilObjCourseGUI.php.

References $form, $GLOBALS, and setSubTabs().

1045  {
1046  $this->setSubTabs('properties');
1047  $this->tabs_gui->setSubTabActive('crs_settings');
1048 
1049  if ($form instanceof ilPropertyFormGUI) {
1050  $GLOBALS['DIC']['tpl']->setContent($form->getHTML());
1051  return true;
1052  } else {
1053  parent::editObject();
1054  }
1055  }
This class represents a property form user interface.
setSubTabs($a_tab)
set sub tabs
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjCourseGUI::executeCommand ( )

Definition at line 2207 of file class.ilObjCourseGUI.php.

References $_GET, $DIC, $editor, $form, $GLOBALS, $html, $ilCtrl, ilObjectGUI\$ilErr, $ilUser, ilContainerGUI\$rbacsystem, $ret, $t, ilObjectGUI\$tpl, ilCourseParticipants\_getInstanceByObjId(), ilLink\_getLink(), ilObjCourse\_isActivated(), ilParticipants\_isParticipant(), ilObjCourse\_registrationEnabled(), ilLearningProgress\_tracProgress(), ilObjectGUI\addHeaderAction(), ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), ilObjectGUI\getCreationMode(), ilNewsTimelineGUI\getInstance(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getLocalRoles(), infoScreen(), infoScreenObject(), initInfoEditor(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilCourseConstants\MAIL_ALLOWED_ALL, prepareOutput(), ilLTIProviderObjectSettingGUI\setCustomRolesForSelection(), ilMailMemberSearchGUI\setObjParticipants(), setSubTabs(), ilContainerGUI\showPermanentLink(), ilContainerGUI\showRepTree(), and viewObject().

2208  {
2209  global $DIC;
2210 
2211  $rbacsystem = $DIC['rbacsystem'];
2212  $ilUser = $DIC['ilUser'];
2213  $ilAccess = $DIC['ilAccess'];
2214  $ilErr = $DIC['ilErr'];
2215  $ilTabs = $DIC['ilTabs'];
2216  $ilNavigationHistory = $DIC['ilNavigationHistory'];
2217  $ilCtrl = $DIC['ilCtrl'];
2218  $ilToolbar = $DIC['ilToolbar'];
2219 
2220  $next_class = $this->ctrl->getNextClass($this);
2221  $cmd = $this->ctrl->getCmd();
2222 
2223  $this->prepareOutput();
2224 
2225  // show repository tree
2226  $this->showRepTree();
2227 
2228  // add entry to navigation history
2229  if (!$this->getCreationMode() &&
2230  $ilAccess->checkAccess('read', '', $_GET['ref_id'])) {
2231  include_once("./Services/Link/classes/class.ilLink.php");
2232  $ilNavigationHistory->addItem(
2233  $_GET["ref_id"],
2234  ilLink::_getLink($_GET["ref_id"], "crs"),
2235  "crs"
2236  );
2237  }
2238 
2239  $header_action = true;
2240  switch ($next_class) {
2241  case 'illtiproviderobjectsettinggui':
2242 
2243  $this->setSubTabs('properties');
2244  $this->tabs_gui->activateTab('settings');
2245  $this->tabs_gui->activateSubTab('lti_provider');
2246  $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
2247  $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
2248  $lti_gui->offerLTIRolesForSelection(false);
2249  $this->ctrl->forwardCommand($lti_gui);
2250  break;
2251 
2252  case 'ilcoursemembershipgui':
2253 
2254  $this->tabs_gui->activateTab('members');
2255 
2256  include_once './Modules/Course/classes/class.ilCourseMembershipGUI.php';
2257  $mem_gui = new ilCourseMembershipGUI($this, $this->object);
2258  $this->ctrl->forwardCommand($mem_gui);
2259  break;
2260 
2261  case "ilinfoscreengui":
2262  $this->infoScreen(); // forwards command
2263  break;
2264 
2265  case 'ilobjectmetadatagui':
2266  if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
2267  $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->WARNING);
2268  }
2269  $this->tabs_gui->setTabActive('meta_data');
2270  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
2271  $md_gui = new ilObjectMetaDataGUI($this->object);
2272  $this->ctrl->forwardCommand($md_gui);
2273  break;
2274 
2275  case 'ilcourseregistrationgui':
2276  $this->ctrl->setReturn($this, '');
2277  $this->tabs_gui->setTabActive('join');
2278  include_once('./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2279  $registration = new ilCourseRegistrationGUI($this->object, $this);
2280  $this->ctrl->forwardCommand($registration);
2281  break;
2282 
2283  case 'ilobjectcustomuserfieldsgui':
2284  include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
2285  $cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
2286  $this->setSubTabs('properties');
2287  $this->tabs_gui->activateTab('settings');
2288  $this->tabs_gui->activateSubTab('crs_custom_user_fields');
2289  $this->ctrl->forwardCommand($cdf_gui);
2290  break;
2291 
2292  case "ilcourseobjectivesgui":
2293  include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2294 
2295  $this->ctrl->setReturn($this, "");
2296  $reg_gui = new ilCourseObjectivesGUI($this->object->getRefId());
2297  $ret = &$this->ctrl->forwardCommand($reg_gui);
2298  break;
2299 
2300  case 'ilobjcoursegroupinggui':
2301  include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
2302 
2303  $this->ctrl->setReturn($this, 'edit');
2304  $this->setSubTabs('properties');
2305  $this->tabs_gui->activateTab('settings');
2306  $this->tabs_gui->activateSubTab('groupings');
2307  $crs_grp_gui = new ilObjCourseGroupingGUI($this->object, (int) $_GET['obj_id']);
2308  $this->ctrl->forwardCommand($crs_grp_gui);
2309  break;
2310 
2311 
2312  case "ilpropertyformgui":
2313  // only case is currently adv metadata internal link in info settings, see #24497
2314  $form = $this->initInfoEditor();
2315  $this->ctrl->forwardCommand($form);
2316  break;
2317 
2318  case "ilcolumngui":
2319  $this->tabs_gui->setTabActive('none');
2320  $this->checkPermission("read");
2321  //$this->prepareOutput();
2322  //include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
2323  //$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
2324  // ilObjStyleSheet::getContentStylePath(0));
2325  //$this->renderObject();
2326  $this->viewObject();
2327  break;
2328 
2329  case "ilconditionhandlergui":
2330  include_once './Services/Conditions/classes/class.ilConditionHandlerGUI.php';
2331  // preconditions for whole course
2332  $this->setSubTabs("properties");
2333  $this->tabs_gui->activateTab('settings');
2334  $this->tabs_gui->activateSubTab('preconditions');
2335  $new_gui = new ilConditionHandlerGUI($this);
2336  $this->ctrl->forwardCommand($new_gui);
2337  break;
2338 
2339  case "illearningprogressgui":
2340  include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
2341 
2342  $new_gui = new ilLearningProgressGUI(
2344  $this->object->getRefId(),
2345  $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId()
2346  );
2347  $this->ctrl->forwardCommand($new_gui);
2348  $this->tabs_gui->setTabActive('learning_progress');
2349  break;
2350 
2351  case 'ilpermissiongui':
2352  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
2353  $this->tabs_gui->setTabActive('perm_settings');
2354  $perm_gui = new ilPermissionGUI($this);
2355  $ret = &$this->ctrl->forwardCommand($perm_gui);
2356  break;
2357 
2358  case 'ilcalendarpresentationgui':
2359  include_once('./Services/Calendar/classes/class.ilCalendarPresentationGUI.php');
2360  $cal = new ilCalendarPresentationGUI($this->object->getRefId());
2361  $ret = $this->ctrl->forwardCommand($cal);
2362  $header_action = false;
2363  break;
2364 
2365  case 'ilcoursecontentinterface':
2366 
2367  $this->initCourseContentInterface();
2368  $this->cci_obj->cci_setContainer($this);
2369 
2370  $this->ctrl->forwardCommand($this->cci_obj);
2371  $this->setSubTabs('content');
2372  $this->tabs_gui->setTabActive('content');
2373  break;
2374 
2375  case 'ilcoursecontentgui':
2376  $this->ctrl->setReturn($this, 'members');
2377  include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
2378  $course_content_obj = new ilCourseContentGUI($this);
2379  $this->ctrl->forwardCommand($course_content_obj);
2380  break;
2381 
2382  case 'ilpublicuserprofilegui':
2383  $this->tpl->enableDragDropFileUpload(null);
2384  require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
2385  $this->setSubTabs('members');
2386  $this->tabs_gui->setTabActive('members');
2387  $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
2388  $profile_gui->setBackUrl($this->ctrl->getLinkTargetByClass(["ilCourseMembershipGUI", "ilUsersGalleryGUI"], 'view'));
2389  $this->tabs_gui->setSubTabActive('crs_members_gallery');
2390  $html = $this->ctrl->forwardCommand($profile_gui);
2391  $this->tpl->setVariable("ADM_CONTENT", $html);
2392  break;
2393 
2394 
2395  case 'ilmemberagreementgui':
2396  include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
2397  $this->tabs_gui->clearTargets();
2398 
2399  $this->ctrl->setReturn($this, '');
2400  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
2401  $this->ctrl->forwardCommand($agreement);
2402  break;
2403 
2404 
2405  // container page editing
2406  case "ilcontainerpagegui":
2407  $ret = $this->forwardToPageObject();
2408  if ($ret != "") {
2409  $this->tpl->setContent($ret);
2410  }
2411  break;
2412 
2413  case "ilcontainerstartobjectspagegui":
2414  // file downloads, etc. (currently not active)
2415  include_once "Services/Container/classes/class.ilContainerStartObjectsPageGUI.php";
2416  $pgui = new ilContainerStartObjectsPageGUI($this->object->getId());
2417  $ret = $this->ctrl->forwardCommand($pgui);
2418  if ($ret) {
2419  $this->tpl->setContent($ret);
2420  }
2421  break;
2422 
2423  case 'ilobjectcopygui':
2424  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
2425  $cp = new ilObjectCopyGUI($this);
2426  $cp->setType('crs');
2427  $this->ctrl->forwardCommand($cp);
2428  break;
2429 
2430  case "ilobjstylesheetgui":
2431  $this->forwardToStyleSheet();
2432  break;
2433 
2434 
2435  case 'ilexportgui':
2436  $this->tabs_gui->setTabActive('export');
2437  include_once './Services/Export/classes/class.ilExportGUI.php';
2438  $exp = new ilExportGUI($this);
2439  $exp->addFormat('xml');
2440  $this->ctrl->forwardCommand($exp);
2441  break;
2442 
2443  case "ilcommonactiondispatchergui":
2444  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
2446  $this->ctrl->forwardCommand($gui);
2447  break;
2448 
2449  case 'ildidactictemplategui':
2450  $this->ctrl->setReturn($this, 'edit');
2451  include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
2452  $did = new ilDidacticTemplateGUI($this);
2453  $this->ctrl->forwardCommand($did);
2454  break;
2455 
2456  case "ilcertificategui":
2457  $this->tabs_gui->activateTab("settings");
2458  $this->setSubTabs("properties");
2459  $this->tabs_gui->activateSubTab('certificate');
2460 
2461  $guiFactory = new ilCertificateGUIFactory();
2462  $output_gui = $guiFactory->create($this->object);
2463  $this->ctrl->forwardCommand($output_gui);
2464  break;
2465 
2466  case 'ilobjectservicesettingsgui':
2467  $this->ctrl->setReturn($this, 'edit');
2468  $this->setSubTabs("properties");
2469  $this->tabs_gui->activateTab('settings');
2470  $this->tabs_gui->acltivateSubTab('tool_settings');
2471 
2472  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
2473  $service = new ilObjectServiceSettingsGUI(
2474  $this,
2475  $this->object->getId(),
2476  array(
2478  )
2479  );
2480  $this->ctrl->forwardCommand($service);
2481  break;
2482 
2483  case 'illoeditorgui':
2484  #$this->tabs_gui->clearTargets();
2485  #$this->tabs_gui->setBackTarget($this->lng->txt('back'),$this->ctrl->getLinkTarget($this,''));
2486  $this->tabs_gui->activateTab('crs_objectives');
2487 
2488  include_once './Modules/Course/classes/Objectives/class.ilLOEditorGUI.php';
2489  $editor = new ilLOEditorGUI($this->object);
2490  $this->ctrl->forwardCommand($editor);
2491  break;
2492 
2493  case 'ilcontainerstartobjectsgui':
2494  $this->ctrl->setReturn($this, 'edit');
2495  $this->tabs_gui->clearTargets();
2496  $this->tabs_gui->setBackTarget(
2497  $this->lng->txt("back_to_crs_content"),
2498  $this->ctrl->getLinkTarget($this, "edit")
2499  );
2500  $this->tabs_gui->addTab(
2501  "start",
2502  $this->lng->txt("crs_start_objects"),
2503  $this->ctrl->getLinkTargetByClass("ilcontainerstartobjectsgui", "listStructure")
2504  );
2505  global $DIC;
2506 
2507  $ilHelp = $DIC['ilHelp'];
2508  $ilHelp->setScreenIdComponent("crs");
2509 
2510  include_once './Services/Container/classes/class.ilContainerStartObjectsGUI.php';
2511  $stgui = new ilContainerStartObjectsGUI($this->object);
2512  $this->ctrl->forwardCommand($stgui);
2513  break;
2514 
2515  case 'illomembertestresultgui':
2516  include_once './Modules/Course/classes/Objectives/class.ilLOMemberTestResultGUI.php';
2517  $GLOBALS['DIC']['ilCtrl']->setReturn($this, 'members');
2518  $GLOBALS['DIC']['ilTabs']->clearTargets();
2519  $GLOBALS['DIC']['ilTabs']->setBackTarget(
2520  $GLOBALS['DIC']['lng']->txt('back'),
2521  $GLOBALS['DIC']['ilCtrl']->getLinkTarget($this, 'members')
2522  );
2523 
2524  $result_view = new ilLOMemberTestResultGUI($this, $this->object, (int) $_REQUEST['uid']);
2525  $this->ctrl->forwardCommand($result_view);
2526  break;
2527 
2528  case 'ilmailmembersearchgui':
2529  include_once 'Services/Mail/classes/class.ilMail.php';
2530  $mail = new ilMail($ilUser->getId());
2531 
2532  if (
2533  !($this->object->getMailToMembersType() == ilCourseConstants::MAIL_ALLOWED_ALL ||
2534  $ilAccess->checkAccess('manage_members', "", $this->object->getRefId())) &&
2535  $rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId())) {
2536  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
2537  }
2538 
2539  $this->tabs_gui->setTabActive('members');
2540 
2541  include_once './Services/Contact/classes/class.ilMailMemberSearchGUI.php';
2542  include_once './Services/Contact/classes/class.ilMailMemberCourseRoles.php';
2543 
2544  $mail_search = new ilMailMemberSearchGUI($this, $this->object->getRefId(), new ilMailMemberCourseRoles());
2545  $mail_search->setObjParticipants(
2546  ilCourseParticipants::_getInstanceByObjId($this->object->getId())
2547  );
2548  $this->ctrl->forwardCommand($mail_search);
2549  break;
2550 
2551  case 'ilbadgemanagementgui':
2552  $this->tabs_gui->setTabActive('obj_tool_setting_badges');
2553  include_once 'Services/Badge/classes/class.ilBadgeManagementGUI.php';
2554  $bgui = new ilBadgeManagementGUI($this->object->getRefId(), $this->object->getId(), 'crs');
2555  $this->ctrl->forwardCommand($bgui);
2556  break;
2557 
2558  case "ilcontainernewssettingsgui":
2559  $this->setSubTabs("properties");
2560  $this->tabs_gui->activateTab('settings');
2561  $this->tabs_gui->activateSubTab('obj_news_settings');
2562  $news_set_gui = new ilContainerNewsSettingsGUI($this);
2563  $news_set_gui->setTimeline(true);
2564  $news_set_gui->setCronNotifications(true);
2565  $news_set_gui->setHideByDate(true);
2566  $this->ctrl->forwardCommand($news_set_gui);
2567  break;
2568 
2569  case "ilnewstimelinegui":
2570  $this->tabs_gui->setTabActive('news_timeline');
2571  include_once("./Services/News/classes/class.ilNewsTimelineGUI.php");
2572  $t = ilNewsTimelineGUI::getInstance($this->object->getRefId(), $this->object->getNewsTimelineAutoENtries());
2573  $t->setUserEditAll($ilAccess->checkAccess('write', '', $this->object->getRefId(), 'grp'));
2574  $this->showPermanentLink($tpl);
2575  $this->ctrl->forwardCommand($t);
2576  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
2578  $ilUser->getId(),
2579  $this->object->getId(),
2580  $this->object->getRefId(),
2581  'crs'
2582  );
2583  break;
2584 
2585  case 'ilmemberexportsettingsgui':
2586  $this->setSubTabs('properties');
2587  $this->tabs_gui->activateTab('properties');
2588  $this->tabs_gui->activateSubTab('export_members');
2589  include_once './Services/Membership/classes/Export/class.ilMemberExportSettingsGUI.php';
2590  $settings_gui = new ilMemberExportSettingsGUI($this->object->getType(), $this->object->getId());
2591  $this->ctrl->forwardCommand($settings_gui);
2592  break;
2593 
2594 
2595  case "ilcontainerskillgui":
2596  $this->tabs_gui->activateTab('obj_tool_setting_skills');
2597  include_once("./Services/Container/Skills/classes/class.ilContainerSkillGUI.php");
2598  $gui = new ilContainerSkillGUI($this);
2599  $this->ctrl->forwardCommand($gui);
2600  break;
2601 
2602 
2603  case 'ilobjecttranslationgui':
2604  $this->checkPermissionBool("write");
2605  $this->setSubTabs("properties");
2606  $this->tabs_gui->activateTab("settings");
2607  $this->tabs_gui->activateSubTab("obj_multilinguality");
2608  include_once("./Services/Object/classes/class.ilObjectTranslationGUI.php");
2609  $transgui = new ilObjectTranslationGUI($this);
2610  $this->ctrl->forwardCommand($transgui);
2611  break;
2612 
2613 
2614  default:
2615 /* if(!$this->creation_mode)
2616  {
2617  $this->checkPermission('visible');
2618  }*/
2619  /*
2620  if(!$this->creation_mode and !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'crs'))
2621  {
2622  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
2623  }
2624  */
2625 
2626  // #9401 - see also ilStartupGUI::_checkGoto()
2627  if ($cmd == 'infoScreenGoto') {
2628  if (ilObjCourse::_isActivated($this->object->getId()) &&
2629  ilObjCourse::_registrationEnabled($this->object->getId())) {
2630  $cmd = 'join';
2631  } else {
2632  $cmd = 'infoScreen';
2633  }
2634  }
2635 
2636  if (!$this->creation_mode) {
2637  if ($cmd == "infoScreen") {
2638  $this->checkPermission("visible");
2639  } else {
2640  // $this->checkPermission("read");
2641  }
2642  }
2643 
2644 
2645  if (!$this->creation_mode
2646  && $cmd != 'infoScreen'
2647  && $cmd != 'sendfile'
2648  && $cmd != 'unsubscribe'
2649  && $cmd != 'deliverCertificate'
2650  && $cmd != 'performUnsubscribe'
2651  && !$ilAccess->checkAccess("read", '', $this->object->getRefId())
2652  || $cmd == 'join'
2653  || $cmd == 'subscribe') {
2654  include_once './Modules/Course/classes/class.ilCourseParticipants.php';
2655  if ($rbacsystem->checkAccess('join', $this->object->getRefId()) &&
2656  !ilCourseParticipants::_isParticipant($this->object->getRefId(), $ilUser->getId())) {
2657  include_once('./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
2658  $this->ctrl->redirectByClass("ilCourseRegistrationGUI");
2659  } else {
2660  $this->infoScreenObject();
2661  break;
2662  }
2663  }
2664 
2665  if ($cmd == 'listObjectives') {
2666  include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
2667 
2668  $this->ctrl->setReturn($this, "");
2669  $obj_gui = new ilCourseObjectivesGUI($this->object->getRefId());
2670  $ret = &$this->ctrl->forwardCommand($obj_gui);
2671  break;
2672  }
2673 
2674  // cognos-blu-patch: begin
2675  // cognos-blu-patch: end
2676 
2677  // if news timeline is landing page, redirect if necessary
2678  if ($cmd == "" && $this->object->isNewsTimelineLandingPageEffective()) {
2679  $this->ctrl->redirectbyclass("ilnewstimelinegui");
2680  }
2681 
2682  if (!$cmd) {
2683  $cmd = 'view';
2684  }
2685  $cmd .= 'Object';
2686  $this->$cmd();
2687 
2688  break;
2689  }
2690 
2691  if ($header_action) {
2692  $this->addHeaderAction();
2693  }
2694 
2695  return true;
2696  }
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
Class ilObjectMetaDataGUI.
class ilConditionHandlerGUI
Container start objects page GUI class.
GUI class for the workflow of copying objects.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _registrationEnabled($a_obj_id)
Registration enabled? Method is in Access class, since it is needed by Access/ListGUI.
Class ilLOEditorGUI.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.
getLocalRoles($a_exclude=array())
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
Class ilMailMemberSearchGUI.
global $ilCtrl
Definition: ilias.php:18
Export User Interface Class.
setCustomRolesForSelection($a_roles)
Set custom roles for mapping to LTI roles.
GUI class for public user profile presentation.
prepareOutput($a_show_subobjects=true)
Handle member view.
Class ilMailMemberCourseRoles.
class ilobjcourseobjectivesgui
GUI class for didactic template settings inside repository objects.
if(isset($_POST['submit'])) $form
GUI class for LTI provider object settings.
Skills for container (course/group) (top gui class)
forwardToStyleSheet()
Forward to style object.
& forwardToPageObject()
forward command to page object
$ilUser
Definition: imgupload.php:18
$editor
showPermanentLink()
show permanent link
Class ilObjCourseGroupingGUI.
GUI class for course registrations.
setSubTabs($a_tab)
set sub tabs
static _isActivated($a_obj_id)
Is activated.
Class ilCourseContentGUI.
$ret
Definition: parser.php:6
getCreationMode()
get creation mode
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
GUI class for service settings (calendar, notes, comments)
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
addHeaderAction()
Add header action menu.
infoScreen()
show information screen
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
Class ilObjUserTrackingGUI.
$html
Definition: example_001.php:87
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilContainerStartObjectsGUI.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
GUI class for object translation handling.
initInfoEditor()
init info editor
static getInstance($a_ref_id, $a_include_auto_entries)
Get instance.
+ Here is the call graph for this function:

◆ gatewayObject()

ilObjCourseGUI::gatewayObject ( )

Definition at line 64 of file class.ilObjCourseGUI.php.

References $_POST, and viewObject().

65  {
66  switch ($_POST["action"]) {
67 
68  case "deleteSubscribers":
69  $this->deleteSubscribers();
70  break;
71 
72  case "addSubscribers":
73  $this->addSubscribers();
74  break;
75 
76  case "addFromWaitingList":
77  $this->addFromWaitingList();
78  break;
79 
80  case "removeFromWaitingList":
81  $this->removeFromWaitingList();
82  break;
83 
84  default:
85  $this->viewObject();
86  break;
87  }
88  return true;
89  }
$_POST["username"]
+ Here is the call graph for this function:

◆ getAgreementTabs()

ilObjCourseGUI::getAgreementTabs ( )
protected

Get tabs for member agreement.

Definition at line 1944 of file class.ilObjCourseGUI.php.

References $GLOBALS.

1945  {
1946  if ($GLOBALS['DIC']['ilAccess']->checkAccess('visible', '', $this->ref_id)) {
1947  $GLOBALS['DIC']['ilTabs']->addTarget(
1948  "info_short",
1949  $this->ctrl->getLinkTargetByClass(
1950  array("ilobjcoursegui", "ilinfoscreengui"),
1951  "showSummary"
1952  ),
1953  "infoScreen"
1954  );
1955  }
1956  if ($GLOBALS['DIC']['ilAccess']->checkAccess('leave', '', $this->object->getRefId()) and $this->object->getMemberObject()->isMember()) {
1957  $GLOBALS['DIC']['ilTabs']->addTarget(
1958  "crs_unsubscribe",
1959  $this->ctrl->getLinkTarget($this, "unsubscribe"),
1960  'leave',
1961  ""
1962  );
1963  }
1964  }
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

◆ getEditFormValues()

ilObjCourseGUI::getEditFormValues ( )
protected

Definition at line 1521 of file class.ilObjCourseGUI.php.

1522  {
1523  // values are done in initEditForm()
1524  }

◆ getLocalRoles()

ilObjCourseGUI::getLocalRoles (   $a_exclude = array())

Definition at line 3411 of file class.ilObjCourseGUI.php.

References $title, ilObjRole\_getTranslation(), and hasAdminPermission().

Referenced by executeCommand().

3412  {
3413  $crs_admin = $this->object->getDefaultAdminRole();
3414  $crs_member = $this->object->getDefaultMemberRole();
3415  $local_roles = $this->object->getLocalCourseRoles(false);
3416  $crs_roles = array();
3417 
3418  //put the course member role to the top of the crs_roles array
3419  if (in_array($crs_member, $local_roles)) {
3420  #$crs_roles[$crs_member] = ilObjRole::_getTranslation(array_search ($crs_member, $local_roles));
3421  #unset($local_roles[$crs_roles[$crs_member]]);
3422  }
3423 
3424  foreach ($local_roles as $title => $role_id) {
3425  if ($role_id == $crs_admin && !$this->hasAdminPermission()) {
3426  continue;
3427  }
3428 
3429  $crs_roles[$role_id] = ilObjRole::_getTranslation($title);
3430  }
3431 
3432  if (count($a_exclude) > 0) {
3433  foreach ($a_exclude as $excluded_role) {
3434  if (isset($crs_roles[$excluded_role])) {
3435  unset($crs_roles[$excluded_role]);
3436  }
3437  }
3438  }
3439  return $crs_roles;
3440  }
hasAdminPermission()
user has admin permission or "edit permission" permission on this course
static _getTranslation($a_role_title)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTabs()

ilObjCourseGUI::getTabs ( )

Get tabs.

Definition at line 1984 of file class.ilObjCourseGUI.php.

References $_GET, $DIC, $GLOBALS, $ilUser, ilObjectGUI\$lng, ilCourseObjective\_getCountObjectives(), ilWaitingList\_isOnList(), ilParticipants\_isParticipant(), ilContainer\_lookupContainerSetting(), addContentTab(), ilLearningProgressAccess\checkAccess(), ilBadgeHandler\getInstance(), IL_CRS_VIEW_OBJECTIVE, IL_CRS_VIEW_TIMING, and ilObjectServiceSettingsGUI\SKILLS.

1985  {
1986  global $DIC;
1987 
1988  $ilUser = $DIC['ilUser'];
1989  $lng = $DIC['lng'];
1990  $ilHelp = $DIC['ilHelp'];
1991 
1992  $ilAccess = $GLOBALS['DIC']->access();
1993 
1994  $ilHelp->setScreenIdComponent("crs");
1995 
1996  $this->ctrl->setParameter($this, "ref_id", $this->ref_id);
1997 
1998  if ($ilAccess->checkAccess('read', '', $this->ref_id)) {
1999  // default activation
2000  $this->tabs_gui->activateTab('view_content');
2001  if ($this->object->isNewsTimelineEffective()) {
2002  if (!$this->object->isNewsTimelineLandingPageEffective()) {
2003  $this->addContentTab();
2004  }
2005  $this->tabs_gui->addTab(
2006  "news_timeline",
2007  $lng->txt("cont_news_timeline_tab"),
2008  $this->ctrl->getLinkTargetByClass("ilnewstimelinegui", "show")
2009  );
2010  if ($this->object->isNewsTimelineLandingPageEffective()) {
2011  $this->addContentTab();
2012  }
2013  } else {
2014  $this->addContentTab();
2015  }
2016  }
2017 
2018  if ($this->object->getViewMode() == IL_CRS_VIEW_TIMING and
2019  $ilAccess->checkAccess('write', '', $this->ref_id)
2020  ) {
2021  $this->tabs->addTab(
2022  'timings_timings',
2023  $lng->txt('timings_timings'),
2024  $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'manageTimings')
2025  );
2026  } elseif (
2027  $this->object->getViewMode() == IL_CRS_VIEW_TIMING and
2028  $this->object->getMemberObject()->isParticipant() and
2029  $ilAccess->checkAccess('read', '', $this->ref_id)) {
2030  $this->tabs->addTab(
2031  'timings_timings',
2032  $lng->txt('timings_timings'),
2033  $this->ctrl->getLinkTargetByClass('ilcoursecontentgui', 'managePersonalTimings')
2034  );
2035  }
2036 
2037 
2038 
2039  // learning objectives
2040  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
2041  include_once('./Modules/Course/classes/class.ilCourseObjective.php');
2042  if ($this->object->getViewMode() == IL_CRS_VIEW_OBJECTIVE or ilCourseObjective::_getCountObjectives($this->object->getId())) {
2043  $this->tabs_gui->addTarget(
2044  'crs_objectives',
2045  $this->ctrl->getLinkTargetByClass('illoeditorgui', ''),
2046  'illoeditorgui'
2047  );
2048  }
2049  }
2050 
2051  if (
2052  $ilAccess->checkAccess('visible', '', $this->ref_id) ||
2053  $ilAccess->checkAccess('join', '', $this->ref_id) ||
2054  $ilAccess->checkAccess('read', '', $this->ref_id)
2055  ) {
2056  //$next_class = $this->ctrl->getNextClass($this);
2057 
2058  // this is not nice. tabs should be displayed in ilcoursegui
2059  // not via ilrepositorygui, then next_class == ilinfoscreengui
2060  // could be checked
2061  $force_active = (strtolower($_GET["cmdClass"]) == "ilinfoscreengui"
2062  || strtolower($_GET["cmdClass"]) == "ilnotegui")
2063  ? true
2064  : false;
2065  $this->tabs_gui->addTarget(
2066  "info_short",
2067  $this->ctrl->getLinkTargetByClass(
2068  array("ilobjcoursegui", "ilinfoscreengui"),
2069  "showSummary"
2070  ),
2071  "infoScreen",
2072  "",
2073  "",
2074  $force_active
2075  );
2076  }
2077  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
2078  $force_active = (strtolower($_GET["cmdClass"]) == "ilconditionhandlergui"
2079  && $_GET["item_id"] == "")
2080  ? true
2081  : false;
2082  $this->tabs_gui->addTarget(
2083  "settings",
2084  $this->ctrl->getLinkTarget($this, "edit"),
2085  array("edit", "editMapSettings", "editCourseIcons", "listStructure"),
2086  "",
2087  "",
2088  $force_active
2089  );
2090  }
2091 
2092 
2093  $is_participant = ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId());
2094  include_once './Services/Mail/classes/class.ilMail.php';
2095  $mail = new ilMail($GLOBALS['DIC']['ilUser']->getId());
2096 
2097  include_once './Modules/Course/classes/class.ilCourseMembershipGUI.php';
2098  $membership_gui = new ilCourseMembershipGUI($this, $this->object);
2099  $membership_gui->addMemberTab($this->tabs_gui, $is_participant);
2100 
2101  // badges
2102  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
2103  include_once 'Services/Badge/classes/class.ilBadgeHandler.php';
2104  if (ilBadgeHandler::getInstance()->isObjectActive($this->object->getId())) {
2105  $this->tabs_gui->addTarget(
2106  "obj_tool_setting_badges",
2107  $this->ctrl->getLinkTargetByClass("ilbadgemanagementgui", ""),
2108  "",
2109  "ilbadgemanagementgui"
2110  );
2111  }
2112  }
2113 
2114  // skills
2115  include_once("./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
2116  if ($ilAccess->checkAccess('read', '', $this->ref_id) && ilContainer::_lookupContainerSetting(
2117  $this->object->getId(),
2119  false
2120  )) {
2121  $skmg_set = new ilSetting("skmg");
2122  if ($skmg_set->get("enable_skmg")) {
2123  $this->tabs_gui->addTarget(
2124  "obj_tool_setting_skills",
2125  $this->ctrl->getLinkTargetByClass(array("ilcontainerskillgui", "ilcontskillpresentationgui"), ""),
2126  "",
2127  array("ilcontainerskillgui", "ilcontskillpresentationgui", "ilcontskilladmingui")
2128  );
2129  }
2130  }
2131 
2132  // learning progress
2133  include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
2134  if (ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant)) {
2135  $this->tabs_gui->addTarget(
2136  'learning_progress',
2137  $this->ctrl->getLinkTargetByClass(array('ilobjcoursegui','illearningprogressgui'), ''),
2138  '',
2139  array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui')
2140  );
2141  }
2142 
2143  // meta data
2144  if ($ilAccess->checkAccess('write', '', $this->ref_id)) {
2145  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
2146  $mdgui = new ilObjectMetaDataGUI($this->object);
2147  $mdtab = $mdgui->getTab();
2148  if ($mdtab) {
2149  $this->tabs_gui->addTarget(
2150  "meta_data",
2151  $mdtab,
2152  "",
2153  "ilobjectmetadatagui"
2154  );
2155  }
2156  }
2157 
2158  if ($ilAccess->checkAccess('write', '', $this->object->getRefId())) {
2159  $this->tabs_gui->addTarget(
2160  'export',
2161  $this->ctrl->getLinkTargetByClass('ilexportgui', ''),
2162  'export',
2163  'ilexportgui'
2164  );
2165  }
2166 
2167  if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id)) {
2168  $this->tabs_gui->addTarget(
2169  "perm_settings",
2170  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
2171  array("perm","info","owner"),
2172  'ilpermissiongui'
2173  );
2174  }
2175 
2176  // Join/Leave
2177  if ($ilAccess->checkAccess('join', '', $this->ref_id)
2178  and !$this->object->getMemberObject()->isAssigned()) {
2179  include_once './Modules/Course/classes/class.ilCourseWaitingList.php';
2180  if (ilCourseWaitingList::_isOnList($ilUser->getId(), $this->object->getId())) {
2181  $this->tabs_gui->addTab(
2182  'leave',
2183  $this->lng->txt('membership_leave'),
2184  $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', 'show', '')
2185  );
2186  } else {
2187  $this->tabs_gui->addTarget(
2188  "join",
2189  $this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', "show"),
2190  'show',
2191  ""
2192  );
2193  }
2194  }
2195  if ($ilAccess->checkAccess('leave', '', $this->object->getRefId())
2196  and $this->object->getMemberObject()->isMember()) {
2197  $this->tabs_gui->addTarget(
2198  "crs_unsubscribe",
2199  $this->ctrl->getLinkTarget($this, "unsubscribe"),
2200  'leave',
2201  ""
2202  );
2203  }
2204  }
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
Class ilObjectMetaDataGUI.
const IL_CRS_VIEW_OBJECTIVE
global $DIC
Definition: saml.php:7
$_GET["client_id"]
const IL_CRS_VIEW_TIMING
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
addContentTab()
Add content tab.
$ilUser
Definition: imgupload.php:18
static _isOnList($a_usr_id, $a_obj_id)
Check if a user on the waiting list.
static _getCountObjectives($a_obj_id, $a_activated_only=false)
get count objectives
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static getInstance()
Constructor.
+ Here is the call graph for this function:

◆ hasAdminPermission()

ilObjCourseGUI::hasAdminPermission ( )
protected

user has admin permission or "edit permission" permission on this course

Returns
bool

Definition at line 3446 of file class.ilObjCourseGUI.php.

References $DIC, $ilUser, ilCourseParticipant\_getInstanceByObjId(), and ilObjectGUI\checkPermissionBool().

Referenced by getLocalRoles().

3447  {
3448  global $DIC;
3449 
3450  $ilUser = $DIC['ilUser'];
3451  return ilCourseParticipant::_getInstanceByObjId($this->object->getId(), $ilUser->getId())->isAdmin()
3452  or $this->checkPermissionBool('edit_permission');
3453  }
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
static _getInstanceByObjId($a_obj_id, $a_usr_id)
Get singleton instance.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjCourseGUI::infoScreen ( )

show information screen

Definition at line 212 of file class.ilObjCourseGUI.php.

References $_GET, $c, $DIC, $email, $files, ilObjectGUI\$ilErr, $ilSetting, $ilUser, $info, ilObjectGUI\$tpl, $txt, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilMDUtils\_fillHTMLMetaTags(), ilCourseDefinedFieldDefinition\_getFields(), ilPrivacySettings\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilCourseFile\_readFilesByCourse(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilMailFormCall\CONTEXT_KEY, createMailSignature(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), ilParticipants\getInstanceByObjId(), ilMailFormCall\getLinkTarget(), ilCourseMailTemplateMemberContext\ID, IL_CAL_UNIX, IL_CRS_SUBSCRIPTION_CONFIRMATION, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_SUBSCRIPTION_PASSWORD, ilObjCourseAccess\lookupRegistrationInfo(), ilUtil\makeClickable(), ilAdvancedMDRecordGUI\MODE_INFO, and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

213  {
214  global $DIC;
215 
216  $ilErr = $DIC['ilErr'];
217  $ilAccess = $DIC['ilAccess'];
218  $ilUser = $DIC['ilUser'];
219  $ilSetting = $DIC['ilSetting'];
220 
221  if (!$this->checkPermissionBool('read')) {
222  $this->checkPermission('visible');
223  }
224 
225  // Fill meta header tags
226  include_once('Services/MetaData/classes/class.ilMDUtils.php');
227  ilMDUtils::_fillHTMLMetaTags($this->object->getId(), $this->object->getId(), 'crs');
228 
229  $this->tabs_gui->setTabActive('info_short');
230 
231  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
232  include_once 'Modules/Course/classes/class.ilCourseFile.php';
233 
234  $files = &ilCourseFile::_readFilesByCourse($this->object->getId());
235 
236  $info = new ilInfoScreenGUI($this);
237  $info->enablePrivateNotes();
238  $info->enableFeedback();
239  $info->enableNews();
240  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
241  $info->enableNewsEditing();
242  }
243 
244  if (strlen($this->object->getImportantInformation()) or
245  strlen($this->object->getSyllabus()) or
246  count($files)) {
247  $info->addSection($this->lng->txt('crs_general_informations'));
248  }
249 
250  if (strlen($this->object->getImportantInformation())) {
251  $info->addProperty(
252  $this->lng->txt('crs_important_info'),
253  "<strong>" . nl2br(
254  ilUtil::makeClickable($this->object->getImportantInformation(), true) . "</strong>"
255  )
256  );
257  }
258  if (strlen($this->object->getSyllabus())) {
259  $info->addProperty($this->lng->txt('crs_syllabus'), nl2br(
260  ilUtil::makeClickable($this->object->getSyllabus(), true)
261  ));
262  }
263  // files
264  if (count($files)) {
265  $tpl = new ilTemplate('tpl.event_info_file.html', true, true, 'Modules/Course');
266 
267  foreach ($files as $file) {
268  $tpl->setCurrentBlock("files");
269  $this->ctrl->setParameter($this, 'file_id', $file->getFileId());
270  $tpl->setVariable("DOWN_LINK", $this->ctrl->getLinkTarget($this, 'sendfile'));
271  $tpl->setVariable("DOWN_NAME", $file->getFileName());
272  $tpl->setVariable("DOWN_INFO_TXT", $this->lng->txt('crs_file_size_info'));
273  $tpl->setVariable("DOWN_SIZE", $file->getFileSize());
274  $tpl->setVariable("TXT_BYTES", $this->lng->txt('bytes'));
275  $tpl->parseCurrentBlock();
276  }
277  $info->addProperty(
278  $this->lng->txt('crs_file_download'),
279  $tpl->get()
280  );
281  }
282 
283  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
284  $record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO, 'crs', $this->object->getId());
285  $record_gui->setInfoObject($info);
286  $record_gui->parse();
287 
288  // meta data
289  $info->addMetaDataSections($this->object->getId(), 0, $this->object->getType());
290 
291  // contact
292  if ($this->object->hasContactData()) {
293  $info->addSection($this->lng->txt("crs_contact"));
294  }
295  if (strlen($this->object->getContactName())) {
296  $info->addProperty(
297  $this->lng->txt("crs_contact_name"),
298  $this->object->getContactName()
299  );
300  }
301  if (strlen($this->object->getContactResponsibility())) {
302  $info->addProperty(
303  $this->lng->txt("crs_contact_responsibility"),
304  $this->object->getContactResponsibility()
305  );
306  }
307  if (strlen($this->object->getContactPhone())) {
308  $info->addProperty(
309  $this->lng->txt("crs_contact_phone"),
310  $this->object->getContactPhone()
311  );
312  }
313  if ($this->object->getContactEmail()) {
314  include_once './Modules/Course/classes/class.ilCourseMailTemplateMemberContext.php';
315  require_once 'Services/Mail/classes/class.ilMailFormCall.php';
316 
317  $emails = explode(",", $this->object->getContactEmail());
318  foreach ($emails as $email) {
319  $email = trim($email);
320  $etpl = new ilTemplate("tpl.crs_contact_email.html", true, true, 'Modules/Course');
321  $etpl->setVariable(
322  "EMAIL_LINK",
324  $info,
325  'showSummary',
326  array(),
327  array(
328  'type' => 'new',
329  'rcp_to' => $email,
330  'sig' => $this->createMailSignature()
331  ),
332  array(
334  'ref_id' => $this->object->getRefId(),
335  'ts' => time()
336  )
337  )
338  );
339  $etpl->setVariable("CONTACT_EMAIL", $email);
340  $mailString .= $etpl->get() . "<br />";
341  }
342  $info->addProperty($this->lng->txt("crs_contact_email"), $mailString);
343  }
344  if (strlen($this->object->getContactConsultation())) {
345  $info->addProperty(
346  $this->lng->txt("crs_contact_consultation"),
347  nl2br($this->object->getContactConsultation())
348  );
349  }
350 
351 
352  // support contacts
353  $parts = ilParticipants::getInstanceByObjId($this->object->getId());
354  $conts = $parts->getContacts();
355  if (count($conts) > 0) {
356  $info->addSection($this->lng->txt("crs_mem_contacts"));
357  foreach ($conts as $c) {
358  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
359  $pgui = new ilPublicUserProfileGUI($c);
360  $pgui->setBackUrl($this->ctrl->getLinkTargetByClass("ilinfoscreengui"));
361  $pgui->setEmbedded(true);
362  $info->addProperty("", $pgui->getHTML());
363  }
364  }
365 
366 
367 
368  //
369  // access
370  //
371 
372  // #10360
373  $this->lng->loadLanguageModule("rep");
374  $info->addSection($this->lng->txt("rep_activation_availability"));
375  $info->showLDAPRoleGroupMappingInfo();
376 
377  // activation
378  if ($this->object->getActivationUnlimitedStatus()) {
379  $info->addProperty(
380  $this->lng->txt("rep_activation_access"),
381  $this->lng->txt('crs_visibility_limitless')
382  );
383  } else {
384  $info->addProperty(
385  $this->lng->txt('rep_activation_access'),
387  new ilDateTime($this->object->getActivationStart(), IL_CAL_UNIX),
388  new ilDateTime($this->object->getActivationEnd(), IL_CAL_UNIX)
389  )
390  );
391  }
392  switch ($this->object->getSubscriptionLimitationType()) {
394  $txt = $this->lng->txt("crs_info_reg_deactivated");
395  break;
396 
397  default:
398  switch ($this->object->getSubscriptionType()) {
400  $txt = $this->lng->txt("crs_info_reg_confirmation");
401  break;
403  $txt = $this->lng->txt("crs_info_reg_direct");
404  break;
406  $txt = $this->lng->txt("crs_info_reg_password");
407  break;
408  }
409  }
410 
411  // subscription
412  $info->addProperty($this->lng->txt("crs_info_reg"), $txt);
413 
414 
415  if ($this->object->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED) {
416  if ($this->object->getSubscriptionUnlimitedStatus()) {
417  $info->addProperty(
418  $this->lng->txt("crs_reg_until"),
419  $this->lng->txt('crs_unlimited')
420  );
421  } elseif ($this->object->getSubscriptionStart() < time()) {
422  $info->addProperty(
423  $this->lng->txt("crs_reg_until"),
424  $this->lng->txt('crs_to') . ' ' .
425  ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX))
426  );
427  } elseif ($this->object->getSubscriptionStart() > time()) {
428  $info->addProperty(
429  $this->lng->txt("crs_reg_until"),
430  $this->lng->txt('crs_from') . ' ' .
431  ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX))
432  );
433  }
434  if ($this->object->isSubscriptionMembershipLimited()) {
435  if ($this->object->getSubscriptionMinMembers()) {
436  $info->addProperty(
437  $this->lng->txt("mem_min_users"),
438  $this->object->getSubscriptionMinMembers()
439  );
440  }
441  if ($this->object->getSubscriptionMaxMembers()) {
442  include_once './Modules/Course/classes/class.ilObjCourseAccess.php';
443  $reg_info = ilObjCourseAccess::lookupRegistrationInfo($this->object->getId());
444 
445  $info->addProperty(
446  $this->lng->txt('mem_free_places'),
447  $reg_info['reg_info_free_places']
448  );
449  }
450  }
451  }
452 
453  if ($this->object->getCancellationEnd()) {
454  $info->addProperty(
455  $this->lng->txt('crs_cancellation_end'),
456  ilDatePresentation::formatDate($this->object->getCancellationEnd())
457  );
458  }
459 
460  if ($this->object->getCourseStart()) {
461  $info->addProperty(
462  $this->lng->txt('crs_period'),
464  $this->object->getCourseStart(),
465  $this->object->getCourseEnd()
466  )
467  );
468  }
469 
470  // Confirmation
471  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
472  $privacy = ilPrivacySettings::_getInstance();
473 
474  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
475  if ($privacy->courseConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledCourseExport()) {
476  include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
477 
478  $field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
479 
480  $this->lng->loadLanguageModule('ps');
481  $info->addSection($this->lng->txt('crs_user_agreement_info'));
482  $info->addProperty($this->lng->txt('ps_export_data'), $field_info->exportableFieldsToInfoString());
483 
484  if ($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())) {
485  $info->addProperty($this->lng->txt('ps_crs_user_fields'), $fields);
486  }
487  }
488 
489  $info->enableLearningProgress(true);
490 
491  // forward the command
492  $this->ctrl->forwardCommand($info);
493  }
if($orgName !==null) if($spconfig->hasValue('contacts')) $email
Definition: metadata.php:201
Class ilInfoScreenGUI.
$files
Definition: metarefresh.php:49
static _fieldsToInfoString($a_obj_id)
Fields to info string.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
const IL_CRS_SUBSCRIPTION_CONFIRMATION
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static getLinkTarget($gui, $cmd, array $gui_params=array(), array $mail_params=array(), $context_params=array())
GUI class for public user profile presentation.
const IL_CRS_SUBSCRIPTION_PASSWORD
setInfoObject($info)
get info sections
createMailSignature()
Create a course mail signature.
static _getInstanceByType($a_type)
Get Singleton Instance.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
special template class to simplify handling of ITX/PEAR
static lookupRegistrationInfo($a_obj_id)
Lookup registration info ilDB $ilDB ilObjUser $ilUser ilLanguage $lng.
Date and time handling
$ilUser
Definition: imgupload.php:18
$txt
Definition: error.php:11
static _readFilesByCourse($a_course_id)
const CONTEXT_KEY
Session parameter for the context.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
global $ilSetting
Definition: privfeed.php:17
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
const IL_CRS_SUBSCRIPTION_DIRECT
static _getInstance()
Get instance of ilPrivacySettings.
$info
Definition: index.php:5
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static getInstanceByObjId($a_obj_id)
Get instance by obj type.
const IL_CRS_SUBSCRIPTION_DEACTIVATED
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjCourseGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 202 of file class.ilObjCourseGUI.php.

References infoScreen().

Referenced by executeCommand().

203  {
204  $this->ctrl->setCmd("showSummary");
205  $this->ctrl->setCmdClass("ilinfoscreengui");
206  $this->infoScreen();
207  }
infoScreen()
show information screen
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initEditForm()

ilObjCourseGUI::initEditForm ( )
protected

init form

protected

Parameters

Definition at line 1064 of file class.ilObjCourseGUI.php.

References $form, PHPMailer\PHPMailer\$options, $pass, $section, $sess, ilContainerGUI\$settings, $si, ilObjUserTracking\_enabledLearningProgress(), ilPrivacySettings\_getInstance(), ilLink\_getLink(), ilContainer\_lookupContainerSetting(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilMembershipRegistrationCodeUtils\generateCode(), ilObjectLP\getInstance(), ilObjectGUI\getObjectService(), IL_CAL_UNIX, IL_CRS_SUBSCRIPTION_CONFIRMATION, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_SUBSCRIPTION_PASSWORD, IL_CRS_VIEW_BY_TYPE, IL_CRS_VIEW_OBJECTIVE, IL_CRS_VIEW_SESSIONS, IL_CRS_VIEW_SIMPLE, IL_CRS_VIEW_TIMING, IL_CRS_VIEW_TIMING_ABSOLUTE, IL_CRS_VIEW_TIMING_RELATIVE, ilObjectGUI\initDidacticTemplate(), ilContainerGUI\initListPresentationForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilContainerGUI\initSortingForm(), ilCourseConstants\MAIL_ALLOWED_ALL, ilCourseConstants\MAIL_ALLOWED_TUTORS, ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setMinValue(), ilDateDurationInputGUI\setShowTime(), ilSelectInputGUI\setValue(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), ilObjectServiceSettingsGUI\SKILLS, ilContainer\SORT_ACTIVATION, ilContainer\SORT_CREATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjCourse\STATUS_DETERMINATION_LP, ilObjCourse\STATUS_DETERMINATION_MANUAL, ilObjectServiceSettingsGUI\TAG_CLOUD, and ilObjectServiceSettingsGUI\USE_NEWS.

Referenced by updateObject().

1065  {
1066  $obj_service = $this->getObjectService();
1067  $setting = $this->settings;
1068 
1069  include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
1070  include_once('./Services/Calendar/classes/class.ilDateTime.php');
1071 
1072  $form = new ilPropertyFormGUI();
1073  $form->setTitle($this->lng->txt('crs_edit'));
1074 
1075  $form->addCommandButton('update', $this->lng->txt('save'));
1076  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
1077 
1078  $form->setFormAction($this->ctrl->getFormAction($this, 'update'));
1079 
1080  // title and description
1081  $this->initFormTitleDescription($form);
1082 
1083  // Show didactic template type
1084  $this->initDidacticTemplate($form);
1085 
1086  // period
1087  include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
1088  $cdur = new ilDateDurationInputGUI($this->lng->txt('crs_period'), 'period');
1089  $cdur->setInfo($this->lng->txt('crs_period_info'));
1090  if ($this->object->getCourseStart()) {
1091  $cdur->setStart($this->object->getCourseStart());
1092  }
1093  if ($this->object->getCourseStart()) {
1094  $cdur->setEnd($this->object->getCourseEnd());
1095  }
1096  $form->addItem($cdur);
1097 
1098 
1099  // activation/availability
1100 
1101  $this->lng->loadLanguageModule('rep');
1102 
1104  $section->setTitle($this->lng->txt('rep_activation_availability'));
1105  $form->addItem($section);
1106 
1107  $online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'), 'activation_online');
1108  $online->setChecked(!$this->object->getOfflineStatus());
1109  $online->setInfo($this->lng->txt('crs_activation_online_info'));
1110  $form->addItem($online);
1111 
1112  include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
1113  $dur = new ilDateDurationInputGUI($this->lng->txt('rep_time_period'), "access_period");
1114  $dur->setShowTime(true);
1115  $dur->setStart(new ilDateTime($this->object->getActivationStart(), IL_CAL_UNIX));
1116  $dur->setEnd(new ilDateTime($this->object->getActivationEnd(), IL_CAL_UNIX));
1117  $form->addItem($dur);
1118 
1119  $visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'activation_visibility');
1120  $visible->setInfo($this->lng->txt('crs_activation_limited_visibility_info'));
1121  $visible->setChecked($this->object->getActivationVisibility());
1122  $dur->addSubItem($visible);
1123 
1124 
1126  $section->setTitle($this->lng->txt('crs_reg'));
1127  $form->addItem($section);
1128 
1129  $reg_proc = new ilRadioGroupInputGUI($this->lng->txt('crs_registration_type'), 'subscription_type');
1130  $reg_proc->setValue(
1131  ($this->object->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED)
1132  ? $this->object->getSubscriptionType()
1134  );
1135  // $reg_proc->setInfo($this->lng->txt('crs_reg_type_info'));
1136 
1137  $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_direct'), IL_CRS_SUBSCRIPTION_DIRECT);
1138  $reg_proc->addOption($opt);
1139 
1140  $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_password'), IL_CRS_SUBSCRIPTION_PASSWORD);
1141 
1142  $pass = new ilTextInputGUI($this->lng->txt("password"), 'subscription_password');
1143  $pass->setRequired(true);
1144  $pass->setInfo($this->lng->txt('crs_reg_password_info'));
1145  $pass->setSubmitFormOnEnter(true);
1146  $pass->setSize(32);
1147  $pass->setMaxLength(32);
1148  $pass->setValue($this->object->getSubscriptionPassword());
1149 
1150  $opt->addSubItem($pass);
1151  $reg_proc->addOption($opt);
1152 
1153  $opt = new ilRadioOption($this->lng->txt('crs_subscription_options_confirmation'), IL_CRS_SUBSCRIPTION_CONFIRMATION);
1154  $opt->setInfo($this->lng->txt('crs_registration_confirmation_info'));
1155  $reg_proc->addOption($opt);
1156 
1157  $opt = new ilRadioOption($this->lng->txt('crs_reg_no_selfreg'), IL_CRS_SUBSCRIPTION_DEACTIVATED);
1158  $opt->setInfo($this->lng->txt('crs_registration_deactivated'));
1159  $reg_proc->addOption($opt);
1160 
1161  $form->addItem($reg_proc);
1162 
1163 
1164  // Registration codes
1165  $reg_code = new ilCheckboxInputGUI($this->lng->txt('crs_reg_code'), 'reg_code_enabled');
1166  $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
1167  $reg_code->setValue(1);
1168  $reg_code->setInfo($this->lng->txt('crs_reg_code_enabled_info'));
1169 
1170  /*
1171  $code = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_value'));
1172  $code->setValue($this->object->getRegistrationAccessCode());
1173  $reg_code->addSubItem($code);
1174  */
1175 
1176  #$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
1177  // Create default access code
1178  if (!$this->object->getRegistrationAccessCode()) {
1179  include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
1180  $this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
1181  }
1182  $reg_link = new ilHiddenInputGUI('reg_code');
1183  $reg_link->setValue($this->object->getRegistrationAccessCode());
1184  $form->addItem($reg_link);
1185 
1186  $link = new ilCustomInputGUI($this->lng->txt('crs_reg_code_link'));
1187  include_once './Services/Link/classes/class.ilLink.php';
1188  $val = ilLink::_getLink($this->object->getRefId(), $this->object->getType(), array(), '_rcode' . $this->object->getRegistrationAccessCode());
1189  $link->setHTML('<span class="small">' . $val . '</span>');
1190  $reg_code->addSubItem($link);
1191 
1192  $form->addItem($reg_code);
1193 
1194  // time limit
1195  include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
1196  $sdur = new ilDateDurationInputGUI($this->lng->txt('crs_registration_limited'), "subscription_period");
1197  $sdur->setShowTime(true);
1198  if ($this->object->getSubscriptionStart()) {
1199  $sdur->setStart(new ilDateTime($this->object->getSubscriptionStart(), IL_CAL_UNIX));
1200  }
1201  if ($this->object->getSubscriptionEnd()) {
1202  $sdur->setEnd(new ilDateTime($this->object->getSubscriptionEnd(), IL_CAL_UNIX));
1203  }
1204  $form->addItem($sdur);
1205 
1206  // cancellation limit
1207  $cancel = new ilDateTimeInputGUI($this->lng->txt('crs_cancellation_end'), 'cancel_end');
1208  $cancel->setInfo($this->lng->txt('crs_cancellation_end_info'));
1209  $cancel_end = $this->object->getCancellationEnd();
1210  if ($cancel_end) {
1211  $cancel->setDate($cancel_end);
1212  }
1213  $form->addItem($cancel);
1214 
1215  // Max members
1216  $lim = new ilCheckboxInputGUI($this->lng->txt('crs_subscription_max_members_short'), 'subscription_membership_limitation');
1217  $lim->setInfo($this->lng->txt('crs_subscription_max_members_short_info'));
1218  $lim->setValue(1);
1219  $lim->setChecked($this->object->isSubscriptionMembershipLimited());
1220 
1221  $min = new ilTextInputGUI('', 'subscription_min');
1222  $min->setSubmitFormOnEnter(true);
1223  $min->setSize(4);
1224  $min->setMaxLength(4);
1225  $min->setValue($this->object->getSubscriptionMinMembers() ? $this->object->getSubscriptionMinMembers() : '');
1226  $min->setTitle($this->lng->txt('crs_subscription_min_members'));
1227  $min->setInfo($this->lng->txt('crs_subscription_min_members_info'));
1228  $lim->addSubItem($min);
1229 
1230  $max = new ilTextInputGUI('', 'subscription_max');
1231  $max->setSubmitFormOnEnter(true);
1232  $max->setSize(4);
1233  $max->setMaxLength(4);
1234  $max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() : '');
1235  $max->setTitle($this->lng->txt('crs_subscription_max_members'));
1236  $max->setInfo($this->lng->txt('crs_reg_max_info'));
1237 
1238  $lim->addSubItem($max);
1239 
1240  /*
1241  $wait = new ilCheckboxInputGUI($this->lng->txt('crs_waiting_list'),'waiting_list');
1242  $wait->setChecked($this->object->enabledWaitingList());
1243  $wait->setInfo($this->lng->txt('crs_wait_info'));
1244  $lim->addSubItem($wait);
1245 
1246  $wait = new ilCheckboxInputGUI($this->lng->txt('crs_waiting_list'),'waiting_list');
1247  $wait->setChecked($this->object->enabledWaitingList());
1248  $wait->setInfo($this->lng->txt('crs_wait_info'));
1249  $lim->addSubItem($wait);
1250 
1251  $auto = new ilCheckboxInputGUI($this->lng->txt('crs_waiting_list_autofill'), 'auto_wait');
1252  $auto->setChecked($this->object->hasWaitingListAutoFill());
1253  $auto->setInfo($this->lng->txt('crs_waiting_list_autofill_info'));
1254  $wait->addSubItem($auto);
1255  */
1256 
1257  $wait = new ilRadioGroupInputGUI($this->lng->txt('crs_waiting_list'), 'waiting_list');
1258 
1259  $option = new ilRadioOption($this->lng->txt('none'), 0);
1260  $wait->addOption($option);
1261 
1262  $option = new ilRadioOption($this->lng->txt('crs_waiting_list_no_autofill'), 1);
1263  $option->setInfo($this->lng->txt('crs_wait_info'));
1264  $wait->addOption($option);
1265 
1266  $option = new ilRadioOption($this->lng->txt('crs_waiting_list_autofill'), 2);
1267  $option->setInfo($this->lng->txt('crs_waiting_list_autofill_info'));
1268  $wait->addOption($option);
1269 
1270  if ($this->object->hasWaitingListAutoFill()) {
1271  $wait->setValue(2);
1272  } elseif ($this->object->enabledWaitingList()) {
1273  $wait->setValue(1);
1274  }
1275 
1276  $lim->addSubItem($wait);
1277 
1278  $form->addItem($lim);
1279 
1280 
1281  $pres = new ilFormSectionHeaderGUI();
1282  $pres->setTitle($this->lng->txt('crs_view_mode'));
1283 
1284  $form->addItem($pres);
1285 
1286  // title and icon visibility
1287  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTitleIconVisibility();
1288 
1289  // top actions visibility
1290  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTopActionsVisibility();
1291 
1292  // breadcrumbs
1293  if ($setting->get("rep_breadcr_crs_overwrite")) {
1294  $add = $setting->get("rep_breadcr_crs_default")
1295  ? " (" . $this->lng->txt("crs_breadcrumb_crs_only") . ")"
1296  : " (" . $this->lng->txt("crs_breadcrumb_full_path") . ")";
1297  $options = array(
1298  self::BREADCRUMB_DEFAULT => $this->lng->txt("crs_sys_default") . $add,
1299  self::BREADCRUMB_CRS_ONLY => $this->lng->txt("crs_breadcrumb_crs_only"),
1300  self::BREADCRUMB_FULL_PATH => $this->lng->txt("crs_breadcrumb_full_path")
1301  );
1302  $si = new ilSelectInputGUI($this->lng->txt("crs_shorten_breadcrumb"), "rep_breacrumb");
1303  $si->setValue((int) ilContainer::_lookupContainerSetting($this->object->getId(), "rep_breacrumb"));
1304  $si->setOptions($options);
1305  $form->addItem($si);
1306  }
1307 
1308 
1309  // custom icon
1310  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addIcon();
1311 
1312  // tile image
1313  $form = $obj_service->commonSettings()->legacyForm($form, $this->object)->addTileImage();
1314 
1315  // list presentation
1317 
1318  // presentation type
1319  $view_type = new ilRadioGroupInputGUI($this->lng->txt('crs_presentation_type'), 'view_mode');
1320  $view_type->setValue($this->object->getViewMode());
1321 
1322  $opts = new ilRadioOption($this->lng->txt('cntr_view_sessions'), IL_CRS_VIEW_SESSIONS);
1323  $opts->setInfo($this->lng->txt('cntr_view_info_sessions'));
1324  $view_type->addOption($opts);
1325 
1326  // Limited sessions
1327  $sess = new ilCheckboxInputGUI($this->lng->txt('sess_limit'), 'sl');
1328  $sess->setValue(1);
1329  $sess->setChecked($this->object->isSessionLimitEnabled());
1330  $sess->setInfo($this->lng->txt('sess_limit_info'));
1331 
1332  $prev = new ilNumberInputGUI($this->lng->txt('sess_num_prev'), 'sp');
1333  #$prev->setSubmitFormOnEnter(true);
1334  $prev->setMinValue(0);
1335  $prev->setValue(
1336  $this->object->getNumberOfPreviousSessions() == -1 ?
1337  '' :
1338  $this->object->getNumberOfPreviousSessions()
1339  );
1340  $prev->setSize(2);
1341  $prev->setMaxLength(3);
1342  $sess->addSubItem($prev);
1343 
1344  $next = new ilNumberInputGUI($this->lng->txt('sess_num_next'), 'sn');
1345  #$next->setSubmitFormOnEnter(true);
1346  $next->setMinValue(0);
1347  $next->setValue(
1348  $this->object->getNumberOfNextSessions() == -1 ?
1349  '' :
1350  $this->object->getNumberOfnextSessions()
1351  );
1352  $next->setSize(2);
1353  $next->setMaxLength(3);
1354  $sess->addSubItem($next);
1355 
1356  $opts->addSubItem($sess);
1357 
1358 
1359 
1360 
1361  $optsi = new ilRadioOption($this->lng->txt('cntr_view_simple'), IL_CRS_VIEW_SIMPLE);
1362  $optsi->setInfo($this->lng->txt('cntr_view_info_simple'));
1363  $view_type->addOption($optsi);
1364 
1365  $optbt = new ilRadioOption($this->lng->txt('cntr_view_by_type'), IL_CRS_VIEW_BY_TYPE);
1366  $optbt->setInfo($this->lng->txt('cntr_view_info_by_type'));
1367  $view_type->addOption($optbt);
1368 
1369  $opto = new ilRadioOption($this->lng->txt('crs_view_objective'), IL_CRS_VIEW_OBJECTIVE);
1370  $opto->setInfo($this->lng->txt('crs_view_info_objective'));
1371  $view_type->addOption($opto);
1372 
1373  $optt = new ilRadioOption($this->lng->txt('crs_view_timing'), IL_CRS_VIEW_TIMING);
1374  $optt->setInfo($this->lng->txt('crs_view_info_timing'));
1375 
1376  // cognos-blu-patch: begin
1377  $timing = new ilRadioGroupInputGUI($this->lng->txt('crs_view_timings'), "timing_mode");
1378  $timing->setValue($this->object->getTimingMode());
1379 
1380  $absolute = new ilRadioOption($this->lng->txt('crs_view_timing_absolute'), IL_CRS_VIEW_TIMING_ABSOLUTE);
1381  $absolute->setInfo($this->lng->txt('crs_view_info_timing_absolute'));
1382  $timing->addOption($absolute);
1383 
1384  $relative = new ilRadioOption($this->lng->txt('crs_view_timing_relative'), IL_CRS_VIEW_TIMING_RELATIVE);
1385  $relative->setInfo($this->lng->txt('crs_view_info_timing_relative'));
1386  $timing->addOption($relative);
1387 
1388  $optt->addSubItem($timing);
1389  // cognos-blu-patch: end
1390 
1391  $view_type->addOption($optt);
1392 
1393  $form->addItem($view_type);
1394 
1395  $this->initSortingForm(
1396  $form,
1397  array(
1402  )
1403  );
1404 
1405 
1406 
1407  // lp vs. course status
1408  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
1410  include_once './Services/Object/classes/class.ilObjectLP.php';
1411  $olp = ilObjectLP::getInstance($this->object->getId());
1412  if ($olp->getCurrentMode()) {
1413  $lp_status = new ilFormSectionHeaderGUI();
1414  $lp_status->setTitle($this->lng->txt('crs_course_status_of_users'));
1415  $form->addItem($lp_status);
1416 
1417  $lp_status_options = new ilRadioGroupInputGUI($this->lng->txt('crs_status_determination'), "status_dt");
1418  // $lp_status_options->setRequired(true);
1419  $lp_status_options->setValue($this->object->getStatusDetermination());
1420 
1421  $lp_option = new ilRadioOption(
1422  $this->lng->txt('crs_status_determination_lp'),
1424  $this->lng->txt('crs_status_determination_lp_info')
1425  );
1426  $lp_status_options->addOption($lp_option);
1427  $lp_status_options->addOption(new ilRadioOption(
1428  $this->lng->txt('crs_status_determination_manual'),
1430  ));
1431 
1432  $form->addItem($lp_status_options);
1433  }
1434  }
1435 
1436  // additional features
1437  $feat = new ilFormSectionHeaderGUI();
1438  $feat->setTitle($this->lng->txt('obj_features'));
1439  $form->addItem($feat);
1440 
1441  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1443  $this->object->getId(),
1444  $form,
1445  array(
1454  )
1455  );
1456 
1457  $mem = new ilCheckboxInputGUI($this->lng->txt('crs_show_members'), 'show_members');
1458  $mem->setChecked($this->object->getShowMembers());
1459  $mem->setInfo($this->lng->txt('crs_show_members_info'));
1460  $form->addItem($mem);
1461 
1462  // check privacy
1463  if (\ilPrivacySettings::_getInstance()->participantsListInCoursesEnabled()) {
1464  $part_list = new ilCheckboxInputGUI($this->lng->txt('crs_show_member_export'), 'show_members_export');
1465  $part_list->setChecked($this->object->getShowMembersExport());
1466  $part_list->setInfo($this->lng->txt('crs_show_member_export_info'));
1467  $mem->addSubItem($part_list);
1468  }
1469 
1470  // Show members type
1471  $mail_type = new ilRadioGroupInputGUI($this->lng->txt('crs_mail_type'), 'mail_type');
1472  $mail_type->setValue($this->object->getMailToMembersType());
1473 
1474  $mail_tutors = new ilRadioOption(
1475  $this->lng->txt('crs_mail_tutors_only'),
1477  $this->lng->txt('crs_mail_tutors_only_info')
1478  );
1479  $mail_type->addOption($mail_tutors);
1480 
1481  $mail_all = new ilRadioOption(
1482  $this->lng->txt('crs_mail_all'),
1484  $this->lng->txt('crs_mail_all_info')
1485  );
1486  $mail_type->addOption($mail_all);
1487  $form->addItem($mail_type);
1488 
1489  // Notification Settings
1490  /*$notification = new ilFormSectionHeaderGUI();
1491  $notification->setTitle($this->lng->txt('crs_notification'));
1492  $form->addItem($notification);*/
1493 
1494  // Self notification
1495  $not = new ilCheckboxInputGUI($this->lng->txt('crs_auto_notification'), 'auto_notification');
1496  $not->setValue(1);
1497  $not->setInfo($this->lng->txt('crs_auto_notification_info'));
1498  $not->setChecked($this->object->getAutoNotification());
1499  $form->addItem($not);
1500 
1501 
1502  // Further information
1503  //$further = new ilFormSectionHeaderGUI();
1504  //$further->setTitle($this->lng->txt('crs_further_settings'));
1505  //$form->addItem($further);
1506 
1507  $desk = new ilCheckboxInputGUI($this->lng->txt('crs_add_remove_from_desktop'), 'abo');
1508  $desk->setChecked($this->object->getAboStatus());
1509  $desk->setInfo($this->lng->txt('crs_add_remove_from_desktop_info'));
1510  $form->addItem($desk);
1511 
1512 
1513  // Edit ecs export settings
1514  include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
1515  $ecs = new ilECSCourseSettings($this->object);
1516  $ecs->addSettingsToForm($form, 'crs');
1517 
1518  return $form;
1519  }
This class represents an option in a radio group.
const IL_CRS_VIEW_OBJECTIVE
This class represents a selection list property in a property form.
This class represents a property form user interface.
This class represents a section header in a property form.
const IL_CRS_VIEW_TIMING_ABSOLUTE
This class represents a checkbox property in a property form.
const IL_CRS_VIEW_TIMING_RELATIVE
const IL_CRS_SUBSCRIPTION_CONFIRMATION
const IL_CAL_UNIX
const IL_CRS_VIEW_TIMING
const STATUS_DETERMINATION_LP
setInfo($a_info)
Set Info.
const IL_CRS_VIEW_SIMPLE
const IL_CRS_VIEW_BY_TYPE
This class represents a date/time property in a property form.
setInfo($a_info)
Set Information Text.
$section
Definition: Utf8Test.php:83
setChecked($a_checked)
Set Checked.
This class represents a hidden form property in a property form.
input GUI for a time span (start and end date)
static _enabledLearningProgress()
check wether learing progress is enabled or not
const IL_CRS_SUBSCRIPTION_PASSWORD
This class represents a property in a property form.
setValue($a_value)
Set Value.
setMinValue($a_minvalue, $a_display_always=false)
Set Minimum Value.
const IL_CRS_VIEW_SESSIONS
if(isset($_POST['submit'])) $form
setValue($a_value)
Set Value.
This class represents a number property in a property form.
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
Date and time handling
setShowTime($a_showtime)
Set Show Time Information.
const STATUS_DETERMINATION_MANUAL
This class represents a custom property in a property form.
static generateCode()
Generate new registration key.
initListPresentationForm(ilPropertyFormGUI $form)
Add list presentation settings to form.
initSortingForm(ilPropertyFormGUI $form, array $a_sorting_settings)
Append sorting settings to property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
const IL_CRS_SUBSCRIPTION_DIRECT
static _getInstance()
Get instance of ilPrivacySettings.
getObjectService()
Get object service.
static getInstance($a_obj_id)
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
Class ilECSCourseSettings.
const IL_CRS_SUBSCRIPTION_DEACTIVATED
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initHeaderAction()

ilObjCourseGUI::initHeaderAction (   $a_sub_type = null,
  $a_sub_id = null 
)
protected

Definition at line 3169 of file class.ilObjCourseGUI.php.

References $DIC, $ilUser, $lg, ilParticipants\_isParticipant(), ilUtil\getImagePath(), and ilMembershipNotifications\isActive().

3170  {
3171  global $DIC;
3172 
3173  $ilUser = $DIC->user();
3174 
3175  $lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
3176 
3177  if ($lg && $this->ref_id && ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId())) {
3178  // certificate
3179 
3180  $validator = new ilCertificateDownloadValidator();
3181  if (true === $validator->isCertificateDownloadable($ilUser->getId(), $this->object->getId())) {
3182  $cert_url = $this->ctrl->getLinkTarget($this, "deliverCertificate");
3183 
3184  $this->lng->loadLanguageModule("certificate");
3185  $lg->addCustomCommand($cert_url, "download_certificate");
3186 
3187  $lg->addHeaderIcon(
3188  "cert_icon",
3189  ilUtil::getImagePath("icon_cert.svg"),
3190  $this->lng->txt("download_certificate"),
3191  null,
3192  null,
3193  $cert_url
3194  );
3195  }
3196 
3197  // notification
3198  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
3200  $noti = new ilMembershipNotifications($this->ref_id);
3201  if (!$noti->isCurrentUserActive()) {
3202  $lg->addHeaderIcon(
3203  "not_icon",
3204  ilUtil::getImagePath("notification_off.svg"),
3205  $this->lng->txt("crs_notification_deactivated")
3206  );
3207 
3208  $this->ctrl->setParameter($this, "crs_ntf", 1);
3209  $caption = "crs_activate_notification";
3210  } else {
3211  $lg->addHeaderIcon(
3212  "not_icon",
3213  ilUtil::getImagePath("notification_on.svg"),
3214  $this->lng->txt("crs_notification_activated")
3215  );
3216 
3217  $this->ctrl->setParameter($this, "crs_ntf", 0);
3218  $caption = "crs_deactivate_notification";
3219  }
3220 
3221  if ($noti->canCurrentUserEdit()) {
3222  $lg->addCustomCommand(
3223  $this->ctrl->getLinkTarget($this, "saveNotification"),
3224  $caption
3225  );
3226  }
3227 
3228  $this->ctrl->setParameter($this, "crs_ntf", "");
3229  }
3230  }
3231 
3232  return $lg;
3233  }
static _isParticipant($a_ref_id, $a_usr_id)
Static function to check if a user is a participant of the container object.
$lg
Definition: example_018.php:62
static isActive()
Is feature active?
global $DIC
Definition: saml.php:7
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Validates if an active certificate is stored in the database and can be downloaded by the user...
$ilUser
Definition: imgupload.php:18
Membership notification settings.
+ Here is the call graph for this function:

◆ initInfoEditor()

ilObjCourseGUI::initInfoEditor ( )

init info editor

public

Parameters

Definition at line 641 of file class.ilObjCourseGUI.php.

References $form, $section, $text, ilFileInputGUI\enableFileNameSelection(), ilAdvancedMDRecordGUI\MODE_EDITOR, ilAdvancedMDRecordGUI\setPropertyForm(), and ilTextAreaInputGUI\setValue().

Referenced by editInfoObject(), executeCommand(), and updateInfoObject().

642  {
643  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
644  $form = new ilPropertyFormGUI();
645  $form->setFormAction($this->ctrl->getFormAction($this, 'updateInfo'));
646  $form->setMultipart(true);
647  $form->setTitle($this->lng->txt('crs_general_info'));
648  $form->addCommandButton('updateInfo', $this->lng->txt('save'));
649  $form->addCommandButton('cancel', $this->lng->txt('cancel'));
650 
651  $area = new ilTextAreaInputGUI($this->lng->txt('crs_important_info'), 'important');
652  $area->setValue($this->object->getImportantInformation());
653  $area->setRows(6);
654  $area->setCols(80);
655  $form->addItem($area);
656 
657  $area = new ilTextAreaInputGUI($this->lng->txt('crs_syllabus'), 'syllabus');
658  $area->setValue($this->object->getSyllabus());
659  $area->setRows(6);
660  $area->setCols(80);
661  $form->addItem($area);
662 
664  $section->setTitle($this->lng->txt('crs_info_download'));
665  $form->addItem($section);
666 
667  $file = new ilFileInputGUI($this->lng->txt('crs_file'), 'file');
668  $file->enableFileNameSelection('file_name');
669  $form->addItem($file);
670 
672  $section->setTitle($this->lng->txt('crs_contact'));
673  $form->addItem($section);
674 
675  $text = new ilTextInputGUI($this->lng->txt('crs_contact_name'), 'contact_name');
676  $text->setValue($this->object->getContactName());
677  $text->setSize(40);
678  $text->setMaxLength(70);
679  $form->addItem($text);
680 
681  $text = new ilTextInputGUI($this->lng->txt('crs_contact_responsibility'), 'contact_responsibility');
682  $text->setValue($this->object->getContactResponsibility());
683  $text->setSize(40);
684  $text->setMaxLength(70);
685  $form->addItem($text);
686 
687  $text = new ilTextInputGUI($this->lng->txt('crs_contact_phone'), 'contact_phone');
688  $text->setValue($this->object->getContactPhone());
689  $text->setSize(40);
690  $text->setMaxLength(40);
691  $form->addItem($text);
692 
693  $text = new ilTextInputGUI($this->lng->txt('crs_contact_email'), 'contact_email');
694  $text->setValue($this->object->getContactEmail());
695  $text->setInfo($this->lng->txt('crs_contact_email_info'));
696  $text->setSize(40);
697  $text->setMaxLength(255);
698  $form->addItem($text);
699 
700  $area = new ilTextAreaInputGUI($this->lng->txt('crs_contact_consultation'), 'contact_consultation');
701  $area->setValue($this->object->getContactConsultation());
702  $area->setRows(6);
703  $area->setCols(80);
704  $form->addItem($area);
705 
706  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
707  $this->record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR, 'crs', $this->object->getId());
708  $this->record_gui->setPropertyForm($form);
709  $this->record_gui->parse();
710 
711  return $form;
712  }
This class represents a property form user interface.
setPropertyForm($form)
set property form object
This class represents a section header in a property form.
This class represents a file property in a property form.
setValue($a_value)
Set Value.
$section
Definition: Utf8Test.php:83
if(isset($_POST['submit'])) $form
$text
Definition: errorreport.php:18
This class represents a text property in a property form.
enableFileNameSelection($a_post_var)
If enabled, users get the possibility to enter a filename for the uploaded file.
This class represents a text area property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ jump2UsersGalleryObject()

ilObjCourseGUI::jump2UsersGalleryObject ( )
protected

Definition at line 3459 of file class.ilObjCourseGUI.php.

3460  {
3461  $this->ctrl->redirectByClass('ilUsersGalleryGUI');
3462  }

◆ leaveObject()

ilObjCourseGUI::leaveObject ( )

Definition at line 1889 of file class.ilObjCourseGUI.php.

References $DIC, $ilUser, ilObjectGUI\checkPermission(), ilUtil\sendFailure(), and viewObject().

Referenced by unsubscribeObject().

1890  {
1891  global $DIC;
1892 
1893  $ilUser = $DIC['ilUser'];
1894 
1895  $this->checkPermission('leave');
1896 
1897  if ($this->object->getMembersObject()->isLastAdmin($ilUser->getId())) {
1898  ilUtil::sendFailure($this->lng->txt('crs_min_one_admin'));
1899  $this->viewObject();
1900  return false;
1901  }
1902 
1903  $this->tabs_gui->setTabActive('crs_unsubscribe');
1904 
1905  include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
1906  $cgui = new ilConfirmationGUI();
1907  $cgui->setHeaderText($this->lng->txt('crs_unsubscribe_sure'));
1908  $cgui->setFormAction($this->ctrl->getFormAction($this));
1909  $cgui->setCancel($this->lng->txt("cancel"), "cancel");
1910  $cgui->setConfirm($this->lng->txt("crs_unsubscribe"), "performUnsubscribe");
1911  $this->tpl->setContent($cgui->getHTML());
1912  }
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadDate()

ilObjCourseGUI::loadDate (   $a_field)
protected

load date

protected

Parameters

Definition at line 3031 of file class.ilObjCourseGUI.php.

References $_POST, $DIC, $ilUser, and IL_CAL_FKT_GETDATE.

3032  {
3033  global $DIC;
3034 
3035  $ilUser = $DIC['ilUser'];
3036 
3037  include_once('./Services/Calendar/classes/class.ilDateTime.php');
3038 
3039  // #10206 / #10217
3040  if (is_array($_POST[$a_field]['date'])) {
3041  $dt['year'] = (int) $_POST[$a_field]['date']['y'];
3042  $dt['mon'] = (int) $_POST[$a_field]['date']['m'];
3043  $dt['mday'] = (int) $_POST[$a_field]['date']['d'];
3044  $dt['hours'] = (int) $_POST[$a_field]['time']['h'];
3045  $dt['minutes'] = (int) $_POST[$a_field]['time']['m'];
3046  $dt['seconds'] = (int) $_POST[$a_field]['time']['s'];
3047  } else {
3048  $date = date_parse($_POST[$a_field]['date'] . " " . $_POST[$a_field]['time']);
3049  $dt['year'] = (int) $date['year'];
3050  $dt['mon'] = (int) $date['month'];
3051  $dt['mday'] = (int) $date['day'];
3052  $dt['hours'] = (int) $date['hour'];
3053  $dt['minutes'] = (int) $date['minute'];
3054  $dt['seconds'] = (int) $date['second'];
3055  }
3056 
3057  $date = new ilDateTime($dt, IL_CAL_FKT_GETDATE, $ilUser->getTimeZone());
3058  return $date;
3059  }
global $DIC
Definition: saml.php:7
Date and time handling
$ilUser
Definition: imgupload.php:18
const IL_CAL_FKT_GETDATE
$_POST["username"]

◆ membersObject()

ilObjCourseGUI::membersObject ( )
protected

Called from goto?

Definition at line 2765 of file class.ilObjCourseGUI.php.

References $GLOBALS.

Referenced by autoFillObject().

2766  {
2767  $GLOBALS['DIC']['ilCtrl']->redirectByClass('ilcoursemembershipgui');
2768  }
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the caller graph for this function:

◆ modifyItemGUI()

ilObjCourseGUI::modifyItemGUI (   $a_item_list_gui,
  $a_item_data,
  $a_show_path 
)

Modify Item ListGUI for presentation in container.

Parameters
type$a_item_list_gui
type$a_item_data
type$a_show_path
Returns
type

Definition at line 2912 of file class.ilObjCourseGUI.php.

References _modifyItemGUI().

2913  {
2915  $a_item_list_gui,
2916  'ilcoursecontentgui',
2917  $a_item_data,
2918  $a_show_path,
2919  $this->object->getAboStatus(),
2920  $this->object->getRefId(),
2921  $this->object->getId()
2922  );
2923  }
static _modifyItemGUI( $a_item_list_gui, $a_cmd_class, $a_item_data, $a_show_path, $a_abo_status, $a_course_ref_id, $a_course_obj_id, $a_parent_ref_id=0)
We need a static version of this, e.g.
+ Here is the call graph for this function:

◆ performUnsubscribeObject()

ilObjCourseGUI::performUnsubscribeObject ( )

Definition at line 1922 of file class.ilObjCourseGUI.php.

References $DIC, $ilCtrl, $ilUser, and ilObjectGUI\checkPermission().

1923  {
1924  global $DIC;
1925 
1926  $ilUser = $DIC['ilUser'];
1927  $ilCtrl = $DIC['ilCtrl'];
1928 
1929  // CHECK ACCESS
1930  $this->checkPermission('leave');
1931  $this->object->getMembersObject()->delete($this->ilias->account->getId());
1932  $this->object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->ilias->account->getId());
1933  $this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE, $ilUser->getId());
1934 
1935  ilUtil::sendSuccess($this->lng->txt('crs_unsubscribed_from_crs'), true);
1936 
1937  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->tree->getParentId($this->ref_id));
1938  $ilCtrl->redirectByClass("ilrepositorygui", "");
1939  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ prepareOutput()

ilObjCourseGUI::prepareOutput (   $a_show_subobjects = true)

Handle member view.

Returns

Definition at line 3139 of file class.ilObjCourseGUI.php.

References $DIC, ilContainerGUI\$rbacsystem, ilContainerGUI\$settings, ilObjectGUI\getCreationMode(), and ilMemberViewSettings\getInstance().

Referenced by executeCommand().

3140  {
3141  global $DIC;
3142 
3143  $rbacsystem = $DIC['rbacsystem'];
3144  if (!$this->getCreationMode()) {
3145  include_once './Services/Container/classes/class.ilMemberViewSettings.php';
3147  if ($settings->isActive() and $settings->getContainer() != $this->object->getRefId()) {
3148  $settings->setContainer($this->object->getRefId());
3149  $rbacsystem->initMemberView();
3150  }
3151  }
3152  parent::prepareOutput($a_show_subobjects);
3153  }
global $DIC
Definition: saml.php:7
static getInstance()
Get instance.
getCreationMode()
get creation mode
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readMemberData()

ilObjCourseGUI::readMemberData (   $ids,
  $selected_columns = null 
)

Definition at line 1738 of file class.ilObjCourseGUI.php.

References $failed, $name, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilPrivacySettings\_getInstance(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilLearningProgress\_lookupProgressByObjId(), ilDatePresentation\formatDate(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), ilObjectLP\getInstance(), IL_CAL_UNIX, ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, and ilObjCourse\STATUS_DETERMINATION_LP.

1739  {
1740  include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
1741  $this->show_tracking =
1742  (
1744  ilObjUserTracking::_enabledUserRelatedData()
1745  );
1746  if ($this->show_tracking) {
1747  include_once('./Services/Object/classes/class.ilObjectLP.php');
1748  $olp = ilObjectLP::getInstance($this->object->getId());
1749  $this->show_tracking = $olp->isActive();
1750  }
1751 
1752  if ($this->show_tracking) {
1753  include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1754  $completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
1755  $in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
1756  $failed = ilLPStatusWrapper::_lookupFailedForObject($this->object->getId());
1757  }
1758  include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1759  $privacy = ilPrivacySettings::_getInstance();
1760 
1761  if ($privacy->enabledCourseAccessTimes()) {
1762  include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
1763  $progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
1764  }
1765 
1766  $do_prtf = (is_array($selected_columns) &&
1767  in_array('prtf', $selected_columns) &&
1768  is_array($ids));
1769  if ($do_prtf) {
1770  include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
1772  $ids,
1773  $this->ctrl->getLinkTarget($this, "members")
1774  );
1775  }
1776 
1777  foreach ((array) $ids as $usr_id) {
1778  $name = ilObjUser::_lookupName($usr_id);
1779  $tmp_data['firstname'] = $name['firstname'];
1780  $tmp_data['lastname'] = $name['lastname'];
1781  $tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
1782  $tmp_data['passed'] = $this->object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
1783  if ($this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP) {
1784  $tmp_data['passed_info'] = $this->object->getMembersObject()->getPassedInfo($usr_id);
1785  }
1786  $tmp_data['notification'] = $this->object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
1787  $tmp_data['blocked'] = $this->object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
1788  // cognos-blu-patch: begin
1789  $tmp_data['contact'] = $this->object->getMembersObject()->isContact($usr_id) ? 1 : 0;
1790  // cognos-blu-patch: end
1791 
1792  $tmp_data['usr_id'] = $usr_id;
1793 
1794  if ($this->show_tracking) {
1795  if (in_array($usr_id, $completed)) {
1796  $tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
1797  } elseif (in_array($usr_id, $in_progress)) {
1798  $tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
1799  } elseif (in_array($usr_id, $failed)) {
1800  $tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
1801  } else {
1802  $tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
1803  }
1804  }
1805 
1806  if ($privacy->enabledCourseAccessTimes()) {
1807  if (isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts']) {
1808  $tmp_data['access_ut'] = $progress[$usr_id]['ts'];
1809  $tmp_data['access_time'] = ilDatePresentation::formatDate(new ilDateTime($progress[$usr_id]['ts'], IL_CAL_UNIX));
1810  } else {
1811  $tmp_data['access_ut'] = 0;
1812  $tmp_data['access_time'] = $this->lng->txt('no_date');
1813  }
1814  }
1815 
1816  if ($do_prtf) {
1817  $tmp_data['prtf'] = $all_prtf[$usr_id];
1818  }
1819 
1820  $members[$usr_id] = $tmp_data;
1821  }
1822  return $members ? $members : array();
1823  }
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
const LP_STATUS_NOT_ATTEMPTED
static _lookupFailedForObject($a_obj_id, $a_user_ids=null)
Get failed users for object.
const IL_CAL_UNIX
const STATUS_DETERMINATION_LP
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
const LP_STATUS_IN_PROGRESS
static _enabledLearningProgress()
check wether learing progress is enabled or not
const LP_STATUS_FAILED
static _lookupProgressByObjId($a_obj_id)
lookup progress for a specific object
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
Date and time handling
static getAvailablePortfolioLinksForUserIds(array $a_owner_ids, $a_back_url=null)
$failed
Definition: Utf8Test.php:85
static _lookupInProgressForObject($a_obj_id, $a_user_ids=null)
Get in progress users for object.
static _getInstance()
Get instance of ilPrivacySettings.
static _lookupCompletedForObject($a_obj_id, $a_user_ids=null)
Get completed users for object.
const LP_STATUS_COMPLETED
static getInstance($a_obj_id)
+ Here is the call graph for this function:

◆ redirectLocToTestConfirmation()

ilObjCourseGUI::redirectLocToTestConfirmation (   $a_objective_id,
  $a_test_id 
)
protected

Show confirmation whether user wants to start a new run or resume a previous run.

Parameters
type$a_objective_id
type$a_test_id

Definition at line 3381 of file class.ilObjCourseGUI.php.

References $GLOBALS, ilObjectGUI\getFormAction(), and ilUtil\sendQuestion().

Referenced by redirectLocToTestObject().

3382  {
3383  include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
3384  $confirm = new ilConfirmationGUI();
3385  $confirm->setFormAction($GLOBALS['DIC']['ilCtrl']->getFormAction($this));
3386 
3387  if ($a_objective_id) {
3388  $question = $this->lng->txt('crs_loc_objective_passed_confirmation');
3389  } else {
3390  $question = $this->lng->txt('crs_loc_objectives_passed_confirmation');
3391  }
3392 
3393  $confirm->addHiddenItem('objective_id', $a_objective_id);
3394  $confirm->addHiddenItem('tid', $a_test_id);
3395  $confirm->setConfirm($this->lng->txt('crs_loc_tst_start'), 'redirectLocToTestConfirmed');
3396  $confirm->setCancel($this->lng->txt('cancel'), 'view');
3397 
3398  ilUtil::sendQuestion($question);
3399 
3400  $GLOBALS['DIC']['tpl']->setContent($confirm->getHTML());
3401  return true;
3402  }
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
getFormAction($a_cmd, $a_formaction="")
get form action for command (command is method name without "Object", e.g.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Confirmation screen class.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ redirectLocToTestConfirmedObject()

ilObjCourseGUI::redirectLocToTestConfirmedObject ( )
protected
Returns
booleanRedirect ot test after confirmation of resetting completed objectives

Definition at line 3321 of file class.ilObjCourseGUI.php.

References ilLink\_getLink(), and ilUtil\redirect().

3322  {
3323  include_once './Services/Link/classes/class.ilLink.php';
3324  ilUtil::redirect(ilLink::_getLink((int) $_REQUEST['tid']));
3325  return true;
3326  }
static redirect($a_script)
+ Here is the call graph for this function:

◆ redirectLocToTestObject()

ilObjCourseGUI::redirectLocToTestObject (   $a_force_new_run = null)
protected

Test redirection will be moved lo adapter.

Definition at line 3331 of file class.ilObjCourseGUI.php.

References $GLOBALS, $res, ilLink\_getLink(), ilCourseObjective\_getObjectiveIds(), ilUtil\redirect(), and redirectLocToTestConfirmation().

3332  {
3333  $objective_id = (int) $_REQUEST['objective_id'];
3334  $test_id = (int) $_REQUEST['tid'];
3335 
3336  include_once './Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3337  include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
3338  include_once './Modules/Course/classes/Objectives/class.ilLOTestAssignments.php';
3339 
3340 
3341  $res = new ilLOUserResults(
3342  $this->object->getId(),
3343  $GLOBALS['DIC']['ilUser']->getId()
3344  );
3345  $passed = $res->getCompletedObjectiveIds();
3346 
3347  $has_completed = false;
3348  if ($objective_id) {
3349  $objective_ids = array($objective_id);
3350  if (in_array($objective_id, $passed)) {
3351  $has_completed = true;
3352  $passed = array();
3353  }
3354  } else {
3355  include_once './Modules/Course/classes/class.ilCourseObjective.php';
3356  $objective_ids = ilCourseObjective::_getObjectiveIds($this->object->getId(), true);
3357 
3358  // do not disable objective question if all are passed
3359  if (count($objective_ids) == count($passed)) {
3360  $has_completed = true;
3361  $passed = array();
3362  }
3363  }
3364 
3365  if ($has_completed) {
3366  // show confirmation
3367  $this->redirectLocToTestConfirmation($objective_id, $test_id);
3368  return true;
3369  }
3370 
3371  include_once './Services/Link/classes/class.ilLink.php';
3373  return true;
3374  }
static _getObjectiveIds($course_id, $a_activated_only=false)
foreach($_POST as $key=> $value) $res
redirectLocToTestConfirmation($a_objective_id, $a_test_id)
Show confirmation whether user wants to start a new run or resume a previous run. ...
static redirect($a_script)
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ renderContainer()

ilObjCourseGUI::renderContainer ( )

Definition at line 192 of file class.ilObjCourseGUI.php.

193  {
194  return parent::renderObject();
195  }

◆ renderObject()

ilObjCourseGUI::renderObject ( )

Definition at line 111 of file class.ilObjCourseGUI.php.

References viewObject().

112  {
113  $this->ctrl->setCmd("view");
114  $this->viewObject();
115  }
+ Here is the call graph for this function:

◆ resetObject()

ilObjCourseGUI::resetObject ( )

Definition at line 3082 of file class.ilObjCourseGUI.php.

References $DIC, $GLOBALS, $ilUser, ilLOUserResults\delete(), ilLOTestRun\deleteRuns(), ilCourseObjectiveResult\reset(), and viewObject().

3083  {
3084  global $DIC;
3085 
3086  $ilUser = $DIC['ilUser'];
3087 
3088  include_once './Modules/Course/classes/Objectives/class.ilLOUserResults.php';
3089  $usr_results = new ilLOUserResults($this->object->getId(), $GLOBALS['DIC']['ilUser']->getId());
3090  $usr_results->delete();
3091 
3092 
3093  include_once './Modules/Course/classes/Objectives/class.ilLOTestRun.php';
3094  include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
3096  $this->object->getId(),
3097  $GLOBALS['DIC']['ilUser']->getId()
3098  );
3099 
3100  include_once './Modules/Course/classes/class.ilCourseObjectiveResult.php';
3101 
3102  $tmp_obj_res = new ilCourseObjectiveResult($ilUser->getId());
3103  $tmp_obj_res->reset($this->object->getId());
3104 
3105  $ilUser->deletePref('crs_objectives_force_details_' . $this->object->getId());
3106 
3107  ilUtil::sendSuccess($this->lng->txt('crs_objectives_reseted'));
3108  $this->viewObject();
3109  }
global $DIC
Definition: saml.php:7
delete()
Delete for user and course type $ilDB.
static deleteRuns($a_container_id, $a_user_id)
Delete runs type $ilDB.
$ilUser
Definition: imgupload.php:18
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ saveMapSettingsObject()

ilObjCourseGUI::saveMapSettingsObject ( )

Definition at line 2888 of file class.ilObjCourseGUI.php.

References $_POST, $DIC, $ilCtrl, $ilUser, and ilUtil\stripSlashes().

2889  {
2890  global $DIC;
2891 
2892  $ilCtrl = $DIC['ilCtrl'];
2893  $ilUser = $DIC['ilUser'];
2894 
2895  $this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
2896  $this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
2897  $this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
2898  $this->object->setEnableCourseMap(ilUtil::stripSlashes($_POST["enable_map"]));
2899  $this->object->update();
2900 
2901  $ilCtrl->redirect($this, "editMapSettings");
2902  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST["username"]
+ Here is the call graph for this function:

◆ saveNotificationObject()

ilObjCourseGUI::saveNotificationObject ( )

:TEMP: Save notification setting (from infoscreen)

Definition at line 498 of file class.ilObjCourseGUI.php.

499  {
500  include_once "Services/Membership/classes/class.ilMembershipNotifications.php";
501  $noti = new ilMembershipNotifications($this->ref_id);
502  if ($noti->canCurrentUserEdit()) {
503  if ((bool) $_REQUEST["crs_ntf"]) {
504  $noti->activateUser();
505  } else {
506  $noti->deactivateUser();
507  }
508  }
509  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
510  $this->ctrl->redirect($this, "");
511  }
Membership notification settings.

◆ saveSortingObject()

ilObjCourseGUI::saveSortingObject ( )

Definition at line 3280 of file class.ilObjCourseGUI.php.

References $_POST.

3281  {
3282  if (isset($_POST['position']["lobj"])) {
3283  $lobj = $_POST['position']["lobj"];
3284  unset($_POST['position']["lobj"]);
3285 
3286  $objective_order = array();
3287  foreach ($lobj as $objective_id => $materials) {
3288  $objective_order[$objective_id] = $materials[0];
3289  unset($lobj[$objective_id][0]);
3290  }
3291 
3292  // objective order
3293  include_once "Modules/Course/classes/class.ilCourseObjective.php";
3294  asort($objective_order);
3295  $pos = 0;
3296  foreach (array_keys($objective_order) as $objective_id) {
3297  $obj = new ilCourseObjective($this->object, $objective_id);
3298  $obj->writePosition(++$pos);
3299  }
3300 
3301  // material order
3302  include_once "Modules/Course/classes/class.ilCourseObjectiveMaterials.php";
3303  foreach ($lobj as $objective_id => $materials) {
3304  $objmat = new ilCourseObjectiveMaterials($objective_id);
3305 
3306  asort($materials);
3307  $pos = 0;
3308  foreach (array_keys($materials) as $ass_id) {
3309  $objmat->writePosition($ass_id, ++$pos);
3310  }
3311  }
3312  }
3313 
3314  return parent::saveSortingObject();
3315  }
class ilCourseObjectiveMaterials
class ilcourseobjective
$_POST["username"]

◆ sendFileObject()

ilObjCourseGUI::sendFileObject ( )

Definition at line 1526 of file class.ilObjCourseGUI.php.

References $_GET, and ilUtil\deliverFile().

1527  {
1528  include_once 'Modules/Course/classes/class.ilCourseFile.php';
1529  $file = new ilCourseFile((int) $_GET['file_id']);
1530  ilUtil::deliverFile($file->getAbsolutePath(), $file->getFileName(), $file->getFileType());
1531  return true;
1532  }
$_GET["client_id"]
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
+ Here is the call graph for this function:

◆ setContentSubTabs()

ilObjCourseGUI::setContentSubTabs ( )

Set content sub tabs.

Definition at line 2977 of file class.ilObjCourseGUI.php.

References $_SESSION, $DIC, $ilCtrl, ilObjectGUI\$lng, ilContainerGUI\addStandardContainerSubTabs(), and ilContainerGUI\isActiveAdministrationPanel().

2978  {
2979  global $DIC;
2980 
2981  $ilAccess = $DIC['ilAccess'];
2982  $lng = $DIC['lng'];
2983  $ilCtrl = $DIC['ilCtrl'];
2984 
2985  if ($this->object->getType() != 'crs') {
2986  return true;
2987  }
2988  if (!$ilAccess->checkAccess(
2989  'write',
2990  '',
2991  $this->object->getRefId(),
2992  'crs',
2993  $this->object->getId()
2994  )) {
2995  $is_tutor = false;
2996  // No further tabs if objective view or archives
2997  if ($this->object->enabledObjectiveView()) {
2998  return false;
2999  }
3000  } else {
3001  $is_tutor = true;
3002  }
3003 
3004  // These subtabs should also work, if the command is called directly in
3005  // ilObjCourseGUI, so please use ...ByClass methods.
3006  // (see ilObjCourseGUI->executeCommand: case "ilcolumngui")
3007 
3008  if (!$_SESSION['crs_timings_panel'][$this->object->getId()] or 1) {
3009  if (!$this->isActiveAdministrationPanel()) {
3010  $this->tabs_gui->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass("ilobjcoursegui", "view"));
3011  } else {
3012  $this->tabs_gui->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass("ilobjcoursegui", "disableAdministrationPanel"));
3013  }
3014  }
3015  // cognos-blu-patch: begin
3016  // cognos-blu-patch: begin
3017 
3018  $this->addStandardContainerSubTabs(false);
3019 
3020 
3021  return true;
3022  }
$_SESSION["AccountId"]
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
addStandardContainerSubTabs($a_include_view=true)
Add standar container subtabs for view, manage, oderdering and text/media editor link.
+ Here is the call graph for this function:

◆ setLPSyncObject()

ilObjCourseGUI::setLPSyncObject ( )
protected

Definition at line 1027 of file class.ilObjCourseGUI.php.

References ilObjCourse\STATUS_DETERMINATION_LP.

1028  {
1029  $this->object->setStatusDetermination(ilObjCourse::STATUS_DETERMINATION_LP);
1030  $this->object->update();
1031 
1032  $this->object->syncMembersStatusWithLP();
1033 
1034  ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
1035  $this->ctrl->redirect($this, "edit");
1036  }
const STATUS_DETERMINATION_LP

◆ setShowHidePrefs()

ilObjCourseGUI::setShowHidePrefs ( )

set preferences (show/hide tabel content)

public

Returns

Definition at line 1709 of file class.ilObjCourseGUI.php.

References $_GET, $DIC, $ilUser, and ilCourseParticipants\getMemberRoles().

1710  {
1711  global $DIC;
1712 
1713  $ilUser = $DIC['ilUser'];
1714 
1715  if (isset($_GET['admin_hide'])) {
1716  $ilUser->writePref('crs_admin_hide', (int) $_GET['admin_hide']);
1717  }
1718  if (isset($_GET['tutor_hide'])) {
1719  $ilUser->writePref('crs_tutor_hide', (int) $_GET['tutor_hide']);
1720  }
1721  if (isset($_GET['member_hide'])) {
1722  $ilUser->writePref('crs_member_hide', (int) $_GET['member_hide']);
1723  }
1724  if (isset($_GET['subscriber_hide'])) {
1725  $ilUser->writePref('crs_subscriber_hide', (int) $_GET['subscriber_hide']);
1726  }
1727  if (isset($_GET['wait_hide'])) {
1728  $ilUser->writePref('crs_wait_hide', (int) $_GET['wait_hide']);
1729  }
1730  include_once './Modules/Course/classes/class.ilCourseParticipants.php';
1731  foreach (ilCourseParticipants::getMemberRoles($this->object->getRefId()) as $role_id) {
1732  if (isset($_GET['role_hide_' . $role_id])) {
1733  $ilUser->writePref('crs_role_hide_' . $role_id, (int) $_GET['role_hide_' . $role_id]);
1734  }
1735  }
1736  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static getMemberRoles($a_ref_id)
Get member roles.
$ilUser
Definition: imgupload.php:18
+ Here is the call graph for this function:

◆ setSideColumnReturn()

ilObjCourseGUI::setSideColumnReturn ( )

Set return point for side column actions.

Definition at line 3467 of file class.ilObjCourseGUI.php.

3468  {
3469  $this->ctrl->setReturn($this, "view");
3470  }

◆ setSubTabs()

ilObjCourseGUI::setSubTabs (   $a_tab)

set sub tabs

Definition at line 1537 of file class.ilObjCourseGUI.php.

References $DIC, $ilUser, ilContainerGUI\$rbacsystem, ilObjectGUI\$tree, ilPrivacySettings\_getInstance(), ilCourseDefinedFieldDefinition\_hasFields(), ilMapUtil\isActivated(), and ilCertificate\isActive().

Referenced by confirmDeleteInfoFilesObject(), editInfoObject(), editMapSettingsObject(), editObject(), and executeCommand().

1538  {
1539  global $DIC;
1540 
1541  $rbacsystem = $DIC['rbacsystem'];
1542  $ilUser = $DIC['ilUser'];
1543  $ilAccess = $DIC['ilAccess'];
1544  $tree = $DIC['tree'];
1545 
1546  switch ($a_tab) {
1547  case "properties":
1548  $this->tabs_gui->addSubTabTarget(
1549  "crs_settings",
1550  $this->ctrl->getLinkTarget($this, 'edit'),
1551  "edit",
1552  get_class($this)
1553  );
1554 
1555  $this->tabs_gui->addSubTabTarget(
1556  "crs_info_settings",
1557  $this->ctrl->getLinkTarget($this, 'editInfo'),
1558  "editInfo",
1559  get_class($this)
1560  );
1561 
1562  $this->tabs_gui->addSubTabTarget(
1563  "preconditions",
1564  $this->ctrl->getLinkTargetByClass('ilConditionHandlerGUI', 'listConditions'),
1565  "",
1566  "ilConditionHandlerGUI"
1567  );
1568 
1569  $this->tabs_gui->addSubTabTarget(
1570  "crs_start_objects",
1571  $this->ctrl->getLinkTargetByClass('ilContainerStartObjectsGUI', 'listStructure'),
1572  "listStructure",
1573  get_class($this)
1574  );
1575 
1576  $this->tabs_gui->addSubTabTarget(
1577  'groupings',
1578  $this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui', 'listGroupings'),
1579  'listGroupings',
1580  get_class($this)
1581  );
1582  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
1583  if ($lti_settings->hasSettingsAccess()) {
1584  $this->tabs_gui->addSubTabTarget(
1585  'lti_provider',
1586  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
1587  );
1588  }
1589 
1590  // map settings
1591  include_once("./Services/Maps/classes/class.ilMapUtil.php");
1592  if (ilMapUtil::isActivated()) {
1593  $this->tabs_gui->addSubTabTarget(
1594  "crs_map_settings",
1595  $this->ctrl->getLinkTarget($this, 'editMapSettings'),
1596  "editMapSettings",
1597  get_class($this)
1598  );
1599  }
1600 
1601 
1602  include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
1603  include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
1604  // only show if export permission is granted
1605  if (ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())) {
1606  $this->tabs_gui->addSubTabTarget(
1607  'crs_custom_user_fields',
1608  $this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
1609  '',
1610  'ilobjectcustomuserfieldsgui'
1611  );
1612  }
1613 
1614  // certificates
1615  include_once "Services/Certificate/classes/class.ilCertificate.php";
1616  if (ilCertificate::isActive()) {
1617  $this->tabs_gui->addSubTabTarget(
1618  "certificate",
1619  $this->ctrl->getLinkTargetByClass("ilcertificategui", "certificateeditor"),
1620  "",
1621  "ilcertificategui"
1622  );
1623  }
1624  // news settings
1625  if ($this->object->getUseNews()) {
1626  $this->tabs_gui->addSubTab(
1627  'obj_news_settings',
1628  $this->lng->txt("cont_news_settings"),
1629  $this->ctrl->getLinkTargetByClass('ilcontainernewssettingsgui')
1630  );
1631  }
1632 
1633  if ($this->object->getShowMembersExport()) {
1634  $this->tabs_gui->addSubTab(
1635  'export_members',
1636  $this->lng->txt('crs_show_member_export_settings'),
1637  $this->ctrl->getLinkTargetByClass('ilmemberexportsettingsgui', '')
1638  );
1639  }
1640 
1641  $this->tabs_gui->addSubTabTarget(
1642  "obj_multilinguality",
1643  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", ""),
1644  "",
1645  "ilobjecttranslationgui"
1646  );
1647 
1648  break;
1649 
1650  }
1651  }
global $DIC
Definition: saml.php:7
GUI class for LTI provider object settings.
$ilUser
Definition: imgupload.php:18
static _hasFields($a_container_id)
Check if there are any define fields.
static isActivated()
Checks whether Map feature is activated.
static _getInstance()
Get instance of ilPrivacySettings.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPossibleSubObjects()

ilObjCourseGUI::showPossibleSubObjects ( )

show possible sub objects selection list

Definition at line 1656 of file class.ilObjCourseGUI.php.

References ilContainerGUI\isActiveAdministrationPanel(), and ilContainer\VIEW_OBJECTIVE.

1657  {
1658  if ($this->object->getViewMode() == ilContainer::VIEW_OBJECTIVE
1659  && !$this->isActiveAdministrationPanel()) {
1660  return false;
1661  }
1662  parent::showPossibleSubObjects();
1663  }
+ Here is the call graph for this function:

◆ unsubscribeObject()

ilObjCourseGUI::unsubscribeObject ( )

DEPRECATED?

Definition at line 1917 of file class.ilObjCourseGUI.php.

References leaveObject().

1918  {
1919  $this->leaveObject();
1920  }
+ Here is the call graph for this function:

◆ updateInfoObject()

ilObjCourseGUI::updateInfoObject ( )

Definition at line 714 of file class.ilObjCourseGUI.php.

References $_POST, $DIC, ilContainerGUI\$error, $form, ilObjectGUI\$ilErr, ilObjectGUI\checkPermission(), editInfoObject(), initInfoEditor(), ilUtil\sendFailure(), and ilUtil\stripSlashes().

715  {
716  global $DIC;
717 
718  $ilErr = $DIC['ilErr'];
719  $ilAccess = $DIC['ilAccess'];
720 
721  $this->checkPermission('write');
722 
723  include_once 'Modules/Course/classes/class.ilCourseFile.php';
724  $file_obj = new ilCourseFile();
725  $file_obj->setCourseId($this->object->getId());
726  $file_obj->setFileName(strlen($_POST['file_name']) ?
727  ilUtil::stripSlashes($_POST['file_name']) :
728  $_FILES['file']['name']);
729  $file_obj->setFileSize($_FILES['file']['size']);
730  $file_obj->setFileType($_FILES['file']['type']);
731  $file_obj->setTemporaryName($_FILES['file']['tmp_name']);
732  $file_obj->setErrorCode($_FILES['file']['error']);
733 
734  $this->object->setImportantInformation(ilUtil::stripSlashes($_POST['important']));
735  $this->object->setSyllabus(ilUtil::stripSlashes($_POST['syllabus']));
736  $this->object->setContactName(ilUtil::stripSlashes($_POST['contact_name']));
737  $this->object->setContactResponsibility(ilUtil::stripSlashes($_POST['contact_responsibility']));
738  $this->object->setContactPhone(ilUtil::stripSlashes($_POST['contact_phone']));
739  $this->object->setContactEmail(ilUtil::stripSlashes($_POST['contact_email']));
740  $this->object->setContactConsultation(ilUtil::stripSlashes($_POST['contact_consultation']));
741 
742 
743  // validate
744 
745  $error = false;
746  $ilErr->setMessage('');
747 
748  $file_obj->validate();
749  $this->object->validateInfoSettings();
750  if (strlen($ilErr->getMessage())) {
751  $error = $ilErr->getMessage();
752  }
753 
754  // needed for proper advanced MD validation
755  $form = $this->initInfoEditor();
756  $form->checkInput();
757  if (!$this->record_gui->importEditFormPostValues()) {
758  $error = true;
759  }
760 
761  if ($error) {
762  if ($error !== true) {
763  ilUtil::sendFailure($ilErr->getMessage());
764  }
765  $this->editInfoObject($form);
766  return false;
767  }
768 
769  $this->object->update();
770  $file_obj->create();
771  $this->record_gui->writeEditForm();
772 
773 
774  // Update ecs content
775  include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
776  $ecs = new ilECSCourseSettings($this->object);
777  $ecs->handleContentUpdate();
778 
779  ilUtil::sendSuccess($this->lng->txt("crs_settings_saved"));
780  $this->editInfoObject();
781  return true;
782  }
global $DIC
Definition: saml.php:7
if(isset($_POST['submit'])) $form
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
editInfoObject(ilPropertyFormGUI $a_form=null)
Edit info page informations.
$_POST["username"]
Class ilECSCourseSettings.
initInfoEditor()
init info editor
+ Here is the call graph for this function:

◆ updateLPFromStatus()

ilObjCourseGUI::updateLPFromStatus (   $a_member_id,
  $a_has_passed 
)

sync course status and lp status

Parameters
int$a_member_id
bool$a_has_passed

Definition at line 1831 of file class.ilObjCourseGUI.php.

References $DIC, $ilUser, ilObjUserTracking\_enabledLearningProgress(), ilLPStatusWrapper\_updateStatus(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_MANUAL_BY_TUTOR, ilCourseAppEventListener\setBlockedForLP(), ilLPMarks\setCompleted(), and ilObjCourse\STATUS_DETERMINATION_LP.

1832  {
1833  global $DIC;
1834 
1835  $ilUser = $DIC['ilUser'];
1836 
1837  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
1839  $this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP) {
1840  include_once './Services/Object/classes/class.ilObjectLP.php';
1841  $olp = ilObjectLP::getInstance($this->object->getId());
1842  if ($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_MANUAL_BY_TUTOR) {
1843  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1844  $marks = new ilLPMarks($this->object->getId(), $a_member_id);
1845 
1846  // only if status has changed
1847  if ($marks->getCompleted() != $a_has_passed) {
1848  $marks->setCompleted($a_has_passed);
1849  $marks->update();
1850 
1851  // as course is origin of LP status change, block syncing
1852  include_once("./Modules/Course/classes/class.ilCourseAppEventListener.php");
1854 
1855  include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
1856  ilLPStatusWrapper::_updateStatus($this->object->getId(), $a_member_id);
1857  }
1858  }
1859  }
1860  }
global $DIC
Definition: saml.php:7
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
const STATUS_DETERMINATION_LP
static _enabledLearningProgress()
check wether learing progress is enabled or not
$ilUser
Definition: imgupload.php:18
setCompleted($a_status)
static getInstance($a_obj_id)
static setBlockedForLP($a_status)
Toggle LP blocking property status.
+ Here is the call graph for this function:

◆ updateObject()

ilObjCourseGUI::updateObject ( )

Update course settings type $ilUser.

Returns
boolean

Definition at line 790 of file class.ilObjCourseGUI.php.

References $_POST, $DIC, $form, $GLOBALS, $ilUser, ilContainerGUI\$settings, ilChangeEvent\_catchupWriteEvents(), ilPrivacySettings\_getInstance(), ilChangeEvent\_recordWriteEvent(), ilContainer\_writeContainerSetting(), ilContainerGUI\afterUpdate(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\BADGES, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, confirmLPSync(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilObjectGUI\editObject(), ilObjectGUI\getObjectService(), IL_CAL_UNIX, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_SUBSCRIPTION_LIMITED, IL_CRS_SUBSCRIPTION_UNLIMITED, IL_CRS_VIEW_OBJECTIVE, IL_CRS_VIEW_TIMING, initEditForm(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilContainerGUI\saveListPresentation(), ilContainerGUI\saveSortingSettings(), ilUtil\sendFailure(), ilObjectServiceSettingsGUI\SKILLS, ilContainer\SORT_ACTIVATION, ilObjCourse\STATUS_DETERMINATION_LP, ilObjectServiceSettingsGUI\TAG_CLOUD, ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and ilObjectServiceSettingsGUI\USE_NEWS.

791  {
792  $obj_service = $this->getObjectService();
793  $setting = $this->settings;
794 
795  $form = $this->initEditForm();
796 
797  if (!$form->checkInput()) {
798  $form->setValuesByPost();
799  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input'));
800  return $this->editObject($form);
801  }
802 
803  // Additional checks: subsription min/max
804  if (
805  $form->getInput('subscription_max') &&
806  $form->getInput('subscription_min') &&
807  ($form->getInput('subscription_max') < $form->getInput('subscription_min'))
808  ) {
809  $min = $form->getItemByPostVar('subscription_min');
810  $min->setAlert($this->lng->txt('crs_subscription_min_members_err'));
811  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input'));
812  return $this->editObject($form);
813  }
814 
815  // Additional checks: both tile and objective view activated (not supported)
816  if (
817  $form->getInput('list_presentation') == "tile" &&
818  $form->getInput('view_mode') == IL_CRS_VIEW_OBJECTIVE) {
819  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('crs_tile_and_objective_view_not_supported'));
820  return $this->editObject($form);
821  }
822 
823  // Additional checks: both tile and session limitation activated (not supported)
824  if ($form->getInput('sl') == "1" &&
825  $form->getInput('list_presentation') == "tile") {
826  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('crs_tile_and_session_limit_not_supported'));
827  return $this->editObject($form);
828  }
829 
830  // check successful
831 
832  // title/desc
833  $this->object->setTitle($form->getInput('title'));
834  $this->object->setDescription($form->getInput('desc'));
835 
836  // period
837  $crs_period = $form->getItemByPostVar("period");
838  $this->object->setCourseStart($crs_period->getStart());
839  $this->object->setCourseEnd($crs_period->getEnd());
840 
841  // activation/online
842  $this->object->setOfflineStatus((bool) !$form->getInput('activation_online'));
843 
844  // activation period
845  $period = $form->getItemByPostVar("access_period");
846  if ($period->getStart() && $period->getEnd()) {
847  $this->object->setActivationStart($period->getStart()->get(IL_CAL_UNIX));
848  $this->object->setActivationEnd($period->getEnd()->get(IL_CAL_UNIX));
849  $this->object->setActivationVisibility((int) $form->getInput('activation_visibility'));
850  } else {
851  $this->object->setActivationStart(null);
852  $this->object->setActivationEnd(null);
853  }
854 
855  // subscription settings
856  $this->object->setSubscriptionPassword($form->getInput('subscription_password'));
857  $this->object->setSubscriptionStart(null);
858  $this->object->setSubscriptionEnd(null);
859 
860  $sub_type = $form->getInput('subscription_type');
861  $sub_period = $form->getItemByPostVar('subscription_period');
862 
863  $this->object->setSubscriptionType($sub_type);
864  if ($sub_type != IL_CRS_SUBSCRIPTION_DEACTIVATED) {
865  if ($sub_period->getStart() && $sub_period->getEnd()) {
866  $this->object->setSubscriptionLimitationType(IL_CRS_SUBSCRIPTION_LIMITED);
867  $this->object->setSubscriptionStart($sub_period->getStart()->get(IL_CAL_UNIX));
868  $this->object->setSubscriptionEnd($sub_period->getEnd()->get(IL_CAL_UNIX));
869  } else {
870  $this->object->setSubscriptionLimitationType(IL_CRS_SUBSCRIPTION_UNLIMITED);
871  }
872  } else {
873  $this->object->setSubscriptionType(IL_CRS_SUBSCRIPTION_DIRECT);
874  $this->object->setSubscriptionLimitationType(IL_CRS_SUBSCRIPTION_DEACTIVATED);
875  }
876 
877  // registration code
878  $this->object->enableRegistrationAccessCode((int) $form->getInput('reg_code_enabled'));
879  $this->object->setRegistrationAccessCode($form->getInput('reg_code'));
880 
881  // cancellation end
882  $this->object->setCancellationEnd($form->getItemByPostVar("cancel_end")->getDate());
883 
884  // waiting list
885  $this->object->enableSubscriptionMembershipLimitation((int) $form->getInput('subscription_membership_limitation'));
886  $this->object->setSubscriptionMaxMembers((int) $form->getInput('subscription_max'));
887  $this->object->setSubscriptionMinMembers((int) $form->getInput('subscription_min'));
888  $old_autofill = $this->object->hasWaitingListAutoFill();
889  switch ((int) $form->getInput('waiting_list')) {
890  case 2:
891  $this->object->enableWaitingList(true);
892  $this->object->setWaitingListAutoFill(true);
893  break;
894 
895  case 1:
896  $this->object->enableWaitingList(true);
897  $this->object->setWaitingListAutoFill(false);
898  break;
899 
900  default:
901  $this->object->enableWaitingList(false);
902  $this->object->setWaitingListAutoFill(false);
903  break;
904  }
905 
906  // title icon visibility
907  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTitleIconVisibility();
908 
909  // top actions visibility
910  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTopActionsVisibility();
911 
912  ilContainer::_writeContainerSetting($this->object->getId(), "rep_breacrumb", $form->getInput('rep_breacrumb'));
913 
914  // custom icon
915  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveIcon();
916 
917  // tile image
918  $obj_service->commonSettings()->legacyForm($form, $this->object)->saveTileImage();
919 
920  // list presentation
921  $this->saveListPresentation($form);
922 
923 
924  // view mode settings
925  $this->object->setViewMode((int) $form->getInput('view_mode'));
926  if ($this->object->getViewMode() == IL_CRS_VIEW_TIMING) {
927  $this->object->setOrderType(ilContainer::SORT_ACTIVATION);
928  $this->object->setTimingMode((int) $form->getInput('timing_mode'));
929  }
930  $this->object->setTimingMode($form->getInput('timing_mode'));
931  $this->object->setOrderType($form->getInput('sorting'));
932  $this->saveSortingSettings($form);
933 
934  $this->object->setAboStatus((int) $form->getInput('abo'));
935  $this->object->setShowMembers((int) $form->getInput('show_members'));
936 
937  if (\ilPrivacySettings::_getInstance()->participantsListInCoursesEnabled()) {
938  $this->object->setShowMembersExport((int) $form->getInput('show_members_export'));
939  }
940  $this->object->setMailToMembersType((int) $form->getInput('mail_type'));
941 
942  $this->object->enableSessionLimit((int) $form->getInput('sl'));
943 
944  $session_sp = $form->getInput('sp');
945  $this->object->setNumberOfPreviousSessions(is_numeric($session_sp) ? (int) $session_sp : -1);
946  $session_sn = $form->getInput('sn');
947  $this->object->setNumberOfnextSessions(is_numeric($session_sn) ? (int) $session_sn : -1);
948  $this->object->setAutoNotification($form->getInput('auto_notification') == 1 ? true : false);
949 
950  // lp sync
951  $show_lp_sync_confirmation = false;
952 
953  // could be hidden in form
954  if (isset($_POST['status_dt'])) {
955  if (
956  $this->object->getStatusDetermination() != ilObjCourse::STATUS_DETERMINATION_LP &&
957  (int) $_POST['status_dt'] == ilObjCourse::STATUS_DETERMINATION_LP
958  ) {
959  $show_lp_sync_confirmation = true;
960  } else {
961  $this->object->setStatusDetermination((int) $form->getInput('status_dt'));
962  }
963  }
964 
965  if (!$old_autofill && $this->object->hasWaitingListAutoFill()) {
966  $this->object->handleAutoFill();
967  }
968  $this->object->update();
969 
970 
971  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
973  $this->object->getId(),
974  $form,
975  array(
984  )
985  );
986 
987  require_once('Services/Tracking/classes/class.ilChangeEvent.php');
988  global $DIC;
989 
990  $ilUser = $DIC['ilUser'];
991  ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
992  ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
993 
994  // lp sync confirmation required
995  if ($show_lp_sync_confirmation) {
996  return $this->confirmLPSync();
997  }
998 
999  // Update ecs export settings
1000  include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
1001  $ecs = new ilECSCourseSettings($this->object);
1002  if (!$ecs->handleSettingsUpdate()) {
1003  $form->setValuesByPost();
1004  ilUtil::sendFailure($GLOBALS['DIC']->language()->txt('err_check_input'));
1005  return $this->editObject($form);
1006  }
1007 
1008  return $this->afterUpdate();
1009  }
const IL_CRS_SUBSCRIPTION_LIMITED
const IL_CRS_VIEW_OBJECTIVE
saveSortingSettings(ilPropertyFormGUI $form)
Save sorting settings.
global $DIC
Definition: saml.php:7
static _recordWriteEvent($obj_id, $usr_id, $action, $parent_obj_id=null)
Records a write event.
const IL_CAL_UNIX
const IL_CRS_VIEW_TIMING
const STATUS_DETERMINATION_LP
static _catchupWriteEvents($obj_id, $usr_id, $timestamp=null)
Catches up with all write events which occured before the specified timestamp.
if(isset($_POST['submit'])) $form
const IL_CRS_SUBSCRIPTION_UNLIMITED
$ilUser
Definition: imgupload.php:18
editObject()
edit object
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
saveListPresentation(ilPropertyFormGUI $form)
Save list presentation setting.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _writeContainerSetting($a_id, $a_keyword, $a_value)
const IL_CRS_SUBSCRIPTION_DIRECT
static _getInstance()
Get instance of ilPrivacySettings.
getObjectService()
Get object service.
$_POST["username"]
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
Class ilECSCourseSettings.
const IL_CRS_SUBSCRIPTION_DEACTIVATED
+ Here is the call graph for this function:

◆ viewObject()

ilObjCourseGUI::viewObject ( )

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

References $_GET, $DIC, $ilCtrl, $ilUser, ilContainerGUI\$rbacsystem, $ret, __checkStartObjects(), ilMDUtils\_fillHTMLMetaTags(), ilLearningProgress\_tracProgress(), checkAgreement(), ilObjectGUI\checkPermission(), ilContainer\VIEW_BY_TYPE, ilContainer\VIEW_OBJECTIVE, ilContainer\VIEW_SESSIONS, ilContainer\VIEW_SIMPLE, and ilContainer\VIEW_TIMING.

Referenced by executeCommand(), gatewayObject(), leaveObject(), renderObject(), and resetObject().

118  {
119  global $DIC;
120 
121  $rbacsystem = $DIC['rbacsystem'];
122  $ilUser = $DIC['ilUser'];
123  $ilCtrl = $DIC['ilCtrl'];
124 
125  $this->tabs_gui->setTabActive('view_content');
126 
127  // CHECK ACCESS
128  $this->checkPermission('read', 'view');
129  /*
130  if(!$rbacsystem->checkAccess("read",$this->object->getRefId()))
131  {
132  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
133  }
134  */
135  if (strtolower($_GET["baseClass"]) == "iladministrationgui") {
136  parent::viewObject();
137  return true;
138  }
139 
140  // Fill meta header tags
141  include_once('Services/MetaData/classes/class.ilMDUtils.php');
142  ilMDUtils::_fillHTMLMetaTags($this->object->getId(), $this->object->getId(), 'crs');
143 
144  // Trac access
145  if ($ilCtrl->getNextClass() != "ilcolumngui") {
146  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
148  $ilUser->getId(),
149  $this->object->getId(),
150  $this->object->getRefId(),
151  'crs'
152  );
153  }
154 
155  if (!$this->checkAgreement()) {
156  include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
157  $this->tabs_gui->clearTargets();
158  $this->ctrl->setReturn($this, 'view_content');
159  $agreement = new ilMemberAgreementGUI($this->object->getRefId());
160  $this->ctrl->setCmdClass(get_class($agreement));
161  $this->ctrl->forwardCommand($agreement);
162  return true;
163  }
164 
165  if (!$this->__checkStartObjects()) {
166  include_once "Services/Container/classes/class.ilContainerStartObjectsContentGUI.php";
167  $stgui = new ilContainerStartObjectsContentGUI($this, $this->object);
168  $stgui->enableDesktop($this->object->getAboStatus(), $this);
169  return $stgui->getHTML();
170  }
171 
172  // views handled by general container logic
173  if ($this->object->getViewMode() == ilContainer::VIEW_SIMPLE ||
174  $this->object->getViewMode() == ilContainer::VIEW_BY_TYPE ||
175  $this->object->getViewMode() == ilContainer::VIEW_SESSIONS ||
176  $this->object->getViewMode() == ilContainer::VIEW_TIMING ||
177  $this->object->getViewMode() == ilContainer::VIEW_OBJECTIVE
178  ) {
179  $ret = parent::renderObject();
180  return $ret;
181  } else {
182  include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
183  $course_content_obj = new ilCourseContentGUI($this);
184 
185  $this->ctrl->setCmdClass(get_class($course_content_obj));
186  $this->ctrl->forwardCommand($course_content_obj);
187  }
188 
189  return true;
190  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
global $ilCtrl
Definition: ilias.php:18
$ilUser
Definition: imgupload.php:18
static _fillHTMLMetaTags($a_rbac_id, $a_obj_id, $a_type)
Fill html meta tags.
Class ilCourseContentGUI.
$ret
Definition: parser.php:6
Class ilContainerStartObjectsContentGUI.
checkAgreement()
Check agreement and redirect if it is not accepted.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ BREADCRUMB_CRS_ONLY

const ilObjCourseGUI::BREADCRUMB_CRS_ONLY = 1

Definition at line 34 of file class.ilObjCourseGUI.php.

◆ BREADCRUMB_DEFAULT

const ilObjCourseGUI::BREADCRUMB_DEFAULT = 0

Definition at line 33 of file class.ilObjCourseGUI.php.

Referenced by ilLocatorGUI\addRepositoryItems().

◆ BREADCRUMB_FULL_PATH

const ilObjCourseGUI::BREADCRUMB_FULL_PATH = 2

Definition at line 35 of file class.ilObjCourseGUI.php.

Referenced by ilLocatorGUI\addRepositoryItems().


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