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

Class ilInfoScreenGUI. More...

+ Collaboration diagram for ilInfoScreenGUI:

Public Member Functions

 __construct ($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...
 
 getContextRefId ()
 
 setContextRefId (int $contextRefId)
 
 getContextObjId ()
 
 setContextObjId (int $contextObjId)
 
 getContentObjType ()
 
 setContentObjType (string $contentObjType)
 
 showLearningProgress ($a_tpl)
 
 saveProgress ($redirect=true)
 
 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

 $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...
 

Protected Member Functions

 addPreconditions ()
 Add preconditions. More...
 
 addPreconditionSection ($obj, $conditions, $obligatory=true)
 

Protected Attributes

 $tabs_gui
 
 $rbacsystem
 
 $tpl
 
 $access
 
 $user
 
 $tree
 
 $settings
 
 $contextRefId = null
 
 $contextObjId = null
 
 $contentObjType = null
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilInfoScreenGUI::__construct (   $a_gui_object)

Constructor.

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

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

References $DIC, $ilCtrl, $lng, settings(), and user().

92  {
93  global $DIC;
94 
95  $this->rbacsystem = $DIC->rbac()->system();
96  $this->tpl = $DIC["tpl"];
97  $this->access = $DIC->access();
98  $this->user = $DIC->user();
99  $this->tree = $DIC->repositoryTree();
100  $this->settings = $DIC->settings();
101  $ilCtrl = $DIC->ctrl();
102  $lng = $DIC->language();
103  $ilTabs = $DIC->tabs();
104 
105  $this->ctrl = $ilCtrl;
106  $this->lng = $lng;
107  $this->tabs_gui = $ilTabs;
108  $this->gui_object = $a_gui_object;
109  $this->sec_nr = 0;
110  $this->private_notes_enabled = false;
111  $this->news_enabled = false;
112  $this->feedback_enabled = false;
113  $this->learning_progress_enabled = false;
114  $this->form_action = "";
115  $this->top_formbuttons = array();
116  $this->hiddenelements = array();
117  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

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 328 of file class.ilInfoScreenGUI.php.

Referenced by getHTML().

329  {
330  if ($a_position == "top") {
331  $this->top_buttons[] =
332  array("title" => $a_title,"link" => $a_link,"target" => $a_frame,"primary" => $a_primary);
333  }
334  }
+ 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 340 of file class.ilInfoScreenGUI.php.

341  {
342  if ($a_position == "top") {
343  array_push(
344  $this->top_formbuttons,
345  array("command" => $a_command, "title" => $a_title)
346  );
347  }
348  }

◆ addHiddenElement()

ilInfoScreenGUI::addHiddenElement (   $a_name,
  $a_value 
)

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

351  {
352  array_push($this->hiddenelements, array("name" => $a_name, "value" => $a_value));
353  }

◆ addMetaDataSections()

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

add standard meta data sections

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

References $a_type, $description, $id, $lng, ilMDUtils\_parseCopyright(), addProperty(), addSection(), and ilDatePresentation\secondsToString().

359  {
360  $lng = $this->lng;
361 
362  $lng->loadLanguageModule("meta");
363 
364  include_once("./Services/MetaData/classes/class.ilMD.php");
365  $md = new ilMD($a_rep_obj_id, $a_obj_id, $a_type);
366 
367  if ($md_gen = $md->getGeneral()) {
368  // get first descrption
369  // The description is shown on the top of the page.
370  // Thus it is not necessary to show it again.
371  foreach ($md_gen->getDescriptionIds() as $id) {
372  $md_des = $md_gen->getDescription($id);
373  $description = $md_des->getDescription();
374  break;
375  }
376 
377  // get language(s)
378  $langs = array();
379  foreach ($ids = $md_gen->getLanguageIds() as $id) {
380  $md_lan = $md_gen->getLanguage($id);
381  if ($md_lan->getLanguageCode() != "") {
382  $langs[] = $lng->txt("meta_l_" . $md_lan->getLanguageCode());
383  }
384  }
385  $langs = implode($langs, ", ");
386 
387  // keywords
388  $keywords = array();
389  foreach ($ids = $md_gen->getKeywordIds() as $id) {
390  $md_key = $md_gen->getKeyword($id);
391  $keywords[] = $md_key->getKeyword();
392  }
393  $keywords = implode($keywords, ", ");
394  }
395 
396  // authors
397  if (is_object($lifecycle = $md->getLifecycle())) {
398  $sep = $author = "";
399  foreach (($ids = $lifecycle->getContributeIds()) as $con_id) {
400  $md_con = $lifecycle->getContribute($con_id);
401  if ($md_con->getRole() == "Author") {
402  foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
403  $md_ent = $md_con->getEntity($ent_id);
404  $author = $author . $sep . $md_ent->getEntity();
405  $sep = ", ";
406  }
407  }
408  }
409  }
410 
411  // copyright
412  $copyright = "";
413  if (is_object($rights = $md->getRights())) {
414  include_once('Services/MetaData/classes/class.ilMDUtils.php');
415  $copyright = ilMDUtils::_parseCopyright($rights->getDescription());
416  }
417 
418  // learning time
419  #if(is_object($educational = $md->getEducational()))
420  #{
421  # $learning_time = $educational->getTypicalLearningTime();
422  #}
423  $learning_time = "";
424  if (is_object($educational = $md->getEducational())) {
425  if ($seconds = $educational->getTypicalLearningTimeSeconds()) {
426  $learning_time = ilDatePresentation::secondsToString($seconds);
427  }
428  }
429 
430 
431  // output
432 
433  // description
434  if ($description != "") {
435  $this->addSection($lng->txt("description"));
436  $this->addProperty("", nl2br($description));
437  }
438 
439  // general section
440  $this->addSection($lng->txt("meta_general"));
441  if ($langs != "") { // language
442  $this->addProperty(
443  $lng->txt("language"),
444  $langs
445  );
446  }
447  if ($keywords != "") { // keywords
448  $this->addProperty(
449  $lng->txt("keywords"),
450  $keywords
451  );
452  }
453  if ($author != "") { // author
454  $this->addProperty(
455  $lng->txt("author"),
456  $author
457  );
458  }
459  if ($copyright != "") { // copyright
460  $this->addProperty(
461  $lng->txt("meta_copyright"),
462  $copyright
463  );
464  }
465  if ($learning_time != "") { // typical learning time
466  $this->addProperty(
467  $lng->txt("meta_typical_learning_time"),
468  $learning_time
469  );
470  }
471  }
static _parseCopyright($a_copyright)
Parse copyright.
if(!array_key_exists('StateId', $_REQUEST)) $id
addSection($a_title)
add a new section
$a_type
Definition: workflow.php:92
static 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 476 of file class.ilInfoScreenGUI.php.

References $access, $ctrl, $ilCtrl, $ilUser, $links, $lng, $r, $size, $tree, $type, $user, ilObject\_getAllReferences(), ilDAVActivationChecker\_isActive(), ilDiskQuotaActivationChecker\_isActive(), ilChangeEvent\_isActive(), ilChangeEvent\_lookupReadEvents(), addProperty(), addSection(), ilDatePresentation\formatDate(), ilUtil\formatSize(), ilECSServerSettings\getInstance(), ilObjectFactory\getInstanceByObjId(), IL_CAL_DATETIME, and ilObjUser\userExists().

Referenced by getHTML().

477  {
478  $lng = $this->lng;
481  $ilAccess = $this->access;
482  $tree = $this->tree;
483 
484  $this->addSection($lng->txt("additional_info"));
485  $a_obj = $this->gui_object->object;
486 
487  // links to the object
488  if (is_object($a_obj)) {
489  // permanent link
490  $type = $a_obj->getType();
491  $ref_id = $a_obj->getRefId();
492 
493  if ($ref_id) {
494  include_once 'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
495  if (ilECSServerSettings::getInstance()->activeServerExists()) {
496  $this->addProperty(
497  $lng->txt("object_id"),
498  $a_obj->getId()
499  );
500  }
501 
502  include_once 'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
503  $pm = new ilPermanentLinkGUI($type, $ref_id);
504  $pm->setIncludePermanentLinkText(false);
505  $pm->setAlignCenter(false);
506  $this->addProperty(
507  $lng->txt("perma_link"),
508  $pm->getHTML(),
509  ""
510  );
511 
512  // bookmarks
513 
514  // links to resource
515  if ($ilAccess->checkAccess("write", "", $ref_id) ||
516  $ilAccess->checkAccess("edit_permissions", "", $ref_id)) {
517  $obj_id = $a_obj->getId();
518  $rs = ilObject::_getAllReferences($obj_id);
519  $refs = array();
520  foreach ($rs as $r) {
521  if ($tree->isInTree($r)) {
522  $refs[] = $r;
523  }
524  }
525  if (count($refs) > 1) {
526  $links = $sep = "";
527  foreach ($refs as $r) {
528  $cont_loc = new ilLocatorGUI();
529  $cont_loc->addContextItems($r, true);
530  $links .= $sep . $cont_loc->getHTML();
531  $sep = "<br />";
532  }
533 
534  $this->addProperty(
535  $lng->txt("res_links"),
536  '<div class="small">' . $links . '</div>'
537  );
538  }
539  }
540  }
541  }
542 
543 
544  // creation date
545  $this->addProperty(
546  $lng->txt("create_date"),
547  ilDatePresentation::formatDate(new ilDateTime($a_obj->getCreateDate(), IL_CAL_DATETIME))
548  );
549 
550  // owner
551  if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner()) {
552  include_once './Services/Object/classes/class.ilObjectFactory.php';
553  include_once './Services/User/classes/class.ilObjUser.php';
554 
555  if (ilObjUser::userExists(array($a_obj->getOwner()))) {
556  $ownerObj = ilObjectFactory::getInstanceByObjId($a_obj->getOwner(), false);
557  } else {
558  $ownerObj = ilObjectFactory::getInstanceByObjId(6, false);
559  }
560 
561  if (!is_object($ownerObj) || $ownerObj->getType() != "usr") { // root user deleted
562  $this->addProperty($lng->txt("owner"), $lng->txt("no_owner"));
563  } elseif ($ownerObj->hasPublicProfile()) {
564  $ilCtrl->setParameterByClass("ilpublicuserprofilegui", "user_id", $ownerObj->getId());
565  $this->addProperty($lng->txt("owner"), $ownerObj->getPublicName(), $ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML"));
566  } else {
567  $this->addProperty($lng->txt("owner"), $ownerObj->getPublicName());
568  }
569  }
570 
571  // disk usage
572  require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
573  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
575  $size = $a_obj->getDiskUsage();
576  if ($size !== null) {
577  $this->addProperty($lng->txt("disk_usage"), ilUtil::formatSize($size, 'long'));
578  }
579  }
580  // change event
581  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
582  if (ilChangeEvent::_isActive()) {
583  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
584  $readEvents = ilChangeEvent::_lookupReadEvents($a_obj->getId());
585  $count_users = 0;
586  $count_members = 0;
587  $count_user_reads = 0;
588  $count_anonymous_reads = 0;
589  foreach ($readEvents as $evt) {
590  if ($evt['usr_id'] == ANONYMOUS_USER_ID) {
591  $count_anonymous_reads += $evt['read_count'];
592  } else {
593  $count_user_reads += $evt['read_count'];
594  $count_users++;
595  /* to do: if ($evt['user_id'] is member of $this->getRefId())
596  {
597  $count_members++;
598  }*/
599  }
600  }
601  if ($count_anonymous_reads > 0) {
602  $this->addProperty($this->lng->txt("readcount_anonymous_users"), $count_anonymous_reads);
603  }
604  if ($count_user_reads > 0) {
605  $this->addProperty($this->lng->txt("readcount_users"), $count_user_reads);
606  }
607  if ($count_users > 0) {
608  $this->addProperty($this->lng->txt("accesscount_registered_users"), $count_users);
609  }
610  }
611  }
612  // END ChangeEvent: Display change event info
613 
614  // WebDAV: Display locking information
615  require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
617  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
618  require_once 'Services/WebDAV/classes/lock/class.ilWebDAVLockBackend.php';
619  $webdav_lock_backend = new ilWebDAVLockBackend();
620 
621  // Show lock info
622  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
623  if ($lock = $webdav_lock_backend->getLocksOnObjectId($this->gui_object->object->getId())) {
624  $lock_user = new ilObjUser($lock->getIliasOwner());
625  $this->addProperty(
626  $this->lng->txt("in_use_by"),
627  $lock_user->getPublicName(),
628  "./ilias.php?user=" . $lock_user->getId() . '&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
629  );
630  }
631  }
632  }
633  }
634  }
$size
Definition: RandomTest.php:84
const IL_CAL_DATETIME
Class for permanent links.
$type
static getInstance()
Get singleton instance.
addSection($a_title)
add a new section
static _isActive()
Static getter.
static userExists($a_usr_ids=array())
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _getAllReferences($a_id)
get all reference ids of object
locator handling class
global $ilCtrl
Definition: ilias.php:18
$r
Definition: example_031.php:79
Date and time handling
$ilUser
Definition: imgupload.php:18
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 ...
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilWebDAVLockBackend.
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.
$links
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPreconditions()

