ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilInfoScreenGUI Class Reference

Class ilInfoScreenGUI. More...

+ Collaboration diagram for ilInfoScreenGUI:

Public Member Functions

 ilInfoScreenGUI ($a_gui_object)
 Constructor. More...
 
executeCommand ()
 execute command More...
 
 setTableClass ($a_val)
 Set table class. More...
 
 getTableClass ()
 Get table class. More...
 
 enablePrivateNotes ($a_enable=true)
 enable notes More...
 
 enableLearningProgress ($a_enable=true)
 enable learning progress More...
 
 enableFeedback ($a_enable=true)
 enable feedback More...
 
 enableNews ($a_enable=true)
 enable news More...
 
 enableNewsEditing ($a_enable=true)
 enable news editing More...
 
 setBlockProperty ($a_block_type, $a_property, $a_value)
 This function is supposed to be used for block type specific properties, that should be passed to ilBlockGUI->setProperty. More...
 
 getAllBlockProperties ()
 
 addSection ($a_title)
 add a new section More...
 
 setFormAction ($a_form_action)
 set a form action More...
 
 removeFormAction ()
 remove form action More...
 
 addProperty ($a_name, $a_value, $a_link="")
 add a property to current section More...
 
 addPropertyCheckbox ($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label="", $a_checkbox_checked=false)
 add a property to current section More...
 
 addPropertyTextinput ($a_name, $a_input_name, $a_input_value="", $a_input_size="", $direct_button_command="", $direct_button_label="", $direct_button_primary=false)
 add a property to current section More...
 
 addButton ($a_title, $a_link, $a_frame="", $a_position="top", $a_primary=false)
 add a property to current section More...
 
 addFormButton ($a_command, $a_title, $a_position="top")
 add a form button to the info screen the form buttons are only valid if a form action is set More...
 
 addHiddenElement ($a_name, $a_value)
 
 addMetaDataSections ($a_rep_obj_id, $a_obj_id, $a_type)
 add standard meta data sections More...
 
 addObjectSections ()
 add standard object section More...
 
 showSummary ()
 show summary page More...
 
 getCenterColumnHTML ()
 Display center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings ($column_gui)
 Set column settings. More...
 
 setOpenFormTag ($a_val)
 
 setCloseFormTag ($a_val)
 
 getHTML ()
 get html More...
 
 showLearningProgress ($a_tpl)
 
 saveProgress ()
 
 showNotesSection ()
 show notes section More...
 
 showLDAPRoleGroupMappingInfo ($a_section='')
 show LDAP role group mapping info More...
 
 setTabs ()
 
 getTabs (&$tabs_gui)
 get tabs More...
 
 addTagging ()
 Add tagging. More...
 
 saveTags ()
 
 hideFurtherSections ($a_add_toggle=true)
 
 getHiddenToggleButton ()
 

Data Fields

 $ilias
 
 $lng
 
 $ctrl
 
 $gui_object
 
 $top_buttons = array()
 
 $top_formbuttons = array()
 
 $hiddenelements = array()
 
 $table_class = "il_InfoScreen"
 
 $open_form_tag = true
 
 $close_form_tag = true
 
 $form_action
 a form action parameter. More...
 

Detailed Description

Member Function Documentation

◆ addButton()

ilInfoScreenGUI::addButton (   $a_title,
  $a_link,
  $a_frame = "",
  $a_position = "top",
  $a_primary = false 
)

add a property to current section

Definition at line 278 of file class.ilInfoScreenGUI.php.

Referenced by getHTML().

279  {
280  if ($a_position == "top")
281  {
282  $this->top_buttons[] =
283  array("title" => $a_title,"link" => $a_link,"target" => $a_frame,"primary" => $a_primary);
284  }
285  }
+ Here is the caller graph for this function:

◆ addFormButton()

ilInfoScreenGUI::addFormButton (   $a_command,
  $a_title,
  $a_position = "top" 
)

add a form button to the info screen the form buttons are only valid if a form action is set

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

292  {
293  if ($a_position == "top")
294  {
295  array_push($this->top_formbuttons,
296  array("command" => $a_command, "title" => $a_title)
297  );
298  }
299  }

◆ addHiddenElement()

ilInfoScreenGUI::addHiddenElement (   $a_name,
  $a_value 
)

Definition at line 301 of file class.ilInfoScreenGUI.php.

302  {
303  array_push($this->hiddenelements, array("name" => $a_name, "value" => $a_value));
304  }

◆ addMetaDataSections()

ilInfoScreenGUI::addMetaDataSections (   $a_rep_obj_id,
  $a_obj_id,
  $a_type 
)

add standard meta data sections

Definition at line 309 of file class.ilInfoScreenGUI.php.

References $lng, ilMDUtils\_parseCopyright(), ilFormat\_secondsToString(), addProperty(), and addSection().

