ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilObjSessionListGUI Class Reference
+ Inheritance diagram for ilObjSessionListGUI:
+ Collaboration diagram for ilObjSessionListGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 init ()
 Initialisation. More...
 
 getTitle ()
 get title Overwritten since sessions prepend the date of the session to the title More...
 
 getCommandLink ($a_cmd)
 Get command link url. More...
 
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
 Only check cmd access for cmd 'register' and 'unregister'. More...
 
 getProperties ()
 get properties More...
 
- Public Member Functions inherited from ilObjectListGUI
 ilObjectListGUI ()
 constructor More...
 
 setContainerObject ($container_obj)
 set the container object (e.g categorygui) Used for link, delete ... commands More...
 
 getContainerObject ()
 get container object More...
 
 init ()
 initialisation More...
 
 enableProperties ($a_status)
 En/disable properties. More...
 
 getPropertiesStatus ()
 
 enablePreconditions ($a_status)
 En/disable preconditions. More...
 
 getNoticePropertiesStatus ()
 
 enableNoticeProperties ($a_status)
 En/disable notices. More...
 
 getPreconditionsStatus ()
 
 enableDescription ($a_status)
 En/disable description. More...
 
 getDescriptionStatus ()
 
 getSearchFragmentStatus ()
 Show hide search result fragments. More...
 
 enableSearchFragments ($a_status)
 En/disable description. More...
 
 enableLinkedPath ($a_status)
 Enable linked path. More...
 
 enabledRelevance ()
 enabled relevance More...
 
 enableRelevance ($a_status)
 enable relevance More...
 
 setRelevance ($a_rel)
 set relevance More...
 
 getRelevance ()
 get relevance More...
 
 enableIcon ($a_status)
 En/Dis-able icons. More...
 
 getIconStatus ()
 Are icons enabled? More...
 
 enableCheckbox ($a_status)
 En/Dis-able checkboxes. More...
 
 getCheckboxStatus ()
 Are checkboxes enabled? More...
 
 enableExpand ($a_status)
 En/Dis-able expand/collapse link. More...
 
 getExpandStatus ()
 Is expand/collapse enabled. More...
 
 setExpanded ($a_status)
 
 isExpanded ()
 
 setPositionInputField ($a_field_index, $a_position_value)
 Set position input field. More...
 
 enableDelete ($a_status)
 En/disable delete. More...
 
 getDeleteStatus ()
 
 enableCut ($a_status)
 En/disable cut. More...
 
 getCutStatus ()
 
 enableCopy ($a_status)
 En/disable copy. More...
 
 getCopyStatus ()
 
 enableSubscribe ($a_status)
 En/disable subscribe. More...
 
 getSubscribeStatus ()
 
 enablePayment ($a_status)
 En/disable payment. More...
 
 getPaymentStatus ()
 
 enableLink ($a_status)
 En/disable link. More...
 
 getLinkStatus ()
 
 enablePath ($a_path, $a_start_node=null)
 En/disable path. More...
 
 getPathStatus ()
 
 enableCommands ($a_status, $a_std_only=false)
 En/disable commands. More...
 
 getCommandsStatus ()
 
 enableInfoScreen ($a_info_screen)
 En/disable path. More...
 
 addSubItemHTML ($a_html)
 Add HTML for subitem (used for sessions) More...
 
 getInfoScreenStatus ()
 
 enableProgressInfo ($a_status)
 enable progress info More...
 
 getProgressInfoStatus ()
 get progress info status More...
 
 enableSubstitutions ($a_status)
 Enable substitutions. More...
 
 getSubstitutionStatus ()
 Get substitution status. More...
 
 enableItemDetailLinks ($a_status)
 enable item detail links E.g Direct links to chapters or pages More...
 
 getItemDetailLinkStatus ()
 get item detail link status More...
 
 setItemDetailLinks ($a_detail_links, $a_intro_txt='')
 set items detail links More...
 
 insertItemDetailLinks ()
 insert item detail links More...
 
 setTitle ($a_title)
 
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php More...
 
 setDescription ($a_description)
 
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php More...
 
 setSearchFragment ($a_text)
 set search fragment More...
 
 getSearchFragment ()
 get search fragment More...
 
 setSeparateCommands ($a_val)
 Set separate commands. More...
 
 getSeparateCommands ()
 Get separate commands. More...
 
 getCommandId ()
 get command id Normally the ref id. More...
 
 setAdditionalInformation ($a_val)
 Set additional information. More...
 
 getAdditionalInformation ()
 Get additional information. More...
 
 setDetailsLevel ($a_level)
 Details level Currently used in Search which shows only limited properties of forums Currently used for Sessions (switch between minimal and extended view for each session) More...
 
 getDetailsLevel ()
 Get current details level. More...
 
 enableRepositoryTransfer ($a_value)
 Enable copy/move to repository (from personal workspace) More...
 
 restrictToGoto ($a_value)
 Restrict all actions/links to goto. More...
 
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
 
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="", $a_context=self::CONTEXT_REPOSITORY)
 inititialize new item (is called by getItemHTML()) More...
 
 setConditionTarget ($a_ref_id, $a_obj_id, $a_target_type)
 
 resetConditionTarget ()
 
 disableTitleLink ($a_status)
 
 setDefaultCommandParameters (array $a_params)
 
 createDefaultCommand ($command)
 Get default command link Overwritten for e.g categories,courses => they return a goto link If search engine visibility is enabled these object type return a goto_CLIENT_ID_cat_99.html link. More...
 
 getCommandLink ($a_cmd)
 Get command link url. More...
 
 getCommandFrame ($a_cmd)
 Get command target frame. More...
 
 getCommandImage ($a_cmd)
 Get command icon image. More...
 
 getProperties ($a_item='')
 Get item properties. More...
 
 addCustomProperty ($a_property="", $a_value="", $a_alert=false, $a_newline=false)
 add custom property More...
 
 getCustomProperties ($a_prop)
 get custom properties More...
 
 getAlertProperties ()
 get all alert properties More...
 
 getNoticeProperties ()
 get notice properties More...
 
 addCustomCommand ($a_link, $a_lang_var, $a_frame="", $onclick="")
 add a custom command More...
 
 forceVisibleOnly ($a_stat)
 Force visible access only. More...
 
 isVisibleOnlyForced ()
 Force unreadable. More...
 
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user) More...
 
 getIconImageType ()
 Returns the icon image type. More...
 
 insertTitle ()
 insert item title More...
 
 insertSubstitutions ()
 Insert substitutions. More...
 
 insertDescription ()
 insert item description More...
 
 insertSearchFragment ()
 Insert highlighted search fragment. More...
 
 insertRelevance ()
 insert relevance More...
 
 setMode ($a_mode)
 set output mode More...
 
 getMode ()
 get output mode More...
 
 setConditionDepth ($a_depth)
 set depth for precondition output (stops at level 5) More...
 
 isMode ($a_mode)
 check current output mode More...
 
 insertProperties ($a_item='')
 insert properties More...
 
 insertNoticeProperties ()
 
 insertPayment ()
 insert payment information More...
 
 insertPreconditions ()
 insert all missing preconditions More...
 
 insertCommand ($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
 insert command button More...
 
 insertDeleteCommand ()
 insert cut command More...
 
 insertLinkCommand ()
 insert link command More...
 
 insertCutCommand ($a_to_repository=false)
 insert cut command More...
 
 insertCopyCommand ($a_to_repository=false)
 Insert copy command. More...
 
 insertPasteCommand ()
 Insert paste command. More...
 
 insertSubscribeCommand ()
 insert subscribe command More...
 
 insertInfoScreenCommand ()
 insert info screen command More...
 
 insertCommonSocialCommands ($a_header_actions=false)
 Insert common social commands (comments, notes, tagging) More...
 
 insertTimingsCommand ()
 insert edit timings command More...
 
 insertCommands ($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
 insert all commands into html code More...
 
 enableComments ($a_value, $a_enable_comments_settings=true)
 Toogle comments action status. More...
 
 enableNotes ($a_value)
 Toogle notes action status. More...
 
 enableTags ($a_value)
 Toogle tags action status. More...
 
 enableRating ($a_value, $a_text=null, $a_categories=false, array $a_ctrl_path=null)
 Toogle rating action status. More...
 
 enableMultiDownload ($a_value)
 Toggles whether multiple objects can be downloaded at once or not. More...
 
 insertMultiDownloadCommand ()
 
 enableDownloadCheckbox ($a_ref_id, $a_value)
 
 getDownloadCheckboxState ()
 
 setHeaderSubObject ($a_type, $a_id)
 Set sub object identifier. More...
 
 addHeaderIcon ($a_id, $a_img, $a_tooltip=null, $a_onclick=null, $a_status_text=null, $a_href=null)
 
 addHeaderIconHTML ($a_id, $a_html)
 
 setAjaxHash ($a_hash)
 
 getHeaderAction ()
 Get header action. More...
 
 appendRepositoryFrameParameter ($a_link)
 workaround: all links into the repository (from outside) must tell repository to setup the frameset More...
 
 modifySAHSlaunch ($a_link, $wtarget)
 workaround: SAHS in new javavasript-created window or iframe More...
 
 insertPath ()
 insert path More...
 
 insertProgressInfo ()
 insert progress info More...
 
 insertIconsAndCheckboxes ()
 Insert icons and checkboxes. More...
 
 insertSubItems ()
 Insert subitems. More...
 
 insertPositionField ()
 Insert field for positioning. More...
 
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output More...
 
 storeAccessCache ()
 Store access cache. More...
 
 getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_context=self::CONTEXT_REPOSITORY)
 Get all item information (title, commands, description) in HTML. More...
 
 setParentRefId ($a_ref_id)
 Set current parent ref id to enable unique js-ids (sessions, etc.) More...
 
 getCommandsHTML ()
 Get commands HTML (must be called after get list item html) More...
 
 isSideBlock ()
 Returns whether current item is a block in a side column or not. More...
 
 setBoldTitle ($a_bold_title)
 @access public @params boolean $a_bold_title set the item title bold More...
 
 isTitleBold ()
 @access public More...
 
 enableTimings ($a_status)
 enable timings link More...
 
 isFileUploadAllowed ()
 Gets a value indicating whether file uploads to this object are allowed or not. More...
 
 insertFileUpload ()
 Inserts a file upload component. More...
 

Protected Member Functions

 getAppointmentInfo ()
 get appointment info More...
 
- Protected Member Functions inherited from ilObjectListGUI
 buildGotoLink ()
 
 insertPaymentCommand ($has_extension_prices=false)
 
 parseConditions ($toggle_id, $conditions, $obligatory=true)
 
 modifyTitleLink ($a_default_link)
 
 resetCustomData ()
 reset properties and commands More...
 
 getUniqueItemId ($a_as_div=false)
 Get unique item identifier (for js-actions) More...
 
 isCommentsActivated ($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access=true)
 Check comments status against comments settings and context. More...
 

Static Protected Member Functions

static lookupAssignedMaterials ($a_sess_id)
 Get assigned items of event. More...
 

Protected Attributes

 $app_info = array()
 
- Protected Attributes inherited from ilObjectListGUI
 $obj_id
 
 $ref_id
 
 $type
 
 $sub_obj_id
 
 $sub_obj_type
 
 $substitutions = null
 
 $substitutions_enabled = false
 
 $icons_enabled = false
 
 $checkboxes_enabled = false
 
 $position_enabled = false
 
 $progress_enabled = false
 
 $item_detail_links_enabled = false
 
 $item_detail_links = array()
 
 $item_detail_links_intro = ''
 
 $search_fragments_enabled = false
 
 $search_fragment = ''
 
 $path_linked = false
 
 $enabled_relevance = false
 
 $relevance = 0
 
 $expand_enabled = false
 
 $is_expanded = true
 
 $bold_title = false
 
 $copy_enabled = true
 
 $details_level = self::DETAILS_ALL
 
 $reference_ref_id = false
 
 $separate_commands = false
 
 $search_fragment_enabled = false
 
 $additional_information = false
 
 $static_link_enabled = false
 
 $repository_transfer_enabled = false
 
 $shared = false
 
 $restrict_to_goto = false
 
 $comments_enabled = false
 
 $comments_settings_enabled = false
 
 $notes_enabled = false
 
 $tags_enabled = false
 
 $rating_enabled = false
 
 $rating_categories_enabled = false
 
 $rating_text = false
 
 $rating_ctrl_path = false
 
 $timings_enabled = true
 
 $force_visible_only = false
 
 $prevent_duplicate_commands = array()
 
 $parent_ref_id
 
 $title_link = ''
 
 $title_link_disabled = false
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectListGUI
static prepareJsLinks ($a_redraw_url, $a_notes_url, $a_tags_url, $a_tpl=null)
 Insert js/ajax links into template
More...
 
static preloadCommonProperties ($a_obj_ids, $a_context)
 Preload common properties. More...
 
- Data Fields inherited from ilObjectListGUI
const DETAILS_MINIMAL = 10
 
const DETAILS_SEARCH = 20
 
const DETAILS_ALL = 30
 
const CONTEXT_REPOSITORY = 1
 
const CONTEXT_WORKSPACE = 2
 
const CONTEXT_SHOP = 3
 
const CONTEXT_WORKSPACE_SHARING = 4
 
const CONTEXT_PERSONAL_DESKTOP = 5
 
const CONTEXT_SEARCH = 6
 
const DOWNLOAD_CHECKBOX_NONE = 0
 
const DOWNLOAD_CHECKBOX_ENABLED = 1
 
const DOWNLOAD_CHECKBOX_DISABLED = 2
 
 $ctrl
 
 $description_enabled = true
 
 $preconditions_enabled = true
 
 $properties_enabled = true
 
 $notice_properties_enabled = true
 
 $commands_enabled = true
 
 $cust_prop = array()
 
 $cust_commands = array()
 
 $info_screen_enabled = false
 
 $condition_depth = 0
 
 $std_cmd_only = false
 
 $sub_item_html = array()
 
 $multi_download_enabled = false
 
 $download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE
 
- Static Protected Attributes inherited from ilObjectListGUI
static $cnt_notes = array()
 
static $cnt_tags = array()
 
static $tags = array()
 
static $comments_activation = array()
 
static $preload_done = false
 
static $js_unique_id = 0
 
static $tpl_file_name = "tpl.container_list_item.html"
 
static $tpl_component = "Services/Container"
 

Detailed Description

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilObjSessionListGUI::__construct ( )

Constructor.

@access public

Returns

Definition at line 45 of file class.ilObjSessionListGUI.php.

46 {
47 global $lng;
48
49 $lng->loadLanguageModule('crs');
50 $lng->loadLanguageModule('sess');
51
52 parent::__construct();
53 }
global $lng
Definition: privfeed.php:40

References $lng.

Member Function Documentation

◆ checkCommandAccess()

ilObjSessionListGUI::checkCommandAccess (   $a_permission,
  $a_cmd,
  $a_ref_id,
  $a_type,
  $a_obj_id = "" 
)

Only check cmd access for cmd 'register' and 'unregister'.

Parameters
string$a_permission
object$a_cmd
object$a_ref_id
object$a_type
object$a_obj_id[optional]
Returns

Reimplemented from ilObjectListGUI.

Definition at line 124 of file class.ilObjSessionListGUI.php.

125 {
126 if($a_cmd != 'register' and $a_cmd != 'unregister')
127 {
128 $a_cmd = '';
129 }
130 return parent::checkCommandAccess($a_permission,$a_cmd,$a_ref_id,$a_type,$a_obj_id);
131 }

◆ getAppointmentInfo()

ilObjSessionListGUI::getAppointmentInfo ( )
protected

get appointment info

@access protected

Returns
array

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

248 {
249 if(isset($this->app_info[$this->obj_id]))
250 {
251 return $this->app_info[$this->obj_id];
252 }
253 include_once('./Modules/Session/classes/class.ilSessionAppointment.php');
254 return $this->app_info[$this->obj_id] = ilSessionAppointment::_lookupAppointment($this->obj_id);
255 }
static _lookupAppointment($a_obj_id)
lookup appointment

References ilObjectListGUI\$obj_id, and ilSessionAppointment\_lookupAppointment().

Referenced by getProperties(), and getTitle().

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

◆ getCommandLink()

ilObjSessionListGUI::getCommandLink (   $a_cmd)

Get command link url.

Parameters
int$a_ref_idreference id
string$a_cmdcommand

Reimplemented from ilObjectListGUI.

Definition at line 104 of file class.ilObjSessionListGUI.php.

105 {
106 global $ilCtrl;
107
108 // separate method for this line
109 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
110 $cmd_link = $ilCtrl->getLinkTargetByClass("ilrepositorygui", $a_cmd);
111 $ilCtrl->setParameterByClass("ilrepositorygui", "ref_id", $_GET["ref_id"]);
112 return $cmd_link;
113 }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18

References $_GET, and $ilCtrl.

◆ getProperties()

ilObjSessionListGUI::getProperties ( )

get properties

@access public

Parameters

return

Definition at line 141 of file class.ilObjSessionListGUI.php.

142 {
143 $app_info = $this->getAppointmentInfo();
144
145 /*
146 $props[] = array(
147 'alert' => false,
148 'property' => $this->lng->txt('event_date'),
149 'value' => ilSessionAppointment::_appointmentToString($app_info['start'],$app_info['end'],$app_info['fullday']));
150 */
151 include_once './Modules/Session/classes/class.ilObjSession.php';
152 $session_data = new ilObjSession($this->obj_id, false);
153 include_once './Modules/Session/classes/class.ilSessionParticipants.php';
154 $part = ilSessionParticipants::_getInstanceByObjId($this->obj_id);
155
156 if($session_data->isRegistrationUserLimitEnabled()) {
157 if ($part->getCountMembers() <= $session_data->getRegistrationMaxUsers()) {
158 $props[] = array(
159 'alert' => false,
160 'property' => $this->lng->txt('sess_list_reg_limit_places'),
161 'value' => max(
162 0,
163 $session_data->getRegistrationMaxUsers() - $part->getCountMembers()
164 )
165 );
166 }
167 }
168
170 {
171 if($items = self::lookupAssignedMaterials($this->obj_id))
172 {
173 $props[] = array(
174 'alert' => false,
175 'property' => $this->lng->txt('event_ass_materials_prop'),
176 'value' => count($items)
177 );
178
179 }
180 }
182 {
183 include_once './Modules/Session/classes/class.ilObjSession.php';
184 $session_data = ilObjSession::lookupSession($this->obj_id);
185
186 if(strlen($session_data['location']))
187 {
188 $props[] = array(
189 'alert' => false,
190 'property' => $this->lng->txt('event_location'),
191 'value' => $session_data['location']
192 );
193 }
194 if(strlen($session_data['details']))
195 {
196 $props[] = array(
197 'alert' => false,
198 'property' => $this->lng->txt('event_details_workflow'),
199 'value' => nl2br($session_data['details']),
200 'newline' => true
201 );
202 }
203 $has_new_line = false;
204 if(strlen($session_data['name']))
205 {
206 $props[] = array(
207 'alert' => false,
208 'property' => $this->lng->txt('event_lecturer'),
209 'value' => $session_data['name'],
210 'newline' => true
211 );
212 $has_new_line = true;
213 }
214 if(strlen($session_data['email']))
215 {
216 $props[] = array(
217 'alert' => false,
218 'property' => $this->lng->txt('tutor_email'),
219 'value' => $session_data['email'],
220 'newline' => $has_new_line ? false : true
221 );
222 $has_new_line = true;
223 }
224 if(strlen($session_data['phone']))
225 {
226 $props[] = array(
227 'alert' => false,
228 'property' => $this->lng->txt('tutor_phone'),
229 'value' => $session_data['phone'],
230 'newline' => $has_new_line ? false : true
231 );
232 $has_new_line = true;
233 }
234 }
235
236 return $props;
237 }
getAppointmentInfo()
get appointment info
static lookupSession($a_obj_id)
Get session data.
getDetailsLevel()
Get current details level.
static _getInstanceByObjId($a_obj_id)
Get singleton instance.

References $app_info, ilSessionParticipants\_getInstanceByObjId(), ilObjectListGUI\DETAILS_ALL, ilObjectListGUI\DETAILS_MINIMAL, getAppointmentInfo(), ilObjectListGUI\getDetailsLevel(), and ilObjSession\lookupSession().

+ Here is the call graph for this function:

◆ getTitle()

ilObjSessionListGUI::getTitle ( )

get title Overwritten since sessions prepend the date of the session to the title

@access public

Parameters

return

Reimplemented from ilObjectListGUI.

Definition at line 88 of file class.ilObjSessionListGUI.php.

89 {
91 $title = strlen($this->title) ? (': '.$this->title) : '';
92 return ilSessionAppointment::_appointmentToString($app_info['start'], $app_info['end'],$app_info['fullday']) . $title;
93 }
static _appointmentToString($start, $end, $fulltime)

References $app_info, ilSessionAppointment\_appointmentToString(), and getAppointmentInfo().

+ Here is the call graph for this function:

◆ init()

ilObjSessionListGUI::init ( )

Initialisation.

@access public

Returns
void

Reimplemented from ilObjectListGUI.

Definition at line 61 of file class.ilObjSessionListGUI.php.

62 {
63 $this->delete_enabled = true;
64 $this->cut_enabled = true;
65 $this->copy_enabled = true;
66 $this->subscribe_enabled = true;
67 $this->link_enabled = true;
68 $this->payment_enabled = false;
69 $this->info_screen_enabled = true;
70 $this->subitems_enabled = true;
71 $this->type = "sess";
72 $this->gui_class_name = "ilobjsessiongui";
73
74 // general commands array
75 include_once('./Modules/Session/classes/class.ilObjSessionAccess.php');
76 $this->commands = ilObjSessionAccess::_getCommands();
77 }
_getCommands()
get list of command/permission combinations

References ilObjSessionAccess\_getCommands().

+ Here is the call graph for this function:

◆ lookupAssignedMaterials()

static ilObjSessionListGUI::lookupAssignedMaterials (   $a_sess_id)
staticprotected

Get assigned items of event.

Returns
Parameters
object$a_sess_id

Definition at line 262 of file class.ilObjSessionListGUI.php.

263 {
264 global $ilDB;
265
266 $query = 'SELECT * FROM event_items ei '.
267 'JOIN tree ON item_id = child '.
268 'WHERE event_id = '.$ilDB->quote($a_sess_id,'integer').' '.
269 'AND tree > 0';
270 $res = $ilDB->query($query);
271 while($row = $res->fetchRow(FETCHMODE_OBJECT))
272 {
273 $items[] = $row->item_id;
274 }
275 return $items ? $items : array();
276 }
global $ilDB

References $ilDB, $query, $res, and $row.

Field Documentation

◆ $app_info

ilObjSessionListGUI::$app_info = array()
protected

Definition at line 36 of file class.ilObjSessionListGUI.php.

Referenced by getProperties(), and getTitle().


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