ilInfoScreenGUI::addPreconditions ( )
protected

Add preconditions.

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

References $i, ilObject\_lookupTitle(), addPreconditionSection(), and ilUtil\sortArray().

Referenced by getHTML().

1265  {
1266  if (!is_object($this->gui_object) || !is_object($this->gui_object->object)) {
1267  return;
1268  }
1269  $obj = $this->gui_object->object;
1270  if ($obj->getRefId() <= 0) {
1271  return;
1272  }
1273 
1274  $conditions = ilConditionHandler::_getEffectiveConditionsOfTarget($obj->getRefId(), $obj->getId());
1275 
1276  if (sizeof($conditions)) {
1277  for ($i = 0; $i < count($conditions); $i++) {
1278  $conditions[$i]['title'] = ilObject::_lookupTitle($conditions[$i]['trigger_obj_id']);
1279  }
1280  $conditions = ilUtil::sortArray($conditions, 'title', 'DESC');
1281 
1282  // Show obligatory and optional preconditions seperated
1283  $this->addPreconditionSection($obj, $conditions, true);
1284  $this->addPreconditionSection($obj, $conditions, false);
1285  }
1286  }
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static _lookupTitle($a_id)
lookup object title
addPreconditionSection($obj, $conditions, $obligatory=true)
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPreconditionSection()