310  {
311  global $lng;
312 
313  $lng->loadLanguageModule("meta");
314 
315  include_once("./Services/MetaData/classes/class.ilMD.php");
316  $md = new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
317 
318  if ($md_gen = $md->getGeneral())
319  {
320  // get first descrption
321  // The description is shown on the top of the page.
322  // Thus it is not necessary to show it again.
323  foreach($md_gen->getDescriptionIds() as $id)
324  {
325  $md_des = $md_gen->getDescription($id);
326  $description = $md_des->getDescription();
327  break;
328  }
329 
330  // get language(s)
331  $langs = array();
332  foreach($ids = $md_gen->getLanguageIds() as $id)
333  {
334  $md_lan = $md_gen->getLanguage($id);
335  if ($md_lan->getLanguageCode() != "")
336  {
337  $langs[] = $lng->txt("meta_l_".$md_lan->getLanguageCode());
338  }
339  }
340  $langs = implode($langs, ", ");
341 
342  // keywords
343  $keywords = array();
344  foreach($ids = $md_gen->getKeywordIds() as $id)
345  {
346  $md_key = $md_gen->getKeyword($id);
347  $keywords[] = $md_key->getKeyword();
348  }
349  $keywords = implode($keywords, ", ");
350  }
351 
352  // authors
353  if(is_object($lifecycle = $md->getLifecycle()))
354  {
355  $sep = $author = "";
356  foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
357  {
358  $md_con = $lifecycle->getContribute($con_id);
359  if ($md_con->getRole() == "Author")
360  {
361  foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
362  {
363  $md_ent = $md_con->getEntity($ent_id);
364  $author = $author.$sep.$md_ent->getEntity();
365  $sep = ", ";
366  }
367  }
368  }
369  }
370 
371  // copyright
372  $copyright = "";
373  if(is_object($rights = $md->getRights()))
374  {
375  include_once('Services/MetaData/classes/class.ilMDUtils.php');
376  $copyright = ilMDUtils::_parseCopyright($rights->getDescription());
377  }
378 
379  // learning time
380  #if(is_object($educational = $md->getEducational()))
381  #{
382  # $learning_time = $educational->getTypicalLearningTime();
383  #}
384  $learning_time = "";
385  if(is_object($educational = $md->getEducational()))
386  {
387  if($seconds = $educational->getTypicalLearningTimeSeconds())
388  {
389  $learning_time = ilFormat::_secondsToString($seconds);
390  }
391  }
392 
393 
394  // output
395 
396  // description
397  if ($description != "")
398  {
399  $this->addSection($lng->txt("description"));
400  $this->addProperty("", nl2br($description));
401  }
402 
403  // general section
404  $this->addSection($lng->txt("meta_general"));
405  if ($langs != "") // language
406  {
407  $this->addProperty($lng->txt("language"),
408  $langs);
409  }
410  if ($keywords != "") // keywords
411  {
412  $this->addProperty($lng->txt("keywords"),
413  $keywords);
414  }
415  if ($author != "") // author
416  {
417  $this->addProperty($lng->txt("author"),
418  $author);
419  }
420  if ($copyright != "") // copyright
421  {
422  $this->addProperty($lng->txt("meta_copyright"),
423  $copyright);
424  }
425  if ($learning_time != "") // typical learning time
426  {
427  $this->addProperty($lng->txt("meta_typical_learning_time"),
428  $learning_time);
429  }
430  }
static _parseCopyright($a_copyright)
Parse copyright.
addSection($a_title)
add a new section
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
addProperty($a_name, $a_value, $a_link="")
add a property to current section
+ Here is the call graph for this function:

◆ addObjectSections()

ilInfoScreenGUI::addObjectSections ( )

add standard object section

Definition at line 435 of file class.ilInfoScreenGUI.php.

References $ilCtrl, $ilias, $ilSetting, $ilUser, $lng, $r, $ref_id, $size, ilObject\_getAllReferences(), ilPermanentLinkGUI\_getBookmarksSelectionList(), ilLink\_getStaticLink(), ilDiskQuotaActivationChecker\_isActive(), ilChangeEvent\_isActive(), ilDAVServer\_isActive(), ilChangeEvent\_lookupReadEvents(), addProperty(), addSection(), ilDatePresentation\formatDate(), ilFormat\formatSize(), ilECSServerSettings\getInstance(), ilObjectFactory\getInstanceByObjId(), IL_CAL_DATETIME, and ilObjUser\userExists().

Referenced by getHTML().

436  {
437  global $lng, $ilCtrl, $ilUser, $ilAccess, $tree, $ilSetting, $ilObjDataCache;
438 
439  $this->addSection($lng->txt("additional_info"));
440  $a_obj = $this->gui_object->object;
441 
442  // links to the object
443  if (is_object($a_obj))
444  {
445  // permanent link
446  $type = $a_obj->getType();
447  $ref_id = $a_obj->getRefId();
448 
449  if($ref_id)
450  {
451  include_once('./Services/Link/classes/class.ilLink.php');
452  $href = ilLink::_getStaticLink($ref_id,$type,true);
453 
454  include_once 'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
455  if(ilECSServerSettings::getInstance()->activeServerExists())
456  {
457  $this->addProperty($lng->txt("object_id"),
458  $a_obj->getId()
459  );
460  }
461 
462  include_once 'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
463  $pm = new ilPermanentLinkGUI($type, $ref_id);
464  $pm->setIncludePermanentLinkText(false);
465  $pm->setAlignCenter(false);
466  $this->addProperty($lng->txt("perma_link"),
467  $pm->getHTML(),
468  ""
469  );
470 
471  // bookmarks
472 
473  $title = $ilObjDataCache->lookupTitle($a_obj->getId());
474 
476 
477  // links to resource
478  if ($ilAccess->checkAccess("write", "", $ref_id) ||
479  $ilAccess->checkAccess("edit_permissions", "", $ref_id))
480  {
481  $obj_id = $a_obj->getId();
482  $rs = ilObject::_getAllReferences($obj_id);
483  $refs = array();
484  foreach($rs as $r)
485  {
486  if ($tree->isInTree($r))
487  {
488  $refs[] = $r;
489  }
490  }
491  if (count($refs) > 1)
492  {
493  $links = $sep = "";
494  foreach($refs as $r)
495  {
496  $cont_loc = new ilLocatorGUI();
497  $cont_loc->addContextItems($r, true);
498  $links.= $sep.$cont_loc->getHTML();
499  $sep = "<br />";
500  }
501 
502  $this->addProperty($lng->txt("res_links"),
503  '<div class="small">'.$links.'</div>'
504  );
505  }
506  }
507  }
508  }
509 
510 
511  // creation date
512  $this->addProperty(
513  $lng->txt("create_date"),
514  ilDatePresentation::formatDate(new ilDateTime($a_obj->getCreateDate(),IL_CAL_DATETIME)));
515 
516  // owner
517  if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner())
518  {
519  include_once './Services/Object/classes/class.ilObjectFactory.php';
520  include_once './Services/User/classes/class.ilObjUser.php';
521 
522  if(ilObjUser::userExists(array($a_obj->getOwner())))
523  {
524  $ownerObj = ilObjectFactory::getInstanceByObjId($a_obj->getOwner(),false);
525  }
526  else
527  {
528  $ownerObj = ilObjectFactory::getInstanceByObjId(6, false);
529  }
530 
531  if (!is_object($ownerObj) || $ownerObj->getType() != "usr") // root user deleted
532  {
533  $this->addProperty($lng->txt("owner"), $lng->txt("no_owner"));
534  }
535  else if ($ownerObj->hasPublicProfile())
536  {
537  $ilCtrl->setParameterByClass("ilpublicuserprofilegui", "user_id", $ownerObj->getId());
538  $this->addProperty($lng->txt("owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML"));
539  }
540  else
541  {
542  $this->addProperty($lng->txt("owner"),$ownerObj->getPublicName());
543  }
544  }
545 
546  // disk usage
547  require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
548  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
550  {
551  $size = $a_obj->getDiskUsage();
552  if ($size !== null) {
553  $this->addProperty($lng->txt("disk_usage"),ilFormat::formatSize($size,'long'));
554  }
555  }
556  // change event
557  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
559  {
560  if ($ilUser->getId() != ANONYMOUS_USER_ID)
561  {
562  $readEvents = ilChangeEvent::_lookupReadEvents($a_obj->getId());
563  $count_users = 0;
564  $count_members = 0;
565  $count_user_reads = 0;
566  $count_anonymous_reads = 0;
567  foreach ($readEvents as $evt)
568  {
569  if ($evt['usr_id'] == ANONYMOUS_USER_ID)
570  {
571  $count_anonymous_reads += $evt['read_count'];
572  }
573  else
574  {
575  $count_user_reads += $evt['read_count'];
576  $count_users++;
577  /* to do: if ($evt['user_id'] is member of $this->getRefId())
578  {
579  $count_members++;
580  }*/
581  }
582  }
583  if ($count_anonymous_reads > 0)
584  {
585  $this->addProperty($this->lng->txt("readcount_anonymous_users"),$count_anonymous_reads);
586  }
587  if ($count_user_reads > 0)
588  {
589  $this->addProperty($this->lng->txt("readcount_users"),$count_user_reads);
590  }
591  if ($count_users > 0)
592  {
593  $this->addProperty($this->lng->txt("accesscount_registered_users"),$count_users);
594  }
595  }
596  }
597  // END ChangeEvent: Display change event info
598 
599  // BEGIN WebDAV: Display locking information
600  require_once('Services/WebDAV/classes/class.ilDAVServer.php');
602  {
603  global $ilias, $ilUser;
604  if ($ilUser->getId() != ANONYMOUS_USER_ID)
605  {
606  $davLocks = new ilDAVLocks();
607 
608  // Show lock info
609  if ($ilias->account->getId() != ANONYMOUS_USER_ID)
610  {
611  $locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
612  if (count($locks) > 0)
613  {
614  $lockUser = new ilObjUser($locks[0]['ilias_owner']);
615  $this->addProperty($this->lng->txt("in_use_by"),
616  $lockUser->getPublicName()
617  ,
618  "./ilias.php?user=".$locks[0]['ilias_owner'].'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
619  );
620  }
621  }
622  }
623  }
624  // END WebDAV: Display locking information
625 
626 
627  }
$size
Definition: RandomTest.php:79
const IL_CAL_DATETIME
Class for permanent links.
static getInstance()
Get singleton instance.
static _isActive()
Static getter.
addSection($a_title)
add a new section
static userExists($a_usr_ids=array())
static _getAllReferences($a_id)
get all reference ids of object
locator handling class
global $ilCtrl
Definition: ilias.php:18
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupReadEvents($obj_id, $usr_id=null)
Reads all read events which occured on the object which happened after the last time the user caught ...
global $ilUser
Definition: imgupload.php:15
$ref_id
Definition: sahs_server.php:39
global $ilSetting
Definition: privfeed.php:40
static _isActive()
Returns true, if change event tracking is active.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
static formatSize($size, $a_mode='short', $a_lng=null)
Returns the specified file size value in a human friendly form.
static _getBookmarksSelectionList($title, $href)
returns the active bookmark links.
$r
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addProperty()

