ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
ilObjiLincCourseGUI Class Reference

Class ilObjiLincCourseGUI. More...

+ Inheritance diagram for ilObjiLincCourseGUI:
+ Collaboration diagram for ilObjiLincCourseGUI:

Public Member Functions

 ilObjiLincCourseGUI ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=false)
 Constructor public. More...
 
 createObject ()
 create new object form More...
 
 updateObject ()
 
 saveObject ()
 save object public More...
 
 getTabs (&$tabs_gui)
 get tabs public More...
 
 __unsetSessionVariables ()
 
 __search ($a_search_string, $a_search_for)
 
 __showSearchUserTable ($a_result_set, $a_user_ids=NULL, $a_cmd="search")
 
 __showSearchRoleTable ($a_result_set, $a_role_ids=NULL)
 
 __showSearchGroupTable ($a_result_set, $a_grp_ids=NULL)
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $from="")
 
 listUsersRoleObject ()
 
 listUsersGroupObject ()
 
 canceledObject ()
 canceledObject is called when an operation is canceled, method links back public More...
 
 cancelMemberObject ()
 canceledObject is called when operation is canceled, method links back public More...
 
 membersObject ()
 display group members More...
 
executeCommand ()
 
 viewObject ()
 
 agendaObject ()
 
 searchUserFormObject ()
 
 searchObject ()
 
 addUserObject ()
 displays confirmation formular with users that shall be assigned to group public More...
 
 removeMemberObject ()
 displays confirmation formular with users that shall be removed from group public More...
 
 confirmationObject ($user_id='', $confirm='', $cancel='', $info='', $status='', $a_cmd_return_location='', $invokeMethod='')
 displays confirmation form public More...
 
 confirmedRemoveMemberObject ()
 remove members from group TODO: set return location to parent object if user removes himself TODO: allow user to remove himself when he is not group admin public More...
 
 changeMemberObject ()
 displays form in which the member-status can be changed public More...
 
 updateMemberStatusObject ()
 displays form in which the member-status can be changed public More...
 
 editObject ()
 
 joinObject ()
 
 isActiveAdministrationPanel ()
 
 __setSubTabs ($a_tab)
 
 mailMembersObject ()
 
 membersGalleryObject ()
 Builds a learnlink seminar members gallery as a layer of left-floating images. More...
 
 addStandardContainerSubTabs ()
 
 showAdministrationPanel ($tpl)
 
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 editObject ()
 edit object More...
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 list childs of current object More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
- Public Member Functions inherited from ilContainerGUI
 ilContainerGUI ($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public. More...
 
executeCommand ()
 execute command note: this method is overwritten in all container objects More...
 
 forwardToStyleSheet ()
 Forward to style object. More...
 
forwardToPageObject ()
 forward command to page object More...
 
 addPageTabs ()
 Add page tabs. More...
 
 getContainerPageHTML ()
 Get container page HTML. More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 showTreeFlatIcon ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 showPossibleSubObjects ()
 show possible sub objects selection list More...
 
 getContentGUI ()
 Get content gui object. More...
 
 renderObject ()
 render the object More...
 
 setContentSubTabs ()
 Set content sub tabs. More...
 
 showAdministrationPanel (&$tpl)
 show administration panel More...
 
 __showTimingsButton (&$tpl)
 
 showPermanentLink (&$tpl)
 show permanent link More...
 
 switchToStdEditorObject ()
 Switch to standard page editor. More...
 
 switchToOldEditorObject ()
 Switch to old page editor. More...
 
 useNewEditorObject ()
 Use new editor (-> delete xhtml content page) More...
 
 editPageFrameObject ()
 show page editor frameset More...
 
 editPageContentObject ()
 edit page content (for repository root node and categories) More...
 
 savePageContentObject ()
 
 cancelPageContentObject ()
 
 showLinkListObject ()
 
 clearAdminCommandsDetermination ()
 cleaer administration commands determination More...
 
newBlockTemplate ()
 determin admin commands More...
 
 addHeaderRow (&$a_tpl, $a_type, $a_show_image=true)
 adds a header row to a block template More...
 
 addStandardRow (&$a_tpl, $a_html, $a_item_ref_id="", $a_item_obj_id="", $a_image_type="")
 adds a standard row to a block template More...
 
 addMessageRow (&$a_tpl, $a_message, $a_type)
 add message row More...
 
 resetRowType ()
 
 setPageEditorTabs ()
 Add page editor tabs. More...
 
 addStandardContainerSubTabs ($a_include_view=true)
 Add standar container subtabs for view, manage, oderdering and text/media editor link. More...
 
 getTabs (&$tabs_gui)
 common tabs for all container objects (should be called at the end of child getTabs() method More...
 
 enableAdministrationPanelObject ()
 enable administration panel More...
 
 disableAdministrationPanelObject ()
 enable administration panel More...
 
 editOrderObject ()
 Edit order. More...
 
 isActiveOrdering ()
 Check if ordering is enabled. More...
 
 isActiveItemOrdering ()
 Check if item ordering is enabled. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
 enableMultiDownloadObject ()
 
 isMultiDownloadEnabled ()
 
 lockObject ()
 
 cutObject ()
 cut object(s) out from a container and write the information to clipboard More...
 
 copyObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 downloadObject ()
 
 linkObject ()
 create an new reference of an object in tree it's like a hard link of unix More...
 
 clearObject ()
 clear clipboard and go back to last object More...
 
 performPasteIntoMultipleObjectsObject ()
 
 initAndDisplayLinkIntoMultipleObjectsObject ()
 
 showPasteTreeObject ()
 Show paste tree. More...
 
 cancelMoveLinkObject ()
 Cancel move|link empty clipboard and return to parent. More...
 
 keepObjectsInClipboardObject ()
 Keep objects in the clipboard. More...
 
 initAndDisplayCopyIntoMultipleObjectsObject ()
 
 initAndDisplayMoveIntoObjectObject ()
 
 pasteObject ()
 paste object from clipboard to current place Depending on the chosen command the object(s) are linked, copied or moved More...
 
 clipboardObject ()
 Copy object(s) out from a container and write the information to clipboard It is not possible to copy multiple objects at once. More...
 
 showCustomIconsEditing ($a_input_colspan=1, ilPropertyFormGUI $a_form=null, $a_as_section=true)
 show edit section of custom icons for container More...
 
 isActiveAdministrationPanel ()
 
 setColumnSettings ($column_gui)
 May be overwritten in subclasses. More...
 
 allowBlocksMoving ()
 Standard is to allow blocks moving. More...
 
 allowBlocksConfigure ()
 Standard is to allow blocks configuration. More...
 
 cloneWizardPageTreeObject ()
 public More...
 
 cloneWizardPageListObject ()
 public More...
 
 cloneWizardPageObject ($a_tree_view=true)
 Show clone wizard page for container objects. More...
 
 cloneAllObject ()
 Clone all object Overwritten method for copying container objects. More...
 
 saveSortingObject ()
 Save Sorting. More...
 
 cloneNodes ($srcRef, $dstRef, &$mapping, $newName=null)
 Recursively clones all nodes of the RBAC tree. More...
 
 modifyItemGUI (&$a_item_list_gui, $a_item_data, $a_show_path)
 Modify Item ListGUI for presentation in container. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 getAsynchItemListObject ()
 Get item list command drop down asynchronously. More...
 
 redrawListItemObject ()
 Redraw a list item (ajax) More...
 
 showRepTree ($a_initial_call=false)
 Show tree. More...
 
 trashObject ()
 Show trash content of object. More...
 
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method More...
 
 undeleteObject ()
 Get objects back from trash. More...
 
 confirmRemoveFromSystemObject ()
 confirmation screen remove from system More...
 

Static Public Member Functions

static _goto ($a_target)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 
- Static Public Member Functions inherited from ilContainerGUI
static _buildPath ($a_ref_id, $a_course_ref_id)
 build path More...
 

Protected Member Functions

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

Private Attributes

 $form_gui = null
 

Additional Inherited Members

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

Detailed Description

Member Function Documentation

◆ __initTableGUI()

& ilObjiLincCourseGUI::__initTableGUI ( )

Definition at line 505 of file class.ilObjiLincCourseGUI.php.

Referenced by __showSearchGroupTable(), __showSearchRoleTable(), and __showSearchUserTable().

506  {
507  include_once "./Services/Table/classes/class.ilTableGUI.php";
508 
509  return new ilTableGUI(0,false);
510  }
Class ilTableGUI.
+ Here is the caller graph for this function:

◆ __search()

ilObjiLincCourseGUI::__search (   $a_search_string,
  $a_search_for 
)

Definition at line 295 of file class.ilObjiLincCourseGUI.php.

References $_SESSION, ilUtil\sendInfo(), and ilUtil\stripSlashes().

Referenced by searchObject().

296  {
297  include_once("./Services/Search/classes/class.ilSearch.php");
298 
299  $this->lng->loadLanguageModule("content");
300  $search =& new ilSearch($_SESSION["AccountId"]);
301  $search->setPerformUpdate(false);
302  $search->setSearchString(ilUtil::stripSlashes($a_search_string));
303  $search->setCombination("and");
304  $search->setSearchFor(array(0 => $a_search_for));
305  $search->setSearchType('new');
306 
307  if($search->validate($message))
308  {
309  $search->performSearch();
310  }
311  else
312  {
313  ilUtil::sendInfo($message,true);
314  $this->ctrl->redirect($this,"searchUserForm");
315  }
316 
317  return $search->getResultByType($a_search_for);
318  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __setSubTabs()

ilObjiLincCourseGUI::__setSubTabs (   $a_tab)

Definition at line 1621 of file class.ilObjiLincCourseGUI.php.

References $ilUser.

Referenced by changeMemberObject(), executeCommand(), mailMembersObject(), membersGalleryObject(), membersObject(), and removeMemberObject().

1622  {
1623  global $rbacsystem, $ilUser;
1624 
1625  switch($a_tab)
1626  {
1627  case 'members':
1628  //$this->tabs_gui->addSubTabTarget('ilinc_member_administration',
1629  $this->tabs_gui->addSubTabTarget('members', $this->ctrl->getLinkTarget($this, 'members'), array('members', 'changeMember', 'removeMember'), get_class($this));
1630  $this->tabs_gui->addSubTabTarget('icrs_members_gallery', $this->ctrl->getLinkTarget($this, 'membersGallery'), 'membersGallery', get_class($this));
1631  $this->tabs_gui->addSubTabTarget('mail_members', $this->ctrl->getLinkTarget($this, 'mailMembers'), 'mailMembers', get_class($this));
1632  break;
1633  }
1634  }
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ __setTableGUIBasicData()

ilObjiLincCourseGUI::__setTableGUIBasicData ( $tbl,
$result_set,
  $from = "" 
)

Definition at line 512 of file class.ilObjiLincCourseGUI.php.

References $_GET.

Referenced by __showSearchGroupTable(), __showSearchRoleTable(), and __showSearchUserTable().

513  {
514  switch($from)
515  {
516  case "subscribers":
517  $offset = $_GET["update_subscribers"] ? $_GET["offset"] : 0;
518  $order = $_GET["update_subscribers"] ? $_GET["sort_by"] : 'login';
519  $direction = $_GET["update_subscribers"] ? $_GET["sort_order"] : '';
520  break;
521 
522  case "group":
523  $offset = $_GET["offset"];
524  $order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
525  $direction = $_GET["sort_order"];
526  break;
527 
528  case "role":
529  $offset = $_GET["offset"];
530  $order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
531  $direction = $_GET["sort_order"];
532  break;
533 
534  default:
535  $offset = $_GET["offset"];
536  // init sort_by (unfortunatly sort_by is preset with 'title'
537  if ($_GET["sort_by"] == "title" or empty($_GET["sort_by"]))
538  {
539  $_GET["sort_by"] = "login";
540  }
541  $order = $_GET["sort_by"];
542  $direction = $_GET["sort_order"];
543  break;
544  }
545 
546  $tbl->setOrderColumn($order);
547  $tbl->setOrderDirection($direction);
548  $tbl->setOffset($offset);
549  $tbl->setLimit($_GET["limit"]);
550  //$tbl->setMaxCount(count($result_set));
551  $tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
552  $tbl->setData($result_set);
553  }
$_GET["client_id"]
+ Here is the caller graph for this function:

◆ __showSearchGroupTable()

ilObjiLincCourseGUI::__showSearchGroupTable (   $a_result_set,
  $a_grp_ids = NULL 
)

Definition at line 447 of file class.ilObjiLincCourseGUI.php.

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

Referenced by searchObject().

448  {
449  $tbl =& $this->__initTableGUI();
450  $tpl =& $tbl->getTemplateObject();
451 
452  $tpl->setCurrentBlock("tbl_form_header");
453  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
454  $tpl->parseCurrentBlock();
455 
456  $tpl->setCurrentBlock("tbl_action_btn");
457  $tpl->setVariable("BTN_NAME","searchUserForm");
458  $tpl->setVariable("BTN_VALUE",$this->lng->txt("back"));
459  $tpl->parseCurrentBlock();
460 
461  $tpl->setCurrentBlock("tbl_action_btn");
462  $tpl->setVariable("BTN_NAME","listUsersGroup");
463  $tpl->setVariable("BTN_VALUE",$this->lng->txt("grp_list_users"));
464  $tpl->parseCurrentBlock();
465 
466  if (!empty($a_grp_ids))
467  {
468  // set checkbox toggles
469  $tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
470  $tpl->setVariable("JS_VARNAME","group");
471  $tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($a_grp_ids));
472  $tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
473  $tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
474  $tpl->parseCurrentBlock();
475  }
476 
477  $tpl->setCurrentBlock("tbl_action_row");
478  $tpl->setVariable("COLUMN_COUNTS",5);
479  $tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.svg"));
480  $tpl->parseCurrentBlock();
481 
482  $tbl->setTitle($this->lng->txt("ilinc_header_edit_users"),"icon_usr_b.png",$this->lng->txt("ilinc_header_edit_users"));
483  $tbl->setHeaderNames(array("",
484  $this->lng->txt("obj_grp"),
485  $this->lng->txt("grp_count_members")));
486  $tbl->setHeaderVars(array("",
487  "title",
488  "nr_members"),
489  array("ref_id" => $this->object->getRefId(),
490  "cmd" => "search",
491  "cmdClass" => "ilobjilinccoursegui",
492  "cmdNode" => $_GET["cmdNode"]));
493 
494  $tbl->setColumnWidth(array("","80%","19%"));
495 
496 
497  $this->__setTableGUIBasicData($tbl,$a_result_set,"group");
498  $tbl->render();
499 
500  $this->tpl->setVariable("SEARCH_RESULT_TABLE",$tbl->tpl->get());
501 
502  return true;
503  }
$_GET["client_id"]
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static array_php2js($data)
convert php arrays to javascript arrays
__setTableGUIBasicData(&$tbl, &$result_set, $from="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showSearchRoleTable()

ilObjiLincCourseGUI::__showSearchRoleTable (   $a_result_set,
  $a_role_ids = NULL 
)

Definition at line 389 of file class.ilObjiLincCourseGUI.php.

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

Referenced by searchObject().

390  {
391  $tbl =& $this->__initTableGUI();
392  $tpl =& $tbl->getTemplateObject();
393 
394  $tpl->setCurrentBlock("tbl_form_header");
395  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
396  $tpl->parseCurrentBlock();
397 
398  $tpl->setCurrentBlock("tbl_action_btn");
399  $tpl->setVariable("BTN_NAME","searchUserForm");
400  $tpl->setVariable("BTN_VALUE",$this->lng->txt("back"));
401  $tpl->parseCurrentBlock();
402 
403  $tpl->setCurrentBlock("tbl_action_btn");
404  $tpl->setVariable("BTN_NAME","listUsersRole");
405  $tpl->setVariable("BTN_VALUE",$this->lng->txt("grp_list_users"));
406  $tpl->parseCurrentBlock();
407 
408  if (!empty($a_role_ids))
409  {
410  // set checkbox toggles
411  $tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
412  $tpl->setVariable("JS_VARNAME","role");
413  $tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($a_role_ids));
414  $tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
415  $tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
416  $tpl->parseCurrentBlock();
417  }
418 
419  $tpl->setCurrentBlock("tbl_action_row");
420  $tpl->setVariable("COLUMN_COUNTS",5);
421  $tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.svg"));
422  $tpl->parseCurrentBlock();
423 
424  $tbl->setTitle($this->lng->txt("ilinc_header_edit_users"),"icon_usr_b.png",$this->lng->txt("ilinc_header_edit_users"));
425  $tbl->setHeaderNames(array("",
426  $this->lng->txt("obj_role"),
427  $this->lng->txt("grp_count_members")));
428  $tbl->setHeaderVars(array("",
429  "title",
430  "nr_members"),
431  array("ref_id" => $this->object->getRefId(),
432  "cmd" => "search",
433  "cmdClass" => "ilobjilincoursegui",
434  "cmdNode" => $_GET["cmdNode"]));
435 
436  $tbl->setColumnWidth(array("","80%","19%"));
437 
438 
439  $this->__setTableGUIBasicData($tbl,$a_result_set,"role");
440  $tbl->render();
441 
442  $this->tpl->setVariable("SEARCH_RESULT_TABLE",$tbl->tpl->get());
443 
444  return true;
445  }
$_GET["client_id"]
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static array_php2js($data)
convert php arrays to javascript arrays
__setTableGUIBasicData(&$tbl, &$result_set, $from="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __showSearchUserTable()

ilObjiLincCourseGUI::__showSearchUserTable (   $a_result_set,
  $a_user_ids = NULL,
  $a_cmd = "search" 
)

Definition at line 320 of file class.ilObjiLincCourseGUI.php.

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

Referenced by listUsersGroupObject(), listUsersRoleObject(), and searchObject().

321  {
322  $return_to = "searchUserForm";
323 
324  if ($a_cmd == "listUsersRole" or $a_cmd == "listUsersGroup")
325  {
326  $return_to = "search";
327  }
328 
329  $tbl =& $this->__initTableGUI();
330  $tpl =& $tbl->getTemplateObject();
331 
332  // SET FORMACTION
333  $tpl->setCurrentBlock("tbl_form_header");
334  $tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
335  $tpl->parseCurrentBlock();
336 
337  $tpl->setCurrentBlock("tbl_action_btn");
338  $tpl->setVariable("BTN_NAME",$return_to);
339  $tpl->setVariable("BTN_VALUE",$this->lng->txt("back"));
340  $tpl->parseCurrentBlock();
341 
342  $tpl->setCurrentBlock("tbl_action_btn");
343  $tpl->setVariable("BTN_NAME","addUser");
344  $tpl->setVariable("BTN_VALUE",$this->lng->txt("add"));
345  $tpl->parseCurrentBlock();
346 
347  if (!empty($a_user_ids))
348  {
349  // set checkbox toggles
350  $tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
351  $tpl->setVariable("JS_VARNAME","user");
352  $tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($a_user_ids));
353  $tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
354  $tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
355  $tpl->parseCurrentBlock();
356  }
357 
358  $tpl->setCurrentBlock("tbl_action_row");
359  $tpl->setVariable("COLUMN_COUNTS",5);
360  $tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.svg"));
361  $tpl->parseCurrentBlock();
362 
363  $tbl->setTitle($this->lng->txt("ilinc_header_edit_users"),"icon_usr.svg",$this->lng->txt("ilinc_header_edit_users"));
364  $tbl->setHeaderNames(array("",
365  $this->lng->txt("username"),
366  $this->lng->txt("firstname"),
367  $this->lng->txt("lastname"),
368  $this->lng->txt("last_visit")));
369  $tbl->setHeaderVars(array("",
370  "login",
371  "firstname",
372  "lastname",
373  "last_visit"),
374  array("ref_id" => $this->object->getRefId(),
375  "cmd" => $a_cmd,
376  "cmdClass" => "ilobjilinccoursegui",
377  "cmdNode" => $_GET["cmdNode"]));
378 
379  $tbl->setColumnWidth(array("","33%","33%","33%"));
380 
381  $this->__setTableGUIBasicData($tbl,$a_result_set);
382  $tbl->render();
383 
384  $this->tpl->setVariable("SEARCH_RESULT_TABLE",$tbl->tpl->get());
385 
386  return true;
387  }
$_GET["client_id"]
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static array_php2js($data)
convert php arrays to javascript arrays
__setTableGUIBasicData(&$tbl, &$result_set, $from="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ __unsetSessionVariables()

ilObjiLincCourseGUI::__unsetSessionVariables ( )

Definition at line 284 of file class.ilObjiLincCourseGUI.php.

References $_SESSION.

Referenced by searchUserFormObject().

285  {
286  unset($_SESSION["grp_delete_member_ids"]);
287  unset($_SESSION["grp_delete_subscriber_ids"]);
288  unset($_SESSION["grp_search_str"]);
289  unset($_SESSION["grp_search_for"]);
290  unset($_SESSION["grp_role"]);
291  unset($_SESSION["grp_group"]);
292  unset($_SESSION["grp_archives"]);
293  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

◆ _goto()

static ilObjiLincCourseGUI::_goto (   $a_target)
static

Definition at line 1794 of file class.ilObjiLincCourseGUI.php.

References $ilErr, ilObjectGUI\$lng, and ilObjectGUI\_gotoRepositoryNode().

1795  {
1796  global $ilAccess, $ilErr, $lng;
1797 
1798  if ($ilAccess->checkAccess('read', '', $a_target))
1799  {
1801  }
1802  else
1803  {
1804  $ilErr->raiseError($lng->txt('msg_no_perm_read'), $ilErr->FATAL);
1805  }
1806  }
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
+ Here is the call graph for this function:

◆ addStandardContainerSubTabs()

ilObjiLincCourseGUI::addStandardContainerSubTabs ( )

Definition at line 1785 of file class.ilObjiLincCourseGUI.php.

1786  {
1787 
1788  }

◆ addUserObject()

ilObjiLincCourseGUI::addUserObject ( )

displays confirmation formular with users that shall be assigned to group public

Definition at line 1111 of file class.ilObjiLincCourseGUI.php.

References $_POST, $_SESSION, ilUtil\redirect(), and ilUtil\sendInfo().

1112  {
1113  $user_ids = $_POST["user"];
1114  include_once 'Services/Mail/classes/class.ilMail.php';
1115  $mail = new ilMail($_SESSION["AccountId"]);
1116 
1117  if (empty($user_ids[0]))
1118  {
1119  // TODO: jumps back to grp content. go back to last search result
1120  $this->ilErr->raiseError($this->lng->txt("no_checkbox"),$this->ilErr->MESSAGE);
1121  }
1122 
1123  foreach ($user_ids as $new_member)
1124  {
1125  $user_obj = $this->ilias->obj_factory->getInstanceByObjId($new_member);
1126 
1127  if (!$this->object->addMember($user_obj,$this->object->getDefaultMemberRole(),false))
1128  {
1129  //var_dump($this->object->getErrorMsg());exit;
1130  $this->ilErr->raiseError($this->object->getErrorMsg(),$this->ilErr->MESSAGE);
1131  }
1132 
1133  $user_obj->addDesktopItem($this->object->getRefId(),"icrs");
1134  $mail->sendMail($user_obj->getLogin(),"","",$this->lng->txtlng("common","ilinc_mail_subj_new_subscription",$user_obj->getLanguage()).": ".$this->object->getTitle(),$this->lng->txtlng("common","ilinc_mail_body_new_subscription",$user_obj->getLanguage()),array(),array('normal'));
1135 
1136  unset($user_obj);
1137  }
1138 
1139  //echo "end";exit;
1140 
1141  unset($_SESSION["saved_post"]);
1142 
1143  ilUtil::sendInfo($this->lng->txt("ilinc_msg_member_assigned"),true);
1144  ilUtil::redirect($this->ctrl->getLinkTarget($this,"members","",false,false));
1145  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class Mail this class handles base functions for mail handling.
redirection script todo: (a better solution should control the processing via a xml file) ...
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ afterSave()

ilObjiLincCourseGUI::afterSave ( ilObject  $a_new_object)
protected
Parameters
ilObjiLincCourse$a_new_object

Definition at line 163 of file class.ilObjiLincCourseGUI.php.

References $_GET, $success, ilObject\getRefId(), ilObjectGUI\redirectToRefId(), ilUtil\sendFailure(), ilUtil\sendInfo(), and ilUtil\tf2yn().

164  {
165  // save ilinc_id in ILIAS and save data
166  $a_new_object->storeiLincId($this->iLincAddCourseResponse->getFirstID());
167  $a_new_object->saveActivationStatus(ilUtil::tf2yn((bool)$this->form_gui->getInput('activated')));
168  $a_new_object->saveAKClassValues(
169  $this->form_gui->getInput('akclassvalue1'),
170  $this->form_gui->getInput('akclassvalue2')
171  );
172 
173  // ...finally assign icrsadmin role to creator of icrs object
174  $success = $a_new_object->addMember($this->ilias->account, $a_new_object->getDefaultAdminRole(), true);
175 
176  if(!$success)
177  {
178  ilUtil::sendFailure($a_new_object->getErrorMsg(), true);
179  $this->ctrl->returnToParent($this);
180  }
181 
182 // $icrsObj->setRegistrationFlag($_POST["enable_registration"]); //0=no registration, 1=registration enabled 2=passwordregistration
183 // $icrsObj->setPassword($_POST["password"]);
184 // $icrsObj->setExpirationDateTime($_POST["expirationdate"]." ".$_POST["expirationtime"].":00");
185 
186  $this->ilias->account->addDesktopItem($a_new_object->getRefId(), 'icrs');
187 
188  // always send a message
189  ilUtil::sendInfo($this->lng->txt('icrs_added'), true);
190  $this->redirectToRefId((int)$_GET['ref_id']);
191  }
static tf2yn($a_tf)
convert true/false to "y"/"n"
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$success
Definition: Utf8Test.php:87
redirection script todo: (a better solution should control the processing via a xml file) ...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
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 sav...
getRefId()
get reference id public
+ Here is the call graph for this function:

◆ agendaObject()

ilObjiLincCourseGUI::agendaObject ( )

Definition at line 919 of file class.ilObjiLincCourseGUI.php.

References ilUtil\redirect().

920  {
921  // user login
922  $url = $this->object->userLogin($this->ilias->account);
923 
924  if (!$url)
925  {
926  $this->ilias->raiseError($this->object->getErrorMsg(),$this->ilias->error_obj->FATAL);
927  }
928 
929  ilUtil::redirect(trim($url));
930  }
redirection script todo: (a better solution should control the processing via a xml file) ...
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ canceledObject()

ilObjiLincCourseGUI::canceledObject ( )

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

Definition at line 688 of file class.ilObjiLincCourseGUI.php.

References $_GET, ilObjectGUI\$return_location, and ilUtil\sendInfo().

689  {
690  $return_location = $_GET["cmd_return_location"];
691  if (strcmp($return_location, "") == 0)
692  {
693  $return_location = "members";
694  }
695 
696  ilUtil::sendInfo($this->lng->txt("action_aborted"),true);
697  $this->ctrl->redirect($this, $return_location);
698  }
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
+ Here is the call graph for this function:

◆ cancelMemberObject()

ilObjiLincCourseGUI::cancelMemberObject ( )

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

Definition at line 704 of file class.ilObjiLincCourseGUI.php.

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

705  {
706  $return_location = "members";
707 
708  ilUtil::sendInfo($this->lng->txt("action_aborted"),true);
709  ilUtil::redirect($this->ctrl->getLinkTarget($this,$return_location,"",false,false));
710  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ changeMemberObject()

ilObjiLincCourseGUI::changeMemberObject ( )

displays form in which the member-status can be changed public

Definition at line 1311 of file class.ilObjiLincCourseGUI.php.

References $_GET, $_POST, ilObjectGUI\$data, $ilUser, __setSubTabs(), ilUtil\formRadioButton(), ilUtil\formSelect(), and ilObjectFactory\getInstanceByObjId().

1312  {
1313  global $rbacreview, $ilUser;
1314 
1315  $this->__setSubTabs('members');
1316 
1317  $member_ids = array();
1318 
1319  if(isset($_POST['user_id']))
1320  {
1321  $member_ids = $_POST['user_id'];
1322  }
1323  else if(isset($_GET['mem_id']))
1324  {
1325  $member_ids[0] = $_GET['mem_id'];
1326  }
1327  else if(isset($_GET['mem_id_arr']))
1328  {
1329  $member_ids = explode(',', $_GET['mem_id_arr']);
1330  }
1331 
1332  if(empty($member_ids[0]))
1333  {
1334  $this->ilErr->raiseError($this->lng->txt('no_checkbox'), $this->ilErr->MESSAGE);
1335  }
1336 
1337  if(!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID) &&
1338  !in_array($ilUser->getId(), $this->object->getAdminIds()))
1339  {
1340  $this->ilErr->raiseError($this->lng->txt('grp_err_no_permission'), $this->ilErr->MESSAGE);
1341  }
1342 
1343  $stati = array_flip($this->object->getLocalRoles(true));
1344 
1345  // fetch docent or student assignment form all coursemembers from iLinc server
1346  $docent_ids = $this->object->getiLincMemberIds(true);
1347  $student_ids = $this->object->getiLincMemberIds(false);
1348 
1349  $data = array();
1350 
1351  //build data structure
1352  foreach($member_ids as $member_id)
1353  {
1354  $member = ilObjectFactory::getInstanceByObjId($member_id);
1355  $mem_status = $this->object->getMemberRoles($member_id);
1356 
1357  include_once 'Modules/ILinc/classes/class.ilObjiLincUser.php';
1358  $ilinc_user = new ilObjiLincUser($member);
1359 
1360  $ilinc_status = $this->object->checkiLincMemberStatus($ilinc_user->id, $docent_ids, $student_ids);
1361 
1362  $docent = 0; $student = 0;
1363 
1364  if($ilinc_status == ILINC_MEMBER_DOCENT)
1365  {
1366  $docent = 1;
1367  }
1368  else if($ilinc_status == ILINC_MEMBER_STUDENT)
1369  {
1370  $student = 1;
1371  }
1372 
1373  $radio1 = ilUtil::formRadioButton($docent, 'ilinc_member_status_select['.$member->getId().']['.$ilinc_user->id.']', ILINC_MEMBER_DOCENT);
1374  $radio2 = ilUtil::formRadioButton($student, 'ilinc_member_status_select['.$member->getId().']['.$ilinc_user->id.']', ILINC_MEMBER_STUDENT);
1375 
1376  $data[$member->getId()] = array(
1377  'login' => $member->getLogin(),
1378  'firstname' => $member->getFirstname(),
1379  'lastname' => $member->getLastname(),
1380  'attending_as' => $radio1.' '.$this->lng->txt('ilinc_docent').'<br />'.$radio2.' '.$this->lng->txt('ilinc_student'),
1381  'grp_role' => ilUtil::formSelect($mem_status, 'member_status_select['.$member->getId().'][]', $stati, true, true, 3)
1382  );
1383  }
1384 
1385  unset($member);
1386  unset($ilinc_user);
1387 
1388  include_once 'Modules/ILinc/classes/class.iliLinkMembersTableGUI.php';
1389  $this->ctrl->setParameter($this, 'mem_id_arr', implode(',', $member_ids));
1390  $oTable = new iliLinkMembersTableGUI($this, $data, 'change', 'changeMember', 'changeMember');
1391  $oTable->setTitle($this->lng->txt('grp_mem_change_status'), 'icon_usr_b.png', $this->lng->txt('grp_mem_change_status'));
1392 
1393  return $this->tpl->setContent($oTable->getHTML());
1394  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjiLincUser iLinc related user settings.
static formRadioButton($checked, $varname, $value, $onclick=null, $disabled=false)
??? public
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ confirmationObject()

ilObjiLincCourseGUI::confirmationObject (   $user_id = '',
  $confirm = '',
  $cancel = '',
  $info = '',
  $status = '',
  $a_cmd_return_location = '',
  $invokeMethod = '' 
)

displays confirmation form public

Definition at line 1251 of file class.ilObjiLincCourseGUI.php.

1252  {
1253 
1254  }

◆ confirmedRemoveMemberObject()

ilObjiLincCourseGUI::confirmedRemoveMemberObject ( )

remove members from group TODO: set return location to parent object if user removes himself TODO: allow user to remove himself when he is not group admin public

Definition at line 1262 of file class.ilObjiLincCourseGUI.php.

References $_SESSION, $ilCtrl, ilUtil\redirect(), and ilUtil\sendInfo().

1263  {
1264  global $ilCtrl;
1265 
1266  $removed_self = false;
1267  include_once 'Services/Mail/classes/class.ilMail.php';
1268  $mail = new ilMail($_SESSION["AccountId"]);
1269 
1270  //User needs to have administrative rights to remove members...
1271  foreach($_SESSION["saved_post"]["user_id"] as $member_id)
1272  {
1273  $user_obj = new ilObjUser($member_id);
1274 
1275  if (!$this->object->removeMember($user_obj))
1276  {
1277  ilUtil::sendInfo($this->lng->txt($this->object->getErrorMsg()),true);
1278  ilUtil::redirect($this->ctrl->getLinkTarget($this,"members","",false,false));
1279  }
1280 
1281  $user_obj->dropDesktopItem($this->object->getRefId(), "icrs");
1282 
1283  if (!$removed_self and $user_obj->getId() == $this->ilias->account->getId())
1284  {
1285  $removed_self = true;
1286  }
1287  else
1288  {
1289  $mail->sendMail($user_obj->getLogin(),"","",$this->lng->txtlng("common","ilinc_mail_subj_subscription_cancelled",$user_obj->getLanguage()).": ".$this->object->getTitle(),$this->lng->txtlng("common","ilinc_mail_body_subscription_cancelled",$user_obj->getLanguage()),array(),array('normal'));
1290  }
1291  }
1292 
1293  unset($_SESSION["saved_post"]);
1294 
1295  ilUtil::sendInfo($this->lng->txt("ilinc_msg_membership_annulled"),true);
1296 
1297  if ($removed_self)
1298  {
1299  $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id",
1300  $this->tree->getParentId($this->ref_id));
1301  $ilCtrl->redirectByClass("ilrepositorygui", "");
1302  }
1303 
1304  ilUtil::redirect($this->ctrl->getLinkTarget($this,"members","",false,false));
1305  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class Mail this class handles base functions for mail handling.
redirection script todo: (a better solution should control the processing via a xml file) ...
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ createObject()

ilObjiLincCourseGUI::createObject ( )

create new object form

public

Definition at line 43 of file class.ilObjiLincCourseGUI.php.

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

44  {
45  global $rbacsystem;
46 
47  $new_type = $_POST['new_type'] ? $_POST['new_type'] : $_GET['new_type'];
48 
49  if(!$rbacsystem->checkAccess('create', $_GET['ref_id'], $new_type))
50  {
51  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
52  }
53 
54  $this->initSettingsForm('create');
55  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
56  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ editObject()

ilObjiLincCourseGUI::editObject ( )

Definition at line 1503 of file class.ilObjiLincCourseGUI.php.

References getObjectValues(), and initSettingsForm().

1504  {
1505  if(!$this->ilias->getSetting('ilinc_active'))
1506  {
1507  $this->ilias->raiseError($this->lng->txt('ilinc_server_not_active'), $this->ilias->error_obj->MESSAGE);
1508  }
1509 
1510  $this->initSettingsForm('edit');
1511  $this->getObjectValues();
1512  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
1513  }
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

◆ executeCommand()

& ilObjiLincCourseGUI::executeCommand ( )

Definition at line 815 of file class.ilObjiLincCourseGUI.php.

References $_GET, $cmd, $ilErr, $ilUser, $ret, __setSubTabs(), ilObjectGUI\getCreationMode(), and ilObjectGUI\prepareOutput().

816  {
817  global $ilUser,$rbacsystem,$ilAccess,$ilErr;
818 
819  $next_class = $this->ctrl->getNextClass($this);
820  $cmd = $this->ctrl->getCmd();
821  $this->prepareOutput();
822 
823  switch($next_class)
824  {
825  case "ilconditionhandlergui":
826  include_once './Services/AccessControl/classes/class.ilConditionHandlerGUI.php';
827 
828  if($_GET['item_id'])
829  {
830  $new_gui =& new ilConditionHandlerGUI($this,(int) $_GET['item_id']);
831  $this->ctrl->saveParameter($this,'item_id',$_GET['item_id']);
832  $this->ctrl->forwardCommand($new_gui);
833  }
834  else
835  {
836  $new_gui =& new ilConditionHandlerGUI($this);
837  $this->ctrl->forwardCommand($new_gui);
838  }
839  break;
840 
841  case 'ilrepositorysearchgui':
842  include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
843  $rep_search =& new ilRepositorySearchGUI();
844  $rep_search->setCallback($this,'addUserObject');
845 
846  // Set tabs
847  $this->tabs_gui->setTabActive('members');
848  $this->ctrl->setReturn($this,'members');
849  $ret =& $this->ctrl->forwardCommand($rep_search);
850  $this->__setSubTabs('members');
851  $this->tabs_gui->setSubTabActive('members');
852  break;
853 
854  case "ilobjilincclassroomgui":
855  include_once ('./Modules/ILinc/classes/class.ilObjiLincClassroomGUI.php');
856  $icla_gui = new ilObjiLincClassroomGUI($_GET['class_id'],$this->ref_id);
857  $ret =& $this->ctrl->forwardCommand($icla_gui);
858  break;
859 
860  case 'ilpermissiongui':
861  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
862  $perm_gui =& new ilPermissionGUI($this);
863  $ret =& $this->ctrl->forwardCommand($perm_gui);
864  break;
865 
866  case 'ilpublicuserprofilegui':
867  require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
868  $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
869  $html = $this->ctrl->forwardCommand($profile_gui);
870  $this->__setSubTabs('members');
871  $this->tabs_gui->setTabActive('group_members');
872  $this->tabs_gui->setSubTabActive('grp_members_gallery');
873  $this->tpl->setVariable("ADM_CONTENT", $html);
874  break;
875 
876  default:
877  if (!$this->getCreationMode() and !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'icrs'))
878  {
879  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
880  }
881 
882 
883  if(!$cmd)
884  {
885  $cmd = 'view';
886  }
887  $cmd .= 'Object';
888  $this->$cmd();
889  break;
890  }
891  }
class ilConditionHandlerGUI
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
GUI class for public user profile presentation.
Class ilObjiLincClassroomGUI.
prepareOutput()
prepare output
global $ilUser
Definition: imgupload.php:15
getCreationMode()
get creation mode
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
+ Here is the call graph for this function:

◆ getObjectValues()

ilObjiLincCourseGUI::getObjectValues ( )
protected

Definition at line 1515 of file class.ilObjiLincCourseGUI.php.

Referenced by editObject().

1516  {
1517  $this->form_gui->setValuesByArray(array(
1518  'title' => $this->object->getTitle(),
1519  'desc' => $this->object->getDescription(),
1520  'activated' => (int)$this->object->activated,
1521  'akclassvalue1' => $this->object->getAKClassValue1(),
1522  'akclassvalue2' => $this->object->getAKClassValue2(),
1523  ));
1524  }
+ Here is the caller graph for this function:

◆ getTabs()

ilObjiLincCourseGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Definition at line 198 of file class.ilObjiLincCourseGUI.php.

References $_GET, and $_SESSION.

199  {
200  global $rbacsystem,$ilAccess;
201 
202  $this->ctrl->setParameter($this,'ref_id',$this->ref_id);
203 
204  if($rbacsystem->checkAccess('read',$this->ref_id))
205  {
206  $tabs_gui->addTarget('ilinc_classrooms',
207  $this->ctrl->getLinkTarget($this, ''),
208  array('', 'view', 'editClassroom', 'updateClassroom', 'removeClassroom')
209  );
210  }
211 
212  if($this->ilias->getSetting('ilinc_active'))
213  {
214  if($ilAccess->checkAccess('write', '', $this->ref_id))
215  {
216  $tabs_gui->addTarget('edit_properties',
217  $this->ctrl->getLinkTarget($this, 'edit'), array('edit', 'update', 'save'), get_class($this));
218  }
219 
220  /* if ($rbacsystem->checkAccess('read',$this->ref_id))
221  {
222  $tabs_gui->addTarget("ilinc_involved_users",
223  $this->ctrl->getLinkTarget($this, "members"), array("members","mailMembers","membersGallery","showProfile"), get_class($this));
224  }*/
225 
226  // member list
227  if($ilAccess->checkAccess('write','',$this->ref_id))
228  {
229  $tabs_gui->addTarget("ilinc_involved_users",
230  $this->ctrl->getLinkTarget($this, "members"),
231  array("members","mailMembers","membersGallery","showProfile",'changeMember', 'RemoveMember'),
232  get_class($this));
233  }
234  elseif ($ilAccess->checkAccess('read','',$this->ref_id))
235  {
236  $tabs_gui->addTarget("ilinc_involved_users",
237  $this->ctrl->getLinkTarget($this, "membersGallery"),
238  array("members","mailMembers","membersGallery","showProfile"),
239  get_class($this));
240  }
241 
242  if ($rbacsystem->checkAccess('write',$this->ref_id) and $this->object->isDocent($this->ilias->account))
243  {
244  // testing: display link to ilinc server directly
245  $tabs_gui->addTarget("ilinc_manage_course_documents",
246  $url = $this->object->userLogin($this->ilias->account), "agenda","","_blank");
247  // $tabs_gui->addTarget("ilinc_manage_course_documents",
248  // $this->ctrl->getLinkTarget($this, "agenda"), "agenda", get_class($this),"_blank");
249 
250  }
251  }
252 
253  /*$applications = $this->object->getNewRegistrations();
254 
255  if (is_array($applications) and $this->object->isAdmin($this->ilias->account->getId()))
256  {
257  $tabs_gui->addTarget("ilinc_new_registrations",
258  $this->ctrl->getLinkTarget($this, "ShownewRegistrations"), "ShownewRegistrations", get_class($this));
259  }*/
260 
261  if ($rbacsystem->checkAccess('edit_permission',$this->ref_id))
262  {
263  $tabs_gui->addTarget("perm_settings",
264  $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
265  }
266 
267  // show clipboard in repository
268  if ($_GET["baseClass"] == "ilRepositoryGUI" and !empty($_SESSION['il_rep_clipboard']))
269  {
270  $tabs_gui->addTarget("clipboard",
271  $this->ctrl->getLinkTarget($this, "clipboard"), "clipboard", get_class($this));
272  }
273 
274  if ($this->ctrl->getTargetScript() == "adm_object.php")
275  {
276  if ($this->tree->getSavedNodeData($this->ref_id))
277  {
278  $tabs_gui->addTarget("trash",
279  $this->ctrl->getLinkTarget($this, "trash"), "trash", get_class($this));
280  }
281  }
282  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_GET["client_id"]
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ ilObjiLincCourseGUI()

ilObjiLincCourseGUI::ilObjiLincCourseGUI (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = false 
)

Constructor public.

Definition at line 28 of file class.ilObjiLincCourseGUI.php.

References ilContainerGUI\ilContainerGUI().

29  {
30  $this->type = "icrs";
31  $this->ilContainerGUI($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
32 
33  $this->ctrl->saveParameter($this,'ref_id');
34 
35  $this->lng->loadLanguageModule('ilinc');
36  }
ilContainerGUI($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Constructor public.
+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjiLincCourseGUI::initSettingsForm (   $a_mode = 'create')
protected

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

References ilUtil\getTypeIconPath(), and ilFormPropertyGUI\setRequired().

Referenced by createObject(), editObject(), saveObject(), and updateObject().

1527  {
1528  include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
1529 
1530  $this->form_gui = new ilPropertyFormGUI();
1531  $this->form_gui->setTableWidth('600');
1532  if($a_mode == 'create')
1533  {
1534  $this->form_gui->setTitle($this->lng->txt('icrs_new'));
1535  }
1536  else
1537  {
1538  $this->form_gui->setTitle($this->lng->txt('icrs_edit'));
1539  }
1540  $this->form_gui->setTitleIcon(ilUtil::getTypeIconPath('icrs', 0));
1541 
1542  // Title
1543  $text_input = new ilTextInputGUI($this->lng->txt('title'), 'title');
1544  $text_input->setRequired(true);
1545  $this->form_gui->addItem($text_input);
1546 
1547  // Description
1548  $text_area = new ilTextAreaInputGUI($this->lng->txt('desc'), 'desc');
1549  $this->form_gui->addItem($text_area);
1550 
1551  // Access
1552  $text_area = new ilCheckboxInputGUI($this->lng->txt('online'), 'activated');
1553  $this->form_gui->addItem($text_area);
1554 
1555  // AKClassValues
1556  if($this->ilias->getSetting('ilinc_akclassvalues_active'))
1557  {
1558  $section_header = new ilFormSectionHeaderGUI();
1559  $section_header->setTitle($this->lng->txt('akclassvalues'));
1560  $this->form_gui->addItem($section_header);
1561 
1562  $text_input = new ilTextInputGUI($this->lng->txt('akclassvalue1'), 'akclassvalue1');
1563  if($this->ilias->getSetting('ilinc_akclassvalues_required'))
1564  {
1565  $text_input->setRequired(true);
1566  }
1567  $this->form_gui->addItem($text_input);
1568 
1569  $text_input = new ilTextInputGUI($this->lng->txt('akclassvalue2'), 'akclassvalue2');
1570  $this->form_gui->addItem($text_input);
1571  }
1572 
1573  if($this->call_by_reference)
1574  {
1575  $this->ctrl->setParameter($this, 'obj_id', $this->obj_id);
1576  }
1577 
1578  // save and cancel commands
1579  if($a_mode == 'create')
1580  {
1581  $this->ctrl->setParameter($this, 'mode', 'create');
1582  $this->ctrl->setParameter($this, 'new_type', 'icrs');
1583 
1584  $this->form_gui->addCommandButton('save', $this->lng->txt('icrs_add'));
1585  $this->form_gui->addCommandButton('cancel', $this->lng->txt('cancel'));
1586  $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'save'));
1587  }
1588  else
1589  {
1590  $this->form_gui->addCommandButton('update', $this->lng->txt('save'));
1591  $this->form_gui->addCommandButton('cancel', $this->lng->txt('cancel'));
1592  $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'update'));
1593  }
1594  }
This class represents a property form user interface.
This class represents a section header in a property form.
This class represents a checkbox property in a property form.
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
This class represents a text area property in a property form.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isActiveAdministrationPanel()

ilObjiLincCourseGUI::isActiveAdministrationPanel ( )

Definition at line 1616 of file class.ilObjiLincCourseGUI.php.

1617  {
1618  return false;
1619  }

◆ joinObject()

ilObjiLincCourseGUI::joinObject ( )

Definition at line 1596 of file class.ilObjiLincCourseGUI.php.

References $_GET, ilUtil\redirect(), and ilUtil\sendInfo().

1597  {
1598  global $ilAccess;
1599 
1600  if(!$ilAccess->checkAccess('join', '', (int)$_GET['ref_id']))
1601  {
1602  $this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
1603  }
1604 
1605  if(!$this->object->addMember($this->ilias->account, $this->object->getDefaultMemberRole(),false))
1606  {
1607  $this->ilErr->raiseError($this->object->getErrorMsg(), $this->ilErr->MESSAGE);
1608  }
1609 
1610  $this->ilias->account->addDesktopItem($this->object->getRefId(), "icrs");
1611 
1612  ilUtil::sendInfo($this->lng->txt("ilinc_msg_joined"), true);
1613  ilUtil::redirect($this->ctrl->getLinkTarget($this, "view", "", false, false));
1614  }
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
redirection script todo: (a better solution should control the processing via a xml file) ...
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ listUsersGroupObject()

ilObjiLincCourseGUI::listUsersGroupObject ( )

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

References $_POST, $_SESSION, ilObjectGUI\$tree, ilObjectGUI\__showButton(), __showSearchUserTable(), ilDatePresentation\formatDate(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), ilObjectFactory\getInstanceByRefId(), IL_CAL_DATETIME, searchObject(), and ilUtil\sendInfo().

615  {
616  global $rbacsystem,$rbacreview,$tree;
617 
618  $_SESSION["grp_group"] = $_POST["group"] = $_POST["group"] ? $_POST["group"] : $_SESSION["grp_group"];
619 
620  // MINIMUM ACCESS LEVEL = 'administrate'
621  if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
622  {
623  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
624  }
625 
626  if(!is_array($_POST["group"]))
627  {
628  ilUtil::sendInfo($this->lng->txt("grp_no_groups_selected"));
629  $this->searchObject();
630 
631  return false;
632  }
633 
634  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html",
635  "Modules/Group");
636  $this->__showButton("searchUserForm",$this->lng->txt("grp_new_search"));
637 
638  // GET ALL MEMBERS
639  $members = array();
640  foreach($_POST["group"] as $group_id)
641  {
642  if (!$tree->isInTree($group_id))
643  {
644  continue;
645  }
646  if (!$tmp_obj = ilObjectFactory::getInstanceByRefId($group_id))
647  {
648  continue;
649  }
650 
651  $members = array_merge($tmp_obj->getGroupMemberIds(),$members);
652 
653  unset($tmp_obj);
654  }
655 
656  $members = array_unique($members);
657 
658  // FORMAT USER DATA
659  $counter = 0;
660  $f_result = array();
661  foreach($members as $user)
662  {
663  if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user,false))
664  {
665  continue;
666  }
667 
668  $user_ids[$counter] = $user;
669 
670  $f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user);
671  $f_result[$counter][] = $tmp_obj->getLogin();
672  $f_result[$counter][] = $tmp_obj->getLastname();
673  $f_result[$counter][] = $tmp_obj->getFirstname();
674  $f_result[$counter][] = ilDatePresentation::formatDate(new ilDateTime($tmp_obj->getLastLogin(),IL_CAL_DATETIME));
675 
676  unset($tmp_obj);
677  ++$counter;
678  }
679  $this->__showSearchUserTable($f_result,$user_ids,"listUsersGroup");
680 
681  return true;
682  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
const IL_CAL_DATETIME
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
__showButton($a_cmd, $a_text, $a_target='')
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__showSearchUserTable($a_result_set, $a_user_ids=NULL, $a_cmd="search")
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
redirection script todo: (a better solution should control the processing via a xml file) ...
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:

◆ listUsersRoleObject()

ilObjiLincCourseGUI::listUsersRoleObject ( )

Definition at line 555 of file class.ilObjiLincCourseGUI.php.

References $_POST, $_SESSION, ilObjectGUI\__showButton(), __showSearchUserTable(), ilDatePresentation\formatDate(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), IL_CAL_DATETIME, searchObject(), and ilUtil\sendInfo().

556  {
557  global $rbacsystem,$rbacreview;
558 
559  $_SESSION["grp_role"] = $_POST["role"] = $_POST["role"] ? $_POST["role"] : $_SESSION["grp_role"];
560 
561  // MINIMUM ACCESS LEVEL = 'administrate'
562  if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
563  {
564  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
565  }
566 
567  if(!is_array($_POST["role"]))
568  {
569  ilUtil::sendInfo($this->lng->txt("grp_no_roles_selected"));
570  $this->searchObject();
571 
572  return false;
573  }
574 
575  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html",
576  "Modules/Group");
577  $this->__showButton("searchUserForm",$this->lng->txt("grp_new_search"));
578 
579  // GET ALL MEMBERS
580  $members = array();
581  foreach($_POST["role"] as $role_id)
582  {
583  $members = array_merge($rbacreview->assignedUsers($role_id),$members);
584  }
585 
586  $members = array_unique($members);
587 
588  // FORMAT USER DATA
589  $counter = 0;
590  $f_result = array();
591  foreach($members as $user)
592  {
593  if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user,false))
594  {
595  continue;
596  }
597 
598  $user_ids[$counter] = $user;
599 
600  $f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user);
601  $f_result[$counter][] = $tmp_obj->getLogin();
602  $f_result[$counter][] = $tmp_obj->getLastname();
603  $f_result[$counter][] = $tmp_obj->getFirstname();
604  $f_result[$counter][] = ilDatePresentation::formatDate(new ilDateTime($tmp_obj->getLastLogin(),IL_CAL_DATETIME));
605 
606  unset($tmp_obj);
607  ++$counter;
608  }
609  $this->__showSearchUserTable($f_result,$user_ids,"listUsersRole");
610 
611  return true;
612  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
const IL_CAL_DATETIME
__showButton($a_cmd, $a_text, $a_target='')
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__showSearchUserTable($a_result_set, $a_user_ids=NULL, $a_cmd="search")
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
redirection script todo: (a better solution should control the processing via a xml file) ...
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:

◆ mailMembersObject()

ilObjiLincCourseGUI::mailMembersObject ( )

Definition at line 1636 of file class.ilObjiLincCourseGUI.php.

References __setSubTabs(), ilLink\_getLink(), ilObjRole\_getTranslation(), ilUtil\formCheckbox(), ilUtil\getImagePath(), and ilMailFormCall\getLinkTarget().

1637  {
1638  global $rbacreview, $ilObjDataCache;
1639 
1640  include_once 'Services/AccessControl/classes/class.ilObjRole.php';
1641 
1642  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.mail_members.html','Services/Contact');
1643 
1644  $this->__setSubTabs('members');
1645 
1646  include_once("./Services/Link/classes/class.ilLink.php");
1647  $link_to_seminar = ilLink::_getLink($this->object->getRefId());
1648  include_once 'Services/Mail/classes/class.ilMail.php';
1649  require_once 'Services/Mail/classes/class.ilMailFormCall.php';
1650  $this->tpl->setVariable("MAILACTION", ilMailFormCall::getLinkTarget($this, 'mailMembers', array(), array('type' => 'role')));
1651  $this->tpl->setVariable('ADDITIONAL_MESSAGE_TEXT', $link_to_seminar);
1652  $this->tpl->setVariable('IMG_ARROW', ilUtil::getImagePath('arrow_downright.svg'));
1653  $this->tpl->setVariable('OK', $this->lng->txt('ok'));
1654 
1655  $role_ids = $rbacreview->getRolesOfRoleFolder($this->object->getRefId(), false);
1656  foreach($role_ids as $role_id)
1657  {
1658  $this->tpl->setCurrentBlock('mailbox_row');
1659  $role_addr = $rbacreview->getRoleMailboxAddress( $role_id );
1660  $this->tpl->setVariable('CHECK_MAILBOX', ilUtil::formCheckbox(1, 'roles[]', htmlspecialchars($role_addr)));
1661  if (ilMail::_usePearMail())
1662  {
1663  // if pear mail is enabled, mailbox addresses are already localized in the language of the user
1664  $this->tpl->setVariable('MAILBOX', $role_addr);
1665  }
1666  else
1667  {
1668  // if pear mail is not enabled, we need to localize mailbox addresses in the language of the user
1669  $this->tpl->setVariable('MAILBOX', ilObjRole::_getTranslation( $ilObjDataCache->lookupTitle( $role_id ) ). ' (' . $role_addr . ')');
1670  }
1671 
1672  $this->tpl->parseCurrentBlock();
1673  }
1674  }
static getLinkTarget($gui, $cmd, Array $gui_params=array(), Array $mail_params=array())
_getTranslation($a_role_title)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:

◆ membersGalleryObject()

ilObjiLincCourseGUI::membersGalleryObject ( )

Builds a learnlink seminar members gallery as a layer of left-floating images.

Author
Arturo Gonzalez artur.nosp@m.ogf@.nosp@m.gmail.nosp@m..com public

Definition at line 1681 of file class.ilObjiLincCourseGUI.php.

References $file, __setSubTabs(), exit, ilObjectFactory\getInstanceByObjId(), and ilUtil\getStyleSheetLocation().

1682  {
1683  global $rbacsystem;
1684 
1685  $is_admin = (bool) $rbacsystem->checkAccess('write', $this->object->getRefId());
1686 
1687  $this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.icrs_members_gallery.html','Modules/ILinc');
1688 
1689  $this->__setSubTabs('members');
1690 
1691  $this->lng->loadLanguageModule('ilinc');
1692 
1693  $member_ids = $this->object->getMemberIds();
1694 
1695  // fetch all user data in one shot to improve performance (from ILIAS db)
1696  $members = $this->object->getMemberData($member_ids);
1697 
1698  // fetch docent or student assignment form all coursemembers from iLinc server
1699  $admin_ids = $this->object->getiLincMemberIds(true);
1700 
1701  // MEMBERS
1702  if(count($members))
1703  {
1704  foreach($members as $member)
1705  {
1706  // get user object
1707  if(!($usr_obj = ilObjectFactory::getInstanceByObjId($member['id'],false)))
1708  {
1709  continue;
1710  }
1711 
1712  $public_profile = $usr_obj->getPref('public_profile');
1713 
1714  // SET LINK TARGET FOR USER PROFILE
1715  $this->ctrl->setParameterByClass('ilpublicuserprofilegui', 'user', $member['id']);
1716  $profile_target = $this->ctrl->getLinkTargetByClass('ilpublicuserprofilegui','getHTML');
1717 
1718  // GET USER IMAGE
1719  $file = $usr_obj->getPersonalPicturePath('xsmall');
1720 
1721  switch(in_array($member['ilinc_id'],$admin_ids))
1722  {
1723  //admins
1724  case 1:
1725  if($public_profile == 'y' || $public_profile == 'g')
1726  {
1727  $this->tpl->setCurrentBlock('tutor_linked');
1728  $this->tpl->setVariable('LINK_PROFILE', $profile_target);
1729  $this->tpl->setVariable('SRC_USR_IMAGE', $file);
1730  $this->tpl->parseCurrentBlock();
1731  }
1732  else
1733  {
1734  $this->tpl->setCurrentBlock('tutor_not_linked');
1735  $this->tpl->setVariable('SRC_USR_IMAGE', $file);
1736  $this->tpl->parseCurrentBlock();
1737  }
1738  $this->tpl->setCurrentBlock('tutor');
1739  break;
1740 
1741  case 0:
1742  if($public_profile == 'y' || $public_profile == 'g')
1743  {
1744  $this->tpl->setCurrentBlock('member_linked');
1745  $this->tpl->setVariable('LINK_PROFILE', $profile_target);
1746  $this->tpl->setVariable('SRC_USR_IMAGE', $file);
1747  $this->tpl->parseCurrentBlock();
1748  }
1749  else
1750  {
1751  $this->tpl->setCurrentBlock('member_not_linked');
1752  $this->tpl->setVariable('SRC_USR_IMAGE', $file);
1753  $this->tpl->parseCurrentBlock();
1754  }
1755  $this->tpl->setCurrentBlock('member');
1756  break;
1757  }
1758 
1759  // do not show name, if public profile is not activated
1760  if($public_profile == 'y' || $public_profile == 'g')
1761  {
1762  $this->tpl->setVariable('FIRSTNAME', $member['firstname']);
1763  $this->tpl->setVariable('LASTNAME', $member['lastname']);
1764  }
1765 
1766  $this->tpl->setVariable('LOGIN', $usr_obj->getLogin());
1767  $this->tpl->parseCurrentBlock();
1768  }
1769 
1770  $this->tpl->setCurrentBlock('members');
1771  $this->tpl->setVariable('MEMBERS_TABLE_HEADER',$this->lng->txt('ilinc_involved_users'));
1772  $this->tpl->parseCurrentBlock();
1773  }
1774 
1775  $this->tpl->setVariable('TITLE', $this->lng->txt('icrs_members_print_title'));
1776  $this->tpl->setVariable('CSS_PATH', ilUtil::getStyleSheetLocation());
1777 
1778  $headline = $this->object->getTitle().'<br />'.$this->object->getDescription();
1779  $this->tpl->setVariable('HEADLINE', $headline);
1780 
1781  $this->tpl->show();
1782  exit();
1783  }
print $file
exit
Definition: login.php:54
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
+ Here is the call graph for this function:

◆ membersObject()

ilObjiLincCourseGUI::membersObject ( )

display group members

Definition at line 715 of file class.ilObjiLincCourseGUI.php.

References $ilBench, $ilUser, ilObjectGUI\$lng, __setSubTabs(), and ilMailFormCall\getLinkTarget().

716  {
717  global $ilAccess, $ilBench, $lng, $ilToolbar, $ilUser;
718 
719  if(!$this->ilias->getSetting('ilinc_active'))
720  {
721  $this->ilias->raiseError($lng->txt('ilinc_server_not_active'), $this->ilias->error_obj->MESSAGE);
722  }
723 
724  $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.icrs_members.html','Modules/ILinc');
725  $this->__setSubTabs('members');
726 
727  $this->lng->loadLanguageModule('ilinc');
728 
729  // display member search button
730  $is_admin = (bool)$ilAccess->checkAccess('write', '', $this->object->getRefId());
731  if($is_admin)
732  {
733  $ilToolbar->addButton($this->lng->txt('ilinc_add_user'), $this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI', 'start'));
734  }
735 
736  //if current user is admin he is able to add new members to group
737  $val_contact = "<img src=\"".ilUtil::getImagePath("icon_pencil_b.png")."\" alt=\"".$this->lng->txt("ilinc_mem_send_mail")."\" title=\"".$this->lng->txt("ilinc_mem_send_mail")."\" border=\"0\" vspace=\"0\"/>";
738  $val_change = "<img src=\"".ilUtil::getImagePath("icon_change_b.png")."\" alt=\"".$this->lng->txt("ilinc_mem_change_status")."\" title=\"".$this->lng->txt("ilinc_mem_change_status")."\" border=\"0\" vspace=\"0\"/>";
739  $val_leave = "<img src=\"".ilUtil::getImagePath("icon_group_out_b.png")."\" alt=\"".$this->lng->txt("ilinc_mem_leave")."\" title=\"".$this->lng->txt("ilinc_mem_leave")."\" border=\"0\" vspace=\"0\"/>";
740 
741  // store access checks to improve performance
742  $access_leave = $ilAccess->checkAccess('leave', '', $this->object->getRefId());
743  $access_write = $ilAccess->checkAccess('write', '', $this->object->getRefId());
744 
745  $member_ids = $this->object->getMemberIds();
746 
747  // fetch all user data in one shot to improve performance (from ILIAS db)
748  $members = $this->object->getMemberData($member_ids);
749 
750  // fetch docent or student assignment form all coursemembers from iLinc server
751  $docent_ids = $this->object->getiLincMemberIds(true);
752  $student_ids = $this->object->getiLincMemberIds(false);
753 
754  $counter = 0;
755  $result_set = array();
756  require_once 'Services/Mail/classes/class.ilMailFormCall.php';
757  foreach($members as $mem)
758  {
759  $link_contact = ilMailFormCall::getLinkTarget($this, 'members', array(), array('type' => 'new', 'rcp_to' => $mem['login']));
760  $link_change = $this->ctrl->getLinkTarget($this, 'changeMember').'&mem_id='.$mem['id'];
761  if(($mem['id'] == $ilUser->getId() && $access_leave) || $access_delete)
762  {
763  $link_leave = $this->ctrl->getLinkTarget($this, 'removeMember').'&mem_id='.$mem['id'];
764  }
765 
766  //build functions
767  $member_functions = '';
768  if($access_write)
769  {
770  $member_functions = "<a href=\"$link_change\">$val_change</a>";
771  }
772  if(($mem['id'] == $ilUser->getId() && $access_leave) || $access_write)
773  {
774  $link_leave = $this->ctrl->getLinkTarget($this, 'removeMember').'&mem_id='.$mem['id'];
775  $member_functions .="<a href=\"$link_leave\">$val_leave</a>";
776  }
777 
778  // this is twice as fast than the code above
779  $str_member_roles = $this->object->getMemberRolesTitle($mem['id']);
780 
781  if($access_write)
782  {
783  $result_set[$counter]['checkbox'] = ilUtil::formCheckBox(0, 'user_id[]', $mem['id']);
784  }
785 
786  $status = $this->object->checkiLincMemberStatus($mem['ilinc_id'], $docent_ids, $student_ids);
787  if($status == ILINC_MEMBER_NOTSET)
788  {
789  $status = "<span class='warning'>".$this->lng->txt($status)."</span>";
790  }
791  else
792  {
793  $status = $this->lng->txt($status);
794  }
795 
796  $result_set[$counter]['login'] = $mem['login'];
797  $result_set[$counter]['firstname'] = $mem['firstname'];
798  $result_set[$counter]['lastname'] = $mem['lastname'];
799  $result_set[$counter]['attending_as'] = $status;
800  $result_set[$counter]['role'] = $str_member_roles;
801  $result_set[$counter]['options'] = "<a href=\"$link_contact\">".$val_contact."</a>".$member_functions;
802 
803  ++$counter;
804 
805  unset($member_functions);
806  }
807 
808  include_once 'Modules/ILinc/classes/class.iliLinkMembersTableGUI.php';
809  $oTable = new iliLinkMembersTableGUI($this, $result_set, 'show', 'members', 'members');
810  $oTable->setTitle($this->lng->txt('ilinc_involved_users'), 'icon_usr_b.png', $this->lng->txt('ilinc_involved_users'));
811 
812  return $this->tpl->setVariable('MEMBER_TABLE', $oTable->getHTML());
813  }
static getLinkTarget($gui, $cmd, Array $gui_params=array(), Array $mail_params=array())
redirection script todo: (a better solution should control the processing via a xml file) ...
global $ilUser
Definition: imgupload.php:15
global $ilBench
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ removeMemberObject()

ilObjiLincCourseGUI::removeMemberObject ( )

displays confirmation formular with users that shall be removed from group public

Definition at line 1151 of file class.ilObjiLincCourseGUI.php.

References $_GET, $_POST, $_SESSION, ilObjectGUI\$data, $ilUser, __setSubTabs(), ilUtil\getImageTagByType(), ilObjectFactory\getInstanceByObjId(), and ilUtil\sendQuestion().

1152  {
1153  global $ilUser, $rbacreview;
1154 
1155  $this->__setSubTabs('members');
1156 
1157  $user_ids = array();
1158 
1159  if(isset($_POST['user_id']))
1160  {
1161  $user_ids = $_POST['user_id'];
1162  }
1163  else if(isset($_GET['mem_id']))
1164  {
1165  $user_ids[] = $_GET['mem_id'];
1166  }
1167  else if(isset($_GET['mem_id_arr']))
1168  {
1169  $user_ids = explode(',', $_GET['mem_id_arr']);
1170  }
1171 
1172  if(empty($user_ids[0]))
1173  {
1174  $this->ilErr->raiseError($this->lng->txt("no_checkbox"), $this->ilErr->MESSAGE);
1175  }
1176 
1177  if(count($user_ids) == 1 && $ilUser->getId() != $user_ids[0])
1178  {
1179  if(!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID) &&
1180  !in_array($ilUser->getId(), $this->object->getAdminIds()))
1181  {
1182  $this->ilErr->raiseError($this->lng->txt("ilinc_err_no_permission"), $this->ilErr->MESSAGE);
1183  }
1184  }
1185 
1186  //bool value: says if $users_ids contains current user id
1187  $is_dismiss_me = array_search($this->ilias->account->getId(), $user_ids);
1188 
1189  $confirm = "confirmedRemoveMember";
1190  $cancel = "canceled";
1191  $info = ($is_dismiss_me !== false) ? "ilinc_dismiss_myself" : "ilinc_dismiss_member";
1192  $status = "";
1193  $return = "members";
1194 
1195  ilUtil::sendQuestion($this->lng->txt($info));
1196 
1197  $data = array();
1198  if(is_array($user_ids))
1199  {
1200  foreach($user_ids as $id)
1201  {
1202  $obj_data = ilObjectFactory::getInstanceByObjId($id);
1203  $data[$id] = array(
1204  'type' => ilUtil::getImageTagByType($obj_data->getType(), $this->tpl->tplPath),
1205  'title' => $obj_data->getTitle(),
1206  'desc' => $obj_data->getDescription(),
1207  'last_update' => $obj_data->getLastUpdateDate()
1208  );
1209  }
1210  }
1211  else
1212  {
1213  $obj_data = ilObjectFactory::getInstanceByObjId($user_ids);
1214  $data[$user_ids] = array(
1215  'type' => ilUtil::getImageTagByType($obj_data->getType(), $this->tpl->tplPath),
1216  'title' => $obj_data->getTitle(),
1217  'desc' => $obj_data->getDescription(),
1218  'last_update' => $obj_data->getLastUpdateDate(),
1219  );
1220  }
1221 
1222  //write in sessionvariables
1223  if(is_array($user_ids))
1224  {
1225  $_SESSION['saved_post']['user_id'] = $user_ids;
1226  }
1227  else
1228  {
1229  $_SESSION['saved_post']['user_id'][0] = $user_ids;
1230  }
1231 
1232  if(isset($status))
1233  {
1234  $_SESSION['saved_post']['status'] = $status;
1235  }
1236 
1237  include_once 'Modules/ILinc/classes/class.iliLinkConfirmationTableGUI.php';
1238  $this->ctrl->setParameter($this, 'cmd_return_location', $a_cmd_return_location);
1239  $this->ctrl->setParameter($this, 'mem_id_arr', implode(',', $user_ids));
1240  $oTable = new iliLinkConfirmationTableGUI($this, $data, 'removeMember', $return);
1241  $oTable->addCommandButton($cancel, $this->lng->txt('cancel'));
1242  $oTable->addCommandButton($confirm, $this->lng->txt('confirm'));
1243 
1244  return $this->tpl->setContent($oTable->getHTML());
1245  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static getImageTagByType($a_type, $a_path, $a_big=false)
Builds an html image tag TODO: function still in use, but in future use getImagePath and move HTML-Co...
redirection script todo: (a better solution should control the processing via a xml file) ...
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static sendQuestion($a_info="", $a_keep=false)
Send Question to Screen.
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:

◆ saveObject()

ilObjiLincCourseGUI::saveObject ( )

save object public

Definition at line 128 of file class.ilObjiLincCourseGUI.php.

References $_POST, and initSettingsForm().

129  {
130  $this->initSettingsForm('create');
131  if($this->form_gui->checkInput())
132  {
133  $_POST['Fobject']['title'] = $this->form_gui->getInput('title');
134  $_POST['Fobject']['desc'] = $this->form_gui->getInput('desc');
135  $_POST['Fobject']['activated'] = $this->form_gui->getInput('activated');
136  $_POST['Fobject']['akclassvalue1'] = $this->form_gui->getInput('akclassvalue1');
137  $_POST['Fobject']['akclassvalue2'] = $this->form_gui->getInput('akclassvalue2');
138 
139  // when creating new ilinc course we first create it on ilinc server
140  include_once 'Modules/ILinc/classes/class.ilnetucateXMLAPI.php';
141  $ilinc = new ilnetucateXMLAPI();
142  $ilinc->addCourse($_POST['Fobject']);
143 
144  $this->iLincAddCourseResponse = $ilinc->sendRequest();
145  if($this->iLincAddCourseResponse->isError())
146  {
147  $this->ilErr->raiseError($this->iLincAddCourseResponse->getErrorMsg(), $this->ilErr->MESSAGE);
148  }
149 
150  // if everything ok
151  parent::saveObject();
152  }
153  else
154  {
155  $this->form_gui->setValuesByPost();
156  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
157  }
158  }
$_POST['username']
Definition: cron.php:12
API to communicate with a the CMSAPI of centra (c) Sascha Hofmann, 2004.
+ Here is the call graph for this function:

◆ searchObject()

ilObjiLincCourseGUI::searchObject ( )

Definition at line 969 of file class.ilObjiLincCourseGUI.php.

References $_POST, $_SESSION, $result, ilObjectGUI\$tree, __search(), ilObjectGUI\__showButton(), __showSearchGroupTable(), __showSearchRoleTable(), __showSearchUserTable(), ilDatePresentation\formatDate(), ilUtil\formCheckbox(), ilObjectFactory\getInstanceByObjId(), ilObjectFactory\getInstanceByRefId(), IL_CAL_DATETIME, searchUserFormObject(), ilUtil\sendInfo(), and ilUtil\stripSlashes().

Referenced by listUsersGroupObject(), and listUsersRoleObject().

970  {
971  global $rbacsystem,$tree;
972 
973  $_SESSION["grp_search_str"] = $_POST["search_str"] = $_POST["search_str"] ? $_POST["search_str"] : $_SESSION["grp_search_str"];
974  $_SESSION["grp_search_for"] = $_POST["search_for"] = $_POST["search_for"] ? $_POST["search_for"] : $_SESSION["grp_search_for"];
975 
976  // MINIMUM ACCESS LEVEL = 'administrate'
977  if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
978  {
979  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
980  }
981 
982  if(!isset($_POST["search_for"]) or !isset($_POST["search_str"]))
983  {
984  ilUtil::sendInfo($this->lng->txt("grp_search_enter_search_string"));
985  $this->searchUserFormObject();
986 
987  return false;
988  }
989 
990  if(!count($result = $this->__search(ilUtil::stripSlashes($_POST["search_str"]),$_POST["search_for"])))
991  {
992  ilUtil::sendInfo($this->lng->txt("grp_no_results_found"));
993  $this->searchUserFormObject();
994 
995  return false;
996  }
997 
998  $this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.grp_usr_selection.html",
999  "Modules/Group");
1000  $this->__showButton("searchUserForm",$this->lng->txt("grp_new_search"));
1001 
1002  $counter = 0;
1003  $f_result = array();
1004 
1005  switch($_POST["search_for"])
1006  {
1007  case "usr":
1008  foreach($result as $user)
1009  {
1010  if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user["id"],false))
1011  {
1012  continue;
1013  }
1014 
1015  $user_ids[$counter] = $user["id"];
1016 
1017  $f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user["id"]);
1018  $f_result[$counter][] = $tmp_obj->getLogin();
1019  $f_result[$counter][] = $tmp_obj->getFirstname();
1020  $f_result[$counter][] = $tmp_obj->getLastname();
1021  $f_result[$counter][] = ilDatePresentation::formatDate(new ilDateTime($tmp_obj->getLastLogin(),IL_CAL_DATETIME));
1022 
1023  unset($tmp_obj);
1024  ++$counter;
1025  }
1026  $this->__showSearchUserTable($f_result,$user_ids);
1027 
1028  return true;
1029 
1030  case "role":
1031  foreach($result as $role)
1032  {
1033  // exclude anonymous role
1034  if ($role["id"] == ANONYMOUS_ROLE_ID)
1035  {
1036  continue;
1037  }
1038 
1039  if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($role["id"],false))
1040  {
1041  continue;
1042  }
1043 
1044  // exclude roles with no users assigned to
1045  if ($tmp_obj->getCountMembers() == 0)
1046  {
1047  continue;
1048  }
1049 
1050  $role_ids[$counter] = $role["id"];
1051 
1052  $f_result[$counter][] = ilUtil::formCheckbox(0,"role[]",$role["id"]);
1053  $f_result[$counter][] = array($tmp_obj->getTitle(),$tmp_obj->getDescription());
1054  $f_result[$counter][] = $tmp_obj->getCountMembers();
1055 
1056  unset($tmp_obj);
1057  ++$counter;
1058  }
1059 
1060  $this->__showSearchRoleTable($f_result,$role_ids);
1061 
1062  return true;
1063 
1064  case "grp":
1065  foreach($result as $group)
1066  {
1067  if(!$tree->isInTree($group["id"]))
1068  {
1069  continue;
1070  }
1071 
1072  if(!$tmp_obj = ilObjectFactory::getInstanceByRefId($group["id"],false))
1073  {
1074  continue;
1075  }
1076 
1077  // exclude myself :-)
1078  if ($tmp_obj->getId() == $this->object->getId())
1079  {
1080  continue;
1081  }
1082 
1083  $grp_ids[$counter] = $group["id"];
1084 
1085  $f_result[$counter][] = ilUtil::formCheckbox(0,"group[]",$group["id"]);
1086  $f_result[$counter][] = array($tmp_obj->getTitle(),$tmp_obj->getDescription());
1087  $f_result[$counter][] = $tmp_obj->getCountMembers();
1088 
1089  unset($tmp_obj);
1090  ++$counter;
1091  }
1092 
1093  if(!count($f_result))
1094  {
1095  ilUtil::sendInfo($this->lng->txt("grp_no_results_found"));
1096  $this->searchUserFormObject();
1097 
1098  return false;
1099  }
1100 
1101  $this->__showSearchGroupTable($f_result,$grp_ids);
1102 
1103  return true;
1104  }
1105  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
__search($a_search_string, $a_search_for)
$_POST['username']
Definition: cron.php:12
const IL_CAL_DATETIME
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
$result
__showButton($a_cmd, $a_text, $a_target='')
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__showSearchGroupTable($a_result_set, $a_grp_ids=NULL)
__showSearchUserTable($a_result_set, $a_user_ids=NULL, $a_cmd="search")
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
redirection script todo: (a better solution should control the processing via a xml file) ...
__showSearchRoleTable($a_result_set, $a_role_ids=NULL)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formCheckbox($checked, $varname, $value, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ searchUserFormObject()

ilObjiLincCourseGUI::searchUserFormObject ( )

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

References $_POST, $_SESSION, __unsetSessionVariables(), and ilUtil\formRadioButton().

Referenced by searchObject().

933  {
934  global $rbacsystem;
935 
936  $this->lng->loadLanguageModule('search');
937 
938  // MINIMUM ACCESS LEVEL = 'administrate'
939  if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
940  {
941  $this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
942  }
943 
944  $this->tpl->addBlockFile("ADM_CONTENT","adm_content","tpl.grp_members_search.html",
945  "Modules/Group");
946 
947  $this->tpl->setVariable("F_ACTION",$this->ctrl->getFormAction($this));
948  $this->tpl->setVariable("SEARCH_ASSIGN_USR",$this->lng->txt("grp_search_members"));
949  $this->tpl->setVariable("SEARCH_SEARCH_TERM",$this->lng->txt("search_search_term"));
950  $this->tpl->setVariable("SEARCH_VALUE",$_SESSION["grp_search_str"] ? $_SESSION["grp_search_str"] : "");
951  $this->tpl->setVariable("SEARCH_FOR",$this->lng->txt("exc_search_for"));
952  $this->tpl->setVariable("SEARCH_ROW_TXT_USER",$this->lng->txt("exc_users"));
953  $this->tpl->setVariable("SEARCH_ROW_TXT_ROLE",$this->lng->txt("exc_roles"));
954  $this->tpl->setVariable("SEARCH_ROW_TXT_GROUP",$this->lng->txt("exc_groups"));
955  $this->tpl->setVariable("BTN2_VALUE",$this->lng->txt("cancel"));
956  $this->tpl->setVariable("BTN1_VALUE",$this->lng->txt("search"));
957 
958  $usr = ($_POST["search_for"] == "usr" || $_POST["search_for"] == "") ? 1 : 0;
959  $grp = ($_POST["search_for"] == "grp") ? 1 : 0;
960  $role = ($_POST["search_for"] == "role") ? 1 : 0;
961 
962  $this->tpl->setVariable("SEARCH_ROW_CHECK_USER",ilUtil::formRadioButton($usr,"search_for","usr"));
963  $this->tpl->setVariable("SEARCH_ROW_CHECK_ROLE",ilUtil::formRadioButton($role,"search_for","role"));
964  $this->tpl->setVariable("SEARCH_ROW_CHECK_GROUP",ilUtil::formRadioButton($grp,"search_for","grp"));
965 
966  $this->__unsetSessionVariables();
967  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...
static formRadioButton($checked, $varname, $value, $onclick=null, $disabled=false)
??? public
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showAdministrationPanel()

ilObjiLincCourseGUI::showAdministrationPanel (   $tpl)

Definition at line 1790 of file class.ilObjiLincCourseGUI.php.

1791  {
1792  }

◆ updateMemberStatusObject()

ilObjiLincCourseGUI::updateMemberStatusObject ( )

displays form in which the member-status can be changed public

Definition at line 1400 of file class.ilObjiLincCourseGUI.php.

References $_POST, ilUtil\redirect(), and ilUtil\sendInfo().

1401  {
1402  global $ilAccess;
1403 
1404  if(!$ilAccess->checkAccess('write', '', $this->object->getRefId()))
1405  {
1406  $this->ilErr->raiseError('permission_denied',$this->ilErr->MESSAGE);
1407  }
1408 
1409  if(isset($_POST['member_status_select']))
1410  {
1411  foreach($_POST['member_status_select'] as $key => $value)
1412  {
1413  $this->object->leave($key);
1414  $this->object->join($key,$value);
1415  }
1416  }
1417 
1418  if(isset($_POST['ilinc_member_status_select']))
1419  {
1420  $users_to_add = array();
1421  $users_to_register = array();
1422  $users_to_unregister = array();
1423 
1424  foreach($_POST['ilinc_member_status_select'] as $user_id => $ilinc_arr)
1425  {
1426  $ilinc_user_id = key($ilinc_arr);
1427  $ilinc_user_status = current($ilinc_arr);
1428  //var_dump($user_id,$ilinc_arr,$ilinc_user_id,$ilinc_user_status);
1429 
1430  // if no ilinc user id was passed, there are 3 options:
1431  // 1. user was added by roleassignment and is registered on iLinc server
1432  // 2. user was added by roleassignment and is registered NOT YET on iLinc server
1433  // 3. iLinc server returns an empty response which happens sometimes :-(
1434  if($ilinc_user_id == 0)
1435  {
1436  //echo '0';
1437 
1438  // check if user is already registered on iLinc server
1439  $user_obj = new ilObjUser($user_id);
1440 
1441  include_once 'Modules/ILinc/classes/class.ilObjiLincUser.php';
1442  $ilinc_user = new ilObjiLincUser($user_obj);
1443 
1444  if(!$ilinc_user->id)
1445  {
1446  // not registered. put user on 'add list'
1447  $users_to_add[] =& $user_obj;
1448  }
1449  else
1450  {
1451  $users_to_register[$ilinc_user->id] = ILINC_MEMBER_STUDENT;
1452  }
1453 
1454  continue;
1455  }
1456 
1457  //echo '1';
1458  $users_to_unregister[] = $ilinc_user_id;
1459  $users_to_register[$ilinc_user_id] = $ilinc_user_status;
1460  //var_dump($users_to_unregister,$users_to_register);
1461  }
1462 
1463  if(!$this->object->unregisterUsers($users_to_unregister))
1464  {
1465  //echo '2';
1466  //var_dump($this->object->getErrorMsg());exit;
1467  $this->ilErr->raiseError($this->object->getErrorMsg(),$this->ilErr->MESSAGE);
1468  }
1469 
1470  if(count($users_to_add) > 0)
1471  {
1472  //echo '3';
1473  foreach ($users_to_add as $user)
1474  {
1475  if (!$this->object->addUser($user))
1476  {
1477  //echo '4';
1478  //var_dump($this->object->getErrorMsg());exit;
1479  $this->ilErr->raiseError($this->object->getErrorMsg(),$this->ilErr->MESSAGE);
1480  }
1481  else
1482  {
1483  //echo '5';
1484  include_once 'Modules/ILinc/classes/class.ilObjiLincUser.php';
1485  $ilinc_user = new ilObjiLincUser($user);
1486  $users_to_register[$ilinc_user->id] = ILINC_MEMBER_STUDENT;
1487  }
1488  }
1489  }
1490 
1491  if(!$this->object->registerUsers($users_to_register))
1492  {
1493  //echo '6';
1494  //var_dump($this->object->getErrorMsg());exit;
1495  $this->ilErr->raiseError($this->object->getErrorMsg(),$this->ilErr->MESSAGE);
1496  }
1497  }
1498 
1499  ilUtil::sendInfo($this->lng->txt('msg_obj_modified'), true);
1500  ilUtil::redirect($this->ctrl->getLinkTarget($this, 'members', '', false, false));
1501  }
$_POST['username']
Definition: cron.php:12
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
Class ilObjiLincUser iLinc related user settings.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ updateObject()

ilObjiLincCourseGUI::updateObject ( )

Definition at line 58 of file class.ilObjiLincCourseGUI.php.

References $_GET, $_POST, $success, initSettingsForm(), ilUtil\prepareDBString(), ilUtil\sendInfo(), and ilUtil\tf2yn().

59  {
60  global $ilAccess;
61 
62  if(!$ilAccess->checkAccess('write', '', (int)$_GET['ref_id']))
63  {
64  $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->MESSAGE);
65  }
66 
67  $this->initSettingsForm('edit');
68  if($this->form_gui->checkInput())
69  {
70  $_POST['Fobject']['title'] = $this->form_gui->getInput('title');
71  $_POST['Fobject']['desc'] = $this->form_gui->getInput('desc');
72  $_POST['Fobject']['activated'] = $this->form_gui->getInput('activated');
73  $_POST['Fobject']['akclassvalue1'] = $this->form_gui->getInput('akclassvalue1');
74  $_POST['Fobject']['akclassvalue2'] = $this->form_gui->getInput('akclassvalue2');
75 
76  $this->object->setTitle(ilUtil::prepareDBString($_POST['Fobject']['title']));
77  $this->object->setDescription(ilUtil::prepareDBString($_POST['Fobject']['desc']));
78  $this->object->activated = ilUtil::tf2yn($_POST['Fobject']['activated']);
79 
80  // update akclassvalues only if iLinc is active
81  if($this->ilias->getSetting('ilinc_akclassvalues_active'))
82  {
83  if($this->object->getAKClassValue1() != $_POST['Fobject']['akclassvalue1'])
84  {
85  $this->object->setAKClassValue1(ilUtil::prepareDBString($_POST['Fobject']['akclassvalue1']));
86  }
87 
88  if($this->object->getAKClassValue2() != $_POST['Fobject']['akclassvalue2'])
89  {
90  $this->object->setAKClassValue2(ilUtil::prepareDBString($_POST['Fobject']['akclassvalue2']));
91  }
92  }
93 
94  // save changes to ilinc server and ilias database
95  $success = $this->object->update();
96  if($success == false)
97  {
98  $this->ilErr->raiseError($this->object->getErrorMsg(), $this->ilErr->MESSAGE);
99  }
100 
101  // update all akclassvalues of classes if akclassvalues has changed
102  if(array_key_exists('akclassvalue1', $_POST['Fobject']) or
103  array_key_exists('akclassvalue2',$_POST['Fobject']))
104  {
105  if(!$this->object->updateClassrooms())
106  {
107  ilUtil::sendInfo($this->lng->txt($this->object->getErrorMsg()));
108  $this->form_gui->setValuesByPost();
109  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
110  }
111  }
112 
113  ilUtil::sendInfo($this->lng->txt('msg_obj_modified'));
114  $this->form_gui->setValuesByPost();
115  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
116  }
117  else
118  {
119  $this->form_gui->setValuesByPost();
120  return $this->tpl->setVariable('ADM_CONTENT', $this->form_gui->getHtml());
121  }
122  }
static tf2yn($a_tf)
convert true/false to "y"/"n"
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$success
Definition: Utf8Test.php:87
redirection script todo: (a better solution should control the processing via a xml file) ...
static prepareDBString($a_str)
prepare a string for db writing (insert/update)
+ Here is the call graph for this function:

◆ viewObject()

ilObjiLincCourseGUI::viewObject ( )

Definition at line 893 of file class.ilObjiLincCourseGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\getCreationMode(), and ilContainerGUI\renderObject().

894  {
895  global $ilCtrl, $ilNavigationHistory, $ilAccess;
896 
897  if(!$ilAccess->checkAccess('read', '', $this->object->getRefId()))
898  {
899  $this->ilias->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilias->error_obj->MESSAGE);
900  }
901 
902  // add entry to navigation history
903  if(!$this->getCreationMode() &&
904  $ilAccess->checkAccess('read', '', $this->object->getRefId()))
905  {
906  $ilNavigationHistory->addItem($this->object->getRefId(),
907  'ilias.php?baseClass=ilRepositoryGUI&cmd=view&ref_id='.$this->object->getRefId(), 'icrs');
908  }
909 
910  if(strtolower($_GET['baseClass']) == 'iladministrationgui')
911  {
912  parent::viewObject();
913  return true;
914  }
915 
916  return $this->renderObject();
917  }
renderObject()
render the object
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
getCreationMode()
get creation mode
+ Here is the call graph for this function:

Field Documentation

◆ $form_gui

ilObjiLincCourseGUI::$form_gui = null
private

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


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