ilInfoScreenGUI::addPreconditionSection (   $obj,
  $conditions,
  $obligatory = true 
)
protected

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

References $lng, $ok, $tree, ilConditionHandler\_checkCondition(), ilLink\_getLink(), ilObject\_lookupTitle(), addProperty(), addSection(), ilConditionHandler\calculateEffectiveRequiredTriggers(), ilConditionHandler\getEffectiveOptionalConditionsOfTarget(), ilMemberViewSettings\getInstance(), and ilConditionHandlerGUI\translateOperator().

Referenced by addPreconditions().

1289  {
1290  $lng = $this->lng;
1291  $tree = $this->tree;
1292 
1293  $num_required = ilConditionHandler::calculateEffectiveRequiredTriggers($obj->getRefId(), $obj->getId());
1294  $num_optional_required =
1295  $num_required - count($conditions) + count(ilConditionHandler::getEffectiveOptionalConditionsOfTarget($obj->getRefId(), $obj->getId()));
1296 
1297  // Check if all conditions are fullfilled
1298  $visible_conditions = array();
1299  $passed_optional = 0;
1300  foreach ($conditions as $condition) {
1301  if ($obligatory and !$condition['obligatory']) {
1302  continue;
1303  }
1304  if (!$obligatory and $condition['obligatory']) {
1305  continue;
1306  }
1307 
1308  if ($tree->isDeleted($condition['trigger_ref_id'])) {
1309  continue;
1310  }
1311 
1313  !ilMemberViewSettings::getInstance()->isActive();
1314 
1315  if (!$ok) {
1316  $visible_conditions[] = $condition['id'];
1317  }
1318 
1319  if (!$obligatory and $ok) {
1320  ++$passed_optional;
1321  // optional passed
1322  if ($passed_optional >= $num_optional_required) {
1323  return true;
1324  }
1325  }
1326  }
1327 
1328  $properties = [];
1329 
1330  foreach ($conditions as $condition) {
1331  if (!in_array($condition['id'], $visible_conditions)) {
1332  continue;
1333  }
1334 
1335  $missing_cond_exist = true;
1336 
1337  $properties[] = [
1339  $condition['trigger_obj_id'],
1340  $condition['operator']
1341  ) . ' ' . $condition['value'],
1342  "title" => ilObject::_lookupTitle($condition['trigger_obj_id']),
1343  "link" => ilLink::_getLink($condition['trigger_ref_id'])
1344  ];
1345  }
1346 
1347  if (count($properties) > 0) {
1348  if ($obligatory) {
1349  $this->addSection($lng->txt("preconditions_obligatory_hint"));
1350  } else {
1351  $this->addSection(sprintf($lng->txt("preconditions_optional_hint"), $num_optional_required));
1352  }
1353 
1354  foreach ($properties as $p) {
1355  $this->addProperty(
1356  $p["condition"],
1357  "<a href='".$p["link"]."'>".$p["title"]."</a>"
1358  );
1359  }
1360 
1361  }
1362  }
static translateOperator($a_obj_id, $a_operator)
Translate operator.
static _checkCondition($condition, $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...
static _lookupTitle($a_id)
lookup object title
addSection($a_title)
add a new section
static calculateEffectiveRequiredTriggers($a_target_ref_id, $a_target_obj_id, $a_target_obj_type='')
calculate number of obligatory items
static getEffectiveOptionalConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_obj_type='')
Get optional conditions.
static getInstance()
Get instance.
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:

◆ 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 276 of file class.ilInfoScreenGUI.php.