ilInfoScreenGUI::addProperty (   $a_name,
  $a_value,
  $a_link = "" 
)

add a property to current section

Parameters
string$a_nameproperty name string
string$a_valueproperty value
string$a_linklink (will link the property value string)

Definition at line 220 of file class.ilInfoScreenGUI.php.

Referenced by ilObjRemoteCourseGUI\addCustomInfoFields(), ilObjRemoteGroupGUI\addCustomInfoFields(), ilObjRemoteTestGUI\addCustomInfoFields(), ilObjRemoteWikiGUI\addCustomInfoFields(), ilObjRemoteGlossaryGUI\addCustomInfoFields(), ilObjRemoteLearningModuleGUI\addCustomInfoFields(), ilObjRemoteFileGUI\addCustomInfoFields(), addMetaDataSections(), addObjectSections(), addTagging(), ilObjOrgUnitGUI\parseInfoScreen(), and showLDAPRoleGroupMappingInfo().

221  {
222  $this->section[$this->sec_nr]["properties"][] =
223  array("name" => $a_name, "value" => $a_value,
224  "link" => $a_link);
225  }
+ Here is the caller graph for this function:

◆ addPropertyCheckbox()

ilInfoScreenGUI::addPropertyCheckbox (   $a_name,
  $a_checkbox_name,
  $a_checkbox_value,
  $a_checkbox_label = "",
  $a_checkbox_checked = false 
)

add a property to current section

Definition at line 230 of file class.ilInfoScreenGUI.php.

231  {
232  $checkbox = "<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
233  if ($a_checkbox_checked)
234  {
235  $checkbox .= " checked=\"checked\"";
236  }
237  $checkbox .= " />";
238  if (strlen($a_checkbox_label))
239  {
240  $checkbox .= "&nbsp;<label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
241  }
242  $this->section[$this->sec_nr]["properties"][] =
243  array("name" => $a_name, "value" => $checkbox);
244  }

◆ addPropertyTextinput()

ilInfoScreenGUI::addPropertyTextinput (   $a_name,
  $a_input_name,
  $a_input_value = "",
  $a_input_size = "",
  $direct_button_command = "",
  $direct_button_label = "",
  $direct_button_primary = false 
)

add a property to current section

Definition at line 249 of file class.ilInfoScreenGUI.php.

References ilUtil\prepareFormOutput().

