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

Class ilObjCourseGUI. More...

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

Public Member Functions

 ilObjCourseGUI ()
 Constructor public.
 gatewayObject ()
 memberGatewayObject ()
 Gateway for member administration commands.
 sendMailToSelectedUsersObject ()
 cancelMemberObject ()
 canceledObject is called when operation is canceled, method links back public
 renderObject ()
 render the object
 viewObject ()
 list childs of current object
 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
 infoScreen ()
 show information screen
 saveNotificationObject ()
 :TEMP: Save notification setting (from infoscreen)
 askDeleteStarterObject ()
 deleteStarterObject ()
 selectStarterObject ()
 addStarterObject ()
 editInfoObject ()
 Edit info page informations.
 confirmDeleteInfoFilesObject ()
 show info file donfimation table
 deleteInfoFilesObject ()
 Delete info files.
 initInfoEditor ()
 init info editor
 updateInfoObject ()
 updateObject ()
 updates object entry in object_data
 editObject ()
 edit object
 editCourseIconsObject ($a_form=null)
 edit container icons
 initCourseIconsForm ()
 sendFileObject ()
 updateCourseIconsObject ()
 update container icons
 setSubTabs ($a_tab)
 set sub tabs
 removeSmallIconObject ()
 remove small icon
 removeBigIconObject ()
 remove big icon
 removeTinyIconObject ()
 remove small icon
 downloadArchivesObject ()
 setShowHidePrefs ()
 set preferences (show/hide tabel content)
 readMemberData ($ids, $role= 'admin', $selected_columns=null)
 updateAdminStatusObject ()
 update admin status
 updateTutorStatusObject ()
 update tuto status
 updateMemberStatusObject ()
 updateMemberStatus
 updateRoleStatusObject ()
 Update status of additional course roles.
 updateParticipantsStatus ($type, $visible_members, $passed, $notification, $blocked)
 __showWaitingList ()
 editMemberObject ()
 edit member
 editMembersObject ()
 edit members
 updateMembersObject ()
 update members
 updateMemberObject ()
 assignMembersObject (array $a_usr_ids, $a_type)
 callback from repository search gui ilRbacSystem $rbacsystem
 assignFromWaitingListObject ()
 refuseFromListObject ()
 refuse from waiting list
 performRemoveFromWaitingListObject ()
 assignSubscribersObject ()
 autoFillObject ()
 deleteSubscribers ()
 removeFromWaitingList ()
 leaveObject ()
 unsubscribeObject ()
 DEPRECATED?
 performUnsubscribeObject ()
 deleteMembersObject ()
 Delete members ilAccessHandler $ilAccess.
 refuseSubscribersObject ()
 getTabs (&$tabs_gui)
 Get tabs.
 fetchPrintSubscriberData ($a_members)
 fetchPrintMemberData ($a_members)
 printMembersObject ()
 getAttendanceListUserData ($a_user_id)
 printMembersOutputObject ()
 membersGalleryObject ()
 __initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 __showRemoveFromWaitingListTable ($a_result_set)
 __showDeleteSubscriberTable ($a_result_set)
 __showWaitingListTable ($a_result_set, $a_waiting_list_ids=NULL)
 __getDateSelect ($a_type, $a_varname, $a_selected)
 __toUnix ($a_time_arr)
 __unsetSessionVariables ()
 mailMembersObject ()
 executeCommand ()
 execute command note: this method is overwritten in all container objects
 _forwards ()
 cciObjectivesObject ()
 cciObjectivesEditObject ()
 cciObjectivesAskResetObject ()
 cciResetObject ()
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 _goto ($a_target, $a_add="")
 goto target course
 toUnix ($date, $time=array())
 __prepareDateSelect ($a_unix_time)
 __prepareTimeSelect ($a_unix_time)
 editMapSettingsObject ()
 Edit Map Settings.
 saveMapSettingsObject ()
 membersMapObject ()
 Members map.
 modifyItemGUI ($a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container.
 setContentSubTabs ()
 Set content sub tabs.
 askResetObject ()
 ask reset test results
 resetObject ()
 __checkStartObjects ()
 showStartObjects ()
 prepareOutput ()
 Handle member view.
 deliverCertificateObject ()
- Public Member Functions inherited from ilContainerGUI
 ilContainerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 forwardToStyleSheet ()
 Forward to style object.
forwardToPageObject ()
 forward command to page object
 addPageTabs ()
 Add page tabs.
 getContainerPageHTML ()
 Get container page HTML.
 prepareOutput ($a_show_subobjects=true)
 prepare output
 showTreeFlatIcon ()
 setTitleAndDescription ()
 called by prepare output
 showPossibleSubObjects ()
 show possible sub objects selection list
 getContentGUI ()
 Get content gui object.
 showAdministrationPanel (&$tpl)
 show administration panel
 __showTimingsButton (&$tpl)
 showPermanentLink (&$tpl)
 show permanent link
 switchToStdEditorObject ()
 Switch to standard page editor.
 switchToOldEditorObject ()
 Switch to old page editor.
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page)
 editPageFrameObject ()
 show page editor frameset
 editPageContentObject ()
 edit page content (for repository root node and categories)
 savePageContentObject ()
 cancelPageContentObject ()
 renderItemList ($a_type="all")
 showLinkListObject ()
 clearAdminCommandsDetermination ()
 cleaer administration commands determination
newBlockTemplate ()
 determin admin commands
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard row to a block template
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row
 resetRowType ()
 setPageEditorTabs ()
 Add page editor tabs.
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link.
 enableAdministrationPanelObject ()
 enable administration panel
 disableAdministrationPanelObject ()
 enable administration panel
 editOrderObject ()
 Edit order.
 isActiveOrdering ()
 Check if ordering is enabled.
 addToDeskObject ()
 removeFromDeskObject ()
 enableMultiDownloadObject ()
 isMultiDownloadEnabled ()
 lockObject ()
 cutObject ()
 cut object(s) out from a container and write the information to clipboard
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.
 downloadObject ()
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix
 clearObject ()
 clear clipboard and go back to last object
 performPasteIntoMultipleObjectsObject ()
 initAndDisplayLinkIntoMultipleObjectsObject ()
 showPasteTreeObject ()
 Show paste tree.
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent.
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard.
 initAndDisplayCopyIntoMultipleObjectsObject ()
 initAndDisplayMoveIntoObjectObject ()
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved
 clipboardObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once.
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container
 isActiveAdministrationPanel ()
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 allowBlocksMoving ()
 Standard is to allow blocks moving.
 allowBlocksConfigure ()
 Standard is to allow blocks configuration.
 cloneWizardPageTreeObject ()
 public
 cloneWizardPageListObject ()
 public
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects.
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects.
 saveSortingObject ()
 Save Sorting.
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree.
 modifyItemGUI (&$a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container.
 editStylePropertiesObject ()
 Edit style properties.
 initStylePropertiesForm ()
 Init style properties form.
 createStyleObject ()
 Create Style.
 editStyleObject ()
 Edit Style.
 deleteStyleObject ()
 Delete Style.
 saveStyleSettingsObject ()
 Save style settings.
 getAsynchItemListObject ()
 Get item list command drop down asynchronously.
 redrawListItemObject ()
 Redraw a list item (ajax)
 showRepTree ($a_initial_call=false)
 Show tree.
 trashObject ()
 Show trash content of object.
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 undeleteObject ()
 Get objects back from trash.
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 saveObject ()
 save object
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 deleteObject ($a_error=false)
 Display deletion confirmation screen.

Static Public Member Functions

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.
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.

Protected Member Functions

 afterImport (ilObject $a_new_object)
 add course admin after import file
 forwardToTimingsView ()
 listStructureObject ()
 List start objects ilRbacSystem $rbacsystem.
 confirmLPSync ()
 setLPSyncObject ()
 initEditForm ()
 init form
 getEditFormValues ()
 Get values for edit form.
 afterSave (ilObject $a_new_object)
 save object public
 membersObject ()
 Member administration.
 updateLPFromStatus ($a_member_id, $a_has_passed)
 sync course status and lp status
 removeMembersObject ()
 Remove members ilRbacReview $rbacreview ilRbacSystem $rbacsystem.
 getAgreementTabs ()
 Get tabs for member agreement.
 initAttendanceList ()
 loadDate ($a_field)
 load date
 createMailSignature ()
 Create a course mail signature.
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add file manager link.
- Protected Member Functions inherited from ilContainerGUI
 afterUpdate ()
 Post (successful) object update hook.
 showPasswordInstructionObject ($a_init=true)
 Show webdav password instruction.
 initFormPasswordInstruction ()
 Init password form.
 savePasswordObject ()
 Save password.
 fileManagerLaunchObject ()
 Launch jnlp.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Private Member Functions

 checkAgreement ()
 Check agreement and redirect if it is not accepted.
 checkLicenses ($a_keep=false)
 Check the remaining licenses of course objects and generate a message if raare.

Additional Inherited Members

- Data Fields inherited from ilContainerGUI
 $bl_cnt = 1
 $multi_download_enabled = false

Detailed Description

Member Function Documentation

ilObjCourseGUI::__checkStartObjects ( )

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

References $ilUser.

Referenced by viewObject().

{
include_once './Modules/Course/classes/class.ilCourseStart.php';
global $ilAccess,$ilUser;
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
return true;
}
$this->start_obj = new ilCourseStart($this->object->getRefId(),$this->object->getId());
if(count($this->start_obj->getStartObjects()) and !$this->start_obj->allFullfilled($ilUser->getId()))
{
return false;
}
return true;
}

+ Here is the caller graph for this function:

ilObjCourseGUI::__getDateSelect (   $a_type,
  $a_varname,
  $a_selected 
)

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

References ilUtil\formSelect().