Referenced by ilObjIndividualAssessmentGUI\addContactDataToInfo(), ilObjRemoteCourseGUI\addCustomInfoFields(), ilObjRemoteGroupGUI\addCustomInfoFields(), ilObjRemoteTestGUI\addCustomInfoFields(), ilObjRemoteFileGUI\addCustomInfoFields(), ilObjRemoteGlossaryGUI\addCustomInfoFields(), ilObjRemoteLearningModuleGUI\addCustomInfoFields(), ilObjRemoteWikiGUI\addCustomInfoFields(), ilExAssignmentGUI\addFiles(), ilObjIndividualAssessmentGUI\addGeneralDataToInfo(), ilExAssignmentGUI\addInstructions(), ilObjIndividualAssessmentGUI\addMemberDataToInfo(), addMetaDataSections(), addObjectSections(), addPreconditionSection(), ilExAssignmentGUI\addPublicSubmissions(), ilExAssignmentGUI\addSchedule(), ilExAssignmentGUI\addSubmission(), ilExAssignmentGUI\addSubmissionFeedback(), addTagging(), ilExSubmissionTextGUI\getOverviewContent(), ilExSubmissionFileGUI\getOverviewContent(), ilExSubmissionTeamGUI\getOverviewContent(), ilExPeerReviewGUI\getOverviewContent(), ilExSubmissionObjectGUI\getOverviewContentBlog(), ilExSubmissionObjectGUI\getOverviewContentPortfolio(), ilExPeerReviewGUI\renderInfoWidget(), ilExAssTypeWikiTeamGUI\renderOverviewContent(), and showLDAPRoleGroupMappingInfo().

277  {
278  $this->section[$this->sec_nr]["properties"][] =
279  array("name" => $a_name, "value" => $a_value,
280  "link" => $a_link);
281  }
+ 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 286 of file class.ilInfoScreenGUI.php.

287  {
288  $checkbox = "<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
289  if ($a_checkbox_checked) {
290  $checkbox .= " checked=\"checked\"";
291  }
292  $checkbox .= " />";
293  if (strlen($a_checkbox_label)) {
294  $checkbox .= "&nbsp;<label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
295  }
296  $this->section[$this->sec_nr]["properties"][] =
297  array("name" => $a_name, "value" => $checkbox);
298  }

◆ 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 303 of file class.ilInfoScreenGUI.php.

References $input, and ilUtil\prepareFormOutput().

304  {
305  $input = "<span class=\"form-inline\"><input class=\"form-control\" type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
306  if (strlen($a_input_value)) {
307  $input .= " value=\"" . ilUtil::prepareFormOutput($a_input_value) . "\"";
308  }
309  if (strlen($a_input_size)) {
310  $input .= " size=\"" . $a_input_size . "\"";
311  }
312  $input .= " />";
313  if (strlen($direct_button_command) && strlen($direct_button_label)) {
314  $css = "";
315  if ($direct_button_primary) {
316  $css = " btn-primary";
317  }
318  $input .= " <input type=\"submit\" class=\"btn btn-default" . $css . "\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
319  }
320  $input .= "</span>";
321  $this->section[$this->sec_nr]["properties"][] =
322  array("name" => "<label for=\"$a_input_name\">$a_name</label>", "value" => $input);
323  }
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)

◆ addTagging()

ilInfoScreenGUI::addTagging ( )

Add tagging.

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

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

Referenced by getHTML().

1203  {
1204  $lng = $this->lng;
1205  $ilCtrl = $this->ctrl;
1206 
1207  $lng->loadLanguageModule("tagging");
1208  $tags_set = new ilSetting("tags");
1209 
1210  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1211  $tagging_gui = new ilTaggingGUI();
1212  $tagging_gui->setObject(
1213  $this->gui_object->object->getId(),
1214  $this->gui_object->object->getType()
1215  );
1216 
1217  $this->addSection($lng->txt("tagging_tags"));
1218 
1219  if ($tags_set->get("enable_all_users")) {
1220  $this->addProperty(
1221  $lng->txt("tagging_all_users"),
1222  $tagging_gui->getAllUserTagsForObjectHTML()
1223  );
1224  }
1225 
1226  $this->addProperty(
1227  $lng->txt("tagging_my_tags"),
1228  $tagging_gui->getTaggingInputHTML()
1229  );
1230  }
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 205 of file class.ilInfoScreenGUI.php.

206  {
207  $this->feedback_enabled = $a_enable;
208  }

◆ enableLearningProgress()

ilInfoScreenGUI::enableLearningProgress (   $a_enable = true)

enable learning progress

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

197  {
198  $this->learning_progress_enabled = $a_enable;
199  }

◆ enableNews()

ilInfoScreenGUI::enableNews (   $a_enable = true)

enable news

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

214  {
215  $this->news_enabled = $a_enable;
216  }

◆ enableNewsEditing()

ilInfoScreenGUI::enableNewsEditing (   $a_enable = true)

enable news editing

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

222  {
223  $this->news_editing = $a_enable;
224  }

◆ enablePrivateNotes()

ilInfoScreenGUI::enablePrivateNotes (   $a_enable = true)

enable notes

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

189  {
190  $this->private_notes_enabled = $a_enable;
191  }

◆ executeCommand()

ilInfoScreenGUI::executeCommand ( )

execute command

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

References $_GET, $access, $html, $rbacsystem, $tpl, ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), setTabs(), and showSummary().

123  {
125  $tpl = $this->tpl;
126  $ilAccess = $this->access;
127 
128  $next_class = $this->ctrl->getNextClass($this);
129 
130  $cmd = $this->ctrl->getCmd("showSummary");
131  $this->ctrl->setReturn($this, "showSummary");
132 
133  $this->setTabs();
134 
135  switch ($next_class) {
136  case "ilnotegui":
137  $this->showSummary(); // forwards command
138  break;
139 
140  case "ilcolumngui":
141  $this->showSummary();
142  break;
143 
144  case "ilpublicuserprofilegui":
145  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
146  $user_profile = new ilPublicUserProfileGUI($_GET["user_id"]);
147  $user_profile->setBackUrl($this->ctrl->getLinkTarget($this, "showSummary"));
148  $html = $this->ctrl->forwardCommand($user_profile);
149  $tpl->setContent($html);
150  break;
151 
152  case "ilcommonactiondispatchergui":
153  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
155  $this->ctrl->forwardCommand($gui);
156  break;
157 
158  default:
159  return $this->$cmd();
160  break;
161  }
162  return true;
163  }
$_GET["client_id"]
showSummary()
show summary page
GUI class for public user profile presentation.
$html
Definition: example_001.php:87
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
+ Here is the call graph for this function:

◆ getAllBlockProperties()

ilInfoScreenGUI::getAllBlockProperties ( )

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

Referenced by setColumnSettings().