250  {
251  $input = "<span class=\"form-inline\"><input class=\"form-control\" type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
252  if (strlen($a_input_value))
253  {
254  $input .= " value=\"" . ilUtil::prepareFormOutput($a_input_value) . "\"";
255  }
256  if (strlen($a_input_size))
257  {
258  $input .= " size=\"" . $a_input_size . "\"";
259  }
260  $input .= " />";
261  if (strlen($direct_button_command) && strlen($direct_button_label))
262  {
263  $css = "";
264  if($direct_button_primary)
265  {
266  $css = " btn-primary";
267  }
268  $input .= " <input type=\"submit\" class=\"btn btn-default".$css."\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
269  }
270  $input .= "</span>";
271  $this->section[$this->sec_nr]["properties"][] =
272  array("name" => "<label for=\"$a_input_name\">$a_name</label>", "value" => $input);
273  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
+ Here is the call graph for this function:

◆ addSection()

ilInfoScreenGUI::addSection (   $a_title)

add a new section

Definition at line 190 of file class.ilInfoScreenGUI.php.

Referenced by addMetaDataSections(), addObjectSections(), addTagging(), ilObjOrgUnitGUI\parseInfoScreen(), and showLDAPRoleGroupMappingInfo().

191  {
192  $this->sec_nr++;
193  $this->section[$this->sec_nr]["title"] = $a_title;
194  $this->section[$this->sec_nr]["hidden"] = (bool)$this->hidden;
195  }
+ Here is the caller graph for this function:

◆ addTagging()

ilInfoScreenGUI::addTagging ( )

Add tagging.

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

References $ilCtrl, $lng, addProperty(), and addSection().

Referenced by getHTML().

1174  {
1175  global $lng, $ilCtrl;
1176 
1177  $lng->loadLanguageModule("tagging");
1178  $tags_set = new ilSetting("tags");
1179 
1180  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1181  $tagging_gui = new ilTaggingGUI();
1182  $tagging_gui->setObject($this->gui_object->object->getId(),
1183  $this->gui_object->object->getType());
1184 
1185  $this->addSection($lng->txt("tagging_tags"));
1186 
1187  if ($tags_set->get("enable_all_users"))
1188  {
1189  $this->addProperty($lng->txt("tagging_all_users"),
1190  $tagging_gui->getAllUserTagsForObjectHTML());
1191  }
1192 
1193  $this->addProperty($lng->txt("tagging_my_tags"),
1194  $tagging_gui->getTaggingInputHTML());
1195  }
ILIAS Setting Class.
Class ilTaggingGUI.
addSection($a_title)
add a new section
global $ilCtrl
Definition: ilias.php:18
addProperty($a_name, $a_value, $a_link="")
add a property to current section
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableFeedback()

ilInfoScreenGUI::enableFeedback (   $a_enable = true)

enable feedback

Definition at line 149 of file class.ilInfoScreenGUI.php.

150  {
151  $this->feedback_enabled = $a_enable;
152  }

◆ enableLearningProgress()

ilInfoScreenGUI::enableLearningProgress (   $a_enable = true)

enable learning progress

Definition at line 140 of file class.ilInfoScreenGUI.php.

141  {
142  $this->learning_progress_enabled = $a_enable;
143  }

◆ enableNews()

ilInfoScreenGUI::enableNews (   $a_enable = true)

enable news

Definition at line 157 of file class.ilInfoScreenGUI.php.

158  {
159  $this->news_enabled = $a_enable;
160  }

◆ enableNewsEditing()

ilInfoScreenGUI::enableNewsEditing (   $a_enable = true)

enable news editing

Definition at line 165 of file class.ilInfoScreenGUI.php.

166  {
167  $this->news_editing = $a_enable;
168  }

◆ enablePrivateNotes()

ilInfoScreenGUI::enablePrivateNotes (   $a_enable = true)

enable notes

Definition at line 132 of file class.ilInfoScreenGUI.php.

133  {
134  $this->private_notes_enabled = $a_enable;
135  }

◆ executeCommand()

& ilInfoScreenGUI::executeCommand ( )

execute command

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

References $_GET, $cmd, $tpl, ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), setTabs(), and showSummary().

65  {
66  global $rbacsystem, $tpl, $ilAccess;
67 
68  // load additional language modules
69  $this->lng->loadLanguageModule("barometer");
70 
71  $next_class = $this->ctrl->getNextClass($this);
72 
73  $cmd = $this->ctrl->getCmd("showSummary");
74  $this->ctrl->setReturn($this, "showSummary");
75 
76  $this->setTabs();
77 
78  switch($next_class)
79  {
80  case "ilnotegui":
81  $this->showSummary(); // forwards command
82  break;
83 
84  case "ilcolumngui":
85  $this->showSummary();
86  break;
87 
88  case "ilpublicuserprofilegui":
89  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
90  $user_profile = new ilPublicUserProfileGUI($_GET["user_id"]);
91  $user_profile->setBackUrl($this->ctrl->getLinkTarget($this, "showSummary"));
92  $html = $this->ctrl->forwardCommand($user_profile);
93  $tpl->setContent($html);
94  break;
95 
96  case "ilcommonactiondispatchergui":
97  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
99  $this->ctrl->forwardCommand($gui);
100  break;
101 
102  default:
103  return $this->$cmd();
104  break;
105  }
106  return true;
107  }
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
showSummary()
show summary page
global $tpl
Definition: ilias.php:8
GUI class for public user profile presentation.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ getAllBlockProperties()

ilInfoScreenGUI::getAllBlockProperties ( )

Definition at line 182 of file class.ilInfoScreenGUI.php.

Referenced by setColumnSettings().

183  {
184  return $this->block_property;
185  }
+ Here is the caller graph for this function:

◆ getCenterColumnHTML()

ilInfoScreenGUI::getCenterColumnHTML ( )

Display center column.

Definition at line 644 of file class.ilInfoScreenGUI.php.

References $ilCtrl, getHTML(), IL_COL_CENTER, IL_COL_LEFT, IL_COL_RIGHT, IL_SCREEN_SIDE, and setColumnSettings().

Referenced by showSummary().

645  {
646  global $ilCtrl;
647 
648  include_once("Services/Block/classes/class.ilColumnGUI.php");
649  $column_gui = new ilColumnGUI("info", IL_COL_CENTER);
650  $this->setColumnSettings($column_gui);
651 
652  if (!$ilCtrl->isAsynch())
653  {
654  if ($column_gui->getScreenMode() != IL_SCREEN_SIDE)
655  {
656  // right column wants center
657  if ($column_gui->getCmdSide() == IL_COL_RIGHT)
658  {
659  $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
660  $this->setColumnSettings($column_gui);
661  $html = $ilCtrl->forwardCommand($column_gui);
662  }
663  // left column wants center
664  if ($column_gui->getCmdSide() == IL_COL_LEFT)
665  {
666  $column_gui = new ilColumnGUI("info", IL_COL_LEFT);
667  $this->setColumnSettings($column_gui);
668  $html = $ilCtrl->forwardCommand($column_gui);
669  }
670  }
671  else
672  {
673  $html = $this->getHTML();
674  }
675  }
676 
677  return $html;
678  }
const IL_COL_CENTER
const IL_COL_RIGHT
setColumnSettings($column_gui)
Set column settings.
global $ilCtrl
Definition: ilias.php:18
Column user interface class.
const IL_SCREEN_SIDE
const IL_COL_LEFT
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getHiddenToggleButton()

ilInfoScreenGUI::getHiddenToggleButton ( )