{
switch($a_type)
{
case "minute":
for($i=0;$i<=60;$i++)
{
$days[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
case "hour":
for($i=0;$i<24;$i++)
{
$days[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
case "day":
for($i=1;$i<32;$i++)
{
$days[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
case "month":
for($i=1;$i<13;$i++)
{
$month[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$month,false,true);
case "year":
for($i = date("Y",time());$i < date("Y",time()) + 3;++$i)
{
$year[$i] = $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$year,false,true);
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::__initTableGUI ( )

Reimplemented from ilObjectGUI.

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

Referenced by __showDeleteSubscriberTable(), __showRemoveFromWaitingListTable(), and __showWaitingListTable().

{
include_once "./Services/Table/classes/class.ilTableGUI.php";
return new ilTableGUI(0,false);
}

+ Here is the caller graph for this function:

ilObjCourseGUI::__prepareDateSelect (   $a_unix_time)

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

{
return array('y' => date('Y',$a_unix_time),
'm' => date('n',$a_unix_time),
'd' => date('d',$a_unix_time));
}
ilObjCourseGUI::__prepareTimeSelect (   $a_unix_time)

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

{
return array('h' => date('G',$a_unix_time),
'm' => date('i',$a_unix_time),
's' => date('s',$a_unix_time));
}
ilObjCourseGUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $a_from = "" 
)

standard implementation for tables use 'from' variable use different initial setting of table

Reimplemented from ilObjectGUI.

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

References $_GET.

Referenced by __showDeleteSubscriberTable(), __showRemoveFromWaitingListTable(), and __showWaitingListTable().

{
switch($from)
{
case "members":
$offset = $_GET["update_members"] ? $_GET["offset"] : 0;
$order = $_GET["update_members"] ? $_GET["sort_by"] : 'login';
$direction = $_GET["update_members"] ? $_GET["sort_order"] : '';
break;
case "subscribers":
$offset = $_GET["update_subscribers"] ? $_GET["offset"] : 0;
$order = $_GET["update_subscribers"] ? $_GET["sort_by"] : 'sub_time';
$direction = $_GET["update_subscribers"] ? $_GET["sort_order"] : '';
break;
case "group":
$offset = $_GET["offset"];
$order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
$direction = $_GET["sort_order"];
break;
case "role":
$offset = $_GET["offset"];
$order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
$direction = $_GET["sort_order"];
break;
default:
$offset = $_GET["offset"];
// init sort_by (unfortunatly sort_by is preset with 'title'
if ($_GET["sort_by"] == "title" or empty($_GET["sort_by"]))
{
$_GET["sort_by"] = "login";
}
$order = $_GET["sort_by"];
$direction = $_GET["sort_order"];
break;
}
$tbl->setOrderColumn($order);
$tbl->setOrderDirection($direction);
$tbl->setOffset($offset);
$tbl->setLimit($_GET["limit"]);
$tbl->setMaxCount(count($result_set));
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
$tbl->setData($result_set);
}

+ Here is the caller graph for this function:

ilObjCourseGUI::__showDeleteSubscriberTable (   $a_result_set)

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

References $_GET, ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), and ilUtil\getImagePath().

Referenced by deleteSubscribers().

{
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","removeSubscribers");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","cancelMember");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("cancel"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",4);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.png"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_delete_subscribers"),"icon_usr_b.png",$this->lng->txt("crs_header_delete_members"));
$tbl->setHeaderNames(array($this->lng->txt("username"),
$this->lng->txt("firstname"),
$this->lng->txt("lastname"),
$this->lng->txt("crs_time")));
$tbl->setHeaderVars(array("login",
"firstname",
"lastname",
"sub_time"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("25%","25%","25%","25%"));
$this->__setTableGUIBasicData($tbl,$a_result_set);
$tbl->render();
$this->tpl->setVariable("EDIT_MEMBER_TABLE",$tbl->tpl->get());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::__showRemoveFromWaitingListTable (   $a_result_set)

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

References $_GET, ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), and ilUtil\getImagePath().

Referenced by removeFromWaitingList().

{
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","cancelMember");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("cancel"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","performRemoveFromWaitingList");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",4);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.png"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_remove_from_waiting_list"),"icon_usr_b.png",
$this->lng->txt("crs_header_remove_from_waiting_list"));
$tbl->setHeaderNames(array($this->lng->txt("username"),
$this->lng->txt("firstname"),
$this->lng->txt("lastname"),
$this->lng->txt("crs_time")));
$tbl->setHeaderVars(array("login",
"firstname",
"lastname",
"sub_time"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("25%","25%","25%","25%"));
$this->__setTableGUIBasicData($tbl,$a_result_set);
$tbl->render();
$this->tpl->setVariable("EDIT_MEMBER_TABLE",$tbl->tpl->get());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::__showWaitingList ( )

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

References __showWaitingListTable(), ilObjCourseGrouping\_getGroupingCourseIds(), ilCourseParticipants\_getInstanceByObjId(), ilObject\_lookupTitle(), ilDatePresentation\formatDate(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), and IL_CAL_UNIX.

{
include_once './Modules/Course/classes/class.ilObjCourseGrouping.php';
$this->object->initWaitingList();
if($this->object->waiting_list_obj->getCountUsers())
{
$counter = 0;
$f_result = array();
foreach($this->object->waiting_list_obj->getAllUsers() as $waiting_data)
{
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($waiting_data['usr_id'],false))
{
$waiting_list_ids[] = $waiting_data['usr_id'];
$message = '';
// Check if user is member in course grouping
foreach(ilObjCourseGrouping::_getGroupingCourseIds($this->object->getRefId(),
$this->object->getId()) as $course_data)
{
$tmp_members = ilCourseParticipants::_getInstanceByObjId($course_data['id']);
if($course_data['id'] != $this->object->getId() and
$tmp_members->isGroupingMember($tmp_obj->getId(),$course_data['unique']))
{
$message .= ('<br /><font class="alert">'.$this->lng->txt('crs_member_of').' ');
$message .= (ilObject::_lookupTitle($course_data['id'])."</font>");
}
}
$f_result[$counter][] = ilUtil::formCheckbox(0,"waiting_list[]",$waiting_data['usr_id']);
$f_result[$counter][] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname().$message;
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = ilDatePresentation::formatDate(new ilDateTime($waiting_data['time'],IL_CAL_UNIX));
unset($tmp_obj);
++$counter;
}
}
$this->__showWaitingListTable($f_result,$waiting_list_ids);
} // END waiting list
}

+ Here is the call graph for this function:

ilObjCourseGUI::__showWaitingListTable (   $a_result_set,
  $a_waiting_list_ids = NULL 
)

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

References $_GET, ilObjectGUI\$actions, ilObjectGUI\$tpl, __initTableGUI(), __setTableGUIBasicData(), ilUtil\formSelect(), and ilUtil\getImagePath().

Referenced by __showWaitingList().

{
$actions = array("addFromWaitingList" => $this->lng->txt("crs_add_subscribers"),
"removeFromWaitingList" => $this->lng->txt("crs_delete_from_waiting_list"));
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tbl->enable('select_all');
$tbl->setFormName("wait_form");
$tbl->setSelectAllCheckbox("waiting_list");
// SET FOOTER BUTTONS
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",5);
$tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.png"));
$tpl->setCurrentBlock("tbl_action_select");
$tpl->setVariable("SELECT_ACTION",ilUtil::formSelect(1,"action",$actions,false,true));
$tpl->setVariable("BTN_NAME","gateway");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("execute"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("TPLPATH",$this->tpl->tplPath);
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_waiting_list"),"icon_usr.png",$this->lng->txt("crs_waiting_list"));
$tbl->setHeaderNames(array('',
$this->lng->txt("name"),
$this->lng->txt("login"),
$this->lng->txt("crs_time")));
$tbl->setHeaderVars(array("",
"name",
"login",
"sub_time"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"update_subscribers" => 1,
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array('1%'));
$this->__setTableGUIBasicData($tbl,$a_result_set,"subscribers");
$tbl->render();
$this->tpl->setCurrentBlock('sub_wait_table');
$this->tpl->setVariable('SUB_WAIT_NAME','wait_form');
$this->tpl->setVariable('SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
$this->tpl->setVariable("SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
$this->tpl->parseCurrentBlock();
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::__toUnix (   $a_time_arr)

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

{
return mktime($a_time_arr["hour"],
$a_time_arr["minute"],
$a_time_arr["second"],
$a_time_arr["month"],
$a_time_arr["day"],
$a_time_arr["year"]);
}
ilObjCourseGUI::__unsetSessionVariables ( )

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

References $_SESSION.

Referenced by cancelMemberObject().

{
unset($_SESSION["crs_delete_member_ids"]);
unset($_SESSION["crs_delete_subscriber_ids"]);
unset($_SESSION["crs_search_str"]);
unset($_SESSION["crs_search_for"]);
unset($_SESSION["crs_group"]);
unset($_SESSION["crs_role"]);
unset($_SESSION["crs_archives"]);
}

+ Here is the caller graph for this function:

ilObjCourseGUI::_forwards ( )

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

{
return array("ilCourseRegisterGUI",'ilConditionHandlerInterface');
}
ilObjCourseGUI::_goto (   $a_target,
  $a_add = "" 
)

goto target course

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

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

{
global $ilAccess, $ilErr, $lng,$ilUser;
include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
if(substr($a_add,0,5) == 'rcode')
{
if($ilUser->getId() == ANONYMOUS_USER_ID)
{
// Redirect to login for anonymous
"login.php?target=".$_GET["target"]."&cmd=force_login&lang=".
$ilUser->getCurrentLanguage()
);
}
// Redirects to target location after assigning user to course
$a_target,
substr($a_add,5)
);
}
if ($a_add == "mem" && $ilAccess->checkAccess("write", "", $a_target))
{
ilObjectGUI::_gotoRepositoryNode($a_target, "members");
}
if ($ilAccess->checkAccess("read", "", $a_target))
{
}
else
{
// to do: force flat view
if ($ilAccess->checkAccess("visible", "", $a_target))
{
ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreenGoto");
}
else
{
if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
}
}
}
$ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

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 5075 of file class.ilObjCourseGUI.php.

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

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

{
global $lng, $ilAccess;
// this is set for folders within the course
if ($a_parent_ref_id == 0)
{
$a_parent_ref_id = $a_course_ref_id;
}
// Special handling for tests in courses with learning objectives
if($a_item_data['type'] == 'tst' and
{
$a_item_list_gui->addCommandLinkParameter(array('crs_show_result' => $a_course_ref_id));
}
$a_item_list_gui->enableSubscribe($a_abo_status);
$is_tutor = ($ilAccess->checkAccess('write','',
$a_course_ref_id,'crs', $a_course_obj_id));
if($a_show_path and $is_tutor)
{
$a_item_list_gui->addCustomProperty($lng->txt('path'),
ilContainer::_buildPath($a_item_data['ref_id'], $a_course_ref_id),
false,
true);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::addLocatorItems ( )

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

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

{
global $ilLocator;
switch ($this->ctrl->getCmd())
{
default:
#$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
break;
}
}
ilObjCourseGUI::addStarterObject ( )

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

References $_POST, ilCourseStart\add(), ilObjectGUI\checkPermission(), listStructureObject(), selectStarterObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacsystem;
$this->checkPermission('write');
if(!count($_POST['starter']))
{
ilUtil::sendFailure($this->lng->txt('crs_select_one_object'));
return false;
}
include_once './Modules/Course/classes/class.ilCourseStart.php';
$crs_start =& new ilCourseStart($this->object->getRefId(),$this->object->getId());
$added = 0;
foreach($_POST['starter'] as $item_ref_id)
{
if(!$crs_start->exists($item_ref_id))
{
++$added;
$crs_start->add($item_ref_id);
}
}
if($added)
{
ilUtil::sendSuccess($this->lng->txt('crs_added_starters'));
return true;
}
else
{
ilUtil::sendFailure($this->lng->txt('crs_starters_already_assigned'));
return false;
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::afterImport ( ilObject  $a_new_object)
protected

add course admin after import file

Returns

Reimplemented from ilObjectGUI.

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

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

{
global $ilUser;
// #11895
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
$part->add($ilUser->getId(), ilCourseConstants::CRS_ADMIN);
$part->updateNotification($ilUser->getId(), 1);
parent::afterImport($a_new_object);
}

+ Here is the call graph for this function:

ilObjCourseGUI::afterSave ( ilObject  $a_new_object)
protected

save object public

Reimplemented from ilObjectGUI.

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

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

{
global $rbacadmin, $ilUser;
$a_new_object->getMemberObject()->add($ilUser->getId(),IL_CRS_ADMIN);
$a_new_object->getMemberObject()->updateNotification($ilUser->getId(),1);
$a_new_object->update();
// BEGIN ChangeEvent: Record write event.
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
global $ilUser;
ilChangeEvent::_recordWriteEvent($a_new_object->getId(), $ilUser->getId(), 'create');
// END ChangeEvent: Record write event.
// always send a message
ilUtil::sendSuccess($this->lng->txt("crs_added"),true);
$this->ctrl->setParameter($this, "ref_id", $a_new_object->getRefId());
$this->ctrl->getLinkTarget($this, "edit", "", false, false)));
}

+ Here is the call graph for this function:

ilObjCourseGUI::askDeleteStarterObject ( )

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

References $_POST, ilObjectGUI\$obj_id, ilObjectGUI\$tpl, ilObject\_getIcon(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilCourseStart\getStartObjects(), listStructureObject(), and ilUtil\sendFailure().

{
global $tpl;
if(!count($_POST['starter']))
{
ilUtil::sendFailure($this->lng->txt('select_one'));
return true;
}
// display confirmation message
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($this->ctrl->getFormAction($this, "listStructure"));
$cgui->setHeaderText($this->lng->txt("crs_starter_delete_sure"));
$cgui->setCancel($this->lng->txt("cancel"), "listStructure");
$cgui->setConfirm($this->lng->txt("delete"), "deleteStarter");
// list objects that should be deleted
include_once './Modules/Course/classes/class.ilCourseStart.php';
$crs_start = new ilCourseStart($this->object->getRefId(),$this->object->getId());
$all = $crs_start->getStartObjects();
foreach($_POST['starter'] as $starter_id)
{
$obj_id = ilObject::_lookupObjId($all[$starter_id]["item_ref_id"]);
$icon = ilObject::_getIcon($obj_id, "tiny");
$alt = $this->lng->txt('obj_'.ilObject::_lookupType($obj_id));
$cgui->addItem("starter[]", $starter_id, $title, $icon, $alt);
}
$tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

ilObjCourseGUI::askResetObject ( )

ask reset test results

public

Parameters
@return

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

{
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_objectives_ask_reset.html",'Modules/Course');
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("INFO_STRING",$this->lng->txt('crs_objectives_reset_sure'));
$this->tpl->setVariable("TXT_CANCEL",$this->lng->txt('cancel'));
$this->tpl->setVariable("TXT_RESET",$this->lng->txt('reset'));
return true;
}
ilObjCourseGUI::assignFromWaitingListObject ( )

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

References $_POST, ilForumNotification\checkForumsExistsInsert(), ilObjectGUI\checkPermission(), ilObjectFactory\getInstanceByObjId(), IL_CRS_MEMBER, membersObject(), ilWaitingList\removeFromList(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacsystem;
$this->checkPermission('write');
if(!count($_POST["waiting"]))
{
ilUtil::sendFailure($this->lng->txt("crs_no_users_selected"));
$this->membersObject();
return false;
}
include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
$waiting_list = new ilCourseWaitingList($this->object->getId());
$added_users = 0;
foreach($_POST["waiting"] as $user_id)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id,false))
{
continue;
}
if($this->object->getMembersObject()->isAssigned($user_id))
{
continue;
}
$this->object->getMembersObject()->add($user_id,IL_CRS_MEMBER);
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_ACCEPT_USER,$user_id);
$waiting_list->removeFromList($user_id);
include_once('./Modules/Forum/classes/class.ilForumNotification.php');
ilForumNotification::checkForumsExistsInsert($this->object->getRefId(), $user_id);
$this->object->checkLPStatusSync($user_id);
++$added_users;
}
if($added_users)
{
ilUtil::sendSuccess($this->lng->txt("crs_users_added"));
$this->membersObject();
return true;
}
else
{
ilUtil::sendFailure($this->lng->txt("crs_users_already_assigned"));
$this->membersObject();
return false;
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::assignMembersObject ( array  $a_usr_ids,
  $a_type 
)

callback from repository search gui ilRbacSystem $rbacsystem

Parameters
int$a_type
array$a_usr_ids
Returns
bool

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

References $_SESSION, ilForumNotification\checkForumsExistsInsert(), checkLicenses(), ilObjectGUI\checkPermission(), ilCourseConstants\CRS_ADMIN, ilCourseConstants\CRS_MEMBER, ilCourseConstants\CRS_TUTOR, ilObjectFactory\getInstanceByObjId(), IL_CRS_ADMIN, IL_CRS_MEMBER, IL_CRS_TUTOR, ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacsystem;
$this->checkPermission('write');
if(!count($a_usr_ids))
{
ilUtil::sendFailure($this->lng->txt("crs_no_users_selected"),true);
return false;
}
$added_users = 0;
foreach($a_usr_ids as $user_id)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id,false))
{
continue;
}
if($this->object->getMembersObject()->isAssigned($user_id))
{
continue;
}
switch($a_type)
{
$this->object->getMembersObject()->add($user_id,IL_CRS_MEMBER);
break;
$this->object->getMembersObject()->add($user_id,IL_CRS_TUTOR);
break;
$this->object->getMembersObject()->add($user_id,IL_CRS_ADMIN);
break;
}
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_ACCEPT_USER,$user_id);
include_once './Modules/Forum/classes/class.ilForumNotification.php';
ilForumNotification::checkForumsExistsInsert($this->object->getRefId(), $user_id);
$this->object->checkLPStatusSync($user_id);
++$added_users;
}
if($added_users)
{
ilUtil::sendSuccess($this->lng->txt("crs_users_added"),true);
unset($_SESSION["crs_search_str"]);
unset($_SESSION["crs_search_for"]);
unset($_SESSION['crs_usr_search_result']);
$this->checkLicenses(true);
$this->ctrl->redirect($this,'members');
}
ilUtil::sendFailure($this->lng->txt("crs_users_already_assigned"),true);
return false;
}

+ Here is the call graph for this function:

ilObjCourseGUI::assignSubscribersObject ( )

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

References $_POST, $ilErr, $usr_id, ilForumNotification\checkForumsExistsInsert(), ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacsystem,$ilErr;
$this->checkPermission('write');
if(!is_array($_POST["subscribers"]))
{
ilUtil::sendFailure($this->lng->txt("crs_no_subscribers_selected"));
$this->membersObject();
return false;
}
if(!$this->object->getMembersObject()->assignSubscribers($_POST["subscribers"]))
{
ilUtil::sendFailure($ilErr->getMessage());
$this->membersObject();
return false;
}
else
{
foreach($_POST["subscribers"] as $usr_id)
{
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_ACCEPT_SUBSCRIBER,$usr_id);
include_once('./Modules/Forum/classes/class.ilForumNotification.php');
$this->object->checkLPStatusSync($usr_id);
}
}
ilUtil::sendSuccess($this->lng->txt("crs_subscribers_assigned"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::autoFillObject ( )

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

References ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacsystem;
$this->checkPermission('write');
if($this->object->isSubscriptionMembershipLimited() and $this->object->getSubscriptionMaxMembers() and
$this->object->getSubscriptionMaxMembers() <= $this->object->getMembersObject()->getCountMembers())
{
ilUtil::sendFailure($this->lng->txt("crs_max_members_reached"));
$this->membersObject();
return false;
}
if($number = $this->object->getMembersObject()->autoFillSubscribers())
{
ilUtil::sendSuccess($this->lng->txt("crs_number_users_added")." ".$number);
}
else
{
ilUtil::sendFailure($this->lng->txt("crs_no_users_added"));
}
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::cancelMemberObject ( )

canceledObject is called when operation is canceled, method links back public

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

References ilObjectGUI\$return_location, __unsetSessionVariables(), and ilUtil\redirect().

{
$return_location = "members";
#ilUtil::sendSuccess($this->lng->txt("action_aborted"),true);
ilUtil::redirect($this->ctrl->getLinkTarget($this,$return_location,"",false,false));
}

+ Here is the call graph for this function:

ilObjCourseGUI::cciObjectivesAskResetObject ( )

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

{
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_objectives_ask_reset();
return true;;
}
ilObjCourseGUI::cciObjectivesEditObject ( )

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

{
$this->tabs_gui->setTabActive('edit_content');
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_view();
return true;
}
ilObjCourseGUI::cciObjectivesObject ( )

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

{
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_objectives();
return true;;
}
ilObjCourseGUI::cciResetObject ( )

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

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

{
global $ilUser;
include_once './Modules/Course/classes/class.ilCourseObjectiveResult.php';
$tmp_obj_res =& new ilCourseObjectiveResult($ilUser->getId());
$tmp_obj_res->reset($this->object->getId());
ilUtil::sendSuccess($this->lng->txt('crs_objectives_reseted'));
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_objectives();
}

+ Here is the call graph for this function:

ilObjCourseGUI::checkAgreement ( )
private

Check agreement and redirect if it is not accepted.

private

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

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

Referenced by viewObject().

{
global $ilUser,$ilAccess;
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
return true;
}
// Disable aggrement if is not member of course
if(!$this->object->getMemberObject()->isAssigned())
{
return true;
}
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
{
return true;
}
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Services/Membership/classes/class.ilMemberAgreement.php');
// Check agreement
if(($privacy->courseConfirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
and !ilMemberAgreement::_hasAccepted($ilUser->getId(),$this->object->getId()))
{
$GLOBALS['ilLog']->write(__METHOD__.': Missing course confirmation.');
return false;
}
// Check required fields
include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
if(!ilCourseUserData::_checkRequired($ilUser->getId(),$this->object->getId()))
{
$GLOBALS['ilLog']->write(__METHOD__.': Missing required fields');
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::checkLicenses (   $a_keep = false)
private

Check the remaining licenses of course objects and generate a message if raare.

private

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

References ilObjectGUI\$lng, ilLicense\_getLicensedChildObjects(), ilLicenseAccess\_isEnabled(), and ilUtil\sendInfo().

Referenced by assignMembersObject(), and executeCommand().

{
global $lng;
include_once("Services/License/classes/class.ilLicenseAccess.php");
{
$lic_set = new ilSetting("license");
$buffer = $lic_set->get("license_warning");
include_once("./Services/License/classes/class.ilLicense.php");
$licensed_items = ilLicense::_getLicensedChildObjects($this->object->getRefId());
foreach ($licensed_items as $item)
{
$license =& new ilLicense($item['obj_id']);
$remaining = $license->getRemainingLicenses();
if ($remaining <= $buffer)
{
$lng->loadlanguageModule("license");
ilUtil::sendInfo(sprintf($this->lng->txt("course_licenses_rare"), $remaining), $a_keep);
break;
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::confirmDeleteInfoFilesObject ( )

show info file donfimation table

public

Parameters

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

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

{
if(!count($_POST['file_id']))
{
ilUtil::sendFailure($this->lng->txt('select_one'));
$this->editInfoObject();
return false;
}
$this->setSubTabs('properties');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_info_settings');
include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
$c_gui = new ilConfirmationGUI();
// set confirm/cancel commands
$c_gui->setFormAction($this->ctrl->getFormAction($this, "deleteInfoFiles"));
$c_gui->setHeaderText($this->lng->txt("info_delete_sure"));
$c_gui->setCancel($this->lng->txt("cancel"), "editInfo");
$c_gui->setConfirm($this->lng->txt("confirm"), "deleteInfoFiles");
// add items to delete
include_once('Modules/Course/classes/class.ilCourseFile.php');
foreach($_POST["file_id"] as $file_id)
{
$file = new ilCourseFile($file_id);
$c_gui->addItem("file_id[]", $file_id, $file->getFileName());
}
$this->tpl->setContent($c_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjCourseGUI::confirmLPSync ( )
protected

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

References ilObjectGUI\$tpl.

Referenced by updateObject().

{
global $tpl;
include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($this->ctrl->getFormAction($this, "setLPSync"));
$cgui->setHeaderText($this->lng->txt("crs_status_determination_sync"));
$cgui->setCancel($this->lng->txt("cancel"), "edit");
$cgui->setConfirm($this->lng->txt("confirm"), "setLPSync");
$tpl->setContent($cgui->getHTML());
}

+ Here is the caller graph for this function:

ilObjCourseGUI::createMailSignature ( )
protected

Create a course mail signature.

Returns

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

References ilLink\_getLink().

Referenced by infoScreen(), mailMembersObject(), and sendMailToSelectedUsersObject().

{
$link = chr(13).chr(10).chr(13).chr(10);
$link .= $this->lng->txt('crs_mail_permanent_link');
$link .= chr(13).chr(10).chr(13).chr(10);
include_once './Services/Link/classes/class.ilLink.php';
$link .= ilLink::_getLink($this->object->getRefId());
return rawurlencode(base64_encode($link));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::deleteInfoFilesObject ( )

Delete info files.

public

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

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

{
if(!count($_POST['file_id']))
{
ilUtil::sendFailure($this->lng->txt('select_one'));
$this->editInfoObject();
return false;
}
include_once('Modules/Course/classes/class.ilCourseFile.php');
foreach($_POST['file_id'] as $file_id)
{
$file = new ilCourseFile($file_id);
if($this->object->getId() == $file->getCourseId())
{
$file->delete();
}
}
ilUtil::sendSuccess($this->lng->txt('settings_saved'));
$this->editInfoObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::deleteMembersObject ( )

Delete members ilAccessHandler $ilAccess.

Returns

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

References $_POST, $ilUser, $usr_id, ilCourseParticipants\_getInstanceByObjId(), ilCourseParticipant\_getInstanceByObjId(), ilObjUser\_lookupName(), ilObjectGUI\checkPermission(), ilUtil\getImagePath(), membersObject(), ilUtil\sendFailure(), and setSubTabs().

Referenced by memberGatewayObject().

{
global $ilAccess, $ilUser;
$this->checkPermission('write');
$participants = array_merge((array) $_POST['admins'],(array) $_POST['tutors'], (array) $_POST['members'], (array) $_POST['roles']);
if(!$participants)
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return true;
}
// Check last admin
if(!$this->object->getMemberObject()->checkLastAdmin($participants))
{
ilUtil::sendFailure($this->lng->txt('crs_at_least_one_admin'));
$this->membersObject();
return false;
}
// Access check for admin deletion
if(
!$ilAccess->checkAccess('edit_permission', '',$this->object->getRefId()) and
!ilCourseParticipants::_getInstanceByObjId($this->object->getId())->isAdmin($ilUser->getId())
)
{
foreach ($participants as $usr_id)
{
$part = ilCourseParticipant::_getInstanceByObjId($this->object->getId(),$usr_id);
if($part->isAdmin())
{
ilUtil::sendFailure($this->lng->txt("msg_no_perm_perm"));
$this->membersObject();
return false;
}
}
}
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_member_administration');
include_once('./Services/Utilities/classes/class.ilConfirmationGUI.php');
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($this->ctrl->getFormAction($this,'deleteMembers'));
$confirm->setHeaderText($this->lng->txt('crs_header_delete_members'));
$confirm->setConfirm($this->lng->txt('confirm'),'removeMembers');
$confirm->setCancel($this->lng->txt('cancel'),'members');
foreach($participants as $usr_id)
{
$name = ilObjUser::_lookupName($usr_id);
$confirm->addItem('participants[]',
$name['user_id'],
$name['lastname'].', '.$name['firstname'].' ['.$name['login'].']',
ilUtil::getImagePath('icon_usr.png'));
}
$this->tpl->setContent($confirm->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::deleteStarterObject ( )

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

References $_POST, ilObjectGUI\checkPermission(), ilCourseStart\delete(), listStructureObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
$this->checkPermission('write');
if(!count($_POST['starter']))
{
ilUtil::sendFailure($this->lng->txt('select_one'));
}
else
{
include_once './Modules/Course/classes/class.ilCourseStart.php';
$crs_start = new ilCourseStart($this->object->getRefId(),$this->object->getId());
foreach($_POST['starter'] as $starter_id)
{
$crs_start->delete((int)$starter_id);
}
ilUtil::sendSuccess($this->lng->txt('crs_starter_deleted'));
}
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::deleteSubscribers ( )

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

References $_POST, $_SESSION, __showDeleteSubscriberTable(), ilObjectGUI\checkPermission(), ilDatePresentation\formatDate(), ilObjectFactory\getInstanceByObjId(), IL_CAL_UNIX, membersObject(), ilUtil\sendFailure(), and ilUtil\sendQuestion().

Referenced by gatewayObject().

{
global $rbacsystem;
$this->tabs_gui->setTabActive('members');
// MINIMUM ACCESS LEVEL = 'administrate'
$this->checkPermission('write');
/*
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
*/
if(!is_array($_POST["subscriber"]) or !count($_POST["subscriber"]))
{
ilUtil::sendFailure($this->lng->txt("crs_no_subscribers_selected"));
$this->membersObject();
return false;
}
ilUtil::sendQuestion($this->lng->txt("crs_delete_subscribers_sure"));
// SHOW DELETE SCREEN
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_editMembers.html",'Modules/Course');
// SAVE IDS IN SESSION
$_SESSION["crs_delete_subscriber_ids"] = $_POST["subscriber"];
$counter = 0;
$f_result = array();
foreach($_POST["subscriber"] as $member_id)
{
$member_data = $this->object->getMembersObject()->getSubscriberData($member_id);
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
$f_result[$counter][] = ilDatePresentation::formatDate(new ilDateTime($member_data['time']),IL_CAL_UNIX);
unset($tmp_obj);
++$counter;
}
}
return $this->__showDeleteSubscriberTable($f_result);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::deliverCertificateObject ( )

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

References $_REQUEST, $ilUser, ilCourseParticipants\getDateTimeOfPassed(), ilCertificate\isActive(), ilCertificate\isObjectActive(), and ilUtil\sendFailure().

{
global $ilUser, $ilAccess;
$user_id = null;
if ($ilAccess->checkAccess('write','',$this->ref_id))
{
$user_id = $_REQUEST["member_id"];
}
if(!$user_id)
{
$user_id = $ilUser->getId();
}
include_once "Services/Certificate/classes/class.ilCertificate.php";
!ilCertificate::isObjectActive($this->object->getId()) ||
!ilCourseParticipants::getDateTimeOfPassed($this->object->getId(), $user_id))
{
ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
$this->ctrl->redirect($this);
}
include_once "./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
$certificate = new ilCertificate(new ilCourseCertificateAdapter($this->object));
$certificate->outCertificate(array("user_id" => $user_id), true);
}

+ Here is the call graph for this function:

ilObjCourseGUI::downloadArchivesObject ( )

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

References $_POST, ilObjectGUI\checkPermission(), ilUtil\deliverFile(), and ilUtil\sendFailure().

{
global $rbacsystem;
$_POST["archives"] = $_POST["archives"] ? $_POST["archives"] : array();
// MINIMUM ACCESS LEVEL = 'write'
$this->checkPermission('read');
/*
if(!$rbacsystem->checkAccess("read", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
*/
if(!count($_POST['archives']))
{
ilUtil::sendFailure($this->lng->txt('crs_no_archive_selected'));
$this->archiveObject();
return false;
}
if(count($_POST['archives']) > 1)
{
ilUtil::sendFailure($this->lng->txt('crs_select_one_archive'));
$this->archiveObject();
return false;
}
$this->object->initCourseArchiveObject();
$abs_path = $this->object->archives_obj->getArchiveFile((int) $_POST['archives'][0]);
$basename = basename($abs_path);
ilUtil::deliverFile($abs_path,$basename);
}

+ Here is the call graph for this function:

ilObjCourseGUI::editCourseIconsObject (   $a_form = null)

edit container icons

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

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), initCourseIconsForm(), and setSubTabs().

Referenced by updateCourseIconsObject().

{
global $tpl;
$this->checkPermission('write');
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
if(!$a_form)
{
$a_form = $this->initCourseIconsForm();
}
$tpl->setContent($a_form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::editInfoObject ( )

Edit info page informations.

public

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

References $file, $ilErr, ilCourseFile\_readFilesByCourse(), ilObjectGUI\checkPermission(), initInfoEditor(), and setSubTabs().

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

{
include_once 'Modules/Course/classes/class.ilCourseFile.php';
global $ilErr,$ilAccess;
$this->checkPermission('write');
/*
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
}
*/
$this->setSubTabs('properties');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_info_settings');
$form = $this->initInfoEditor();
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.edit_info.html','Modules/Course');
$this->tpl->setVariable('INFO_TABLE',$form->getHTML());
if(!count($files = ilCourseFile::_readFilesByCourse($this->object->getId())))
{
return true;
}
$rows = array();
foreach($files as $file)
{
$table_data['id'] = $file->getFileId();
$table_data['filename'] = $file->getFileName();
$table_data['filetype'] = $file->getFileType();
$table_data['filesize'] = $file->getFileSize();
$rows[] = $table_data;
}
include_once("./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
$table_gui = new ilCourseInfoFileTableGUI($this, "edit");
$table_gui->setTitle($this->lng->txt("crs_info_download"));
$table_gui->setData($rows);
$table_gui->addCommandButton("cancel", $this->lng->txt("cancel"));
$table_gui->addMultiCommand("confirmDeleteInfoFiles", $this->lng->txt("delete"));
$table_gui->setSelectAllCheckbox("file_id");
$this->tpl->setVariable('INFO_FILE_TABLE',$table_gui->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::editMapSettingsObject ( )

Edit Map Settings.

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

References $ilCtrl, $ilUser, ilGoogleMapUtil\getDefaultSettings(), ilGoogleMapUtil\isActivated(), ilLocationInputGUI\setLatitude(), setSubTabs(), and ilCheckboxInputGUI\setValue().

{
global $ilUser, $ilCtrl, $ilUser, $ilAccess;
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
return;
}
$latitude = $this->object->getLatitude();
$longitude = $this->object->getLongitude();
$zoom = $this->object->getLocationZoom();
// Get Default settings, when nothing is set
if ($latitude == 0 && $longitude == 0 && $zoom == 0)
{
$latitude = $def["latitude"];
$longitude = $def["longitude"];
$zoom = $def["zoom"];
}
//$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.png"), $this->lng->txt("personal_desktop"));
//$this->tpl->setVariable("HEADER", $this->lng->txt("personal_desktop"));
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($this->lng->txt("crs_map_settings"));
// enable map
$public = new ilCheckboxInputGUI($this->lng->txt("crs_enable_map"),
"enable_map");
$public->setValue("1");
$public->setChecked($this->object->getEnableCourseMap());
$form->addItem($public);
// map location
$loc_prop = new ilLocationInputGUI($this->lng->txt("crs_map_location"),
"location");
$loc_prop->setLatitude($latitude);
$loc_prop->setLongitude($longitude);
$loc_prop->setZoom($zoom);
$form->addItem($loc_prop);
$form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
//$this->tpl->show();
}

+ Here is the call graph for this function:

ilObjCourseGUI::editMemberObject ( )

edit member

public

Parameters
@return

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

References $_GET, $_POST, and editMembersObject().

{
$_POST['members'] = array((int) $_GET['member_id']);
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::editMembersObject ( )

edit members

public

Returns

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

References $_POST, ilCourseParticipants\_getInstanceByObjId(), ilObjectGUI\checkPermission(), membersObject(), readMemberData(), ilUtil\sendFailure(), and setSubTabs().

Referenced by editMemberObject(), and updateMembersObject().

{
$this->checkPermission('write');
$post_participants = array_unique(array_merge((array) $_POST['admins'],(array) $_POST['tutors'],(array) $_POST['members'], (array) $_POST['roles']));
$real_participants = ilCourseParticipants::_getInstanceByObjId($this->object->getId())->getParticipants();
$participants = array_intersect((array) $post_participants, (array) $real_participants);
if(!count($participants))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_member_administration');
include_once('./Modules/Course/classes/class.ilCourseEditParticipantsTableGUI.php');
$table_gui = new ilCourseEditParticipantsTableGUI($this);
$table_gui->setTitle($this->lng->txt('crs_header_edit_members'),'icon_usr.png',$this->lng->txt('crs_header_edit_members'));
$table_gui->setData($this->readMemberData($participants));
$this->tpl->setContent($table_gui->getHTML());
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::editObject ( )

edit object

public

Returns

Reimplemented from ilObjectGUI.

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

References setSubTabs().

Referenced by updateObject().

{
$this->setSubTabs('properties');
$this->tabs_gui->setSubTabActive('crs_settings');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::executeCommand ( )

execute command note: this method is overwritten in all container objects

Reimplemented from ilContainerGUI.

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

References $_GET, $cmd, $GLOBALS, $ilCtrl, $ilErr, $ilUser, $ret, ilCourseParticipants\_getInstanceByObjId(), ilCourseParticipant\_getInstanceByObjId(), ilObjCourse\_isActivated(), ilParticipants\_isParticipant(), ilObjCourse\_registrationEnabled(), ilPaymentObject\_requiresPurchaseToAccess(), ilObjectGUI\addHeaderAction(), ilMDEditorGUI\addObserver(), ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, checkLicenses(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilCourseConstants\CRS_ADMIN, ilCourseConstants\CRS_MEMBER, ilCourseConstants\CRS_TUTOR, ilContainerGUI\forwardToPageObject(), ilContainerGUI\forwardToStyleSheet(), forwardToTimingsView(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), infoScreenObject(), LIC_MODE_REPOSITORY, ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, prepareOutput(), setSubTabs(), ilContainerGUI\showRepTree(), and viewObject().

{
global $rbacsystem,$ilUser,$ilAccess,$ilErr,$ilTabs,$ilNavigationHistory,$ilCtrl;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
// show repository tree
$this->showRepTree(true);
// add entry to navigation history
if(!$this->getCreationMode() &&
$ilAccess->checkAccess('read', '', $_GET['ref_id']))
{
$link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", "frameset");
$ilNavigationHistory->addItem($_GET['ref_id'],
$link, 'crs');
}
if(!$this->getCreationMode())
{
if(IS_PAYMENT_ENABLED)
{
include_once 'Services/Payment/classes/class.ilPaymentObject.php';
if(ilPaymentObject::_requiresPurchaseToAccess($this->object->getRefId(), $type = (isset($_GET['purchasetype']) ? $_GET['purchasetype'] : NULL) ))
{
$ilTabs->setTabActive('info_short');
include_once 'Services/Payment/classes/class.ilShopPurchaseGUI.php';
$this->ctrl->setReturn($this, '');
$pp_gui = new ilShopPurchaseGUI($this->object->getRefId());
$this->ctrl->forwardCommand($pp_gui);
return true;
}
}
}
switch($next_class)
{
case "ilinfoscreengui":
$this->infoScreen(); // forwards command
break;
case 'ilmdeditorgui':
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('permission_denied'),$ilErr->WARNING);
}
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
$this->tabs_gui->setTabActive('meta_data');
break;
case 'ilcourseregistrationgui':
$this->ctrl->setReturn($this,'');
$this->tabs_gui->setTabActive('join');
include_once('./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
$registration = new ilCourseRegistrationGUI($this->object);
$this->ctrl->forwardCommand($registration);
break;
case 'ilobjectcustomuserfieldsgui':
include_once './Services/Membership/classes/class.ilObjectCustomUserFieldsGUI.php';
$cdf_gui = new ilObjectCustomUserFieldsGUI($this->object->getId());
$this->setSubTabs('properties');
$this->tabs_gui->setTabActive('settings');
$this->ctrl->forwardCommand($cdf_gui);
break;
case "ilcourseobjectivesgui":
include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
$this->ctrl->setReturn($this,"");
$reg_gui =& new ilCourseObjectivesGUI($this->object->getRefId());
$ret =& $this->ctrl->forwardCommand($reg_gui);
break;
case 'ilobjcoursegroupinggui':
include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
$this->ctrl->setReturn($this,'edit');
$this->setSubTabs('properties');
$crs_grp_gui =& new ilObjCourseGroupingGUI($this->object,(int) $_GET['obj_id']);
$this->ctrl->forwardCommand($crs_grp_gui);
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('groupings');
break;
case "ilcolumngui":
$this->tabs_gui->setTabActive('none');
$this->checkPermission("read");
//$this->prepareOutput();
//include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
//$this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
// ilObjStyleSheet::getContentStylePath(0));
//$this->renderObject();
$this->viewObject();
break;
case "ilconditionhandlerinterface":
include_once './Services/AccessControl/classes/class.ilConditionHandlerInterface.php';
// preconditions for whole course
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
$new_gui =& new ilConditionHandlerInterface($this);
$this->ctrl->forwardCommand($new_gui);
break;
case "illearningprogressgui":
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$this->object->getRefId(),
$_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
$this->ctrl->forwardCommand($new_gui);
$this->tabs_gui->setTabActive('learning_progress');
break;
case 'illicenseoverviewgui':
include_once("./Services/License/classes/class.ilLicenseOverviewGUI.php");
$license_gui =& new ilLicenseOverviewGUI($this, LIC_MODE_REPOSITORY);
$ret =& $this->ctrl->forwardCommand($license_gui);
$this->tabs_gui->setTabActive('licenses');
break;
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$this->tabs_gui->setTabActive('perm_settings');
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilrepositorysearchgui':
include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
$rep_search =& new ilRepositorySearchGUI();
if(ilCourseParticipant::_getInstanceByObjId($this->object->getId(), $GLOBALS['ilUser']->getId())->isAdmin() or $this->checkPermissionBool('edit_permission'))
{
$rep_search->setCallback($this,
'assignMembersObject',
array(
ilCourseConstants::CRS_MEMBER => $this->lng->txt('crs_member'),
ilCourseConstants::CRS_TUTOR => $this->lng->txt('crs_tutor'),
ilCourseConstants::CRS_ADMIN => $this->lng->txt('crs_admin')
)
);
}
else
{
$rep_search->setCallback($this,
'assignMembersObject',
array(
ilCourseConstants::CRS_MEMBER => $this->lng->txt('crs_member'),
ilCourseConstants::CRS_TUTOR => $this->lng->txt('crs_tutor'),
)
);
}
$this->checkLicenses();
// Set tabs
$this->ctrl->setReturn($this,'members');
$ret =& $this->ctrl->forwardCommand($rep_search);
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_member_administration');
break;
case 'ilcoursecontentinterface':
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->ctrl->forwardCommand($this->cci_obj);
$this->setSubTabs('content');
$this->tabs_gui->setTabActive('content');
break;
case 'ilcoursecontentgui':
$this->ctrl->setReturn($this,'members');
include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
$course_content_obj = new ilCourseContentGUI($this);
$this->ctrl->forwardCommand($course_content_obj);
break;
case 'ilpublicuserprofilegui':
$this->tpl->enableDragDropFileUpload(null);
require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
$profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$profile_gui->setBackUrl($ilCtrl->getLinkTarget($this, "membersGallery"));
$this->tabs_gui->setSubTabActive('crs_members_gallery');
$html = $this->ctrl->forwardCommand($profile_gui);
$this->tpl->setVariable("ADM_CONTENT", $html);
break;
case 'ilmemberexportgui':
include_once('./Services/Membership/classes/Export/class.ilMemberExportGUI.php');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('export_members');
$export = new ilMemberExportGUI($this->object->getRefId());
$this->ctrl->forwardCommand($export);
break;
case 'ilmemberagreementgui':
include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
$this->tabs_gui->clearTargets();
$this->ctrl->setReturn($this,'');
$agreement = new ilMemberAgreementGUI($this->object->getRefId());
$this->ctrl->forwardCommand($agreement);
break;
case 'ilsessionoverviewgui':
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('events');
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
$prt = ilCourseParticipants::_getInstanceByObjId($this->object->getId());
include_once('./Modules/Session/classes/class.ilSessionOverviewGUI.php');
$overview = new ilSessionOverviewGUI($this->object->getRefId(), $prt);
$this->ctrl->forwardCommand($overview);
break;
// container page editing
case "ilcontainerpagegui":
$ret = $this->forwardToPageObject();
if ($ret != "")
{
$this->tpl->setContent($ret);
}
break;
case 'ilobjectcopygui':
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('crs');
$this->ctrl->forwardCommand($cp);
break;
case "ilobjstylesheetgui":
break;
case 'ilcourseparticipantsgroupsgui':
include_once './Modules/Course/classes/class.ilCourseParticipantsGroupsGUI.php';
$cmg_gui = new ilCourseParticipantsGroupsGUI($this->object->getRefId());
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->ctrl->forwardCommand($cmg_gui);
break;
case 'ilexportgui':
$this->tabs_gui->setTabActive('export');
include_once './Services/Export/classes/class.ilExportGUI.php';
$exp = new ilExportGUI($this);
$exp->addFormat('xml');
$this->ctrl->forwardCommand($exp);
break;
case "ilcommonactiondispatchergui":
include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
$this->ctrl->forwardCommand($gui);
break;
case 'ildidactictemplategui':
$this->ctrl->setReturn($this,'edit');
include_once './Services/DidacticTemplate/classes/class.ilDidacticTemplateGUI.php';
$did = new ilDidacticTemplateGUI($this);
$this->ctrl->forwardCommand($did);
break;
case "ilcertificategui":
$this->tabs_gui->activateTab("settings");
$this->setSubTabs("properties");
include_once "./Services/Certificate/classes/class.ilCertificateGUI.php";
include_once "./Modules/Course/classes/class.ilCourseCertificateAdapter.php";
$output_gui = new ilCertificateGUI(new ilCourseCertificateAdapter($this->object));
$this->ctrl->forwardCommand($output_gui);
break;
case 'ilobjectservicesettingsgui':
$this->ctrl->setReturn($this,'edit');
$this->setSubTabs("properties");
$this->tabs_gui->activateTab('settings');
$this->tabs_gui->activateSubTab('tool_settings');
include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
$this,
$this->object->getId(),
array(
));
$this->ctrl->forwardCommand($service);
break;
default:
/* if(!$this->creation_mode)
{
$this->checkPermission('visible');
}*/
/*
if(!$this->creation_mode and !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'crs'))
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
}
*/
// #9401 - see also ilStartupGUI::_checkGoto()
if($cmd == 'infoScreenGoto')
{
if(ilObjCourse::_isActivated($this->object->getId()) &&
ilObjCourse::_registrationEnabled($this->object->getId()))
{
$cmd = 'join';
}
else
{
$cmd = 'infoScreen';
}
}
if(!$this->creation_mode)
{
if ($cmd == "infoScreen")
{
$this->checkPermission("visible");
}
else
{
// $this->checkPermission("read");
}
}
if( !$this->creation_mode
&& $cmd != 'infoScreen'
&& $cmd != 'sendfile'
&& $cmd != 'unsubscribe'
&& $cmd != 'performUnsubscribe'
&& !$ilAccess->checkAccess("read",'',$this->object->getRefId())
|| $cmd == 'join'
|| $cmd == 'subscribe')
{
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
if($rbacsystem->checkAccess('join',$this->object->getRefId()) &&
!ilCourseParticipants::_isParticipant($this->object->getRefId(),$ilUser->getId()))
{
include_once('./Modules/Course/classes/class.ilCourseRegistrationGUI.php');
$this->ctrl->redirectByClass("ilCourseRegistrationGUI");
}
else
{
$this->infoScreenObject();
break;
}
}
if($cmd == 'listObjectives')
{
include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
$this->ctrl->setReturn($this,"");
$obj_gui =& new ilCourseObjectivesGUI($this->object->getRefId());
$ret =& $this->ctrl->forwardCommand($obj_gui);
break;
}
// Dirty hack for course timings view
if($this->forwardToTimingsView())
{
break;
}
if(!$cmd)
{
$cmd = 'view';
}
$cmd .= 'Object';
$this->$cmd();
break;
}
$this->addHeaderAction();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::fetchPrintMemberData (   $a_members)

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

References $_SESSION, $failed, ilObjectGUI\$lng, ilPrivacySettings\_getInstance(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilLearningProgress\_lookupProgressByObjId(), ilDatePresentation\formatDate(), ilObjectFactory\getInstanceByObjId(), IL_CAL_UNIX, ilLPStatus\LP_STATUS_COMPLETED, ilLPStatus\LP_STATUS_FAILED, ilLPStatus\LP_STATUS_IN_PROGRESS, ilLPStatus\LP_STATUS_NOT_ATTEMPTED, ilDatePresentation\setUseRelativeDates(), and ilUtil\sortArray().

Referenced by printMembersOutputObject().

{
global $ilAccess,$lng;
$lng->loadLanguageModule('trac');
#$is_admin = (bool) $ilAccess->checkAccess("write",'',$this->object->getRefId());
$is_admin = true;
include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
if($privacy->enabledCourseAccessTimes())
{
include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
$progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
}
if($this->show_tracking)
{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
$completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
$in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
}
foreach($a_members as $member_id)
{
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$print_member[$member_id]['login'] = $tmp_obj->getLogin();
$print_member[$member_id]['name'] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname();
if($this->object->getMembersObject()->isAdmin($member_id))
{
$print_member[$member_id]['role'] = $this->lng->txt("il_crs_admin");
}
elseif($this->object->getMembersObject()->isTutor($member_id))
{
$print_member[$member_id]['role'] = $this->lng->txt("il_crs_tutor");
}
elseif($this->object->getMembersObject()->isMember($member_id))
{
$print_member[$member_id]['role'] = $this->lng->txt("il_crs_member");
}
if($this->object->getMembersObject()->isAdmin($member_id) or $this->object->getMembersObject()->isTutor($member_id))
{
if($this->object->getMembersObject()->isNotificationEnabled($member_id))
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_notify");
}
else
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_no_notify");
}
}
else
{
if($this->object->getMembersObject()->isBlocked($member_id))
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_blocked");
}
else
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_unblocked");
}
}
if($is_admin)
{
$print_member[$member_id]['passed'] = $this->object->getMembersObject()->hasPassed($member_id) ?
$this->lng->txt('crs_member_passed') :
$this->lng->txt('crs_member_not_passed');
}
if($privacy->enabledCourseAccessTimes())
{
if(isset($progress[$member_id]['ts']) and $progress[$member_id]['ts'])
{
$print_member[$member_id]['access'] = ilDatePresentation::formatDate(new ilDateTime($progress[$member_id]['ts'],IL_CAL_UNIX));
}
else
{
$print_member[$member_id]['access'] = $this->lng->txt('no_date');
}
}
if($this->show_tracking)
{
if(in_array($member_id,$completed))
{
$print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_COMPLETED);
}
elseif(in_array($member_id,$in_progress))
{
$print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_IN_PROGRESS);
}
elseif(in_array($member_id,$failed))
{
$print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_FAILED);
}
else
{
$print_member[$member_id]['progress'] = $this->lng->txt(ilLPStatus::LP_STATUS_NOT_ATTEMPTED);
}
}
}
}
switch($_SESSION['crs_print_sort'])
{
case 'progress':
return ilUtil::sortArray($print_member,'progress',$_SESSION['crs_print_order'], false, true);
case 'access_time':
return ilUtil::sortArray($print_member,'access',$_SESSION['crs_print_order'], false, true);
case 'lastname':
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order'], false, true);
case 'login':
return ilUtil::sortArray($print_member,'login',$_SESSION['crs_print_order'], false, true);
case 'passed':
return ilUtil::sortArray($print_member,'passed',$_SESSION['crs_print_order'], false, true);
case 'blocked':
case 'notification':
return ilUtil::sortArray($print_member,'status',$_SESSION['crs_print_order'], false, true);
default:
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order'], false, true);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::fetchPrintSubscriberData (   $a_members)

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

References $_SESSION, ilDatePresentation\formatDate(), ilObjectFactory\getInstanceByObjId(), IL_CAL_UNIX, and ilUtil\sortArray().

{
foreach($a_members as $member_id)
{
$member_data = $this->object->getMembersObject()->getSubscriberData($member_id);
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$print_member[$member_id]['login'] = $tmp_obj->getLogin();
$print_member[$member_id]['name'] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname();
$print_member[$member_id]['time'] = ilDatePresentation::formatDate(new ilDateTime($member_data['time'],IL_CAL_UNIX));
}
}
switch($_SESSION['crs_print_sort'])
{
case 'lastname':
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order'], false, true);
case 'login':
return ilUtil::sortArray($print_member,'login',$_SESSION['crs_print_order'], false, true);
case 'sub_time':
return ilUtil::sortArray($print_member,'time',$_SESSION['crs_print_order'], false, true);
default:
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order'], false, true);
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::forwardToTimingsView ( )
protected
Parameters
@return

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

References $_SESSION, and ilContainer\VIEW_TIMING.

Referenced by executeCommand().

{
if(!$this->ctrl->getCmd() and $this->object->getViewMode() == ilContainer::VIEW_TIMING)
{
if(!isset($_SESSION['crs_timings'])) {
$_SESSION['crs_timings'] = true;
}
if($_SESSION['crs_timings'] == true) {
include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
$course_content_obj = new ilCourseContentGUI($this);
$this->ctrl->setCmdClass(get_class($course_content_obj));
$this->ctrl->setCmd('editUserTimings');
$this->ctrl->forwardCommand($course_content_obj);
return true;
}
}
$_SESSION['crs_timings'] = false;
return false;
}

+ Here is the caller graph for this function:

ilObjCourseGUI::gatewayObject ( )

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

References $_POST, deleteSubscribers(), removeFromWaitingList(), and viewObject().

{
switch($_POST["action"])
{
case "deleteSubscribers":
break;
case "addSubscribers":
$this->addSubscribers();
break;
case "addFromWaitingList":
$this->addFromWaitingList();
break;
case "removeFromWaitingList":
break;
default:
$this->viewObject();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::getAgreementTabs ( )
protected

Get tabs for member agreement.

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

References $GLOBALS.

{
if ($ilAccess->checkAccess('visible','',$this->ref_id))
{
$GLOBALS['ilTabs']->addTarget("info_short",
$this->ctrl->getLinkTargetByClass(
array("ilobjcoursegui", "ilinfoscreengui"), "showSummary"),
"infoScreen"
);
}
if($ilAccess->checkAccess('leave','',$this->object->getRefId()) and $this->object->getMemberObject()->isMember())
{
$GLOBALS['ilTabs']->addTarget("crs_unsubscribe",
$this->ctrl->getLinkTarget($this, "unsubscribe"),
'leave',
"");
}
}
ilObjCourseGUI::getAttendanceListUserData (   $a_user_id)

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

{
return $this->members_data[$a_user_id];
}
ilObjCourseGUI::getEditFormValues ( )
protected

Get values for edit form.

Returns
array

Reimplemented from ilContainerGUI.

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

{
// values are done in initEditForm()
}
ilObjCourseGUI::getTabs ( $tabs_gui)

Get tabs.

Reimplemented from ilContainerGUI.

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

References $_GET, $GLOBALS, $ilUser, ilObjectGUI\$lng, ilCourseObjective\_getCountObjectives(), ilLicenseAccess\_isEnabled(), ilWaitingList\_isOnList(), ilParticipants\_isParticipant(), ilLearningProgressAccess\checkAccess(), IL_CRS_VIEW_OBJECTIVE, and ilCourseConstants\MAIL_ALLOWED_ALL.

{
global $rbacsystem,$ilAccess,$ilUser, $lng, $ilHelp;
$ilHelp->setScreenIdComponent("crs");
$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
if($ilAccess->checkAccess('read','',$this->ref_id))
{
$tabs_gui->addTab('view_content', $lng->txt("content"),
$this->ctrl->getLinkTarget($this,''));
}
if ($ilAccess->checkAccess('visible','',$this->ref_id))
{
//$next_class = $this->ctrl->getNextClass($this);
// this is not nice. tabs should be displayed in ilcoursegui
// not via ilrepositorygui, then next_class == ilinfoscreengui
// could be checked
$force_active = (strtolower($_GET["cmdClass"]) == "ilinfoscreengui"
|| strtolower($_GET["cmdClass"]) == "ilnotegui")
? true
: false;
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTargetByClass(
array("ilobjcoursegui", "ilinfoscreengui"), "showSummary"),
"infoScreen",
"", "", $force_active);
}
if ($ilAccess->checkAccess('write','',$this->ref_id))
{
$force_active = (strtolower($_GET["cmdClass"]) == "ilconditionhandlerinterface"
&& $_GET["item_id"] == "")
? true
: false;
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "edit"),
array("edit", "editMapSettings", "editCourseIcons", "listStructure"), "", "", $force_active);
}
$is_participant = ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId());
include_once './Services/Mail/classes/class.ilMail.php';
$mail = new ilMail($GLOBALS['ilUser']->getId());
// member list
if($ilAccess->checkAccess('write','',$this->ref_id))
{
$tabs_gui->addTarget("members",
$this->ctrl->getLinkTarget($this, "members"),
"members",
get_class($this));
}
elseif(
$this->object->getShowMembers() == $this->object->SHOW_MEMBERS_ENABLED and
$is_participant
)
{
$tabs_gui->addTarget("members",
$this->ctrl->getLinkTarget($this, "membersGallery"),
"members",
get_class($this));
}
elseif(
$this->object->getMailToMembersType() == ilCourseConstants::MAIL_ALLOWED_ALL and
$GLOBALS['rbacsystem']->checkAccess('internal_mail',$mail->getMailObjectReferenceId ()) and
$is_participant
)
{
$tabs_gui->addTarget("members",
$this->ctrl->getLinkTarget($this, "mailMembers"),
"members",
get_class($this));
}
// learning progress
include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
if(ilLearningProgressAccess::checkAccess($this->object->getRefId(), $is_participant))
{
$tabs_gui->addTarget('learning_progress',
$this->ctrl->getLinkTargetByClass(array('ilobjcoursegui','illearningprogressgui'),''),
'',
array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
}
// learning objectives
if($ilAccess->checkAccess('write','',$this->ref_id))
{
include_once('./Modules/Course/classes/class.ilCourseObjective.php');
if($this->object->getViewMode() == IL_CRS_VIEW_OBJECTIVE or ilCourseObjective::_getCountObjectives($this->object->getId()))
{
$force_active = (strtolower($_GET["cmdClass"]) == "ilcourseobjectivesgui")
? true
: false;
$tabs_gui->addTarget("crs_objectives",
$this->ctrl->getLinkTarget($this,"listObjectives"),
"listObjectives",
get_class($this), "", $force_active);
}
}
// license overview
include_once("Services/License/classes/class.ilLicenseAccess.php");
if ($ilAccess->checkAccess('edit_permission', '', $this->ref_id)
{
$tabs_gui->addTarget("licenses",
$this->ctrl->getLinkTargetByClass('illicenseoverviewgui', ''),
"", "illicenseoverviewgui");
}
// lom meta data
if ($ilAccess->checkAccess('write','',$this->ref_id))
{
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass(array('ilobjcoursegui','ilmdeditorgui'),'listSection'),
"",
"ilmdeditorgui");
}
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$tabs_gui->addTarget(
'export',
$this->ctrl->getLinkTargetByClass('ilexportgui',''),
'export',
'ilexportgui'
);
}
if ($ilAccess->checkAccess('edit_permission','',$this->ref_id))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
array("perm","info","owner"), 'ilpermissiongui');
}
if ($this->ctrl->getTargetScript() == "adm_object.php")
{
$tabs_gui->addTarget("show_owner",
$this->ctrl->getLinkTarget($this, "owner"), "owner", get_class($this));
if ($this->tree->getSavedNodeData($this->ref_id))
{
$tabs_gui->addTarget("trash",
$this->ctrl->getLinkTarget($this, "trash"), "trash", get_class($this));
}
}
// Join/Leave
if($ilAccess->checkAccess('join','',$this->ref_id)
and !$this->object->getMemberObject()->isAssigned())
{
include_once './Modules/Course/classes/class.ilCourseWaitingList.php';
if(ilCourseWaitingList::_isOnList($ilUser->getId(), $this->object->getId()))
{
$tabs_gui->addTab(
'leave',
$this->lng->txt('membership_leave'),
$this->ctrl->getLinkTargetByClass('ilcourseregistrationgui','show','')
);
}
else
{
$tabs_gui->addTarget("join",
$this->ctrl->getLinkTargetByClass('ilcourseregistrationgui', "show"),
'show',
"");
}
}
if($ilAccess->checkAccess('leave','',$this->object->getRefId())
and $this->object->getMemberObject()->isMember())
{
$tabs_gui->addTarget("crs_unsubscribe",
$this->ctrl->getLinkTarget($this, "unsubscribe"),
'leave',
"");
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::ilObjCourseGUI ( )

Constructor public.

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

References $_GET, $ilCtrl, and ilContainerGUI\ilContainerGUI().

{
global $ilCtrl, $ilHelp;
// CONTROL OPTIONS
$this->ctrl =& $ilCtrl;
$this->ctrl->saveParameter($this,array("ref_id","cmdClass"));
$this->type = "crs";
$this->ilContainerGUI('',(int) $_GET['ref_id'],true,false);
$this->lng->loadLanguageModule('crs');
$this->SEARCH_USER = 1;
$this->SEARCH_GROUP = 2;
$this->SEARCH_COURSE = 3;
}

+ Here is the call graph for this function:

ilObjCourseGUI::infoScreen ( )

show information screen

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

References $_GET, $file, $ilErr, $ilSetting, $ilUser, ilObjectGUI\$tpl, ilCourseDefinedFieldDefinition\_fieldsToInfoString(), ilMDUtils\_fillHTMLMetaTags(), ilCourseDefinedFieldDefinition\_getFields(), ilPrivacySettings\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilCourseFile\_readFilesByCourse(), ilObjectGUI\checkPermission(), createMailSignature(), ilDatePresentation\formatDate(), ilDatePresentation\formatPeriod(), ilMailFormCall\getLinkTarget(), IL_CAL_UNIX, IL_CRS_ARCHIVE_NONE, IL_CRS_SUBSCRIPTION_CONFIRMATION, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_SUBSCRIPTION_PASSWORD, IL_CRS_VIEW_ARCHIVE, ilParticipants\lookupNumberOfMembers(), ilUtil\makeClickable(), ilAdvancedMDRecordGUI\MODE_INFO, and ilAdvancedMDRecordGUI\setInfoObject().

Referenced by executeCommand(), and infoScreenObject().

{
global $ilErr,$ilAccess, $ilUser, $ilSetting;
$this->checkPermission('visible');
// Fill meta header tags
include_once('Services/MetaData/classes/class.ilMDUtils.php');
ilMDUtils::_fillHTMLMetaTags($this->object->getId(),$this->object->getId(),'crs');
$this->tabs_gui->setTabActive('info_short');
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
include_once 'Modules/Course/classes/class.ilCourseFile.php';
$files =& ilCourseFile::_readFilesByCourse($this->object->getId());
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->enableFeedback();
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
$info->enableNewsEditing();
}
if(strlen($this->object->getImportantInformation()) or
strlen($this->object->getSyllabus()) or
count($files))
{
$info->addSection($this->lng->txt('crs_general_informations'));
}
if(strlen($this->object->getImportantInformation()))
{
$info->addProperty($this->lng->txt('crs_important_info'),
"<strong>".nl2br(
ilUtil::makeClickable($this->object->getImportantInformation(), true)."</strong>"));
}
if(strlen($this->object->getSyllabus()))
{
$info->addProperty($this->lng->txt('crs_syllabus'), nl2br(
ilUtil::makeClickable ($this->object->getSyllabus(), true)));
}
// files
if(count($files))
{
$tpl = new ilTemplate('tpl.event_info_file.html',true,true,'Modules/Course');
foreach($files as $file)
{
$tpl->setCurrentBlock("files");
$this->ctrl->setParameter($this,'file_id',$file->getFileId());
$tpl->setVariable("DOWN_LINK",$this->ctrl->getLinkTarget($this,'sendfile'));
$tpl->setVariable("DOWN_NAME",$file->getFileName());
$tpl->setVariable("DOWN_INFO_TXT",$this->lng->txt('crs_file_size_info'));
$tpl->setVariable("DOWN_SIZE",$file->getFileSize());
$tpl->setVariable("TXT_BYTES",$this->lng->txt('bytes'));
$tpl->parseCurrentBlock();
}
$info->addProperty($this->lng->txt('crs_file_download'),
$tpl->get());
}
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
$record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO,'crs',$this->object->getId());
$record_gui->setInfoObject($info);
$record_gui->parse();
// meta data
$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
// contact
if($this->object->hasContactData())
{
$info->addSection($this->lng->txt("crs_contact"));
}
if(strlen($this->object->getContactName()))
{
$info->addProperty($this->lng->txt("crs_contact_name"),
$this->object->getContactName());
}
if(strlen($this->object->getContactResponsibility()))
{
$info->addProperty($this->lng->txt("crs_contact_responsibility"),
$this->object->getContactResponsibility());
}
if(strlen($this->object->getContactPhone()))
{
$info->addProperty($this->lng->txt("crs_contact_phone"),
$this->object->getContactPhone());
}
if($this->object->getContactEmail())
{
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
$emails = split(",",$this->object->getContactEmail());
foreach ($emails as $email) {
$email = trim($email);
$etpl = new ilTemplate("tpl.crs_contact_email.html", true, true , 'Modules/Course');
$etpl->setVariable("EMAIL_LINK", ilMailFormCall::getLinkTarget($info, 'showSummary', array(),
array('type' => 'new', 'rcp_to' => $email,'sig' => $this->createMailSignature())));
$etpl->setVariable("CONTACT_EMAIL", $email);
$mailString .= $etpl->get()."<br />";
}
$info->addProperty($this->lng->txt("crs_contact_email"), $mailString);
}
if(strlen($this->object->getContactConsultation()))
{
$info->addProperty($this->lng->txt("crs_contact_consultation"),
nl2br($this->object->getContactConsultation()));
}
//
// access
//
// #10360
$this->lng->loadLanguageModule("rep");
$info->addSection($this->lng->txt("rep_activation_availability"));
$info->showLDAPRoleGroupMappingInfo();
// activation
if($this->object->getActivationUnlimitedStatus())
{
$info->addProperty($this->lng->txt("rep_activation_access"),
$this->lng->txt('crs_visibility_limitless'));
}
else
{
$info->addProperty($this->lng->txt('rep_activation_access'),
new ilDateTime($this->object->getActivationStart(),IL_CAL_UNIX),
new ilDateTime($this->object->getActivationEnd(),IL_CAL_UNIX)));
}
switch($this->object->getSubscriptionLimitationType())
{
$txt = $this->lng->txt("crs_info_reg_deactivated");
break;
default:
switch($this->object->getSubscriptionType())
{
$txt = $this->lng->txt("crs_info_reg_confirmation");
break;
$txt = $this->lng->txt("crs_info_reg_direct");
break;
$txt = $this->lng->txt("crs_info_reg_password");
break;
}
}
// subscription
$info->addProperty($this->lng->txt("crs_info_reg"),$txt);
if($this->object->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED)
{
if($this->object->getSubscriptionUnlimitedStatus())
{
$info->addProperty($this->lng->txt("crs_reg_until"),
$this->lng->txt('crs_unlimited'));
}
elseif($this->object->getSubscriptionStart() < time())
{
$info->addProperty($this->lng->txt("crs_reg_until"),
$this->lng->txt('crs_to').' '.
ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionEnd(),IL_CAL_UNIX)));
}
elseif($this->object->getSubscriptionStart() > time())
{
$info->addProperty($this->lng->txt("crs_reg_until"),
$this->lng->txt('crs_from').' '.
ilDatePresentation::formatDate(new ilDateTime($this->object->getSubscriptionStart(),IL_CAL_UNIX)));
}
if ($this->object->isSubscriptionMembershipLimited())
{
include_once './Services/Membership/classes/class.ilParticipants.php';
$info->addProperty(
$this->lng->txt("mem_free_places"),
max(
0,
$this->object->getSubscriptionMaxMembers() - ilParticipants::lookupNumberOfMembers($this->object->getRefId()))
);
}
}
// archive
if($this->object->getViewMode() == IL_CRS_VIEW_ARCHIVE)
{
if($this->object->getArchiveType() != IL_CRS_ARCHIVE_NONE)
{
$info->addProperty($this->lng->txt("crs_archive"),
new ilDateTime($this->object->getArchiveStart(),IL_CAL_UNIX),
new ilDateTime($this->object->getArchiveStart(),IL_CAL_UNIX)));
}
}
// Confirmation
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
if($privacy->courseConfirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledCourseExport())
{
include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
$field_info = ilExportFieldsInfo::_getInstanceByType($this->object->getType());
$this->lng->loadLanguageModule('ps');
$info->addSection($this->lng->txt('crs_user_agreement_info'));
$info->addProperty($this->lng->txt('ps_export_data'),$field_info->exportableFieldsToInfoString());
if($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId()))
{
$info->addProperty($this->lng->txt('ps_crs_user_fields'),$fields);
}
}
$info->enableLearningProgress(true);
// forward the command
$this->ctrl->forwardCommand($info);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 281 of file class.ilObjCourseGUI.php.

References infoScreen().

Referenced by executeCommand().

{
$this->ctrl->setCmd("showSummary");
$this->ctrl->setCmdClass("ilinfoscreengui");
$this->infoScreen();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::initAttendanceList ( )
protected

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

References ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilPrivacySettings\_getInstance(), ilCourseParticipants\_getInstanceByObjId(), and ilObjectLP\getInstance().

Referenced by printMembersObject(), and printMembersOutputObject().

{
include_once('./Modules/Course/classes/class.ilCourseParticipants.php');
$members_obj = ilCourseParticipants::_getInstanceByObjId($this->object->getId());
include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
$waiting_list = new ilCourseWaitingList($this->object->getId());
include_once 'Services/Membership/classes/class.ilAttendanceList.php';
$list = new ilAttendanceList($this, $members_obj, $waiting_list);
$list->setId('crsmemlst');
$list->setTitle($this->lng->txt('crs_members_print_title'),
$this->lng->txt('obj_crs').': '.$this->object->getTitle());
include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
$this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
ilObjUserTracking::_enabledUserRelatedData());
if($this->show_tracking)
{
include_once('./Services/Object/classes/class.ilObjectLP.php');
$olp = ilObjectLP::getInstance($this->object->getId());
$this->show_tracking = $olp->isActive();
}
if($this->show_tracking)
{
$list->addPreset('progress', $this->lng->txt('learning_progress'), true);
}
include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
if($privacy->enabledCourseAccessTimes())
{
$list->addPreset('access', $this->lng->txt('last_access'), true);
}
$list->addPreset('status', $this->lng->txt('crs_status'), true);
$list->addPreset('passed', $this->lng->txt('crs_passed'), true);
return $list;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::initCourseIconsForm ( )

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

References ilContainerGUI\showCustomIconsEditing().

Referenced by editCourseIconsObject(), and updateCourseIconsObject().

{
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$this->showCustomIconsEditing(1, $form);
// $form->setTitle($this->lng->txt('edit_grouping'));
$form->addCommandButton('updateCourseIcons', $this->lng->txt('save'));
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::initEditForm ( )
protected

init form

protected

Parameters
@return

Reimplemented from ilObjectGUI.

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

References $pass, $section, $sess, ilObjUserTracking\_enabledLearningProgress(), ilLink\_getLink(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, ilMembershipRegistrationCodeUtils\generateCode(), ilUtil\getImagePath(), ilObjectLP\getInstance(), IL_CAL_UNIX, IL_CRS_ACTIVATION_LIMITED, IL_CRS_SUBSCRIPTION_CONFIRMATION, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_SUBSCRIPTION_LIMITED, 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, ilObjectGUI\initDidacticTemplate(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilCourseConstants\MAIL_ALLOWED_ALL, ilCourseConstants\MAIL_ALLOWED_TUTORS, ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setInfo(), ilNumberInputGUI\setMinValue(), ilDateDurationInputGUI\setShowTime(), ilTextInputGUI\setSubmitFormOnEnter(), ilCheckboxInputGUI\setValue(), ilRadioGroupInputGUI\setValue(), ilRadioOption\setValue(), ilTextAreaInputGUI\setValue(), ilContainer\SORT_ACTIVATION, ilContainer\SORT_MANUAL, ilContainer\SORT_TITLE, ilObjCourse\STATUS_DETERMINATION_LP, ilObjCourse\STATUS_DETERMINATION_MANUAL, and ilObject\TITLE_LENGTH.

Referenced by updateObject().

{
include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
include_once('./Services/Calendar/classes/class.ilDateTime.php');
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt('crs_edit'));
$form->setTitleIcon(ilUtil::getImagePath('icon_crs_s.png'));
$form->addCommandButton('update',$this->lng->txt('save'));
$form->addCommandButton('cancel',$this->lng->txt('cancel'));
$form->setFormAction($this->ctrl->getFormAction($this,'update'));
// title
$title = new ilTextInputGUI($this->lng->txt('title'),'title');
$title->setSubmitFormOnEnter(true);
$title->setValue($this->object->getTitle());
$title->setSize(min(40, ilObject::TITLE_LENGTH));
$title->setMaxLength(ilObject::TITLE_LENGTH);
$title->setRequired(true);
$form->addItem($title);
// desc
$desc = new ilTextAreaInputGUI($this->lng->txt('description'),'desc');
$desc->setValue($this->object->getLongDescription());
$desc->setRows(2);
$desc->setCols(40);
$form->addItem($desc);
// Show didactic template type
$this->initDidacticTemplate($form);
// activation/availability
$this->lng->loadLanguageModule('rep');
$section->setTitle($this->lng->txt('rep_activation_availability'));
$form->addItem($section);
$online = new ilCheckboxInputGUI($this->lng->txt('rep_activation_online'),'activation_online');
$online->setChecked(!$this->object->getOfflineStatus());
$online->setInfo($this->lng->txt('crs_activation_online_info'));
$form->addItem($online);
$act_type = new ilCheckboxInputGUI($this->lng->txt('crs_visibility_until'), 'activation_type');
$act_type->setChecked($this->object->getActivationType() == IL_CRS_ACTIVATION_LIMITED);
// $act_type->setInfo($this->lng->txt('crs_availability_until_info'));
$this->tpl->addJavaScript('./Services/Form/js/date_duration.js');
include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
$dur = new ilDateDurationInputGUI($this->lng->txt('rep_time_period'), "access_period");
$dur->setShowTime(true);
$dur->setStart(new ilDateTime($this->object->getActivationStart(),IL_CAL_UNIX));
$dur->setStartText($this->lng->txt('rep_activation_limited_start'));
$dur->setEnd(new ilDateTime($this->object->getActivationEnd(),IL_CAL_UNIX));
$dur->setEndText($this->lng->txt('rep_activation_limited_end'));
$act_type->addSubItem($dur);
$visible = new ilCheckboxInputGUI($this->lng->txt('rep_activation_limited_visibility'), 'activation_visibility');
$visible->setInfo($this->lng->txt('crs_activation_limited_visibility_info'));
$visible->setChecked($this->object->getActivationVisibility());
$act_type->addSubItem($visible);
$form->addItem($act_type);
$section->setTitle($this->lng->txt('crs_reg'));
$form->addItem($section);
$reg_proc = new ilRadioGroupInputGUI($this->lng->txt('crs_registration_type'),'subscription_type');
$reg_proc->setValue(
($this->object->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED)
? $this->object->getSubscriptionType()
// $reg_proc->setInfo($this->lng->txt('crs_reg_type_info'));
$opt = new ilRadioOption($this->lng->txt('crs_subscription_options_direct'),IL_CRS_SUBSCRIPTION_DIRECT);
$reg_proc->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('crs_subscription_options_password'),IL_CRS_SUBSCRIPTION_PASSWORD);
$pass = new ilTextInputGUI($this->lng->txt("password"),'subscription_password');
$pass->setInfo($this->lng->txt('crs_reg_password_info'));
$pass->setSubmitFormOnEnter(true);
$pass->setSize(12);
$pass->setMaxLength(12);
$pass->setValue($this->object->getSubscriptionPassword());
$opt->addSubItem($pass);
$reg_proc->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('crs_subscription_options_confirmation'),IL_CRS_SUBSCRIPTION_CONFIRMATION);
$opt->setInfo($this->lng->txt('crs_registration_confirmation_info'));
$reg_proc->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('crs_reg_no_selfreg'),IL_CRS_SUBSCRIPTION_DEACTIVATED);
$opt->setInfo($this->lng->txt('crs_registration_deactivated'));
$reg_proc->addOption($opt);
$form->addItem($reg_proc);
// Registration codes
$reg_code = new ilCheckboxInputGUI($this->lng->txt('crs_reg_code'),'reg_code_enabled');
$reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
$reg_code->setValue(1);
$reg_code->setInfo($this->lng->txt('crs_reg_code_enabled_info'));
/*
$code = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_value'));
$code->setValue($this->object->getRegistrationAccessCode());
$reg_code->addSubItem($code);
*/
#$link = new ilNonEditableValueGUI($this->lng->txt('crs_reg_code_link'));
// Create default access code
if(!$this->object->getRegistrationAccessCode())
{
include_once './Services/Membership/classes/class.ilMembershipRegistrationCodeUtils.php';
$this->object->setRegistrationAccessCode(ilMembershipRegistrationCodeUtils::generateCode());
}
$reg_link = new ilHiddenInputGUI('reg_code');
$reg_link->setValue($this->object->getRegistrationAccessCode());
$form->addItem($reg_link);
$link = new ilCustomInputGUI($this->lng->txt('crs_reg_code_link'));
include_once './Services/Link/classes/class.ilLink.php';
$val = ilLink::_getLink($this->object->getRefId(),$this->object->getType(),array(),'_rcode'.$this->object->getRegistrationAccessCode());
$link->setHTML('<font class="small">'.$val.'</font>');
$reg_code->addSubItem($link);
$form->addItem($reg_code);
// time limit
$time_limit = new ilCheckboxInputGUI($this->lng->txt('crs_registration_limited'),'subscription_limitation_type');
$time_limit->setChecked(($this->object->getSubscriptionLimitationType() == IL_CRS_SUBSCRIPTION_LIMITED) ? true : false);
include_once "Services/Form/classes/class.ilDateDurationInputGUI.php";
$sdur = new ilDateDurationInputGUI($this->lng->txt('crs_registration_period'), "subscription_period");
$sdur->setShowTime(true);
$sdur->setStart(new ilDateTime($this->object->getSubscriptionStart(),IL_CAL_UNIX));
$sdur->setStartText($this->lng->txt('crs_start'));
$sdur->setEnd(new ilDateTime($this->object->getSubscriptionEnd(),IL_CAL_UNIX));
$sdur->setEndText($this->lng->txt('crs_end'));
$time_limit->addSubItem($sdur);
$form->addItem($time_limit);
// Max members
$lim = new ilCheckboxInputGUI($this->lng->txt('crs_subscription_max_members_short'),'subscription_membership_limitation');
$lim->setValue(1);
$lim->setChecked($this->object->isSubscriptionMembershipLimited());
$max = new ilTextInputGUI('','subscription_max');
$max->setSubmitFormOnEnter(true);
$max->setSize(4);
$max->setMaxLength(4);
$max->setValue($this->object->getSubscriptionMaxMembers() ? $this->object->getSubscriptionMaxMembers() : '');
$max->setTitle($this->lng->txt('crs_subscription_max_members'));
$max->setInfo($this->lng->txt('crs_reg_max_info'));
$lim->addSubItem($max);
$wait = new ilCheckboxInputGUI($this->lng->txt('crs_waiting_list'),'waiting_list');
$wait->setChecked($this->object->enabledWaitingList());
$wait->setInfo($this->lng->txt('crs_wait_info'));
$lim->addSubItem($wait);
$form->addItem($lim);
$pres = new ilFormSectionHeaderGUI();
$pres->setTitle($this->lng->txt('crs_view_mode'));
$form->addItem($pres);
// presentation type
$view_type = new ilRadioGroupInputGUI($this->lng->txt('crs_presentation_type'),'view_mode');
$view_type->setValue($this->object->getViewMode());
$opts = new ilRadioOption($this->lng->txt('cntr_view_sessions'),IL_CRS_VIEW_SESSIONS);
$opts->setInfo($this->lng->txt('cntr_view_info_sessions'));
$view_type->addOption($opts);
// Limited sessions
$sess = new ilCheckboxInputGUI($this->lng->txt('sess_limit'),'sl');
$sess->setValue(1);
$sess->setChecked($this->object->isSessionLimitEnabled());
$sess->setInfo($this->lng->txt('sess_limit_info'));
$prev = new ilNumberInputGUI($this->lng->txt('sess_num_prev'),'sp');
#$prev->setSubmitFormOnEnter(true);
$prev->setMinValue(0);
$prev->setValue($this->object->getNumberOfPreviousSessions() == -1 ?
'' :
$this->object->getNumberOfPreviousSessions()
);
$prev->setSize(2);
$prev->setMaxLength(3);
$sess->addSubItem($prev);
$next = new ilNumberInputGUI($this->lng->txt('sess_num_next'),'sn');
#$next->setSubmitFormOnEnter(true);
$next->setMinValue(0);
$next->setValue($this->object->getNumberOfNextSessions() == -1 ?
'' :
$this->object->getNumberOfnextSessions()
);
$next->setSize(2);
$next->setMaxLength(3);
$sess->addSubItem($next);
$opts->addSubItem($sess);
$optsi = new ilRadioOption($this->lng->txt('cntr_view_simple'),IL_CRS_VIEW_SIMPLE);
$optsi->setInfo($this->lng->txt('cntr_view_info_simple'));
$view_type->addOption($optsi);
$optbt = new ilRadioOption($this->lng->txt('cntr_view_by_type'),IL_CRS_VIEW_BY_TYPE);
$optbt->setInfo($this->lng->txt('cntr_view_info_by_type'));
$view_type->addOption($optbt);
$opto = new ilRadioOption($this->lng->txt('crs_view_objective'),IL_CRS_VIEW_OBJECTIVE);
$opto->setInfo($this->lng->txt('crs_view_info_objective'));
$view_type->addOption($opto);
$optt = new ilRadioOption($this->lng->txt('crs_view_timing'),IL_CRS_VIEW_TIMING);
$optt->setInfo($this->lng->txt('crs_view_info_timing'));
$view_type->addOption($optt);
/*
$opt = new ilRadioOption($this->lng->txt('crs_view_archive'),IL_CRS_VIEW_ARCHIVE);
$opt->setInfo($this->lng->txt('crs_archive_info'));
$down = new ilCheckboxInputGUI('','archive_type');
$down->setOptionTitle($this->lng->txt('crs_archive_download'));
$down->setChecked($this->object->getArchiveType() == IL_CRS_ARCHIVE_DOWNLOAD);
$opt->addSubItem($down);
$start = new ilDateTimeInputGUI($this->lng->txt('crs_start'),'archive_start');
$start->setShowTime(true);
$start_date = new ilDateTime($this->object->getArchiveStart(),IL_CAL_UNIX);
$start->setDate($start_date);
$opt->addSubItem($start);
$end = new ilDateTimeInputGUI($this->lng->txt('crs_end'),'archive_end');
$end->setShowTime(true);
$end_date = new ilDateTime($this->object->getArchiveEnd(),IL_CAL_UNIX);
$end->setDate($end_date);
$opt->addSubItem($end);
$view_type->addOption($opt);
*/
$form->addItem($view_type);
// sorting type
$sort = new ilRadioGroupInputGUI($this->lng->txt('crs_sortorder_abo'),'order_type');
$sort->setValue($this->object->getOrderType());
$opt = new ilRadioOption($this->lng->txt('crs_sort_title'),ilContainer::SORT_TITLE);
$opt->setInfo($this->lng->txt('crs_sort_title_info'));
$sort->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('crs_sort_manual'),ilContainer::SORT_MANUAL);
$opt->setInfo($this->lng->txt('crs_sort_manual_info'));
$sort->addOption($opt);
$opt = new ilRadioOption($this->lng->txt('crs_sort_activation'),ilContainer::SORT_ACTIVATION);
$opt->setInfo($this->lng->txt('crs_sort_timing_info'));
$sort->addOption($opt);
$form->addItem($sort);
// lp vs. course status
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
{
include_once './Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($this->object->getId());
if($olp->getCurrentMode())
{
$lp_status = new ilFormSectionHeaderGUI();
$lp_status->setTitle($this->lng->txt('crs_course_status_of_users'));
$form->addItem($lp_status);
$lp_status_options = new ilRadioGroupInputGUI($this->lng->txt('crs_status_determination'), "status_dt");
// $lp_status_options->setRequired(true);
$lp_status_options->setValue($this->object->getStatusDetermination());
$lp_option = new ilRadioOption($this->lng->txt('crs_status_determination_lp'),
ilObjCourse::STATUS_DETERMINATION_LP, $this->lng->txt('crs_status_determination_lp_info'));
$lp_status_options->addOption($lp_option);
$lp_status_options->addOption(new ilRadioOption($this->lng->txt('crs_status_determination_manual'),
$form->addItem($lp_status_options);
}
}
// additional features
$feat = new ilFormSectionHeaderGUI();
$feat->setTitle($this->lng->txt('obj_features'));
$form->addItem($feat);
include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
$this->object->getId(),
$form,
array(
)
);
$mem = new ilCheckboxInputGUI($this->lng->txt('crs_show_members'),'show_members');
$mem->setChecked($this->object->getShowMembers());
$mem->setInfo($this->lng->txt('crs_show_members_info'));
$form->addItem($mem);
// Show members type
$mail_type = new ilRadioGroupInputGUI($this->lng->txt('crs_mail_type'), 'mail_type');
$mail_type->setValue($this->object->getMailToMembersType());
$mail_tutors = new ilRadioOption($this->lng->txt('crs_mail_tutors_only'), ilCourseConstants::MAIL_ALLOWED_TUTORS,
$this->lng->txt('crs_mail_tutors_only_info'));
$mail_type->addOption($mail_tutors);
$mail_all = new ilRadioOption($this->lng->txt('crs_mail_all'), ilCourseConstants::MAIL_ALLOWED_ALL,
$this->lng->txt('crs_mail_all_info'));
$mail_type->addOption($mail_all);
$form->addItem($mail_type);
// Notification Settings
/*$notification = new ilFormSectionHeaderGUI();
$notification->setTitle($this->lng->txt('crs_notification'));
$form->addItem($notification);*/
// Self notification
$not = new ilCheckboxInputGUI($this->lng->txt('crs_auto_notification'), 'auto_notification');
$not->setValue(1);
$not->setInfo($this->lng->txt('crs_auto_notification_info'));
$not->setChecked( $this->object->getAutoNotification() );
$form->addItem($not);
// Further information
//$further = new ilFormSectionHeaderGUI();
//$further->setTitle($this->lng->txt('crs_further_settings'));
//$form->addItem($further);
$desk = new ilCheckboxInputGUI($this->lng->txt('crs_add_remove_from_desktop'),'abo');
$desk->setChecked($this->object->getAboStatus());
$desk->setInfo($this->lng->txt('crs_add_remove_from_desktop_info'));
$form->addItem($desk);
// Edit ecs export settings
include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
$ecs = new ilECSCourseSettings($this->object);
$ecs->addSettingsToForm($form, 'crs');
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Add file manager link.

Parameters
<type>$a_sub_type
<type>$a_sub_id

Reimplemented from ilContainerGUI.

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

References $ilSetting, $ilUser, ilParticipants\_isParticipant(), ilCourseParticipants\getDateTimeOfPassed(), ilUtil\getImagePath(), ilCertificate\isActive(), and ilCertificate\isObjectActive().

{
$lg = parent::initHeaderAction($a_sub_type, $a_sub_id);
if($lg && $this->ref_id && ilCourseParticipants::_isParticipant($this->ref_id, $ilUser->getId()))
{
// certificate
include_once "Services/Certificate/classes/class.ilCertificate.php";
ilCertificate::isObjectActive($this->object->getId()) &&
ilCourseParticipants::getDateTimeOfPassed($this->object->getId(), $ilUser->getId()))
{
$cert_url = $this->ctrl->getLinkTarget($this, "deliverCertificate");
$this->lng->loadLanguageModule("certificate");
$lg->addCustomCommand($cert_url, "download_certificate");
$lg->addHeaderIcon("cert_icon",
ilUtil::getImagePath("icon_cert_s.png"),
$this->lng->txt("download_certificate"),
null,
null,
$cert_url);
}
// notification
if($ilSetting->get("crsgrp_ntf"))
{
if(!$ilUser->getPref("grpcrs_ntf_".$this->ref_id))
{
$lg->addHeaderIcon("not_icon",
ilUtil::getImagePath("notification_off.png"),
$this->lng->txt("crs_notification_deactivated"));
$this->ctrl->setParameter($this, "crs_ntf", 1);
$caption = "crs_activate_notification";
}
else
{
$lg->addHeaderIcon("not_icon",
ilUtil::getImagePath("notification_on.png"),
$this->lng->txt("crs_notification_activated"));
$this->ctrl->setParameter($this, "crs_ntf", 0);
$caption = "crs_deactivate_notification";
}
$lg->addCustomCommand($this->ctrl->getLinkTarget($this, "saveNotification"),
$caption);
$this->ctrl->setParameter($this, "crs_ntf", "");
}
}
return $lg;
}

+ Here is the call graph for this function:

ilObjCourseGUI::initInfoEditor ( )

init info editor

public

Parameters

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

References $file, $section, ilAdvancedMDRecordGUI\MODE_EDITOR, ilAdvancedMDRecordGUI\setPropertyForm(), ilTextInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by editInfoObject().

{
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this,'updateInfo'));
$form->setMultipart(true);
$form->setTitle($this->lng->txt('crs_general_info'));
$form->addCommandButton('updateInfo',$this->lng->txt('save'));
$form->addCommandButton('cancel',$this->lng->txt('cancel'));
$area = new ilTextAreaInputGUI($this->lng->txt('crs_important_info'),'important');
$area->setValue($this->object->getImportantInformation());
$area->setRows(6);
$area->setCols(80);
$form->addItem($area);
$area = new ilTextAreaInputGUI($this->lng->txt('crs_syllabus'),'syllabus');
$area->setValue($this->object->getSyllabus());
$area->setRows(6);
$area->setCols(80);
$form->addItem($area);
$section->setTitle($this->lng->txt('crs_info_download'));
$form->addItem($section);
$file = new ilFileInputGUI($this->lng->txt('crs_file'),'file');
$file->enableFileNameSelection('file_name');
$form->addItem($file);
$section->setTitle($this->lng->txt('crs_contact'));
$form->addItem($section);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_name'),'contact_name');
$text->setValue($this->object->getContactName());
$text->setSize(40);
$text->setMaxLength(70);
$form->addItem($text);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_responsibility'),'contact_responsibility');
$text->setValue($this->object->getContactResponsibility());
$text->setSize(40);
$text->setMaxLength(70);
$form->addItem($text);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_phone'),'contact_phone');
$text->setValue($this->object->getContactPhone());
$text->setSize(40);
$text->setMaxLength(40);
$form->addItem($text);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_email'),'contact_email');
$text->setValue($this->object->getContactEmail());
$text->setInfo($this->lng->txt('crs_contact_email_info'));
$text->setSize(40);
$text->setMaxLength(255);
$form->addItem($text);
$area = new ilTextAreaInputGUI($this->lng->txt('crs_contact_consultation'),'contact_consultation');
$area->setValue($this->object->getContactConsultation());
$area->setRows(6);
$area->setCols(80);
$form->addItem($area);
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
$record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'crs',$this->object->getId());
$record_gui->setPropertyForm($form);
$record_gui->parse();
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::leaveObject ( )

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

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

Referenced by unsubscribeObject().

{
global $ilUser;
$this->checkPermission('leave');
if($this->object->getMembersObject()->isLastAdmin($ilUser->getId()))
{
ilUtil::sendFailure($this->lng->txt('crs_min_one_admin'));
$this->viewObject();
return false;
}
$this->tabs_gui->setTabActive('crs_unsubscribe');
include_once "Services/Utilities/classes/class.ilConfirmationGUI.php";
$cgui = new ilConfirmationGUI();
$cgui->setHeaderText($this->lng->txt('crs_unsubscribe_sure'));
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setCancel($this->lng->txt("cancel"), "cancel");
$cgui->setConfirm($this->lng->txt("crs_unsubscribe"), "performUnsubscribe");
$this->tpl->setContent($cgui->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::listStructureObject ( )
protected

List start objects ilRbacSystem $rbacsystem.

Returns
void

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

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and setSubTabs().

Referenced by addStarterObject(), askDeleteStarterObject(), and deleteStarterObject().

{
global $tpl, $ilToolbar;
$this->checkPermission('write');
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_start_objects');
$ilToolbar->addButton($this->lng->txt('crs_add_starter'),
$this->ctrl->getLinkTarget($this, 'selectStarter'));
include_once './Modules/Course/classes/class.ilCourseStartObjectsTableGUI.php';
$table = new ilCourseStartObjectsTableGUI($this, 'listStructure', $this->object);
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::loadDate (   $a_field)
protected

load date

protected

Parameters
@return

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

References $_POST, $ilUser, and IL_CAL_FKT_GETDATE.

{
global $ilUser;
include_once('./Services/Calendar/classes/class.ilDateTime.php');
// #10206 / #10217
if(is_array($_POST[$a_field]['date']))
{
$dt['year'] = (int) $_POST[$a_field]['date']['y'];
$dt['mon'] = (int) $_POST[$a_field]['date']['m'];
$dt['mday'] = (int) $_POST[$a_field]['date']['d'];
$dt['hours'] = (int) $_POST[$a_field]['time']['h'];
$dt['minutes'] = (int) $_POST[$a_field]['time']['m'];
$dt['seconds'] = (int) $_POST[$a_field]['time']['s'];
}
else
{
$date = date_parse($_POST[$a_field]['date']." ".$_POST[$a_field]['time']);
$dt['year'] = (int) $date['year'];
$dt['mon'] = (int) $date['month'];
$dt['mday'] = (int) $date['day'];
$dt['hours'] = (int) $date['hour'];
$dt['minutes'] = (int) $date['minute'];
$dt['seconds'] = (int) $date['second'];
}
$date = new ilDateTime($dt,IL_CAL_FKT_GETDATE,$ilUser->getTimeZone());
return $date;
}
ilObjCourseGUI::mailMembersObject ( )

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

References $_GET, $ilErr, ilObjectGUI\$ilias, ilObject\_getIdsForTitle(), ilObjRole\_getTranslation(), ilObject\_lookupTitle(), createMailSignature(), ilUtil\formCheckbox(), ilUtil\getImagePath(), ilMailFormCall\getLinkTarget(), ilCourseConstants\MAIL_ALLOWED_ALL, ilUtil\sendInfo(), and setSubTabs().

{
global $rbacreview, $ilErr, $ilAccess, $ilObjDataCache, $ilias;
include_once('./Services/AccessControl/classes/class.ilObjRole.php');
$this->lng->loadLanguageModule('mail');
if(!isset($_GET['returned_from_mail']))
{
ilUtil::sendInfo($this->lng->txt('mail_select_recipients'));
}
$is_admin = (bool) $ilAccess->checkAccess("write", "", $this->object->getRefId());
if (!$is_admin &&
$this->object->getMailToMembersType() != ilCourseConstants::MAIL_ALLOWED_ALL)
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
}
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('mail_members');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.mail_members.html','Services/Contact');
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
$this->tpl->setVariable("MAILACTION", ilMailFormCall::getLinkTarget($this, 'mailMembers', array(), array('type' => 'role', 'sig' => $this->createMailSignature())));
$this->tpl->setVariable("SELECT_ACTION",'ilias.php?baseClass=ilmailgui&view=my_courses&search_crs='.$this->object->getId());
$this->tpl->setVariable("MAIL_SELECTED",$this->lng->txt('send_mail_selected'));
$this->tpl->setVariable("MAIL_MEMBERS",$this->lng->txt('send_mail_members'));
$this->tpl->setVariable("MAIL_TUTOR",$this->lng->txt('send_mail_tutors'));
$this->tpl->setVariable("MAIL_ADMIN",$this->lng->txt('send_mail_admins'));
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.png'));
$this->tpl->setVariable("OK",$this->lng->txt('next'));
// Display roles with user friendly mailbox addresses
$role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
$role_ids = $rbacreview->getRolesOfRoleFolder($role_folder['ref_id'], false);
// Sort by relevance
$sorted_role_ids = array();
$counter = 3;
foreach($role_ids as $role_id)
{
switch(substr(ilObject::_lookupTitle($role_id),0,8))
{
case 'il_crs_a':
$sorted_role_ids[2] = $role_id;
break;
case 'il_crs_t':
$sorted_role_ids[1] = $role_id;
break;
case 'il_crs_m':
$sorted_role_ids[0] = $role_id;
break;
default:
$sorted_role_ids[$counter++] = $role_id;
break;
}
}
ksort($sorted_role_ids,SORT_NUMERIC);
foreach ((array) $sorted_role_ids as $role_id)
{
$this->tpl->setCurrentBlock("mailbox_row");
$role_addr = $rbacreview->getRoleMailboxAddress($role_id);
// check if role title is unique. if not force use pear mail for roles
$ids_for_role_title = ilObject::_getIdsForTitle(ilObject::_lookupTitle($role_id), 'role');
if(count($ids_for_role_title) >= 2)
{
$ilias->setSetting('pear_mail_enable', 1);
}
$this->tpl->setVariable("CHECK_MAILBOX",ilUtil::formCheckbox(1,'roles[]',
htmlspecialchars($role_addr)
));
if (ilMail::_usePearMail() && substr($role_addr, 0, 4) != '#il_')
{
// if pear mail is enabled, mailbox addresses are already localized in the language of the user
$this->tpl->setVariable("MAILBOX",$role_addr);
}
else
{
// if pear mail is not enabled, we need to localize mailbox addresses in the language of the user
$this->tpl->setVariable("MAILBOX",ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)). " (" . $role_addr . ")");
}
$this->tpl->parseCurrentBlock();
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::memberGatewayObject ( )

Gateway for member administration commands.

public

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

References $_POST, deleteMembersObject(), sendMailToSelectedUsersObject(), and updateMembersObject().

{
if(isset($_POST['btn_pressed']['deleteMembers']))
{
return $this->deleteMembersObject();
}
elseif($_POST['btn_pressed']['sendMailToSelectedUsers'])
{
}
else
{
return $this->updateMembersObject();
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::membersGalleryObject ( )

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

References $file, $ilErr, $ilUser, exit, ilObjectFactory\getInstanceByObjId(), ilUtil\getStyleSheetLocation(), setSubTabs(), and ilUtil\sortArray().

{
global $rbacsystem, $ilErr, $ilAccess, $ilUser;
$is_admin = (bool) $ilAccess->checkAccess("write", "", $this->object->getRefId());
if (!$is_admin &&
$this->object->getShowMembers() == $this->object->SHOW_MEMBERS_DISABLED)
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
}
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.crs_members_gallery.html','Modules/Course');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_members_gallery');
// MEMBERS
if(count($members = $this->object->getMembersObject()->getParticipants()))
{
$ordered_members = array();
foreach($members as $member_id)
{
if(!($usr_obj = ilObjectFactory::getInstanceByObjId($member_id,false)))
{
continue;
}
// please do not use strtoupper on first/last name for output
// this messes up with some unicode characters, i guess
// depending on php verion, alex
array_push($ordered_members,array("id" => $member_id,
"login" => $usr_obj->getLogin(),
"lastname" => $usr_obj->getLastName(),
"firstname" => $usr_obj->getFirstName(),
"sortlastname" => strtoupper($usr_obj->getLastName()).strtoupper($usr_obj->getFirstName()),
"usr_obj" => $usr_obj));
}
$ordered_members=ilUtil::sortArray($ordered_members,"sortlastname","asc");
foreach($ordered_members as $member)
{
$usr_obj = $member["usr_obj"];
if(!$usr_obj->getActive())
{
continue;
}
$public_profile = in_array($usr_obj->getPref("public_profile"), array("y", "g")) ? "y" : "";
// SET LINK TARGET FOR USER PROFILE
$this->ctrl->setParameterByClass("ilpublicuserprofilegui", "user", $member["id"]);
$profile_target = $this->ctrl->getLinkTargetByClass("ilpublicuserprofilegui","getHTML");
// GET USER IMAGE
$file = $usr_obj->getPersonalPicturePath("xsmall");
/*if($this->object->getMembersObject()->isAdmin($member["id"]) or $this->object->getMembersObject()->isTutor($member["id"]))
{
if ($public_profile == "y")
{
$this->tpl->setCurrentBlock("tutor_linked");
$this->tpl->setVariable("LINK_PROFILE", $profile_target);
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("tutor_not_linked");
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("tutor");*/
if ($public_profile == "y") {
$this->tpl->setCurrentBlock("member_linked");
$this->tpl->setVariable("LINK_PROFILE", $profile_target);
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
/*else
{
if ($public_profile == "y")
{
$this->tpl->setCurrentBlock("member_linked");
$this->tpl->setVariable("LINK_PROFILE", $profile_target);
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("member_not_linked");
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("member");*/
else {
$this->tpl->setCurrentBlock("member_not_linked");
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("member");
if ($this->object->getMembersObject()->isAdmin($member["id"])) {
$this->tpl->setVariable("MEMBER_CLASS", "il_Admin");
}
elseif ($this->object->getMembersObject()->isTutor($member["id"])) {
$this->tpl->setVariable("MEMBER_CLASS", "il_Tutor");
}
else {
$this->tpl->setVariable("MEMBER_CLASS", "il_Member");
}
// do not show name, if public profile is not activated
if ($public_profile == "y")
{
$this->tpl->setVariable("FIRSTNAME", $member["firstname"]);
$this->tpl->setVariable("LASTNAME", $member["lastname"]);
}
$this->tpl->setVariable("LOGIN", $member["login"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("members");
$this->tpl->setVariable("MEMBERS_TABLE_HEADER",$this->lng->txt('crs_members_title'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TITLE",$this->lng->txt('crs_members_print_title'));
$this->tpl->setVariable("CSS_PATH",ilUtil::getStyleSheetLocation());
$headline = $this->object->getTitle()."<br/>".$this->object->getDescription();
$this->tpl->setVariable("HEADLINE",$headline);
$this->tpl->show();
}

+ Here is the call graph for this function:

ilObjCourseGUI::membersMapObject ( )

Members map.

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

References ilObjectGUI\$tpl, ilCourseParticipants\_getInstanceByObjId(), ilGoogleMapUtil\isActivated(), and setSubTabs().

{
global $tpl;
$this->tabs_gui->setTabActive("members");
$this->setSubTabs('members');
$this->tabs_gui->setSubTabActive("crs_members_map");
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
if (!ilGoogleMapUtil::isActivated() || !$this->object->getEnableCourseMap())
{
return;
}
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
$map = new ilGoogleMapGUI();
$map->setMapId("course_map");
$map->setWidth("700px");
$map->setHeight("500px");
$map->setLatitude($this->object->getLatitude());
$map->setLongitude($this->object->getLongitude());
$map->setZoom($this->object->getLocationZoom());
$map->setEnableTypeControl(true);
$map->setEnableNavigationControl(true);
$map->setEnableCentralMarker(true);
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
$members = ilCourseParticipants::_getInstanceByObjId($this->object->getId())->getParticipants();
if(count($members))
{
foreach($members as $user_id)
{
$map->addUserMarker($user_id);
}
}
$tpl->setContent($map->getHTML());
$tpl->setLeftContent($map->getUserListHTML());
}

+ Here is the call graph for this function:

ilObjCourseGUI::membersObject ( )
protected

Member administration.

ilRbacReview $rbacreview protected

Returns

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

References $_GET, $_SESSION, $GLOBALS, $ilCtrl, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObjUserTracking\_enabledLearningProgress(), ilObjUserTracking\_enabledUserRelatedData(), ilCourseParticipants\_getInstanceByObjId(), ilCourseParticipant\_getInstanceByObjId(), ilObject\_lookupTitle(), ilTable2GUI\addHeaderCommand(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilCourseConstants\CRS_ADMIN, ilCourseConstants\CRS_MEMBER, ilCourseConstants\CRS_TUTOR, ilRepositorySearchGUI\fillAutoCompleteToolbar(), ilUtil\getImagePath(), ilObjectLP\getInstance(), ilCourseParticipants\getMemberRoles(), ilObjectActivation\hasTimings(), IL_CRS_VIEW_TIMING, ilParticipants\lookupSubscribers(), setShowHidePrefs(), setSubTabs(), and ilObjCourse\STATUS_DETERMINATION_LP.

Referenced by assignFromWaitingListObject(), assignSubscribersObject(), autoFillObject(), deleteMembersObject(), deleteSubscribers(), editMembersObject(), performRemoveFromWaitingListObject(), refuseFromListObject(), refuseSubscribersObject(), removeFromWaitingList(), removeMembersObject(), sendMailToSelectedUsersObject(), updateMemberObject(), updateMembersObject(), and updateParticipantsStatus().

{
global $ilUser, $ilAccess, $ilToolbar, $lng, $ilCtrl, $tpl, $rbacreview;
include_once('./Modules/Course/classes/class.ilCourseParticipants.php');
include_once('./Modules/Course/classes/class.ilCourseParticipantsTableGUI.php');
if(isset($_GET['member_table_nav']))
{
list($_SESSION['crs_print_sort'],$_SESSION['crs_print_order'],$tmp) = explode(':',$_GET['member_table_nav']);
}
$this->checkPermission('write');
include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
$this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and
ilObjUserTracking::_enabledUserRelatedData());
if($this->show_tracking)
{
include_once('./Services/Object/classes/class.ilObjectLP.php');
$olp = ilObjectLP::getInstance($this->object->getId());
$this->show_tracking = $olp->isActive();
}
include_once('./Services/Object/classes/class.ilObjectActivation.php');
$this->timings_enabled = (ilObjectActivation::hasTimings($this->object->getRefId()) and
($this->object->getViewMode() == IL_CRS_VIEW_TIMING));
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_member_administration');
$this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.crs_edit_members.html','Modules/Course');
$this->tpl->setVariable('FORMACTION',$this->ctrl->getFormAction($this));
// add members
include_once './Services/Search/classes/class.ilRepositorySearchGUI.php';
if(ilCourseParticipant::_getInstanceByObjId($this->object->getId(), $GLOBALS['ilUser']->getId())->isAdmin() or $this->checkPermissionBool('edit_permission'))
{
$types = array(
ilCourseConstants::CRS_MEMBER => $lng->txt("crs_member"),
ilCourseConstants::CRS_TUTOR => $lng->txt("crs_tutor"),
ilCourseConstants::CRS_ADMIN => $lng->txt("crs_admin")
);
}
else
{
$types = array(
ilCourseConstants::CRS_MEMBER => $lng->txt("crs_member"),
ilCourseConstants::CRS_TUTOR => $lng->txt("crs_tutor")
);
}
$this,
$ilToolbar,
array(
'auto_complete_name' => $lng->txt('user'),
'user_type' => $types,
'submit_name' => $lng->txt('add')
)
);
// spacer
$ilToolbar->addSeparator();
// search button
$ilToolbar->addButton($this->lng->txt("crs_search_users"),
$this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','start'));
// separator
$ilToolbar->addSeparator();
// print button
$ilToolbar->addButton($this->lng->txt("crs_print_list"),
$this->ctrl->getLinkTarget($this, 'printMembers'));
/* attendance list button
$ilToolbar->addButton($this->lng->txt("sess_gen_attendance_list"),
$this->ctrl->getLinkTarget($this, 'attendanceList'));
*/
$this->setShowHidePrefs();
// Waiting list table
include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
$waiting_list = new ilCourseWaitingList($this->object->getId());
if(count($wait = $waiting_list->getAllUsers()))
{
include_once('./Services/Membership/classes/class.ilWaitingListTableGUI.php');
if($ilUser->getPref('crs_wait_hide'))
{
$table_gui = new ilWaitingListTableGUI($this,$waiting_list,false);
$this->ctrl->setParameter($this,'wait_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilWaitingListTableGUI($this,$waiting_list,true);
$this->ctrl->setParameter($this,'wait_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setUsers($wait);
$table_gui->setTitle($this->lng->txt('crs_waiting_list'),'icon_usr.png',$this->lng->txt('crs_waiting_list'));
$this->tpl->setVariable('TABLE_WAIT',$table_gui->getHTML());
}
// Subscriber table
if($subscribers = ilCourseParticipants::lookupSubscribers($this->object->getId()))
{
include_once('./Services/Membership/classes/class.ilSubscriberTableGUI.php');
if($ilUser->getPref('crs_subscriber_hide'))
{
$table_gui = new ilSubscriberTableGUI($this,false);
$this->ctrl->setParameter($this,'subscriber_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilSubscriberTableGUI($this,true);
$this->ctrl->setParameter($this,'subscriber_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->readSubscriberData();
$table_gui->setTitle($this->lng->txt('group_new_registrations'),'icon_usr.png',$this->lng->txt('group_new_registrations'));
$this->tpl->setVariable('TABLE_SUB',$table_gui->getHTML());
}
if($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultAdminRole())))
{
// Security: display the list of course administrators read-only,
// if the user doesn't have the 'edit_permission' permission.
$showEditLink =
(
$ilAccess->checkAccess("edit_permission", '', $this->object->getRefId()) or
ilCourseParticipants::_getInstanceByObjId($this->object->getId())->isAdmin($ilUser->getId())
);
if($ilUser->getPref('crs_admin_hide'))
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'admin',
false,
false,
$this->timings_enabled,
$showEditLink,
$this->object->getDefaultAdminRole(),
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'admin_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'admin',
true,
false,
$this->timings_enabled,
$showEditLink,
$this->object->getDefaultAdminRole(),
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'admin_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setTitle($this->lng->txt('crs_administrators'),'icon_usr.png',$this->lng->txt('crs_administrators'));
$table_gui->parse();
$this->tpl->setVariable('ADMINS',$table_gui->getHTML());
}
if($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultTutorRole())))
{
if($ilUser->getPref('crs_tutor_hide'))
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'tutor',
false,
false,
$this->timings_enabled,
true,
$this->object->getDefaultTutorRole(),
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'tutor_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'tutor',
true,
false,
$this->timings_enabled,
true,
$this->object->getDefaultTutorRole(),
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'tutor_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setTitle($this->lng->txt('crs_tutors'),'icon_usr.png',$this->lng->txt('crs_tutors'));
$table_gui->parse();
$this->tpl->setVariable('TUTORS',$table_gui->getHTML());
}
if($rbacreview->getNumberOfAssignedUsers(array($this->object->getDefaultMemberRole())))
{
if($ilUser->getPref('crs_member_hide'))
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'member',
false,
$this->show_tracking,
$this->timings_enabled,
true,
$this->object->getDefaultMemberRole(),
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'member_hide',0);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png'));
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'member',
true,
$this->show_tracking,
$this->timings_enabled,
true,
$this->object->getDefaultMemberRole(),
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'member_hide',1);
$table_gui->addHeaderCommand($this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png'));
$this->ctrl->clearParameters($this);
}
$table_gui->setTitle($this->lng->txt('crs_members'),'icon_usr.png',$this->lng->txt('crs_members'));
$table_gui->parse();
$this->tpl->setCurrentBlock('member_block');
$this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
$this->tpl->parseCurrentBlock();
}
foreach(ilCourseParticipants::getMemberRoles($this->object->getRefId()) as $role_id)
{
// Do not show table if no user is assigned
if(!($GLOBALS['rbacreview']->getNumberOfAssignedUsers(array($role_id))))
{
continue;
}
if($ilUser->getPref('crs_role_hide_'.$role_id))
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'role',
false,
$this->show_tracking,
$this->timings_enabled,
true,
$role_id,
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'role_hide_'.$role_id,0);
$table_gui->addHeaderCommand(
$this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('show'),
'',
ilUtil::getImagePath('edit_add.png')
);
$this->ctrl->clearParameters($this);
}
else
{
$table_gui = new ilCourseParticipantsTableGUI(
$this,
'role',
true,
$this->show_tracking,
$this->timings_enabled,
true,
$role_id,
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP
);
$this->ctrl->setParameter($this,'role_hide_'.$role_id,1);
$table_gui->addHeaderCommand(
$this->ctrl->getLinkTarget($this,'members'),
$this->lng->txt('hide'),
'',
ilUtil::getImagePath('edit_remove.png')
);
$this->ctrl->clearParameters($this);
}
$table_gui->setTitle(ilObject::_lookupTitle($role_id),'icon_usr.png',$this->lng->txt('crs_members'));
$table_gui->parse();
$this->tpl->setCurrentBlock('member_block');
$this->tpl->setVariable('MEMBERS',$table_gui->getHTML());
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable('TXT_SELECTED_USER',$this->lng->txt('crs_selected_users'));
$this->tpl->setVariable('BTN_FOOTER_EDIT',$this->lng->txt('edit'));
$this->tpl->setVariable('BTN_FOOTER_VAL',$this->lng->txt('remove'));
$this->tpl->setVariable('BTN_FOOTER_MAIL',$this->lng->txt('crs_mem_send_mail'));
$this->tpl->setVariable('ARROW_DOWN',ilUtil::getImagePath('arrow_downright.png'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Modify Item ListGUI for presentation in container.

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

References _modifyItemGUI().

{
return ilObjCourseGUI::_modifyItemGUI($a_item_list_gui, 'ilcoursecontentgui', $a_item_data, $a_show_path,
$this->object->getAboStatus(), $this->object->getRefId(), $this->object->getId());
}

+ Here is the call graph for this function:

ilObjCourseGUI::performRemoveFromWaitingListObject ( )

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

References $_SESSION, $usr_id, ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
$this->checkPermission('write');
/*
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
*/
if(!is_array($_SESSION["crs_delete_waiting_list_ids"]))
{
ilUtil::sendFailure($this->lng->txt("crs_no_users_selected"));
$this->membersObject();
return false;
}
$this->object->initWaitingList();
foreach($_SESSION['crs_delete_waiting_list_ids'] as $usr_id)
{
$this->object->waiting_list_obj->removeFromList($usr_id);
}
ilUtil::sendSuccess($this->lng->txt('crs_users_removed_from_list'));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::performUnsubscribeObject ( )

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

References $ilCtrl, $ilUser, ilForumNotification\checkForumsExistsDelete(), ilObjectGUI\checkPermission(), and ilUtil\sendSuccess().

{
global $ilUser, $ilCtrl;
// CHECK ACCESS
$this->checkPermission('leave');
$this->object->getMembersObject()->delete($this->ilias->account->getId());
$this->object->getMembersObject()->sendUnsubscribeNotificationToAdmins($this->ilias->account->getId());
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNSUBSCRIBE,$ilUser->getId());
include_once './Modules/Forum/classes/class.ilForumNotification.php';
ilForumNotification::checkForumsExistsDelete($this->ref_id, $ilUser->getId());
ilUtil::sendSuccess($this->lng->txt('crs_unsubscribed_from_crs'),true);
$ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->tree->getParentId($this->ref_id));
$ilCtrl->redirectByClass("ilrepositorygui", "");
}

+ Here is the call graph for this function:

ilObjCourseGUI::prepareOutput ( )

Handle member view.

Returns

Reimplemented from ilObjectGUI.

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

References ilObjectGUI\getCreationMode(), and ilMemberViewSettings\getInstance().

Referenced by executeCommand().

{
global $rbacsystem;
if(!$this->getCreationMode())
{
include_once './Services/Container/classes/class.ilMemberViewSettings.php';
if($settings->isActive() and $settings->getContainer() != $this->object->getRefId())
{
$settings->setContainer($this->object->getRefId());
$rbacsystem->initMemberView();
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::printMembersObject ( )

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

References ilObjectGUI\checkPermission(), and initAttendanceList().

{
global $ilTabs;
$this->checkPermission('write');
$ilTabs->clearTargets();
$ilTabs->setBackTarget($this->lng->txt('back'),
$this->ctrl->getLinkTarget($this, 'members'));
$list = $this->initAttendanceList();
$form = $list->initForm('printMembersOutput');
$this->tpl->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilObjCourseGUI::printMembersOutputObject ( )

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

References exit, fetchPrintMemberData(), and initAttendanceList().

{
$list = $this->initAttendanceList();
$list->initFromForm();
$list->setCallback(array($this, 'getAttendanceListUserData'));
$this->members_data = $this->fetchPrintMemberData($this->object->getMembersObject()->getParticipants());
$list->getNonMemberUserData($this->members_data);
$list->getFullscreenHTML();
exit();
/* currently deactivated
// SUBSCRIBERS
if(count($members = $this->object->getMembersObject()->getSubscribers()))
{
$tpl = new ilTemplate('tpl.crs_members_print.html',true,true,'Modules/Course');
$members = $this->fetchPrintSubscriberData($members);
foreach($members as $member_data)
{
$tpl->setCurrentBlock("subscribers_row");
$tpl->setVariable("SLOGIN",$member_data['login']);
$tpl->setVariable("SNAME",$member_data['name']);
$tpl->setVariable("STIME",$member_data["time"]);
$tpl->parseCurrentBlock();
}
$tpl->setVariable("SUBSCRIBERS_IMG_SOURCE",ilUtil::getImagePath('icon_usr.png'));
$tpl->setVariable("SUBSCRIBERS_IMG_ALT",$this->lng->txt('crs_subscribers'));
$tpl->setVariable("SUBSCRIBERS_TABLE_HEADER",$this->lng->txt('crs_subscribers'));
$tpl->setVariable("TXT_SLOGIN",$this->lng->txt('username'));
$tpl->setVariable("TXT_SNAME",$this->lng->txt('name'));
$tpl->setVariable("TXT_STIME",$this->lng->txt('crs_time'));
$tpl->show();
}
*/
}

+ Here is the call graph for this function:

ilObjCourseGUI::readMemberData (   $ids,
  $role = 'admin',
  $selected_columns = null 
)

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

References $failed, $usr_id, ilPrivacySettings\_getInstance(), ilLPStatusWrapper\_lookupCompletedForObject(), ilLPStatusWrapper\_lookupFailedForObject(), ilLPStatusWrapper\_lookupInProgressForObject(), ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilLearningProgress\_lookupProgressByObjId(), ilDatePresentation\formatDate(), ilObjPortfolio\getAvailablePortfolioLinksForUserIds(), 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.

Referenced by editMembersObject().

{
if($this->show_tracking)
{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
$completed = ilLPStatusWrapper::_lookupCompletedForObject($this->object->getId());
$in_progress = ilLPStatusWrapper::_lookupInProgressForObject($this->object->getId());
}
include_once('./Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
if($privacy->enabledCourseAccessTimes())
{
include_once('./Services/Tracking/classes/class.ilLearningProgress.php');
$progress = ilLearningProgress::_lookupProgressByObjId($this->object->getId());
}
$do_prtf = (is_array($selected_columns) &&
in_array('prtf', $selected_columns) &&
is_array($ids));
if($do_prtf)
{
include_once "Modules/Portfolio/classes/class.ilObjPortfolio.php";
$this->ctrl->getLinkTarget($this, "members"));
}
foreach((array) $ids as $usr_id)
{
$tmp_data['firstname'] = $name['firstname'];
$tmp_data['lastname'] = $name['lastname'];
$tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
$tmp_data['passed'] = $this->object->getMembersObject()->hasPassed($usr_id) ? 1 : 0;
if($this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP)
{
$tmp_data['passed_info'] = $this->object->getMembersObject()->getPassedInfo($usr_id);
}
$tmp_data['notification'] = $this->object->getMembersObject()->isNotificationEnabled($usr_id) ? 1 : 0;
$tmp_data['blocked'] = $this->object->getMembersObject()->isBlocked($usr_id) ? 1 : 0;
$tmp_data['usr_id'] = $usr_id;
if($this->show_tracking)
{
if(in_array($usr_id,$completed))
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_COMPLETED;
}
elseif(in_array($usr_id,$in_progress))
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_IN_PROGRESS;
}
elseif(in_array($usr_id,$failed))
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_FAILED;
}
else
{
$tmp_data['progress'] = ilLPStatus::LP_STATUS_NOT_ATTEMPTED;
}
}
if($privacy->enabledCourseAccessTimes())
{
if(isset($progress[$usr_id]['ts']) and $progress[$usr_id]['ts'])
{
$tmp_data['access_ut'] = $progress[$usr_id]['ts'];
$tmp_data['access_time'] = ilDatePresentation::formatDate(new ilDateTime($progress[$usr_id]['ts'],IL_CAL_UNIX));
}
else
{
$tmp_data['access_ut'] = 0;
$tmp_data['access_time'] = $this->lng->txt('no_date');
}
}
if($do_prtf)
{
$tmp_data['prtf'] = $all_prtf[$usr_id];
}
$members[$usr_id] = $tmp_data;
}
return $members ? $members : array();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::refuseFromListObject ( )

refuse from waiting list

public

Returns

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

References $_POST, $ilUser, ilObjectGUI\checkPermission(), membersObject(), ilWaitingList\removeFromList(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $ilUser;
$this->checkPermission('write');
if(!count($_POST['waiting']))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
include_once('./Modules/Course/classes/class.ilCourseWaitingList.php');
$waiting_list = new ilCourseWaitingList($this->object->getId());
foreach($_POST["waiting"] as $user_id)
{
$waiting_list->removeFromList($user_id);
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_DISMISS_SUBSCRIBER,$user_id);
}
ilUtil::sendSuccess($this->lng->txt('crs_users_removed_from_list'));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::refuseSubscribersObject ( )

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

References $_POST, $usr_id, ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacsystem;
$this->checkPermission('write');
if(!$_POST['subscribers'])
{
ilUtil::sendFailure($this->lng->txt("crs_no_subscribers_selected"));
$this->membersObject();
return false;
}
if(!$this->object->getMembersObject()->deleteSubscribers($_POST["subscribers"]))
{
ilUtil::sendFailure($this->object->getMessage());
$this->membersObject();
return false;
}
else
{
foreach($_POST['subscribers'] as $usr_id)
{
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_DISMISS_SUBSCRIBER,$usr_id);
}
}
ilUtil::sendSuccess($this->lng->txt("crs_subscribers_deleted"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::removeBigIconObject ( )

remove big icon

public

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

{
$this->object->removeBigIcon();
$this->ctrl->redirect($this,'editCourseIcons');
}
ilObjCourseGUI::removeFromWaitingList ( )

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

References $_POST, $_SESSION, __showRemoveFromWaitingListTable(), ilObjectGUI\checkPermission(), ilDatePresentation\formatDate(), ilObjectFactory\getInstanceByObjId(), IL_CAL_UNIX, membersObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

Referenced by gatewayObject().

{
global $rbacsystem;
$this->tabs_gui->setTabActive('members');
// MINIMUM ACCESS LEVEL = 'administrate'
$this->checkPermission('write');
/*
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
*/
if(!is_array($_POST["waiting_list"]) or !count($_POST["waiting_list"]))
{
ilUtil::sendFailure($this->lng->txt("crs_no_users_selected"));
$this->membersObject();
return false;
}
ilUtil::sendSuccess($this->lng->txt("crs_delete_from_list_sure"));
// SHOW DELETE SCREEN
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_editMembers.html",'Modules/Course');
$this->object->initWaitingList();
// SAVE IDS IN SESSION
$_SESSION["crs_delete_waiting_list_ids"] = $_POST["waiting_list"];
$counter = 0;
$f_result = array();
foreach($_POST["waiting_list"] as $wait_id)
{
$user_data =& $this->object->waiting_list_obj->getUser($wait_id);
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($wait_id,false))
{
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
#$f_result[$counter][] = strftime("%Y-%m-%d %R",$user_data["time"]);
$f_result[$counter][] = ilDatePresentation::formatDate(new ilDateTime($user_data['time'],IL_CAL_UNIX));
unset($tmp_obj);
++$counter;
}
}
return $this->__showRemoveFromWaitingListTable($f_result);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::removeMembersObject ( )
protected

Remove members ilRbacReview $rbacreview ilRbacSystem $rbacsystem.

Returns
boolean

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

References $_POST, $ilUser, $usr_id, ilCourseParticipants\_getInstanceByObjId(), ilForumNotification\checkForumsExistsDelete(), ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacreview, $rbacsystem, $ilAccess, $ilUser;
$this->checkPermission('write');
if(!is_array($_POST["participants"]) or !count($_POST["participants"]))
{
ilUtil::sendFailure($this->lng->txt("crs_no_member_selected"));
$this->membersObject();
return false;
}
// If the user doesn't have the edit_permission and is not administrator, he may not remove
// members who have the course administrator role
if (
!$ilAccess->checkAccess('edit_permission', '', $this->object->getRefId()) and
!ilCourseParticipants::_getInstanceByObjId($this->object->getId())->isAdmin($ilUser->getId())
)
{
// Determine the role id of the course administrator role.
$courseAdminRoleId = null;
foreach ($this->object->getLocalCourseRoles(false) as $title => $role_id)
{
if (substr($title, 0, 12) == 'il_crs_admin')
{
$courseAdminRoleId = $role_id;
}
}
foreach ($_POST['participants'] as $usr_id)
{
if ($rbacreview->isAssigned($usr_id, $courseAdminRoleId))
{
ilUtil::sendFailure($this->lng->txt("msg_no_perm_perm"));
$this->membersObject();
return false;
}
}
}
if(!$this->object->getMembersObject()->deleteParticipants($_POST["participants"]))
{
ilUtil::sendFailure($this->object->getMessage());
$this->membersObject();
return false;
}
else
{
include_once './Modules/Forum/classes/class.ilForumNotification.php';
// SEND NOTIFICATION
foreach($_POST["participants"] as $usr_id)
{
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_DISMISS_MEMBER,$usr_id);
}
}
ilUtil::sendSuccess($this->lng->txt("crs_members_deleted"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::removeSmallIconObject ( )

remove small icon

public

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

{
$this->object->removeSmallIcon();
$this->ctrl->redirect($this,'editCourseIcons');
}
ilObjCourseGUI::removeTinyIconObject ( )

remove small icon

public

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

{
$this->object->removeTinyIcon();
$this->ctrl->redirect($this,'editCourseIcons');
}
ilObjCourseGUI::renderContainer ( )

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

References renderObject().

{
}

+ Here is the call graph for this function:

ilObjCourseGUI::renderObject ( )

render the object

Reimplemented from ilContainerGUI.

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

References viewObject().

Referenced by renderContainer(), and viewObject().

{
$this->ctrl->setCmd("view");
$this->viewObject();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::resetObject ( )

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

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

{
global $ilUser;
include_once './Modules/Course/classes/class.ilCourseObjectiveResult.php';
$tmp_obj_res = new ilCourseObjectiveResult($ilUser->getId());
$tmp_obj_res->reset($this->object->getId());
$ilUser->deletePref('crs_objectives_force_details_'.$this->object->getId());
ilUtil::sendSuccess($this->lng->txt('crs_objectives_reseted'));
$this->viewObject();
}

+ Here is the call graph for this function:

ilObjCourseGUI::saveMapSettingsObject ( )

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

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

{
global $ilCtrl, $ilUser;
$this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
$this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
$this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
$this->object->setEnableCourseMap(ilUtil::stripSlashes($_POST["enable_map"]));
$this->object->update();
$ilCtrl->redirect($this, "editMapSettings");
}

+ Here is the call graph for this function:

ilObjCourseGUI::saveNotificationObject ( )

:TEMP: Save notification setting (from infoscreen)

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

References $_REQUEST, $ilUser, and ilUtil\sendSuccess().

{
global $ilUser;
$ilUser->setPref("grpcrs_ntf_".$this->ref_id, (bool)$_REQUEST["crs_ntf"]);
$ilUser->writePrefs();
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
$this->ctrl->redirect($this, "");
}

+ Here is the call graph for this function:

ilObjCourseGUI::selectStarterObject ( )

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

References ilObjectGUI\$tpl, and ilObjectGUI\checkPermission().

Referenced by addStarterObject().

{
global $tpl;
$this->checkPermission('write');
$this->tabs_gui->clearTargets();
$this->tabs_gui->setBackTarget($this->lng->txt('back'),
$this->ctrl->getLinkTarget($this, 'listStructure'));
include_once './Modules/Course/classes/class.ilCourseStartObjectsTableGUI.php';
$table = new ilCourseStartObjectsTableGUI($this, 'selectStarter', $this->object);
$tpl->setContent($table->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::sendFileObject ( )

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

References $_GET, $file, and ilUtil\deliverFile().

{
include_once 'Modules/Course/classes/class.ilCourseFile.php';
$file = new ilCourseFile((int) $_GET['file_id']);
ilUtil::deliverFile($file->getAbsolutePath(),$file->getFileName(),$file->getFileType());
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::sendMailToSelectedUsersObject ( )

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

References $_GET, $_POST, $usr_id, ilObjUser\_lookupLogin(), createMailSignature(), ilMailFormCall\getRedirectTarget(), membersObject(), ilUtil\redirect(), and ilUtil\sendFailure().

Referenced by memberGatewayObject().

{
if(isset($_GET['member_id']))
{
$_POST['member'] = array($_GET['member_id']);
}
else
{
$_POST['member'] = array_unique(array_merge((array) $_POST['members'],
(array) $_POST['tutors'],
(array) $_POST['admins'],
(array) $_POST['waiting'],
(array) $_POST['subscribers'],
(array) $_POST['roles']
));
}
if (!count($_POST["member"]))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"));
$this->membersObject();
return false;
}
foreach($_POST["member"] as $usr_id)
{
$rcps[] = ilObjUser::_lookupLogin($usr_id);
}
require_once 'Services/Mail/classes/class.ilMailFormCall.php';
array(),
array(
'type' => 'new',
'rcp_to' => implode(',',$rcps),
'sig' => $this->createMailSignature()
)));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::setContentSubTabs ( )

Set content sub tabs.

Reimplemented from ilContainerGUI.

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

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

{
global $ilAccess, $lng, $ilCtrl;
if ($this->object->getType() != 'crs')
{
return true;
}
if (!$ilAccess->checkAccess('write','',
$this->object->getRefId(),'crs',$this->object->getId()))
{
$is_tutor = false;
// No further tabs if objective view or archives
if($this->object->enabledObjectiveView())
{
return false;
}
}
else
{
$is_tutor = true;
}
// These subtabs should also work, if the command is called directly in
// ilObjCourseGUI, so please use ...ByClass methods.
// (see ilObjCourseGUI->executeCommand: case "ilcolumngui")
if(!$_SESSION['crs_timings_panel'][$this->object->getId()] or 1)
{
{
$this->tabs_gui->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass("ilobjcoursegui", "view"));
}
else
{
$this->tabs_gui->addSubTab("view_content", $lng->txt("view"), $ilCtrl->getLinkTargetByClass("ilobjcoursegui", "disableAdministrationPanel"));
}
}
if($this->object->getViewMode() == IL_CRS_VIEW_TIMING)
{
$this->tabs_gui->addSubTabTarget('timings_timings',
$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','editUserTimings'));
}
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::setLPSyncObject ( )
protected

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

References ilUtil\sendSuccess(), and ilObjCourse\STATUS_DETERMINATION_LP.

{
$this->object->setStatusDetermination(ilObjCourse::STATUS_DETERMINATION_LP);
$this->object->update();
$this->object->syncMembersStatusWithLP();
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
$this->ctrl->redirect($this, "edit");
}

+ Here is the call graph for this function:

ilObjCourseGUI::setShowHidePrefs ( )

set preferences (show/hide tabel content)

public

Returns

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

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

Referenced by membersObject().

{
global $ilUser;
if(isset($_GET['admin_hide']))
{
$ilUser->writePref('crs_admin_hide',(int) $_GET['admin_hide']);
}
if(isset($_GET['tutor_hide']))
{
$ilUser->writePref('crs_tutor_hide',(int) $_GET['tutor_hide']);
}
if(isset($_GET['member_hide']))
{
$ilUser->writePref('crs_member_hide',(int) $_GET['member_hide']);
}
if(isset($_GET['subscriber_hide']))
{
$ilUser->writePref('crs_subscriber_hide',(int) $_GET['subscriber_hide']);
}
if(isset($_GET['wait_hide']))
{
$ilUser->writePref('crs_wait_hide',(int) $_GET['wait_hide']);
}
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
foreach(ilCourseParticipants::getMemberRoles($this->object->getRefId()) as $role_id)
{
if(isset($_GET['role_hide_'.$role_id]))
{
$ilUser->writePref('crs_role_hide_'.$role_id,(int) $_GET['role_hide_'.$role_id]);
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::setSubTabs (   $a_tab)

set sub tabs

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

References $ilUser, ilObjectGUI\$tree, ilPrivacySettings\_getInstance(), ilCourseDefinedFieldDefinition\_hasFields(), ilGoogleMapUtil\isActivated(), ilCertificate\isActive(), and ilCourseConstants\MAIL_ALLOWED_ALL.

Referenced by confirmDeleteInfoFilesObject(), deleteMembersObject(), editCourseIconsObject(), editInfoObject(), editMapSettingsObject(), editMembersObject(), editObject(), executeCommand(), listStructureObject(), mailMembersObject(), membersGalleryObject(), membersMapObject(), and membersObject().

{
global $rbacsystem,$ilUser,$ilAccess,$tree;
switch ($a_tab)
{
case "properties":
$this->tabs_gui->addSubTabTarget("crs_settings",
$this->ctrl->getLinkTarget($this,'edit'),
"edit", get_class($this));
$this->tabs_gui->addSubTabTarget("crs_info_settings",
$this->ctrl->getLinkTarget($this,'editInfo'),
"editInfo", get_class($this));
$this->tabs_gui->addSubTabTarget("preconditions",
$this->ctrl->getLinkTargetByClass('ilConditionHandlerInterface','listConditions'),
"", "ilConditionHandlerInterface");
$this->tabs_gui->addSubTabTarget("crs_start_objects",
$this->ctrl->getLinkTarget($this,'listStructure'),
"listStructure", get_class($this));
$this->tabs_gui->addSubTabTarget('groupings',
$this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui','listGroupings'),
'listGroupings',
get_class($this));
// custom icon
if ($this->ilias->getSetting("custom_icons"))
{
$this->tabs_gui->addSubTabTarget("icon_settings",
$this->ctrl->getLinkTarget($this,'editCourseIcons'),
"editCourseIcons", get_class($this));
}
// map settings
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
{
$this->tabs_gui->addSubTabTarget("crs_map_settings",
$this->ctrl->getLinkTarget($this,'editMapSettings'),
"editMapSettings", get_class($this));
}
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
// only show if export permission is granted
if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()) or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
{
$this->tabs_gui->addSubTabTarget('crs_custom_user_fields',
$this->ctrl->getLinkTargetByClass('ilobjectcustomuserfieldsgui'),
'',
'ilobjectcustomuserfieldsgui');
}
// certificates
include_once "Services/Certificate/classes/class.ilCertificate.php";
{
$this->tabs_gui->addSubTabTarget(
"certificate",
$this->ctrl->getLinkTargetByClass("ilcertificategui", "certificateeditor"),
"", "ilcertificategui");
}
break;
case 'members':
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget("crs_member_administration",
$this->ctrl->getLinkTarget($this,'members'),
"members", get_class($this));
$this->tabs_gui->addSubTabTarget("crs_members_groups",
$this->ctrl->getLinkTargetByClass("ilCourseParticipantsGroupsGUI", "show"),
"", "ilCourseParticipantsGroupsGUI");
$this->tabs_gui->addSubTabTarget("crs_members_gallery",
$this->ctrl->getLinkTarget($this,'membersGallery'),
"membersGallery", get_class($this));
}
elseif(
$this->object->getShowMembers() == $this->object->SHOW_MEMBERS_ENABLED
)
{
$this->tabs_gui->addSubTabTarget("crs_members_gallery",
$this->ctrl->getLinkTarget($this,'membersGallery'),
"membersGallery", get_class($this));
}
// members map
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
if (ilGoogleMapUtil::isActivated() && $this->object->getEnableCourseMap())
{
$this->tabs_gui->addSubTabTarget("crs_members_map",
$this->ctrl->getLinkTarget($this,'membersMap'),
"membersMap", get_class($this));
}
include_once 'Services/Mail/classes/class.ilMail.php';
$mail = new ilMail($ilUser->getId());
if(
($this->object->getMailToMembersType() == ilCourseConstants::MAIL_ALLOWED_ALL ||
$ilAccess->checkAccess('write','',$this->object->getRefId())) &&
$rbacsystem->checkAccess('internal_mail',$mail->getMailObjectReferenceId())
)
{
$this->tabs_gui->addSubTabTarget("mail_members",
$this->ctrl->getLinkTarget($this,'mailMembers'),
"mailMembers", get_class($this));
}
$childs = (array) $tree->getChildsByType($this->object->getRefId(),'sess');
if(count($childs) && $ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget("events",
$this->ctrl->getLinkTargetByClass('ilsessionoverviewgui','listSessions'),
"", 'ilsessionoverviewgui');
}
include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
if(ilPrivacySettings::_getInstance()->checkExportAccess($this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget('export_members',
$this->ctrl->getLinkTargetByClass('ilmemberexportgui','show'),
"", 'ilmemberexportgui');
}
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::showStartObjects ( )

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

References ilObjectGUI\$ilias, $ilUser, ilObjectGUI\$obj_id, ilObjectGUI\$ref_id, ilConditionHandler\_checkAllConditionsOfTarget(), ilLink\_getLink(), ilRepositoryExplorer\buildFrameTarget(), ilUtil\getImagePath(), and ilCourseLMHistory\getLMHistory().

Referenced by viewObject().

{
include_once './Modules/Course/classes/class.ilCourseLMHistory.php';
include_once './Services/Repository/classes/class.ilRepositoryExplorer.php';
include_once './Services/Link/classes/class.ilLink.php';
global $rbacsystem,$ilias,$ilUser,$ilAccess,$ilObjDataCache;
$this->tabs_gui->setSubTabActive('view');
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_start_view.html",'Modules/Course');
$this->tpl->setVariable("INFO_STRING",$this->lng->txt('crs_info_start'));
$this->tpl->setVariable("TBL_TITLE_START",$this->lng->txt('crs_table_start_objects'));
$this->tpl->setVariable("HEADER_NR",$this->lng->txt('crs_nr'));
$this->tpl->setVariable("HEADER_DESC",$this->lng->txt('description'));
$this->tpl->setVariable("HEADER_EDITED",$this->lng->txt('crs_objective_accomplished'));
$lm_continue =& new ilCourseLMHistory($this->object->getRefId(),$ilUser->getId());
$continue_data = $lm_continue->getLMHistory();
$counter = 0;
foreach($this->start_obj->getStartObjects() as $start)
{
$obj_id = $ilObjDataCache->lookupObjId($start['item_ref_id']);
$ref_id = $start['item_ref_id'];
$type = $ilObjDataCache->lookupType($obj_id);
$obj_link = ilLink::_getLink($ref_id,$type);
$obj_frame = $obj_frame ? $obj_frame : '';
// Tmp fix for tests
$obj_frame = $type == 'tst' ? '' : $obj_frame;
$contentObj = false;
if($ilAccess->checkAccess('read','',$ref_id))
{
$this->tpl->setCurrentBlock("start_read");
$this->tpl->setVariable("READ_TITLE_START",$ilObjDataCache->lookupTitle($obj_id));
$this->tpl->setVariable("READ_TARGET_START",$obj_frame);
$this->tpl->setVariable("READ_LINK_START", $obj_link.'&crs_show_result='.$this->object->getRefId());
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("start_visible");
$this->tpl->setVariable("VISIBLE_LINK_START",$ilObjDataCache->lookupTitle($obj_id));
$this->tpl->parseCurrentBlock();
}
// CONTINUE LINK
if(isset($continue_data[$ref_id]))
{
$this->tpl->setCurrentBlock("link");
$this->tpl->setVariable("LINK_HREF",ilLink::_getLink($ref_id,'',array('obj_id',
$continue_data[$ref_id]['lm_page_id'])));
#$this->tpl->setVariable("CONTINUE_LINK_TARGET",$target);
$this->tpl->setVariable("LINK_NAME",$this->lng->txt('continue_work'));
$this->tpl->parseCurrentBlock();
}
// add to desktop link
if(!$ilUser->isDesktopItem($ref_id,$type) and
$this->object->getAboStatus())
{
if ($ilAccess->checkAccess('read','',$ref_id))
{
$this->tpl->setCurrentBlock("link");
$this->ctrl->setParameterByClass(get_class($this),'item_ref_id',$ref_id);
$this->ctrl->setParameterByClass(get_class($this),'item_id',$ref_id);
$this->ctrl->setParameterByClass(get_class($this),'type',$type);
$this->tpl->setVariable("LINK_HREF",$this->ctrl->getLinkTarget($this,'addToDesk'));
$this->tpl->setVariable("LINK_NAME", $this->lng->txt("to_desktop"));
$this->tpl->parseCurrentBlock();
}
}
elseif($this->object->getAboStatus())
{
$this->tpl->setCurrentBlock("link");
$this->ctrl->setParameterByClass(get_class($this),'item_ref_id',$ref_id);
$this->ctrl->setParameterByClass(get_class($this),'item_id',$ref_id);
$this->ctrl->setParameterByClass(get_class($this),'type',$type);
$this->tpl->setVariable("LINK_HREF",$this->ctrl->getLinkTarget($this,'removeFromDesk'));
$this->tpl->setVariable("LINK_NAME", $this->lng->txt("unsubscribe"));
$this->tpl->parseCurrentBlock();
}
// Description
if(strlen($ilObjDataCache->lookupDescription($obj_id)))
{
$this->tpl->setCurrentBlock("start_description");
$this->tpl->setVariable("DESCRIPTION_START",$ilObjDataCache->lookupDescription($obj_id));
$this->tpl->parseCurrentBlock();
}
if($this->start_obj->isFullfilled($ilUser->getId(),$ref_id))
{
$accomplished = 'accomplished';
}
else
{
$accomplished = 'not_accomplished';
}
$this->tpl->setCurrentBlock("start_row");
$this->tpl->setVariable("EDITED_IMG",ilUtil::getImagePath('crs_'.$accomplished.'.png'));
$this->tpl->setVariable("EDITED_ALT",$this->lng->txt('crs_objective_'.$accomplished));
$this->tpl->setVariable("ROW_CLASS",'option_value');
$this->tpl->setVariable("ROW_CLASS_CENTER",'option_value_center');
$this->tpl->setVariable("OBJ_NR_START",++$counter.'.');
$this->tpl->parseCurrentBlock();
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::toUnix (   $date,
  $time = array() 
)

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

{
return mktime($time['h'],$time['m'],0,$date['m'],$date['d'],$date['y']);
}
ilObjCourseGUI::unsubscribeObject ( )

DEPRECATED?

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

References leaveObject().

{
$this->leaveObject();
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateAdminStatusObject ( )

update admin status

public

Parameters
@return

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

References $_POST, ilObjectGUI\checkPermission(), and updateParticipantsStatus().

{
$this->checkPermission('write');
$visible_members = array_intersect(array_unique((array) $_POST['visible_member_ids']),$this->object->getMembersObject()->getAdmins());
$passed = is_array($_POST['passed']) ? $_POST['passed'] : array();
$notification = is_array($_POST['notification']) ? $_POST['notification'] : array();
$this->updateParticipantsStatus('admins',$visible_members,$passed,$notification,array());
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateCourseIconsObject ( )

update container icons

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

References $_POST, ilObjectGUI\checkPermission(), editCourseIconsObject(), initCourseIconsForm(), and ilUtil\sendSuccess().

{
$this->checkPermission('write');
$form = $this->initCourseIconsForm();
if($form->checkInput())
{
//save custom icons
if ($this->ilias->getSetting("custom_icons"))
{
if($_POST["cont_big_icon_delete"])
{
$this->object->removeBigIcon();
}
if($_POST["cont_small_icon_delete"])
{
$this->object->removeSmallIcon();
}
if($_POST["cont_tiny_icon_delete"])
{
$this->object->removeTinyIcon();
}
$this->object->saveIcons($_FILES["cont_big_icon"]['tmp_name'],
$_FILES["cont_small_icon"]['tmp_name'], $_FILES["cont_tiny_icon"]['tmp_name']);
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this,"editCourseIcons");
}
$form->setValuesByPost();
$this->editCourseIconsObject($form);
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateInfoObject ( )

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

References $_POST, $ilErr, ilObjectGUI\checkPermission(), editInfoObject(), ilAdvancedMDRecordGUI\loadFromPost(), ilAdvancedMDRecordGUI\MODE_EDITOR, ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
global $ilErr,$ilAccess;
$this->checkPermission('write');
include_once 'Modules/Course/classes/class.ilCourseFile.php';
$file_obj = new ilCourseFile();
$file_obj->setCourseId($this->object->getId());
$file_obj->setFileName(strlen($_POST['file_name']) ?
ilUtil::stripSlashes($_POST['file_name']) :
$_FILES['file']['name']);
$file_obj->setFileSize($_FILES['file']['size']);
$file_obj->setFileType($_FILES['file']['type']);
$file_obj->setTemporaryName($_FILES['file']['tmp_name']);
$file_obj->setErrorCode($_FILES['file']['error']);
$this->object->setImportantInformation(ilUtil::stripSlashes($_POST['important']));
$this->object->setSyllabus(ilUtil::stripSlashes($_POST['syllabus']));
$this->object->setContactName(ilUtil::stripSlashes($_POST['contact_name']));
$this->object->setContactResponsibility(ilUtil::stripSlashes($_POST['contact_responsibility']));
$this->object->setContactPhone(ilUtil::stripSlashes($_POST['contact_phone']));
$this->object->setContactEmail(ilUtil::stripSlashes($_POST['contact_email']));
$this->object->setContactConsultation(ilUtil::stripSlashes($_POST['contact_consultation']));
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
'crs',$this->object->getId());
$record_gui->loadFromPost();
// Validate
$ilErr->setMessage('');
$file_obj->validate();
$this->object->validateInfoSettings();
if(strlen($ilErr->getMessage()))
{
ilUtil::sendFailure($ilErr->getMessage());
$this->editInfoObject();
return false;
}
$this->object->update();
$file_obj->create();
$record_gui->saveValues();
// Update ecs content
include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
$ecs = new ilECSCourseSettings($this->object);
$ecs->handleContentUpdate();
ilUtil::sendSuccess($this->lng->txt("crs_settings_saved"));
$this->editInfoObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateLPFromStatus (   $a_member_id,
  $a_has_passed 
)
protected

sync course status and lp status

Parameters
int$a_member_id
bool$a_has_passed

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

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

Referenced by updateMemberObject(), updateMembersObject(), and updateParticipantsStatus().

{
global $ilUser;
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
$this->object->getStatusDetermination() == ilObjCourse::STATUS_DETERMINATION_LP)
{
include_once './Services/Object/classes/class.ilObjectLP.php';
$olp = ilObjectLP::getInstance($this->object->getId());
if($olp->getCurrentMode() == ilLPObjSettings::LP_MODE_MANUAL_BY_TUTOR)
{
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$marks = new ilLPMarks($this->object->getId(), $a_member_id);
// only if status has changed
if($marks->getCompleted() != $a_has_passed)
{
$marks->setCompleted($a_has_passed);
$marks->update();
include_once("./Services/Tracking/classes/class.ilLPStatusWrapper.php");
ilLPStatusWrapper::_updateStatus($this->object->getId(), $a_member_id, null, false, true);
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::updateMemberObject ( )

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

References $_GET, $_POST, $ilUser, ilObjectGUI\checkPermission(), membersObject(), ilUtil\sendSuccess(), and updateLPFromStatus().

{
global $rbacsystem, $ilUser;
$this->checkPermission('write');
// CHECK MEMBER_ID
if(!isset($_GET["member_id"]) or !$this->object->getMembersObject()->isAssigned((int) $_GET["member_id"]))
{
$this->ilias->raiseError($this->lng->txt("crs_no_valid_member_id_given"),$this->ilias->error_obj->MESSAGE);
}
// Remember settings for notification
$passed = $this->object->getMembersObject()->hasPassed((int) $_GET['member_id']);
$notify = $this->object->getMembersObject()->isNotificationEnabled((int) $_GET['member_id']);
$blocked = $this->object->getMembersObject()->isBlocked((int) $_GET['member_id']);
$this->object->getMembersObject()->updateRoleAssignments((int) $_GET['member_id'],$_POST['roles']);
$this->object->getMembersObject()->updatePassed((int) $_GET['member_id'],(int) $_POST['passed'],true);
$this->object->getMembersObject()->updateNotification((int) $_GET['member_id'],(int) $_POST['notification']);
$this->object->getMembersObject()->updateBlocked((int) $_GET['member_id'],(int) $_POST['blocked']);
if($passed != $this->object->getMembersObject()->hasPassed((int) $_GET['member_id']) or
$notify != $this->object->getMembersObject()->isNotificationEnabled((int) $_GET['member_id']) or
$blocked != $this->object->getMembersObject()->isBlocked((int) $_GET['member_id']))
{
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_STATUS_CHANGED,(int) $_GET['member_id']);
}
$this->updateLPFromStatus((int) $_GET['member_id'], (bool) $_POST['passed']);
ilUtil::sendSuccess($this->lng->txt("crs_member_updated"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateMembersObject ( )

update members

public

Parameters
@return

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

References $_POST, $ilUser, $usr_id, ilCourseParticipants\_getInstanceByObjId(), ilObjectGUI\checkPermission(), editMembersObject(), membersObject(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and updateLPFromStatus().

Referenced by memberGatewayObject().

{
global $rbacsystem, $rbacreview, $ilUser, $ilAccess;
$this->checkPermission('write');
if(!count($_POST['participants']))
{
ilUtil::sendFailure($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
$notifications = $_POST['notification'] ? $_POST['notification'] : array();
$passed = $_POST['passed'] ? $_POST['passed'] : array();
$blocked = $_POST['blocked'] ? $_POST['blocked'] : array();
// Determine whether the user has the 'edit_permission' permission
$hasEditPermissionAccess =
(
$ilAccess->checkAccess('edit_permission','',$this->object->getRefId()) or
ilCourseParticipants::_getInstanceByObjId($this->object->getId())->isAdmin($ilUser->getId())
);
// Get all assignable local roles of the course object, and
// determine the role id of the course administrator role.
$assignableLocalCourseRoles = array();
$courseAdminRoleId = $this->object->getDefaultAdminRole();
foreach ($this->object->getLocalCourseRoles(false) as $title => $role_id)
{
$assignableLocalCourseRoles[$role_id] = $title;
}
// Validate the user ids and role ids in the post data
foreach($_POST['participants'] as $usr_id)
{
$memberIsCourseAdmin = $rbacreview->isAssigned($usr_id, $courseAdminRoleId);
// If the current user doesn't have the 'edit_permission'
// permission, make sure he doesn't remove the course
// administrator role of members who are course administrator.
if (! $hasEditPermissionAccess && $memberIsCourseAdmin &&
! in_array($courseAdminRoleId, $_POST['roles'][$usr_id])
)
{
$_POST['roles'][$usr_id][] = $courseAdminRoleId;
}
// Validate the role ids in the post data
foreach ((array) $_POST['roles'][$usr_id] as $role_id)
{
if(!array_key_exists($role_id, $assignableLocalCourseRoles))
{
ilUtil::sendFailure($this->lng->txt('msg_no_perm_perm'));
$this->membersObject();
return false;
}
if(!$hasEditPermissionAccess &&
$role_id == $courseAdminRoleId &&
!$memberIsCourseAdmin)
{
ilUtil::sendFailure($this->lng->txt('msg_no_perm_perm'));
$this->membersObject();
return false;
}
}
}
$has_admin = false;
foreach(ilCourseParticipants::_getInstanceByObjId($this->object->getId())->getAdmins() as $admin_id)
{
if(!isset($_POST['roles'][$admin_id]))
{
$has_admin = true;
break;
}
if(in_array($courseAdminRoleId,$_POST['roles'][$admin_id]))
{
$has_admin = true;
break;
}
}
if(!$has_admin)
{
ilUtil::sendFailure($this->lng->txt('crs_min_one_admin'));
$_POST['members'] = $_POST['participants'];
return false;
}
foreach($_POST['participants'] as $usr_id)
{
$this->object->getMembersObject()->updateRoleAssignments($usr_id,(array) $_POST['roles'][$usr_id]);
// Disable notification for all of them
$this->object->getMembersObject()->updateNotification($usr_id,0);
if(($this->object->getMembersObject()->isTutor($usr_id) or $this->object->getMembersObject()->isAdmin($usr_id)) and in_array($usr_id,$notifications))
{
$this->object->getMembersObject()->updateNotification($usr_id,1);
}
$this->object->getMembersObject()->updateBlocked($usr_id,0);
if((!$this->object->getMembersObject()->isAdmin($usr_id) and !$this->object->getMembersObject()->isTutor($usr_id)) and in_array($usr_id,$blocked))
{
$this->object->getMembersObject()->updateBlocked($usr_id,1);
}
$this->object->getMembersObject()->updatePassed($usr_id,in_array($usr_id,$passed),true);
$this->object->getMembersObject()->sendNotification(
$this->object->getMembersObject()->NOTIFY_STATUS_CHANGED,
$this->updateLPFromStatus($usr_id,in_array($usr_id,$passed));
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"));
$this->membersObject();
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::updateMemberStatusObject ( )

updateMemberStatus

public

Parameters
@return

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

References $_POST, ilObjectGUI\checkPermission(), and updateParticipantsStatus().

{
$this->checkPermission('write');
$visible_members = array_intersect(array_unique((array) $_POST['visible_member_ids']),$this->object->getMembersObject()->getMembers());
$passed = is_array($_POST['passed']) ? $_POST['passed'] : array();
$blocked = is_array($_POST['blocked']) ? $_POST['blocked'] : array();
$this->updateParticipantsStatus('members',$visible_members,$passed,array(),$blocked);
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateObject ( )

updates object entry in object_data

Reimplemented from ilObjectGUI.

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

References $_POST, $ilUser, ilChangeEvent\_catchupWriteEvents(), ilChangeEvent\_recordWriteEvent(), ilContainerGUI\afterUpdate(), ilObjectServiceSettingsGUI\AUTO_RATING_NEW_OBJECTS, ilObjectServiceSettingsGUI\CALENDAR_VISIBILITY, confirmLPSync(), editObject(), IL_CAL_UNIX, IL_CRS_ACTIVATION_LIMITED, IL_CRS_ACTIVATION_UNLIMITED, IL_CRS_SUBSCRIPTION_DEACTIVATED, IL_CRS_SUBSCRIPTION_DIRECT, IL_CRS_SUBSCRIPTION_LIMITED, IL_CRS_SUBSCRIPTION_UNLIMITED, IL_CRS_VIEW_TIMING, initEditForm(), ilObjectServiceSettingsGUI\NEWS_VISIBILITY, ilUtil\sendFailure(), ilContainer\SORT_ACTIVATION, ilObjCourse\STATUS_DETERMINATION_LP, ilUtil\stripSlashes(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

{
$form = $this->initEditForm();
$form->checkInput();
$this->object->setTitle(ilUtil::stripSlashes($_POST['title']));
$this->object->setDescription(ilUtil::stripSlashes($_POST['desc']));
/*
$archive_start = $this->loadDate('archive_start');
$archive_end = $this->loadDate('archive_end');
*/
$period = $form->getItemByPostVar("access_period");
$sub_period = $form->getItemByPostVar("subscription_period");
if((int)$_POST['activation_type'])
{
$this->object->setActivationType(IL_CRS_ACTIVATION_LIMITED);
}
else
{
$this->object->setActivationType(IL_CRS_ACTIVATION_UNLIMITED);
}
$this->object->setOfflineStatus(!(bool)$_POST['activation_online']);
$this->object->setActivationStart($period->getStart()->get(IL_CAL_UNIX));
$this->object->setActivationEnd($period->getEnd()->get(IL_CAL_UNIX));
$this->object->setActivationVisibility((int)$_POST['activation_visibility']);
$sub_type = (int)$_POST['subscription_type'];
{
$this->object->setSubscriptionType($sub_type);
if((int)$_POST['subscription_limitation_type'])
{
$this->object->setSubscriptionLimitationType(IL_CRS_SUBSCRIPTION_LIMITED);
}
else
{
$this->object->setSubscriptionLimitationType(IL_CRS_SUBSCRIPTION_UNLIMITED);
}
}
else
{
$this->object->setSubscriptionType(IL_CRS_SUBSCRIPTION_DIRECT); // see ilObjCourse::__createDefaultSettings()
$this->object->setSubscriptionLimitationType(IL_CRS_SUBSCRIPTION_DEACTIVATED);
}
// save subitems anyways
$this->object->setSubscriptionPassword(ilUtil::stripSlashes($_POST['subscription_password']));
$this->object->setSubscriptionStart($sub_period->getStart()->get(IL_CAL_UNIX));
$this->object->setSubscriptionEnd($sub_period->getEnd()->get(IL_CAL_UNIX));
$this->object->enableSubscriptionMembershipLimitation((int) $_POST['subscription_membership_limitation']);
$this->object->setSubscriptionMaxMembers((int) $_POST['subscription_max']);
$this->object->enableRegistrationAccessCode((int) $_POST['reg_code_enabled']);
$this->object->setRegistrationAccessCode(ilUtil::stripSlashes($_POST['reg_code']));
$this->object->enableWaitingList((int) $_POST['waiting_list']);
#$this->object->setSubscriptionNotify((int) $_POST['subscription_notification']);
$this->object->setViewMode((int) $_POST['view_mode']);
if($this->object->getViewMode() == IL_CRS_VIEW_TIMING)
{
$this->object->setOrderType(ilContainer::SORT_ACTIVATION);
}
else
{
$this->object->setOrderType((int) $_POST['order_type']);
}
/*
$this->object->setArchiveStart($archive_start->get(IL_CAL_UNIX));
$this->object->setArchiveEnd($archive_end->get(IL_CAL_UNIX));
$this->object->setArchiveType($_POST['archive_type']);
*/
$this->object->setAboStatus((int) $_POST['abo']);
$this->object->setShowMembers((int) $_POST['show_members']);
$this->object->setMailToMembersType((int) $_POST['mail_type']);
$this->object->enableSessionLimit((int) $_POST['sl']);
$this->object->setNumberOfPreviousSessions(is_numeric($_POST['sp']) ? (int) $_POST['sp'] : -1 );
$this->object->setNumberOfnextSessions(is_numeric($_POST['sn']) ? (int) $_POST['sn'] : -1 );
$this->object->setAutoNotification($_POST['auto_notification'] == 1 ? true : false);
$show_lp_sync_confirmation = false;
// could be hidden in form
if(isset($_POST['status_dt']))
{
if($this->object->getStatusDetermination() != ilObjCourse::STATUS_DETERMINATION_LP &&
(int)$_POST['status_dt'] == ilObjCourse::STATUS_DETERMINATION_LP)
{
$show_lp_sync_confirmation = true;
}
else
{
$this->object->setStatusDetermination((int)$_POST['status_dt']);
}
}
if($this->object->validate())
{
$this->object->update();
// BEGIN ChangeEvent: Record write event
require_once('Services/Tracking/classes/class.ilChangeEvent.php');
global $ilUser;
ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
// END ChangeEvent: Record write event
include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
$this->object->getId(),
$form,
array(
)
);
// Update ecs export settings
include_once 'Modules/Course/classes/class.ilECSCourseSettings.php';
$ecs = new ilECSCourseSettings($this->object);
if(!$ecs->handleSettingsUpdate())
{
$this->editObject();
return false;
}
if($show_lp_sync_confirmation)
{
return $this->confirmLPSync();
}
return $this->afterUpdate();
}
else
{
ilUtil::sendFailure($this->object->getMessage());
$this->editObject();
return false;
}
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateParticipantsStatus (   $type,
  $visible_members,
  $passed,
  $notification,
  $blocked 
)

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

References $ilErr, $ilUser, membersObject(), ilUtil\sendSuccess(), and updateLPFromStatus().

Referenced by updateAdminStatusObject(), updateMemberStatusObject(), updateRoleStatusObject(), and updateTutorStatusObject().

{
global $ilAccess,$ilErr,$ilUser,$rbacadmin;
foreach($visible_members as $member_id)
{
$this->object->getMembersObject()->updatePassed($member_id,in_array($member_id,$passed),true);
$this->updateLPFromStatus($member_id, in_array($member_id, $passed));
switch($type)
{
case 'admins';
$this->object->getMembersObject()->updateNotification($member_id,in_array($member_id,$notification));
$this->object->getMembersObject()->updateBlocked($member_id,false);
break;
case 'members':
if($this->object->getMembersObject()->isBlocked($member_id) and !in_array($member_id,$blocked))
{
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_UNBLOCK_MEMBER,$member_id);
}
if(!$this->object->getMembersObject()->isBlocked($member_id) and in_array($member_id,$blocked))
{
$this->object->getMembersObject()->sendNotification($this->object->getMembersObject()->NOTIFY_BLOCK_MEMBER,$member_id);
}
$this->object->getMembersObject()->updateNotification($member_id,false);
$this->object->getMembersObject()->updateBlocked($member_id,in_array($member_id,$blocked));
break;
}
}
ilUtil::sendSuccess($this->lng->txt('settings_saved'));
$this->membersObject();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjCourseGUI::updateRoleStatusObject ( )

Update status of additional course roles.

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

References $_POST, ilObjectGUI\checkPermission(), ilCourseParticipants\getMemberRoles(), and updateParticipantsStatus().

{
global $rbacreview;
$this->checkPermission('write');
include_once './Modules/Course/classes/class.ilCourseParticipants.php';
$users = array();
foreach(ilCourseParticipants::getMemberRoles($this->object->getRefId()) as $role_id)
{
$users = array_merge($users,$rbacreview->assignedUsers($role_id));
}
$passed = is_array($_POST['passed']) ? $_POST['passed'] : array();
$blocked = is_array($_POST['blocked']) ? $_POST['blocked'] : array();
$this->updateParticipantsStatus('members',$users,$passed,array(),$blocked);
}

+ Here is the call graph for this function:

ilObjCourseGUI::updateTutorStatusObject ( )

update tuto status

public

Parameters
@return

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

References $_POST, ilObjectGUI\checkPermission(), and updateParticipantsStatus().

{
$this->checkPermission('write');
$visible_members = array_intersect(array_unique((array) $_POST['visible_member_ids']),$this->object->getMembersObject()->getTutors());
$passed = is_array($_POST['passed']) ? $_POST['passed'] : array();
$notification = is_array($_POST['notification']) ? $_POST['notification'] : array();
$this->updateParticipantsStatus('admins',$visible_members,$passed,$notification,array());
}

+ Here is the call graph for this function:

ilObjCourseGUI::viewObject ( )

list childs of current object

public

Reimplemented from ilObjectGUI.

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

References $_GET, $ilCtrl, $ilUser, $ret, __checkStartObjects(), ilMDUtils\_fillHTMLMetaTags(), ilLearningProgress\_tracProgress(), checkAgreement(), ilObjectGUI\checkPermission(), renderObject(), showStartObjects(), 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().

{
global $rbacsystem, $ilUser, $ilCtrl;
// CHECK ACCESS
$this->checkPermission('read','view');
/*
if(!$rbacsystem->checkAccess("read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
*/
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
return true;
}
// Fill meta header tags
include_once('Services/MetaData/classes/class.ilMDUtils.php');
ilMDUtils::_fillHTMLMetaTags($this->object->getId(),$this->object->getId(),'crs');
// Trac access
if ($ilCtrl->getNextClass() != "ilcolumngui")
{
include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),
$this->object->getRefId(),'crs');
}
if(!$this->checkAgreement())
{
include_once('Services/Membership/classes/class.ilMemberAgreementGUI.php');
$this->tabs_gui->clearTargets();
$this->ctrl->setReturn($this,'view_content');
$agreement = new ilMemberAgreementGUI($this->object->getRefId());
$this->ctrl->setCmdClass(get_class($agreement));
$this->ctrl->forwardCommand($agreement);
return true;
}
if(!$this->__checkStartObjects())
{
$this->showStartObjects();
}
// views handled by general container logic
if ($this->object->getViewMode() == ilContainer::VIEW_SIMPLE ||
$this->object->getViewMode() == ilContainer::VIEW_BY_TYPE ||
$this->object->getViewMode() == ilContainer::VIEW_SESSIONS ||
$this->object->getViewMode() == ilContainer::VIEW_TIMING ||
$this->object->getViewMode() == ilContainer::VIEW_OBJECTIVE
)
{
return $ret;
}
else
{
include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
$course_content_obj = new ilCourseContentGUI($this);
$this->ctrl->setCmdClass(get_class($course_content_obj));
$this->ctrl->forwardCommand($course_content_obj);
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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