239  {
240  return $this->block_property;
241  }
+ Here is the caller graph for this function:

◆ getCenterColumnHTML()

ilInfoScreenGUI::getCenterColumnHTML ( )

Display center column.

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

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

Referenced by showSummary().

653  {
655 
656  include_once("Services/Block/classes/class.ilColumnGUI.php");
657  $column_gui = new ilColumnGUI("info", IL_COL_CENTER);
658  $this->setColumnSettings($column_gui);
659 
660  if (!$ilCtrl->isAsynch()) {
661  if ($column_gui->getScreenMode() != IL_SCREEN_SIDE) {
662  // right column wants center
663  if ($column_gui->getCmdSide() == IL_COL_RIGHT) {
664  $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
665  $this->setColumnSettings($column_gui);
666  $html = $ilCtrl->forwardCommand($column_gui);
667  }
668  // left column wants center
669  if ($column_gui->getCmdSide() == IL_COL_LEFT) {
670  $column_gui = new ilColumnGUI("info", IL_COL_LEFT);
671  $this->setColumnSettings($column_gui);
672  $html = $ilCtrl->forwardCommand($column_gui);
673  }
674  } else {
675  $html = $this->getHTML();
676  }
677  }
678 
679  return $html;
680  }
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
$html
Definition: example_001.php:87
const IL_COL_LEFT
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getContentObjType()

ilInfoScreenGUI::getContentObjType ( )
Returns
null|string

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

References $contentObjType.

Referenced by showLearningProgress().

932  : string
933  {
934  if ($this->contentObjType !== null) {
935  return $this->contentObjType;
936  }
937 
938  return $this->gui_object->object->getType();
939  }
+ Here is the caller graph for this function:

◆ getContextObjId()

ilInfoScreenGUI::getContextObjId ( )
Returns
int|null

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

References $contextObjId.

Referenced by saveProgress(), and showLearningProgress().

912  : int
913  {
914  if ($this->contextObjId !== null) {
915  return $this->contextObjId;
916  }
917 
918  return $this->gui_object->object->getId();
919  }
+ Here is the caller graph for this function:

◆ getContextRefId()

ilInfoScreenGUI::getContextRefId ( )
Returns
int|null

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

References $contextRefId.

892  : int
893  {
894  if ($this->contextRefId !== null) {
895  return $this->contextRefId;
896  }
897 
898  return $this->gui_object->object->getRefId();
899  }

◆ getHiddenToggleButton()

ilInfoScreenGUI::getHiddenToggleButton ( )

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

References $lng.

1255  {
1256  $lng = $this->lng;
1257 
1258  return "<a onClick=\"toggleSections(this, '" . $lng->txt("show_hidden_sections") . "', '" . $lng->txt("hide_visible_sections") . "'); return false;\" href=\"#\">" . $lng->txt("show_hidden_sections") . "</a>";
1259  }

◆ getHTML()

ilInfoScreenGUI::getHTML ( )

get html

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

References $access, $ctrl, $html, $i, $ilCtrl, $ilSetting, $ilUser, $lng, $settings, $tpl, $tree, $user, addButton(), addObjectSections(), addPreconditions(), addTagging(), getTableClass(), iljQueryUtil\initjQuery(), setFormAction(), showLearningProgress(), and showNotesSection().

Referenced by getCenterColumnHTML().

737  {
738  $lng = $this->lng;
740  $tree = $this->tree;
741  $ilAccess = $this->access;
744 
745  $tpl = new ilTemplate("tpl.infoscreen.html", true, true, "Services/InfoScreen");
746 
747  // other class handles form action (@todo: this is not implemented/tested)
748  if ($this->form_action == "") {
749  $this->setFormAction($ilCtrl->getFormAction($this));
750  }
751 
752  require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
754 
755  if ($this->hidden) {
756  $tpl->touchBlock("hidden_js");
757  if ($this->show_hidden_toggle) {
758  $this->addButton($lng->txt("show_hidden_sections"), "JavaScript:toggleSections(this, '" . $lng->txt("show_hidden_sections") . "', '" . $lng->txt("hide_visible_sections") . "');");
759  }
760  }
761 
762 
763  // DEPRECATED - use ilToolbarGUI
764 
765  // add top buttons
766  if (count($this->top_buttons) > 0) {
767  $tpl->addBlockfile("TOP_BUTTONS", "top_buttons", "tpl.buttons.html");
768 
769  foreach ($this->top_buttons as $button) {
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  $tpl->setVariable("BTN_CLASS", " btn-primary");
777  }
778  $tpl->parseCurrentBlock();
779  }
780  }
781 
782  // add top formbuttons
783  if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0)) {
784  $tpl->addBlockfile("TOP_FORMBUTTONS", "top_submitbuttons", "tpl.submitbuttons.html", "Services/InfoScreen");
785 
786  foreach ($this->top_formbuttons as $button) {
787  // view button
788  $tpl->setCurrentBlock("btn_submit_cell");
789  $tpl->setVariable("BTN_COMMAND", $button["command"]);
790  $tpl->setVariable("BTN_NAME", $button["title"]);
791  $tpl->parseCurrentBlock();
792  }
793  }
794 
795  // add form action
796  if (strlen($this->form_action) > 0) {
797  if ($this->open_form_tag) {
798  $tpl->setCurrentBlock("formtop");
799  $tpl->setVariable("FORMACTION", $this->form_action);
800  $tpl->parseCurrentBlock();
801  }
802 
803  if ($this->close_form_tag) {
804  $tpl->touchBlock("formbottom");
805  }
806  }
807 
808  if (count($this->hiddenelements)) {
809  foreach ($this->hiddenelements as $hidden) {
810  $tpl->setCurrentBlock("hidden_element");
811  $tpl->setVariable("HIDDEN_NAME", $hidden["name"]);
812  $tpl->setVariable("HIDDEN_VALUE", $hidden["value"]);
813  $tpl->parseCurrentBlock();
814  }
815  }
816 
817  $this->addPreconditions();
818 
819  // learning progress
820  if ($this->learning_progress_enabled and $html = $this->showLearningProgress($tpl)) {
821  $tpl->setCurrentBlock("learning_progress");
822  $tpl->setVariable("LP_TABLE", $html);
823  $tpl->parseCurrentBlock();
824  }
825 
826  // notes section
827  if ($this->private_notes_enabled && !$ilSetting->get('disable_notes')) {
828  $html = $this->showNotesSection();
829  $tpl->setCurrentBlock("notes");
830  $tpl->setVariable("NOTES", $html);
831  $tpl->parseCurrentBlock();
832  }
833 
834  // tagging
835  if (is_object($this->gui_object->object)) {
836  $tags_set = new ilSetting("tags");
837  if ($tags_set->get("enable") && $ilUser->getId() != ANONYMOUS_USER_ID) {
838  $this->addTagging();
839  }
840  }
841 
842  if (is_object($this->gui_object->object)) {
843  $this->addObjectSections();
844  }
845 
846  // render all sections
847  for ($i = 1; $i <= $this->sec_nr; $i++) {
848  if (is_array($this->section[$i]["properties"])) {
849  // section properties
850  foreach ($this->section[$i]["properties"] as $property) {
851  if ($property["name"] != "") {
852  if ($property["link"] == "") {
853  $tpl->setCurrentBlock("pv");
854  $tpl->setVariable("TXT_PROPERTY_VALUE", $property["value"]);
855  $tpl->parseCurrentBlock();
856  } else {
857  $tpl->setCurrentBlock("lpv");
858  $tpl->setVariable("TXT_PROPERTY_LVALUE", $property["value"]);
859  $tpl->setVariable("LINK_PROPERTY_VALUE", $property["link"]);
860  $tpl->parseCurrentBlock();
861  }
862  $tpl->setCurrentBlock("property_row");
863  $tpl->setVariable("TXT_PROPERTY", $property["name"]);
864  $tpl->parseCurrentBlock();
865  } else {
866  $tpl->setCurrentBlock("property_full_row");
867  $tpl->setVariable("TXT_PROPERTY_FULL_VALUE", $property["value"]);
868  $tpl->parseCurrentBlock();
869  }
870  }
871 
872  // section header
873  if ($this->section[$i]["hidden"]) {
874  $tpl->setVariable("SECTION_HIDDEN", " style=\"display:none;\"");
875  $tpl->setVariable("SECTION_ID", "hidable_" . $i);
876  } else {
877  $tpl->setVariable("SECTION_ID", $i);
878  }
879  $tpl->setVariable("TCLASS", $this->getTableClass());
880  $tpl->setVariable("TXT_SECTION", $this->section[$i]["title"]);
881  $tpl->setCurrentBlock("row");
882  $tpl->parseCurrentBlock();
883  }
884  }
885 
886  return $tpl->get();
887  }
addPreconditions()
Add preconditions.
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
getTableClass()
Get table class.
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
showNotesSection()
show notes section
$ilUser
Definition: imgupload.php:18
global $ilSetting
Definition: privfeed.php:17
$i
Definition: disco.tpl.php:19
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
$html
Definition: example_001.php:87
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 685 of file class.ilInfoScreenGUI.php.

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