Definition at line 1217 of file class.ilInfoScreenGUI.php.

References $lng.

1218  {
1219  global $lng;
1220 
1221  return "<a onClick=\"toggleSections(this, '".$lng->txt("show_hidden_sections") ."', '".$lng->txt("hide_visible_sections") ."'); return false;\" href=\"#\">".$lng->txt("show_hidden_sections")."</a>";
1222  }

◆ getHTML()

ilInfoScreenGUI::getHTML ( )

get html

Definition at line 736 of file class.ilInfoScreenGUI.php.

References $ilCtrl, $ilSetting, $ilUser, $lng, $tpl, addButton(), addObjectSections(), addTagging(), getTableClass(), iljQueryUtil\initjQuery(), setFormAction(), showLearningProgress(), and showNotesSection().

Referenced by getCenterColumnHTML().

737  {
738  global $lng, $ilSetting, $tree, $ilAccess, $ilCtrl, $ilUser;
739 
740  $tpl = new ilTemplate("tpl.infoscreen.html" ,true, true, "Services/InfoScreen");
741 
742  // other class handles form action (@todo: this is not implemented/tested)
743  if ($this->form_action == "")
744  {
745  $this->setFormAction($ilCtrl->getFormAction($this));
746  }
747 
748  require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
750 
751  if($this->hidden)
752  {
753  $tpl->touchBlock("hidden_js");
754  if($this->show_hidden_toggle)
755  {
756  $this->addButton($lng->txt("show_hidden_sections"), "JavaScript:toggleSections(this, '".$lng->txt("show_hidden_sections") ."', '".$lng->txt("hide_visible_sections") ."');");
757  }
758  }
759 
760 
761  // DEPRECATED - use ilToolbarGUI
762 
763  // add top buttons
764  if (count($this->top_buttons) > 0)
765  {
766  $tpl->addBlockfile("TOP_BUTTONS", "top_buttons", "tpl.buttons.html");
767 
768  foreach($this->top_buttons as $button)
769  {
770  // view button
771  $tpl->setCurrentBlock("btn_cell");
772  $tpl->setVariable("BTN_LINK", $button["link"]);
773  $tpl->setVariable("BTN_TARGET", $button["target"]);
774  $tpl->setVariable("BTN_TXT", $button["title"]);
775  if($button["primary"])
776  {
777  $tpl->setVariable("BTN_CLASS", " btn-primary");
778  }
779  $tpl->parseCurrentBlock();
780  }
781  }
782 
783  // add top formbuttons
784  if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
785  {
786  $tpl->addBlockfile("TOP_FORMBUTTONS", "top_submitbuttons", "tpl.submitbuttons.html", "Services/InfoScreen");
787 
788  foreach($this->top_formbuttons as $button)
789  {
790  // view button
791  $tpl->setCurrentBlock("btn_submit_cell");
792  $tpl->setVariable("BTN_COMMAND", $button["command"]);
793  $tpl->setVariable("BTN_NAME", $button["title"]);
794  $tpl->parseCurrentBlock();
795  }
796  }
797 
798  // add form action
799  if (strlen($this->form_action) > 0)
800  {
801  if($this->open_form_tag)
802  {
803  $tpl->setCurrentBlock("formtop");
804  $tpl->setVariable("FORMACTION", $this->form_action);
805  $tpl->parseCurrentBlock();
806  }
807 
808  if($this->close_form_tag)
809  {
810  $tpl->touchBlock("formbottom");
811  }
812  }
813 
814  if (count($this->hiddenelements))
815  {
816  foreach ($this->hiddenelements as $hidden)
817  {
818  $tpl->setCurrentBlock("hidden_element");
819  $tpl->setVariable("HIDDEN_NAME", $hidden["name"]);
820  $tpl->setVariable("HIDDEN_VALUE", $hidden["value"]);
821  $tpl->parseCurrentBlock();
822  }
823  }
824 
825 
826  // learning progress
827  if($this->learning_progress_enabled and $html = $this->showLearningProgress($tpl))
828  {
829  $tpl->setCurrentBlock("learning_progress");
830  $tpl->setVariable("LP_TABLE",$html);
831  $tpl->parseCurrentBlock();
832  }
833 
834  // notes section
835  if ($this->private_notes_enabled && !$ilSetting->get('disable_notes'))
836  {
837  $html = $this->showNotesSection();
838  $tpl->setCurrentBlock("notes");
839  $tpl->setVariable("NOTES", $html);
840  $tpl->parseCurrentBlock();
841  }
842 
843  // tagging
844  if (is_object($this->gui_object->object))
845  {
846  $tags_set = new ilSetting("tags");
847  if ($tags_set->get("enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
848  {
849  $this->addTagging();
850  }
851  }
852 
853  if(is_object($this->gui_object->object))
854  {
855  $this->addObjectSections();
856  }
857 
858  // render all sections
859  for($i = 1; $i <= $this->sec_nr; $i++)
860  {
861  if (is_array($this->section[$i]["properties"]))
862  {
863  // section properties
864  foreach($this->section[$i]["properties"] as $property)
865  {
866  if ($property["name"] != "")
867  {
868  if ($property["link"] == "")
869  {
870  $tpl->setCurrentBlock("pv");
871  $tpl->setVariable("TXT_PROPERTY_VALUE", $property["value"]);
872  $tpl->parseCurrentBlock();
873  }
874  else
875  {
876  $tpl->setCurrentBlock("lpv");
877  $tpl->setVariable("TXT_PROPERTY_LVALUE", $property["value"]);
878  $tpl->setVariable("LINK_PROPERTY_VALUE", $property["link"]);
879  $tpl->parseCurrentBlock();
880  }
881  $tpl->setCurrentBlock("property_row");
882  $tpl->setVariable("TXT_PROPERTY", $property["name"]);
883  $tpl->parseCurrentBlock();
884  }
885  else
886  {
887  $tpl->setCurrentBlock("property_full_row");
888  $tpl->setVariable("TXT_PROPERTY_FULL_VALUE", $property["value"]);
889  $tpl->parseCurrentBlock();
890  }
891  }
892 
893  // section header
894  if($this->section[$i]["hidden"])
895  {
896  $tpl->setVariable("SECTION_HIDDEN", " style=\"display:none;\"");
897  $tpl->setVariable("SECTION_ID", "hidable_".$i);
898  }
899  else
900  {
901  $tpl->setVariable("SECTION_ID", $i);
902  }
903  $tpl->setVariable("TCLASS", $this->getTableClass());
904  $tpl->setVariable("TXT_SECTION", $this->section[$i]["title"]);
905  $tpl->touchBlock("row");
906  }
907  }
908 
909  return $tpl->get();
910  }
ILIAS Setting Class.
setFormAction($a_form_action)
set a form action
addButton($a_title, $a_link, $a_frame="", $a_position="top", $a_primary=false)
add a property to current section
global $tpl
Definition: ilias.php:8
getTableClass()
Get table class.
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
showNotesSection()
show notes section
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
static initjQuery($a_tpl=null)
Init jQuery.
addObjectSections()
add standard object section
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRightColumnHTML()

ilInfoScreenGUI::getRightColumnHTML ( )

Display right column.

Definition at line 683 of file class.ilInfoScreenGUI.php.

References $ilCtrl, $ilUser, $lng, IL_COL_RIGHT, IL_SCREEN_SIDE, and setColumnSettings().

Referenced by showSummary().

684  {
685  global $ilUser, $lng, $ilCtrl;
686 
687  include_once("Services/Block/classes/class.ilColumnGUI.php");
688  $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
689  $this->setColumnSettings($column_gui);
690 
691  if ($ilCtrl->getNextClass() == "ilcolumngui" &&
692  $column_gui->getCmdSide() == IL_COL_RIGHT &&
693  $column_gui->getScreenMode() == IL_SCREEN_SIDE)
694  {
695  $html = $ilCtrl->forwardCommand($column_gui);
696  }
697  else
698  {
699  if (!$ilCtrl->isAsynch())
700  {
701  if ($this->news_enabled)
702  {
703  $html = $ilCtrl->getHTML($column_gui);
704  }
705  }
706  }
707 
708  return $html;
709  }
const IL_COL_RIGHT
setColumnSettings($column_gui)
Set column settings.
global $ilCtrl
Definition: ilias.php:18
Column user interface class.
global $ilUser
Definition: imgupload.php:15
const IL_SCREEN_SIDE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTableClass()

ilInfoScreenGUI::getTableClass ( )

Get table class.

Returns
string table class

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

References $table_class.

Referenced by getHTML().

125  {
126  return $this->table_class;
127  }
+ Here is the caller graph for this function:

◆ getTabs()

ilInfoScreenGUI::getTabs ( $tabs_gui)

get tabs

Definition at line 1154 of file class.ilInfoScreenGUI.php.

References $ilUser.

Referenced by setTabs().

1155  {
1156  global $rbacsystem,$ilUser,$ilAccess;
1157 
1158  $next_class = $this->ctrl->getNextClass($this);
1159  $force_active = ($next_class == "ilnotegui")
1160  ? true
1161  : false;
1162 
1163  $tabs_gui->addSubTabTarget('summary',
1164  $this->ctrl->getLinkTarget($this, "showSummary"),
1165  array("showSummary", ""),
1166  get_class($this), "", $force_active);
1167  }
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ hideFurtherSections()

ilInfoScreenGUI::hideFurtherSections (   $a_add_toggle = true)

Definition at line 1211 of file class.ilInfoScreenGUI.php.

1212  {
1213  $this->hidden = true;
1214  $this->show_hidden_toggle = (bool)$a_add_toggle;
1215  }

◆ ilInfoScreenGUI()

ilInfoScreenGUI::ilInfoScreenGUI (   $a_gui_object)

Constructor.

Parameters
object$a_gui_objectGUI instance of related object (ilCouseGUI, ilTestGUI, ...)

Definition at line 42 of file class.ilInfoScreenGUI.php.

References $ilCtrl, $ilias, and $lng.

43  {
44  global $ilias, $ilCtrl, $lng,$ilTabs;
45 
46  $this->ilias =& $ilias;
47  $this->ctrl =& $ilCtrl;
48  $this->lng =& $lng;
49  $this->tabs_gui =& $ilTabs;
50  $this->gui_object =& $a_gui_object;
51  $this->sec_nr = 0;
52  $this->private_notes_enabled = false;
53  $this->news_enabled = false;
54  $this->feedback_enabled = false;
55  $this->learning_progress_enabled = false;
56  $this->form_action = "";
57  $this->top_formbuttons = array();
58  $this->hiddenelements = array();
59  }
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ removeFormAction()

ilInfoScreenGUI::removeFormAction ( )

remove form action

Definition at line 208 of file class.ilInfoScreenGUI.php.

209  {
210  $this->form_action = "";
211  }

◆ saveProgress()

ilInfoScreenGUI::saveProgress ( )

Definition at line 1023 of file class.ilInfoScreenGUI.php.

References $_POST, $GLOBALS, $ilUser, ilLPStatusWrapper\_updateStatus(), ilObjectLP\getInstance(), ilLPObjSettings\LP_MODE_MANUAL, ilUtil\sendFailure(), ilUtil\sendSuccess(), and ilLPMarks\setCompleted().

1024  {
1025  global $ilUser;
1026 
1027  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1028 
1029  include_once './Services/Object/classes/class.ilObjectLP.php';
1030  $olp = ilObjectLP::getInstance($this->gui_object->object->getId());
1031  if(
1032  ($olp->getCurrentMode() != ilLPObjSettings::LP_MODE_MANUAL) ||
1033  !$GLOBALS['ilAccess']->checkAccess('read','',$this->gui_object->object->getRefId())
1034  )
1035  {
1036  ilUtil::sendFailure($this->lng->txt('permission_denied'),true);
1037  $this->ctrl->redirect($this, "");
1038  return false;
1039  }
1040 
1041 
1042  $lp_marks = new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
1043  $lp_marks->setCompleted((bool) $_POST['lp_edit']);
1044  $lp_marks->update();
1045 
1046  require_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1047  ilLPStatusWrapper::_updateStatus($this->gui_object->object->getId(),$ilUser->getId());
1048 
1049  $this->lng->loadLanguageModule('trac');
1050  ilUtil::sendSuccess($this->lng->txt('trac_updated_status'), true);
1051  $this->ctrl->redirect($this, ""); // #14993
1052 
1053  // $this->showSummary();
1054  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
Update status.
$GLOBALS['ct_recipient']
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilUser
Definition: imgupload.php:15
setCompleted($a_status)
static getInstance($a_obj_id)
+ Here is the call graph for this function:

◆ saveTags()

ilInfoScreenGUI::saveTags ( )

Definition at line 1197 of file class.ilInfoScreenGUI.php.

References ilUtil\sendSuccess().

1198  {
1199  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1200  $tagging_gui = new ilTaggingGUI();
1201  $tagging_gui->setObject($this->gui_object->object->getId(),
1202  $this->gui_object->object->getType());
1203  $tagging_gui->saveInput();
1204 
1205  ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
1206  $this->ctrl->redirect($this, ""); // #14993
1207 
1208  // return $this->showSummary();
1209  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
Class ilTaggingGUI.
+ Here is the call graph for this function:

◆ setBlockProperty()

ilInfoScreenGUI::setBlockProperty (   $a_block_type,
  $a_property,
  $a_value 
)

This function is supposed to be used for block type specific properties, that should be passed to ilBlockGUI->setProperty.

Parameters
string$a_propertyproperty name
string$a_valueproperty value

Definition at line 177 of file class.ilInfoScreenGUI.php.

178  {
179  $this->block_property[$a_block_type][$a_property] = $a_value;
180  }

◆ setCloseFormTag()

ilInfoScreenGUI::setCloseFormTag (   $a_val)

Definition at line 728 of file class.ilInfoScreenGUI.php.

729  {
730  $this->close_form_tag = $a_val;
731  }

◆ setColumnSettings()

ilInfoScreenGUI::setColumnSettings (   $column_gui)

Set column settings.

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

References $lng, and getAllBlockProperties().

Referenced by getCenterColumnHTML(), and getRightColumnHTML().

715  {
716  global $lng, $ilAccess;
717 
718  $column_gui->setEnableEdit($this->news_editing);
719  $column_gui->setRepositoryMode(true);
720  $column_gui->setAllBlockProperties($this->getAllBlockProperties());
721  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFormAction()

ilInfoScreenGUI::setFormAction (   $a_form_action)

set a form action

Definition at line 200 of file class.ilInfoScreenGUI.php.

Referenced by getHTML().

201  {
202  $this->form_action = $a_form_action;
203  }
+ Here is the caller graph for this function:

◆ setOpenFormTag()

ilInfoScreenGUI::setOpenFormTag (   $a_val)

Definition at line 723 of file class.ilInfoScreenGUI.php.

724  {
725  $this->open_form_tag = $a_val;
726  }

◆ setTableClass()

ilInfoScreenGUI::setTableClass (   $a_val)

Set table class.

Parameters
stringtable class

Definition at line 114 of file class.ilInfoScreenGUI.php.

115  {
116  $this->table_class = $a_val;
117  }

◆ setTabs()

ilInfoScreenGUI::setTabs ( )

Definition at line 1144 of file class.ilInfoScreenGUI.php.

References $tpl, and getTabs().

Referenced by executeCommand().

1145  {
1146  global $tpl;
1147 
1148  $this->getTabs($this->tabs_gui);
1149  }
getTabs(&$tabs_gui)
get tabs
global $tpl
Definition: ilias.php:8
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showLDAPRoleGroupMappingInfo()

ilInfoScreenGUI::showLDAPRoleGroupMappingInfo (   $a_section = '')

show LDAP role group mapping info

public

Parameters
stringsection name. Leave empty to place this info string inside a section

Definition at line 1118 of file class.ilInfoScreenGUI.php.

References ilLDAPRoleGroupMapping\_getInstance(), addProperty(), and addSection().

1119  {
1120  if(strlen($a_section))
1121  {
1122  $this->addSection($a_section);
1123  }
1124  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1125  $ldap_mapping = ilLDAPRoleGroupMapping::_getInstance();
1126  if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1127  {
1128  $info_combined = '<div style="color:green;">';
1129  $counter = 0;
1130  foreach($infos as $info_string)
1131  {
1132  if($counter++)
1133  {
1134  $info_combined .= '<br />';
1135  }
1136  $info_combined .= $info_string;
1137  }
1138  $info_combined .= '</div>';
1139  $this->addProperty($this->lng->txt('applications'),$info_combined);
1140  }
1141  return true;
1142  }
addSection($a_title)
add a new section
static _getInstance()
Get singleton instance of this class.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
+ Here is the call graph for this function:

◆ showLearningProgress()

ilInfoScreenGUI::showLearningProgress (   $a_tpl)

Definition at line 912 of file class.ilInfoScreenGUI.php.

References $ilUser, ilObjUserTracking\_enabledLearningProgress(), ilLearningProgress\_getProgress(), ilLPMarks\_hasCompleted(), ilFormat\_secondsToString(), ilDatePresentation\formatDate(), ilUtil\formSelect(), ilObjectLP\getInstance(), IL_CAL_DATETIME, and ilLPObjSettings\LP_MODE_MANUAL.

Referenced by getHTML().

913  {
914  global $ilUser,$rbacsystem;
915 
916  if(!$rbacsystem->checkAccess('read',$this->gui_object->object->getRefId()))
917  {
918  return false;
919  }
920  if($ilUser->getId() == ANONYMOUS_USER_ID)
921  {
922  return false;
923  }
924 
925  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
926  if (!ilObjUserTracking::_enabledLearningProgress() and $ilUser->getId() != ANONYMOUS_USER_ID)
927  {
928  return false;
929  }
930 
931  include_once './Services/Object/classes/class.ilObjectLP.php';
932  $olp = ilObjectLP::getInstance($this->gui_object->object->getId());
933  if($olp->getCurrentMode() != ilLPObjSettings::LP_MODE_MANUAL)
934  {
935  return false;
936  }
937 
938  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
939 
940  $this->lng->loadLanguageModule('trac');
941 
942  // section header
943 // $a_tpl->setCurrentBlock("header_row");
944  $a_tpl->setVariable("TXT_SECTION",
945  $this->lng->txt('learning_progress'));
946  $a_tpl->parseCurrentBlock();
947  // $a_tpl->touchBlock("row");
948 
949  // status
950  $i_tpl = new ilTemplate("tpl.lp_edit_manual_info_page.html", true, true, "Services/Tracking");
951  $i_tpl->setVariable("INFO_EDITED", $this->lng->txt("trac_info_edited"));
952  $i_tpl->setVariable("SELECT_STATUS", ilUtil::formSelect((int) ilLPMarks::_hasCompleted($ilUser->getId(),
953  $this->gui_object->object->getId()),
954  'lp_edit',
955  array(0 => $this->lng->txt('trac_not_completed'),
956  1 => $this->lng->txt('trac_completed')),
957  false,
958  true));
959  $i_tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
960  $a_tpl->setCurrentBlock("pv");
961  $a_tpl->setVariable("TXT_PROPERTY_VALUE", $i_tpl->get());
962  $a_tpl->parseCurrentBlock();
963  $a_tpl->setCurrentBlock("property_row");
964  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_status'));
965  $a_tpl->parseCurrentBlock();
966  // $a_tpl->touchBlock("row");
967 
968 
969  // More infos for lm's
970  if($this->gui_object->object->getType() == 'lm' ||
971  $this->gui_object->object->getType() == 'htlm')
972  {
973  $a_tpl->setCurrentBlock("pv");
974 
975  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
976  $progress = ilLearningProgress::_getProgress($ilUser->getId(),$this->gui_object->object->getId());
977  if($progress['access_time'])
978  {
979  $a_tpl->setVariable("TXT_PROPERTY_VALUE",
980  ilDatePresentation::formatDate(new ilDateTime($progress['access_time'],IL_CAL_DATETIME)));
981  }
982  else
983  {
984  $a_tpl->setVariable("TXT_PROPERTY_VALUE",
985  $this->lng->txt('trac_not_accessed'));
986  }
987 
988  $a_tpl->parseCurrentBlock();
989  $a_tpl->setCurrentBlock("property_row");
990  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_last_access'));
991  $a_tpl->parseCurrentBlock();
992  // $a_tpl->touchBlock("row");
993 
994  // tags of all users
995  $a_tpl->setCurrentBlock("pv");
996  $a_tpl->setVariable("TXT_PROPERTY_VALUE",
997  (int) $progress['visits']);
998  $a_tpl->parseCurrentBlock();
999  $a_tpl->setCurrentBlock("property_row");
1000  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_visits'));
1001  $a_tpl->parseCurrentBlock();
1002  // $a_tpl->touchBlock("row");
1003 
1004 
1005  if($this->gui_object->object->getType() == 'lm')
1006  {
1007  // tags of all users
1008  $a_tpl->setCurrentBlock("pv");
1009  $a_tpl->setVariable("TXT_PROPERTY_VALUE",
1010  ilFormat::_secondsToString($progress['spent_seconds']));
1011  $a_tpl->parseCurrentBlock();
1012  $a_tpl->setCurrentBlock("property_row");
1013  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_spent_time'));
1014  $a_tpl->parseCurrentBlock();
1015  // $a_tpl->touchBlock("row");
1016  }
1017  }
1018 
1019  // #10493
1020  $a_tpl->touchBlock("row");
1021  }
_getProgress($a_user_id, $a_obj_id)
const IL_CAL_DATETIME
_secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
_hasCompleted($a_usr_id, $a_obj_id)
static _enabledLearningProgress()
check wether learing progress is enabled or not
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.
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
Date and time handling
global $ilUser
Definition: imgupload.php:15
static getInstance($a_obj_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showNotesSection()

ilInfoScreenGUI::showNotesSection ( )

show notes section

Definition at line 1060 of file class.ilInfoScreenGUI.php.

References $ilSetting, $ref_id, and ilNoteGUI\enablePublicNotes().

Referenced by getHTML().

1061  {
1062  global $ilAccess, $ilSetting;
1063 
1064  $next_class = $this->ctrl->getNextClass($this);
1065  include_once("Services/Notes/classes/class.ilNoteGUI.php");
1066  $notes_gui = new ilNoteGUI($this->gui_object->object->getId(), 0,
1067  $this->gui_object->object->getType());
1068 
1069  // global switch
1070  if($ilSetting->get("disable_comments"))
1071  {
1072  $notes_gui->enablePublicNotes(false);
1073  }
1074  else
1075  {
1076  $ref_id = $this->gui_object->object->getRefId();
1077  $has_write = $ilAccess->checkAccess("write", "", $ref_id);
1078 
1079  if($has_write && $ilSetting->get("comments_del_tutor", 1))
1080  {
1081  $notes_gui->enablePublicNotesDeletion(true);
1082  }
1083 
1084  /* should probably be discussed further
1085  for now this will only work properly with comments settings
1086  (see ilNoteGUI constructor)
1087  */
1088  if ($has_write ||
1089  $ilAccess->checkAccess("edit_permissions", "", $ref_id))
1090  {
1091  $notes_gui->enableCommentsSettings();
1092  }
1093  }
1094 
1095  /* moved to action menu
1096  $notes_gui->enablePrivateNotes();
1097  */
1098 
1099  if ($next_class == "ilnotegui")
1100  {
1101  $html = $this->ctrl->forwardCommand($notes_gui);
1102  }
1103  else
1104  {
1105  $html = $notes_gui->getNotesHTML();
1106  }
1107 
1108  return $html;
1109  }
enablePublicNotes($a_enable=true)
enable public notes
Notes GUI class.
$ref_id
Definition: sahs_server.php:39
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSummary()

ilInfoScreenGUI::showSummary ( )

show summary page

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

References $tpl, getCenterColumnHTML(), and getRightColumnHTML().

Referenced by executeCommand().

633  {
634  global $tpl, $ilAccess;
635 
636  $tpl->setContent($this->getCenterColumnHTML());
637  $tpl->setRightContent($this->getRightColumnHTML());
638  }
getCenterColumnHTML()
Display center column.
getRightColumnHTML()
Display right column.
global $tpl
Definition: ilias.php:8
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $close_form_tag

ilInfoScreenGUI::$close_form_tag = true

Definition at line 29 of file class.ilInfoScreenGUI.php.

◆ $ctrl

ilInfoScreenGUI::$ctrl

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

◆ $form_action

ilInfoScreenGUI::$form_action

a form action parameter.

if set a form is generated

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

◆ $gui_object

ilInfoScreenGUI::$gui_object

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

◆ $hiddenelements

ilInfoScreenGUI::$hiddenelements = array()

Definition at line 26 of file class.ilInfoScreenGUI.php.

◆ $ilias

ilInfoScreenGUI::$ilias

Definition at line 20 of file class.ilInfoScreenGUI.php.

Referenced by addObjectSections(), and ilInfoScreenGUI().

◆ $lng

◆ $open_form_tag

ilInfoScreenGUI::$open_form_tag = true

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

◆ $table_class

ilInfoScreenGUI::$table_class = "il_InfoScreen"

Definition at line 27 of file class.ilInfoScreenGUI.php.

Referenced by getTableClass().

◆ $top_buttons

ilInfoScreenGUI::$top_buttons = array()

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

◆ $top_formbuttons

ilInfoScreenGUI::$top_formbuttons = array()

Definition at line 25 of file class.ilInfoScreenGUI.php.


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