Referenced by showSummary().

686  {
688  $lng = $this->lng;
690 
691  include_once("Services/Block/classes/class.ilColumnGUI.php");
692  $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
693  $this->setColumnSettings($column_gui);
694 
695  if ($ilCtrl->getNextClass() == "ilcolumngui" &&
696  $column_gui->getCmdSide() == IL_COL_RIGHT &&
697  $column_gui->getScreenMode() == IL_SCREEN_SIDE) {
698  $html = $ilCtrl->forwardCommand($column_gui);
699  } else {
700  if (!$ilCtrl->isAsynch()) {
701  if ($this->news_enabled) {
702  $html = $ilCtrl->getHTML($column_gui);
703  }
704  }
705  }
706 
707  return $html;
708  }
const IL_COL_RIGHT
setColumnSettings($column_gui)
Set column settings.
global $ilCtrl
Definition: ilias.php:18
Column user interface class.
$ilUser
Definition: imgupload.php:18
const IL_SCREEN_SIDE
$html
Definition: example_001.php:87
+ 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 180 of file class.ilInfoScreenGUI.php.

References $table_class.

Referenced by getHTML().

181  {
182  return $this->table_class;
183  }
+ Here is the caller graph for this function:

◆ getTabs()

ilInfoScreenGUI::getTabs ( $tabs_gui)

get tabs

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

References $access, $ilUser, $rbacsystem, $tabs_gui, and $user.

Referenced by setTabs().

1178  {
1180  $ilUser = $this->user;
1181  $ilAccess = $this->access;
1182 
1183  $next_class = $this->ctrl->getNextClass($this);
1184  $force_active = ($next_class == "ilnotegui")
1185  ? true
1186  : false;
1187 
1188  $tabs_gui->addSubTabTarget(
1189  'summary',
1190  $this->ctrl->getLinkTarget($this, "showSummary"),
1191  array("showSummary", ""),
1192  get_class($this),
1193  "",
1194  $force_active
1195  );
1196  }
$ilUser
Definition: imgupload.php:18
+ Here is the caller graph for this function:

◆ hideFurtherSections()

ilInfoScreenGUI::hideFurtherSections (   $a_add_toggle = true)

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

1249  {
1250  $this->hidden = true;
1251  $this->show_hidden_toggle = (bool) $a_add_toggle;
1252  }

◆ removeFormAction()

ilInfoScreenGUI::removeFormAction ( )

remove form action

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

265  {
266  $this->form_action = "";
267  }

◆ saveProgress()

ilInfoScreenGUI::saveProgress (   $redirect = true)

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

References $_POST, $ilUser, $user, ilLPStatusWrapper\_updateStatus(), getContextObjId(), and ilLPMarks\setCompleted().

1067  {
1068  $ilUser = $this->user;
1069 
1070  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1071 
1072  $lp_marks = new ilLPMarks($this->getContextObjId(), $ilUser->getId());
1073  $lp_marks->setCompleted((bool) $_POST['lp_edit']);
1074  $lp_marks->update();
1075 
1076  require_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1078 
1079  $this->lng->loadLanguageModule('trac');
1080  ilUtil::sendSuccess($this->lng->txt('trac_updated_status'), true);
1081 
1082  if ($redirect) {
1083  $this->ctrl->redirect($this, ""); // #14993
1084  }
1085  }
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.
$ilUser
Definition: imgupload.php:18
setCompleted($a_status)
$_POST["username"]
+ Here is the call graph for this function:

◆ saveTags()

ilInfoScreenGUI::saveTags ( )

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

1233  {
1234  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1235  $tagging_gui = new ilTaggingGUI();
1236  $tagging_gui->setObject(
1237  $this->gui_object->object->getId(),
1238  $this->gui_object->object->getType()
1239  );
1240  $tagging_gui->saveInput();
1241 
1242  ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
1243  $this->ctrl->redirect($this, ""); // #14993
1244 
1245  // return $this->showSummary();
1246  }
Class ilTaggingGUI.

◆ 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 233 of file class.ilInfoScreenGUI.php.

234  {
235  $this->block_property[$a_block_type][$a_property] = $a_value;
236  }

◆ 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 713 of file class.ilInfoScreenGUI.php.

References $access, $lng, and getAllBlockProperties().

Referenced by getCenterColumnHTML(), and getRightColumnHTML().

714  {
715  $lng = $this->lng;
716  $ilAccess = $this->access;
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:

◆ setContentObjType()

ilInfoScreenGUI::setContentObjType ( string  $contentObjType)
Parameters
null | string$contentObjType

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

References $contentObjType.

945  {
946  $this->contentObjType = $contentObjType;
947  }

◆ setContextObjId()

ilInfoScreenGUI::setContextObjId ( int  $contextObjId)
Parameters
int | null$contextObjId

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

References $contextObjId.

925  {
926  $this->contextObjId = $contextObjId;
927  }

◆ setContextRefId()

ilInfoScreenGUI::setContextRefId ( int  $contextRefId)
Parameters
int | null$contextRefId

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

References $contextRefId.

905  {
906  $this->contextRefId = $contextRefId;
907  }

◆ setFormAction()

ilInfoScreenGUI::setFormAction (   $a_form_action)

set a form action

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

Referenced by getHTML().

257  {
258  $this->form_action = $a_form_action;
259  }
+ 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 170 of file class.ilInfoScreenGUI.php.

171  {
172  $this->table_class = $a_val;
173  }

◆ setTabs()

ilInfoScreenGUI::setTabs ( )

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

References $tpl, and getTabs().

Referenced by executeCommand().

1168  {
1169  $tpl = $this->tpl;
1170 
1171  $this->getTabs($this->tabs_gui);
1172  }
getTabs(&$tabs_gui)
get tabs
+ 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 1145 of file class.ilInfoScreenGUI.php.

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

1146  {
1147  if (strlen($a_section)) {
1148  $this->addSection($a_section);
1149  }
1150  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1151  $ldap_mapping = ilLDAPRoleGroupMapping::_getInstance();
1152  if ($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId())) {
1153  $info_combined = '<div style="color:green;">';
1154  $counter = 0;
1155  foreach ($infos as $info_string) {
1156  if ($counter++) {
1157  $info_combined .= '<br />';
1158  }
1159  $info_combined .= $info_string;
1160  }
1161  $info_combined .= '</div>';
1162  $this->addProperty($this->lng->txt('applications'), $info_combined);
1163  }
1164  return true;
1165  }
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 949 of file class.ilInfoScreenGUI.php.

References $ilUser, $rbacsystem, $user, ilObjUserTracking\_enabledLearningProgress(), ilLearningProgress\_getProgress(), ilLPMarks\_hasCompleted(), ilDatePresentation\formatDate(), ilUtil\formSelect(), getContentObjType(), getContextObjId(), ilObjectLP\getInstance(), IL_CAL_UNIX, ilLPObjSettings\LP_MODE_MANUAL, and ilDatePresentation\secondsToString().

Referenced by getHTML().

950  {
953 
954  if (!$rbacsystem->checkAccess('read', $this->getContextRefId())) {
955  return false;
956  }
957  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
958  return false;
959  }
960 
961  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
963  return false;
964  }
965 
966  include_once './Services/Object/classes/class.ilObjectLP.php';
967  $olp = ilObjectLP::getInstance($this->getContextObjId());
968  if ($olp->getCurrentMode() != ilLPObjSettings::LP_MODE_MANUAL) {
969  return false;
970  }
971 
972  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
973 
974  $this->lng->loadLanguageModule('trac');
975 
976  // section header
977  // $a_tpl->setCurrentBlock("header_row");
978  $a_tpl->setVariable(
979  "TXT_SECTION",
980  $this->lng->txt('learning_progress')
981  );
982  $a_tpl->parseCurrentBlock();
983  // $a_tpl->touchBlock("row");
984 
985  // status
986  $i_tpl = new ilTemplate("tpl.lp_edit_manual_info_page.html", true, true, "Services/Tracking");
987  $i_tpl->setVariable("INFO_EDITED", $this->lng->txt("trac_info_edited"));
988  $i_tpl->setVariable("SELECT_STATUS", ilUtil::formSelect(
990  $ilUser->getId(),
991  $this->getContextObjId()
992  ),
993  'lp_edit',
994  array(0 => $this->lng->txt('trac_not_completed'),
995  1 => $this->lng->txt('trac_completed')),
996  false,
997  true
998  ));
999  $i_tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
1000  $a_tpl->setCurrentBlock("pv");
1001  $a_tpl->setVariable("TXT_PROPERTY_VALUE", $i_tpl->get());
1002  $a_tpl->parseCurrentBlock();
1003  $a_tpl->setCurrentBlock("property_row");
1004  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_status'));
1005  $a_tpl->parseCurrentBlock();
1006  // $a_tpl->touchBlock("row");
1007 
1008 
1009  // More infos for lm's
1010  if ($this->getContentObjType() == 'lm' ||
1011  $this->getContentObjType() == 'htlm') {
1012  $a_tpl->setCurrentBlock("pv");
1013 
1014  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
1015  $progress = ilLearningProgress::_getProgress($ilUser->getId(), $this->getContextObjId());
1016  if ($progress['access_time']) {
1017  $a_tpl->setVariable(
1018  "TXT_PROPERTY_VALUE",
1019  ilDatePresentation::formatDate(new ilDateTime($progress['access_time'], IL_CAL_UNIX))
1020  );
1021  } else {
1022  $a_tpl->setVariable(
1023  "TXT_PROPERTY_VALUE",
1024  $this->lng->txt('trac_not_accessed')
1025  );
1026  }
1027 
1028  $a_tpl->parseCurrentBlock();
1029  $a_tpl->setCurrentBlock("property_row");
1030  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_last_access'));
1031  $a_tpl->parseCurrentBlock();
1032  // $a_tpl->touchBlock("row");
1033 
1034  // tags of all users
1035  $a_tpl->setCurrentBlock("pv");
1036  $a_tpl->setVariable(
1037  "TXT_PROPERTY_VALUE",
1038  (int) $progress['visits']
1039  );
1040  $a_tpl->parseCurrentBlock();
1041  $a_tpl->setCurrentBlock("property_row");
1042  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_visits'));
1043  $a_tpl->parseCurrentBlock();
1044  // $a_tpl->touchBlock("row");
1045 
1046 
1047  if ($this->getContentObjType() == 'lm') {
1048  // tags of all users
1049  $a_tpl->setCurrentBlock("pv");
1050  $a_tpl->setVariable(
1051  "TXT_PROPERTY_VALUE",
1052  ilDatePresentation::secondsToString($progress['spent_seconds'])
1053  );
1054  $a_tpl->parseCurrentBlock();
1055  $a_tpl->setCurrentBlock("property_row");
1056  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_spent_time'));
1057  $a_tpl->parseCurrentBlock();
1058  // $a_tpl->touchBlock("row");
1059  }
1060  }
1061 
1062  // #10493
1063  $a_tpl->touchBlock("row");
1064  }
static _hasCompleted($a_usr_id, $a_obj_id)
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
static _enabledLearningProgress()
check wether learing progress is enabled or not
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
special template class to simplify handling of ITX/PEAR
Date and time handling
$ilUser
Definition: imgupload.php:18
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.
static getInstance($a_obj_id)
static _getProgress($a_user_id, $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 1091 of file class.ilInfoScreenGUI.php.

References $access, $html, $ilSetting, $settings, and ilNoteGUI\enablePublicNotes().

Referenced by getHTML().

1092  {
1093  $ilAccess = $this->access;
1095 
1096  $next_class = $this->ctrl->getNextClass($this);
1097  include_once("Services/Notes/classes/class.ilNoteGUI.php");
1098  $notes_gui = new ilNoteGUI(
1099  $this->gui_object->object->getId(),
1100  0,
1101  $this->gui_object->object->getType()
1102  );
1103 
1104  // global switch
1105  if ($ilSetting->get("disable_comments")) {
1106  $notes_gui->enablePublicNotes(false);
1107  } else {
1108  $ref_id = $this->gui_object->object->getRefId();
1109  $has_write = $ilAccess->checkAccess("write", "", $ref_id);
1110 
1111  if ($has_write && $ilSetting->get("comments_del_tutor", 1)) {
1112  $notes_gui->enablePublicNotesDeletion(true);
1113  }
1114 
1115  /* should probably be discussed further
1116  for now this will only work properly with comments settings
1117  (see ilNoteGUI constructor)
1118  */
1119  if ($has_write ||
1120  $ilAccess->checkAccess("edit_permissions", "", $ref_id)) {
1121  $notes_gui->enableCommentsSettings();
1122  }
1123  }
1124 
1125  /* moved to action menu
1126  $notes_gui->enablePrivateNotes();
1127  */
1128 
1129  if ($next_class == "ilnotegui") {
1130  $html = $this->ctrl->forwardCommand($notes_gui);
1131  } else {
1132  $html = $notes_gui->getNotesHTML();
1133  }
1134 
1135  return $html;
1136  }
enablePublicNotes($a_enable=true)
enable public notes
Notes GUI class.
global $ilSetting
Definition: privfeed.php:17
$html
Definition: example_001.php:87
+ 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 639 of file class.ilInfoScreenGUI.php.

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

Referenced by executeCommand().

640  {
641  $tpl = $this->tpl;
642  $ilAccess = $this->access;
643 
644  $tpl->setContent($this->getCenterColumnHTML());
645  $tpl->setRightContent($this->getRightColumnHTML());
646  }
getCenterColumnHTML()
Display center column.
getRightColumnHTML()
Display right column.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilInfoScreenGUI::$access
protected

◆ $close_form_tag

ilInfoScreenGUI::$close_form_tag = true

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

◆ $contentObjType

ilInfoScreenGUI::$contentObjType = null
protected

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

Referenced by getContentObjType(), and setContentObjType().

◆ $contextObjId

ilInfoScreenGUI::$contextObjId = null
protected

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

Referenced by getContextObjId(), and setContextObjId().

◆ $contextRefId

ilInfoScreenGUI::$contextRefId = null
protected

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

Referenced by getContextRefId(), and setContextRefId().

◆ $ctrl

ilInfoScreenGUI::$ctrl

◆ $form_action

ilInfoScreenGUI::$form_action

a form action parameter.

if set a form is generated

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

◆ $gui_object

ilInfoScreenGUI::$gui_object

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

◆ $hiddenelements

ilInfoScreenGUI::$hiddenelements = array()

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

◆ $lng

◆ $open_form_tag

ilInfoScreenGUI::$open_form_tag = true

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

◆ $rbacsystem

ilInfoScreenGUI::$rbacsystem
protected

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

Referenced by executeCommand(), getTabs(), and showLearningProgress().

◆ $settings

ilInfoScreenGUI::$settings
protected

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

Referenced by getHTML(), and showNotesSection().

◆ $table_class

ilInfoScreenGUI::$table_class = "il_InfoScreen"

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

Referenced by getTableClass().

◆ $tabs_gui

ilInfoScreenGUI::$tabs_gui
protected

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

Referenced by getTabs().

◆ $top_buttons

ilInfoScreenGUI::$top_buttons = array()

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

◆ $top_formbuttons

ilInfoScreenGUI::$top_formbuttons = array()

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

◆ $tpl

ilInfoScreenGUI::$tpl
protected

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

Referenced by executeCommand(), getHTML(), setTabs(), and showSummary().

◆ $tree

ilInfoScreenGUI::$tree
protected

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

Referenced by addObjectSections(), addPreconditionSection(), and getHTML().

◆ $user

ilInfoScreenGUI::$user
protected

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