ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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...
 
 enableAvailability ($a_enable=true)
 enable availability More...
 
 enableBookingInfo ($a_enable=true)
 booking info 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 ()
 
 addAccessPeriodProperty ()
 Add access period property. More...
 

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

 addAvailability ()
 Add preconditions. More...
 
 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
 
 $booking_enabled = false
 
 $availability_enabled = true
 

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

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

103  {
104  global $DIC;
105 
106  $this->rbacsystem = $DIC->rbac()->system();
107  $this->tpl = $DIC["tpl"];
108  $this->access = $DIC->access();
109  $this->user = $DIC->user();
110  $this->tree = $DIC->repositoryTree();
111  $this->settings = $DIC->settings();
112  $ilCtrl = $DIC->ctrl();
113  $lng = $DIC->language();
114  $ilTabs = $DIC->tabs();
115 
116  $this->ctrl = $ilCtrl;
117  $this->lng = $lng;
118  $this->tabs_gui = $ilTabs;
119  $this->gui_object = $a_gui_object;
120  $this->sec_nr = 0;
121  $this->private_notes_enabled = false;
122  $this->news_enabled = false;
123  $this->feedback_enabled = false;
124  $this->learning_progress_enabled = false;
125  $this->form_action = "";
126  $this->top_formbuttons = array();
127  $this->hiddenelements = array();
128  }
settings()
Definition: settings.php:2
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ addAccessPeriodProperty()

ilInfoScreenGUI::addAccessPeriodProperty ( )

Add access period property.

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

References addProperty(), ilDatePresentation\formatPeriod(), IL_CAL_UNIX, and ilObjectActivation\TIMINGS_ACTIVATION.

Referenced by addAvailability().

1427  : void
1428  {
1429  $a_obj = $this->gui_object->object;
1430 
1431  $this->lng->loadLanguageModule("rep");
1432  $this->lng->loadLanguageModule("crs");
1433 
1434  // links to the object
1435  if (is_object($a_obj)) {
1436  $act = new ilObjectActivation();
1437  $act->read($a_obj->getRefId());
1438  if ($act->getTimingType() == ilObjectActivation::TIMINGS_ACTIVATION)
1439  {
1440  $this->addProperty(
1441  $this->lng->txt('rep_activation_access'),
1443  new ilDateTime($act->getTimingStart(), IL_CAL_UNIX),
1444  new ilDateTime($act->getTimingEnd(), IL_CAL_UNIX)
1445  )
1446  );
1447  } else {
1448  $this->addProperty(
1449  $this->lng->txt('rep_activation_access'),
1450  $this->lng->txt('crs_visibility_limitless')
1451  );
1452  }
1453  }
1454  }
const IL_CAL_UNIX
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
addProperty($a_name, $a_value, $a_link="")
add a property to current section
Class ilObjectActivation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addAvailability()

ilInfoScreenGUI::addAvailability ( )
protected

Add preconditions.

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

References addAccessPeriodProperty(), addSection(), and ilObjectActivation\TIMINGS_ACTIVATION.

Referenced by getHTML().

1301  {
1302  if (!is_object($this->gui_object) || !is_object($this->gui_object->object)) {
1303  return;
1304  }
1305 
1306  $obj = $this->gui_object->object;
1307  if ($obj->getRefId() <= 0) {
1308  return;
1309  }
1310 
1311  $act = new ilObjectActivation();
1312  $act->read($obj->getRefId());
1313  if ($act->getTimingType() == ilObjectActivation::TIMINGS_ACTIVATION) {
1314  $this->lng->loadLanguageModule("rep");
1315  $this->addSection($this->lng->txt("rep_activation_availability"));
1316  $this->addAccessPeriodProperty();
1317  }
1318  }
addSection($a_title)
add a new section
addAccessPeriodProperty()
Add access period property.
Class ilObjectActivation.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addButton()

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

add a property to current section

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

Referenced by getHTML().

357  {
358  if ($a_position == "top") {
359  $this->top_buttons[] =
360  array("title" => $a_title,"link" => $a_link,"target" => $a_frame,"primary" => $a_primary);
361  }
362  }
+ 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 368 of file class.ilInfoScreenGUI.php.

369  {
370  if ($a_position == "top") {
371  array_push(
372  $this->top_formbuttons,
373  array("command" => $a_command, "title" => $a_title)
374  );
375  }
376  }

◆ addHiddenElement()

ilInfoScreenGUI::addHiddenElement (   $a_name,
  $a_value 
)

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

379  {
380  array_push($this->hiddenelements, array("name" => $a_name, "value" => $a_value));
381  }

◆ addMetaDataSections()

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

add standard meta data sections

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

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

387  {
388  $lng = $this->lng;
389 
390  $lng->loadLanguageModule("meta");
391 
392  include_once("./Services/MetaData/classes/class.ilMD.php");
393  $md = new ilMD($a_rep_obj_id, $a_obj_id, $a_type);
394 
395  if ($md_gen = $md->getGeneral()) {
396  // get first descrption
397  // The description is shown on the top of the page.
398  // Thus it is not necessary to show it again.
399  foreach ($md_gen->getDescriptionIds() as $id) {
400  $md_des = $md_gen->getDescription($id);
401  $description = $md_des->getDescription();
402  break;
403  }
404 
405  // get language(s)
406  $langs = array();
407  foreach ($ids = $md_gen->getLanguageIds() as $id) {
408  $md_lan = $md_gen->getLanguage($id);
409  if ($md_lan->getLanguageCode() != "") {
410  $langs[] = $lng->txt("meta_l_" . $md_lan->getLanguageCode());
411  }
412  }
413  $langs = implode(", ", $langs);
414 
415  // keywords
416  $keywords = array();
417  foreach ($ids = $md_gen->getKeywordIds() as $id) {
418  $md_key = $md_gen->getKeyword($id);
419  $keywords[] = $md_key->getKeyword();
420  }
421  $keywords = implode(", ", $keywords);
422  }
423 
424  // authors
425  if (is_object($lifecycle = $md->getLifecycle())) {
426  $sep = $author = "";
427  foreach (($ids = $lifecycle->getContributeIds()) as $con_id) {
428  $md_con = $lifecycle->getContribute($con_id);
429  if ($md_con->getRole() == "Author") {
430  foreach ($ent_ids = $md_con->getEntityIds() as $ent_id) {
431  $md_ent = $md_con->getEntity($ent_id);
432  $author = $author . $sep . $md_ent->getEntity();
433  $sep = ", ";
434  }
435  }
436  }
437  }
438 
439  // copyright
440  $copyright = "";
441  if (is_object($rights = $md->getRights())) {
442  include_once('Services/MetaData/classes/class.ilMDUtils.php');
443  $copyright = ilMDUtils::_parseCopyright($rights->getDescription());
444  }
445 
446  // learning time
447  #if(is_object($educational = $md->getEducational()))
448  #{
449  # $learning_time = $educational->getTypicalLearningTime();
450  #}
451  $learning_time = "";
452  if (is_object($educational = $md->getEducational())) {
453  if ($seconds = $educational->getTypicalLearningTimeSeconds()) {
454  $learning_time = ilDatePresentation::secondsToString($seconds);
455  }
456  }
457 
458 
459  // output
460 
461  // description
462  if ($description != "") {
463  $this->addSection($lng->txt("description"));
464  $this->addProperty("", nl2br($description));
465  }
466 
467  // general section
468  $this->addSection($lng->txt("meta_general"));
469  if ($langs != "") { // language
470  $this->addProperty(
471  $lng->txt("language"),
472  $langs
473  );
474  }
475  if ($keywords != "") { // keywords
476  $this->addProperty(
477  $lng->txt("keywords"),
478  $keywords
479  );
480  }
481  if ($author != "") { // author
482  $this->addProperty(
483  $lng->txt("author"),
484  $author
485  );
486  }
487  if ($copyright != "") { // copyright
488  $this->addProperty(
489  $lng->txt("meta_copyright"),
490  $copyright
491  );
492  }
493  if ($learning_time != "") { // typical learning time
494  $this->addProperty(
495  $lng->txt("meta_typical_learning_time"),
496  $learning_time
497  );
498  }
499  }
static _parseCopyright($a_copyright)
Parse copyright.
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 504 of file class.ilInfoScreenGUI.php.

References $access, $ctrl, $ilCtrl, $ilUser, $lng, $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().

505  {
506  $lng = $this->lng;
509  $ilAccess = $this->access;
510  $tree = $this->tree;
511 
512  // ressource bookings
513  if ($this->booking_enabled) {
514  $booking_adapter = new ilBookingInfoScreenAdapter($this);
515  $booking_adapter->add();
516  }
517 
518  $this->addSection($lng->txt("additional_info"));
519  $a_obj = $this->gui_object->object;
520 
521  // links to the object
522  if (is_object($a_obj)) {
523  // permanent link
524  $type = $a_obj->getType();
525  $ref_id = $a_obj->getRefId();
526 
527  if ($ref_id) {
528  include_once 'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
529  if (ilECSServerSettings::getInstance()->activeServerExists()) {
530  $this->addProperty(
531  $lng->txt("object_id"),
532  $a_obj->getId()
533  );
534  }
535 
536  include_once 'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
537  $pm = new ilPermanentLinkGUI($type, $ref_id);
538  $pm->setIncludePermanentLinkText(false);
539  $pm->setAlignCenter(false);
540  $this->addProperty(
541  $lng->txt("perma_link"),
542  $pm->getHTML(),
543  ""
544  );
545 
546  // links to resource
547  if ($ilAccess->checkAccess("write", "", $ref_id) ||
548  $ilAccess->checkAccess("edit_permissions", "", $ref_id)) {
549  $obj_id = $a_obj->getId();
550  $rs = ilObject::_getAllReferences($obj_id);
551  $refs = array();
552  foreach ($rs as $r) {
553  if ($tree->isInTree($r)) {
554  $refs[] = $r;
555  }
556  }
557  if (count($refs) > 1) {
558  $links = $sep = "";
559  foreach ($refs as $r) {
560  $cont_loc = new ilLocatorGUI();
561  $cont_loc->addContextItems($r, true);
562  $links .= $sep . $cont_loc->getHTML();
563  $sep = "<br />";
564  }
565 
566  $this->addProperty(
567  $lng->txt("res_links"),
568  '<div class="small">' . $links . '</div>'
569  );
570  }
571  }
572  }
573  }
574 
575 
576  // creation date
577  $this->addProperty(
578  $lng->txt("create_date"),
579  ilDatePresentation::formatDate(new ilDateTime($a_obj->getCreateDate(), IL_CAL_DATETIME))
580  );
581 
582  // owner
583  if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner()) {
584  include_once './Services/Object/classes/class.ilObjectFactory.php';
585  include_once './Services/User/classes/class.ilObjUser.php';
586 
587  if (ilObjUser::userExists(array($a_obj->getOwner()))) {
588  $ownerObj = ilObjectFactory::getInstanceByObjId($a_obj->getOwner(), false);
589  } else {
590  $ownerObj = ilObjectFactory::getInstanceByObjId(6, false);
591  }
592 
593  if (!is_object($ownerObj) || $ownerObj->getType() != "usr") { // root user deleted
594  $this->addProperty($lng->txt("owner"), $lng->txt("no_owner"));
595  } elseif ($ownerObj->hasPublicProfile()) {
596  $ilCtrl->setParameterByClass("ilpublicuserprofilegui", "user_id", $ownerObj->getId());
597  $this->addProperty($lng->txt("owner"), $ownerObj->getPublicName(), $ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML"));
598  } else {
599  $this->addProperty($lng->txt("owner"), $ownerObj->getPublicName());
600  }
601  }
602 
603  // disk usage
604  if ($ilUser->getId() != ANONYMOUS_USER_ID &&
606  $size = $a_obj->getDiskUsage();
607  if ($size !== null) {
608  $this->addProperty($lng->txt("disk_usage"), ilUtil::formatSize($size, 'long'));
609  }
610  }
611  // change event
612  require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
613  if (ilChangeEvent::_isActive()) {
614  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
615  $readEvents = ilChangeEvent::_lookupReadEvents($a_obj->getId());
616  $count_users = 0;
617  $count_members = 0;
618  $count_user_reads = 0;
619  $count_anonymous_reads = 0;
620  foreach ($readEvents as $evt) {
621  if ($evt['usr_id'] == ANONYMOUS_USER_ID) {
622  $count_anonymous_reads += $evt['read_count'];
623  } else {
624  $count_user_reads += $evt['read_count'];
625  $count_users++;
626  /* to do: if ($evt['user_id'] is member of $this->getRefId())
627  {
628  $count_members++;
629  }*/
630  }
631  }
632  if ($count_anonymous_reads > 0) {
633  $this->addProperty($this->lng->txt("readcount_anonymous_users"), $count_anonymous_reads);
634  }
635  if ($count_user_reads > 0) {
636  $this->addProperty($this->lng->txt("readcount_users"), $count_user_reads);
637  }
638  if ($count_users > 0) {
639  $this->addProperty($this->lng->txt("accesscount_registered_users"), $count_users);
640  }
641  }
642  }
643  // END ChangeEvent: Display change event info
644 
645  // WebDAV: Display locking information
646  require_once('Services/WebDAV/classes/class.ilDAVActivationChecker.php');
648  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
649  require_once 'Services/WebDAV/classes/lock/class.ilWebDAVLockBackend.php';
650  $webdav_lock_backend = new ilWebDAVLockBackend();
651 
652  // Show lock info
653  if ($ilUser->getId() != ANONYMOUS_USER_ID) {
654  if ($lock = $webdav_lock_backend->getLocksOnObjectId($this->gui_object->object->getId())) {
655  $lock_user = new ilObjUser($lock->getIliasOwner());
656  $this->addProperty(
657  $this->lng->txt("in_use_by"),
658  $lock_user->getPublicName(),
659  "./ilias.php?user=" . $lock_user->getId() . '&cmd=showUserProfile&cmdClass=ildashboardgui&cmdNode=1&baseClass=ilDashboardGUI'
660  );
661  }
662  }
663  }
664  }
665  }
$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
Embeds booking information into info screen.
$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.
+ 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 1323 of file class.ilInfoScreenGUI.php.

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

Referenced by getHTML().

1324  {
1325  if (!is_object($this->gui_object) || !is_object($this->gui_object->object)) {
1326  return;
1327  }
1328 
1329  $obj = $this->gui_object->object;
1330  if ($obj->getRefId() <= 0) {
1331  return;
1332  }
1333 
1334  $conditions = ilConditionHandler::_getEffectiveConditionsOfTarget($obj->getRefId(), $obj->getId());
1335 
1336  if (sizeof($conditions)) {
1337  for ($i = 0; $i < count($conditions); $i++) {
1338  $conditions[$i]['title'] = ilObject::_lookupTitle($conditions[$i]['trigger_obj_id']);
1339  }
1340  $conditions = ilUtil::sortArray($conditions, 'title', 'DESC');
1341 
1342  // Show obligatory and optional preconditions seperated
1343  $this->addPreconditionSection($obj, $conditions, true);
1344  $this->addPreconditionSection($obj, $conditions, false);
1345  }
1346  }
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: metadata.php:24
+ 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 1348 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().

1349  {
1350  $lng = $this->lng;
1351  $tree = $this->tree;
1352 
1353  $num_required = ilConditionHandler::calculateEffectiveRequiredTriggers($obj->getRefId(), $obj->getId());
1354  $num_optional_required =
1355  $num_required - count($conditions) + count(ilConditionHandler::getEffectiveOptionalConditionsOfTarget($obj->getRefId(), $obj->getId()));
1356 
1357  // Check if all conditions are fullfilled
1358  $visible_conditions = array();
1359  $passed_optional = 0;
1360  foreach ($conditions as $condition) {
1361  if ($obligatory and !$condition['obligatory']) {
1362  continue;
1363  }
1364  if (!$obligatory and $condition['obligatory']) {
1365  continue;
1366  }
1367 
1368  if ($tree->isDeleted($condition['trigger_ref_id'])) {
1369  continue;
1370  }
1371 
1372  $ok = ilConditionHandler::_checkCondition($condition) and
1373  !ilMemberViewSettings::getInstance()->isActive();
1374 
1375  if (!$ok) {
1376  $visible_conditions[] = $condition['id'];
1377  }
1378 
1379  if (!$obligatory and $ok) {
1380  ++$passed_optional;
1381  // optional passed
1382  if ($passed_optional >= $num_optional_required) {
1383  return true;
1384  }
1385  }
1386  }
1387 
1388  $properties = [];
1389 
1390  foreach ($conditions as $condition) {
1391  if (!in_array($condition['id'], $visible_conditions)) {
1392  continue;
1393  }
1394 
1395  $missing_cond_exist = true;
1396 
1397  $properties[] = [
1399  $condition['trigger_obj_id'],
1400  $condition['operator']
1401  ) . ' ' . $condition['value'],
1402  "title" => ilObject::_lookupTitle($condition['trigger_obj_id']),
1403  "link" => ilLink::_getLink($condition['trigger_ref_id'])
1404  ];
1405  }
1406 
1407  if (count($properties) > 0) {
1408  if ($obligatory) {
1409  $this->addSection($lng->txt("preconditions_obligatory_hint"));
1410  } else {
1411  $this->addSection(sprintf($lng->txt("preconditions_optional_hint"), $num_optional_required));
1412  }
1413 
1414  foreach ($properties as $p) {
1415  $this->addProperty(
1416  $p["condition"],
1417  "<a href='".$p["link"]."'>".$p["title"]."</a>"
1418  );
1419  }
1420 
1421  }
1422  }
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.
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 304 of file class.ilInfoScreenGUI.php.

Referenced by addAccessPeriodProperty(), 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().

305  {
306  $this->section[$this->sec_nr]["properties"][] =
307  array("name" => $a_name, "value" => $a_value,
308  "link" => $a_link);
309  }
+ 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 314 of file class.ilInfoScreenGUI.php.

315  {
316  $checkbox = "<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
317  if ($a_checkbox_checked) {
318  $checkbox .= " checked=\"checked\"";
319  }
320  $checkbox .= " />";
321  if (strlen($a_checkbox_label)) {
322  $checkbox .= "&nbsp;<label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
323  }
324  $this->section[$this->sec_nr]["properties"][] =
325  array("name" => $a_name, "value" => $checkbox);
326  }

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

References ilUtil\prepareFormOutput().

332  {
333  $input = "<span class=\"form-inline\"><input class=\"form-control\" type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
334  if (strlen($a_input_value)) {
335  $input .= " value=\"" . ilUtil::prepareFormOutput($a_input_value) . "\"";
336  }
337  if (strlen($a_input_size)) {
338  $input .= " size=\"" . $a_input_size . "\"";
339  }
340  $input .= " />";
341  if (strlen($direct_button_command) && strlen($direct_button_label)) {
342  $css = "";
343  if ($direct_button_primary) {
344  $css = " btn-primary";
345  }
346  $input .= " <input type=\"submit\" class=\"btn btn-default" . $css . "\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
347  }
348  $input .= "</span>";
349  $this->section[$this->sec_nr]["properties"][] =
350  array("name" => "<label for=\"$a_input_name\">$a_name</label>", "value" => $input);
351  }
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 1237 of file class.ilInfoScreenGUI.php.

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

Referenced by getHTML().

1238  {
1239  $lng = $this->lng;
1240  $ilCtrl = $this->ctrl;
1241 
1242  $lng->loadLanguageModule("tagging");
1243  $tags_set = new ilSetting("tags");
1244 
1245  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1246  $tagging_gui = new ilTaggingGUI();
1247  $tagging_gui->setObject(
1248  $this->gui_object->object->getId(),
1249  $this->gui_object->object->getType()
1250  );
1251 
1252  $this->addSection($lng->txt("tagging_tags"));
1253 
1254  if ($tags_set->get("enable_all_users")) {
1255  $this->addProperty(
1256  $lng->txt("tagging_all_users"),
1257  $tagging_gui->getAllUserTagsForObjectHTML()
1258  );
1259  }
1260 
1261  $this->addProperty(
1262  $lng->txt("tagging_my_tags"),
1263  $tagging_gui->getTaggingInputHTML()
1264  );
1265  }
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:

◆ enableAvailability()

ilInfoScreenGUI::enableAvailability (   $a_enable = true)

enable availability

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

216  {
217  $this->availability_enabled = $a_enable;
218  }

◆ enableBookingInfo()

ilInfoScreenGUI::enableBookingInfo (   $a_enable = true)

booking info

Parameters
bool$a_enable

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

225  {
226  $this->booking_enabled = $a_enable;
227  }

◆ enableFeedback()

ilInfoScreenGUI::enableFeedback (   $a_enable = true)

enable feedback

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

234  {
235  $this->feedback_enabled = $a_enable;
236  }

◆ enableLearningProgress()

ilInfoScreenGUI::enableLearningProgress (   $a_enable = true)

enable learning progress

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

208  {
209  $this->learning_progress_enabled = $a_enable;
210  }

◆ enableNews()

ilInfoScreenGUI::enableNews (   $a_enable = true)

enable news

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

242  {
243  $this->news_enabled = $a_enable;
244  }

◆ enableNewsEditing()

ilInfoScreenGUI::enableNewsEditing (   $a_enable = true)

enable news editing

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

250  {
251  $this->news_editing = $a_enable;
252  }

◆ enablePrivateNotes()

ilInfoScreenGUI::enablePrivateNotes (   $a_enable = true)

enable notes

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

200  {
201  $this->private_notes_enabled = $a_enable;
202  }

◆ executeCommand()

ilInfoScreenGUI::executeCommand ( )

execute command

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

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

134  {
136  $tpl = $this->tpl;
137  $ilAccess = $this->access;
138 
139  $next_class = $this->ctrl->getNextClass($this);
140 
141  $cmd = $this->ctrl->getCmd("showSummary");
142  $this->ctrl->setReturn($this, "showSummary");
143 
144  $this->setTabs();
145 
146  switch ($next_class) {
147  case "ilnotegui":
148  $this->showSummary(); // forwards command
149  break;
150 
151  case "ilcolumngui":
152  $this->showSummary();
153  break;
154 
155  case "ilpublicuserprofilegui":
156  include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
157  $user_profile = new ilPublicUserProfileGUI($_GET["user_id"]);
158  $user_profile->setBackUrl($this->ctrl->getLinkTarget($this, "showSummary"));
159  $html = $this->ctrl->forwardCommand($user_profile);
160  $tpl->setContent($html);
161  break;
162 
163  case "ilcommonactiondispatchergui":
164  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
166  $this->ctrl->forwardCommand($gui);
167  break;
168 
169  default:
170  return $this->$cmd();
171  break;
172  }
173  return true;
174  }
$_GET["client_id"]
showSummary()
show summary page
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 266 of file class.ilInfoScreenGUI.php.

Referenced by setColumnSettings().

267  {
268  return $this->block_property;
269  }
+ Here is the caller graph for this function:

◆ getCenterColumnHTML()

ilInfoScreenGUI::getCenterColumnHTML ( )

Display center column.

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

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

Referenced by showSummary().

684  {
686 
687  include_once("Services/Block/classes/class.ilColumnGUI.php");
688  $column_gui = new ilColumnGUI("info", IL_COL_CENTER);
689  $this->setColumnSettings($column_gui);
690 
691  if (!$ilCtrl->isAsynch()) {
692  if ($column_gui->getScreenMode() != IL_SCREEN_SIDE) {
693  // right column wants center
694  if ($column_gui->getCmdSide() == IL_COL_RIGHT) {
695  $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
696  $this->setColumnSettings($column_gui);
697  $html = $ilCtrl->forwardCommand($column_gui);
698  }
699  // left column wants center
700  if ($column_gui->getCmdSide() == IL_COL_LEFT) {
701  $column_gui = new ilColumnGUI("info", IL_COL_LEFT);
702  $this->setColumnSettings($column_gui);
703  $html = $ilCtrl->forwardCommand($column_gui);
704  }
705  } else {
706  $html = $this->getHTML();
707  }
708  }
709 
710  return $html;
711  }
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:

◆ getContentObjType()

ilInfoScreenGUI::getContentObjType ( )
Returns
null|string

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

References $contentObjType.

Referenced by showLearningProgress().

967  : string
968  {
969  if ($this->contentObjType !== null) {
970  return $this->contentObjType;
971  }
972 
973  return $this->gui_object->object->getType();
974  }
+ Here is the caller graph for this function:

◆ getContextObjId()

ilInfoScreenGUI::getContextObjId ( )
Returns
int|null

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

References $contextObjId.

Referenced by saveProgress(), and showLearningProgress().

947  : int
948  {
949  if ($this->contextObjId !== null) {
950  return $this->contextObjId;
951  }
952 
953  return $this->gui_object->object->getId();
954  }
+ Here is the caller graph for this function:

◆ getContextRefId()

ilInfoScreenGUI::getContextRefId ( )
Returns
int|null

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

References $contextRefId.

927  : int
928  {
929  if ($this->contextRefId !== null) {
930  return $this->contextRefId;
931  }
932 
933  return $this->gui_object->object->getRefId();
934  }

◆ getHiddenToggleButton()

ilInfoScreenGUI::getHiddenToggleButton ( )

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

References $lng.

1290  {
1291  $lng = $this->lng;
1292 
1293  return "<a onClick=\"toggleSections(this, '" . $lng->txt("show_hidden_sections") . "', '" . $lng->txt("hide_visible_sections") . "'); return false;\" href=\"#\">" . $lng->txt("show_hidden_sections") . "</a>";
1294  }

◆ getHTML()

ilInfoScreenGUI::getHTML ( )

get html

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

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

Referenced by getCenterColumnHTML().

768  {
769  $lng = $this->lng;
771  $tree = $this->tree;
772  $ilAccess = $this->access;
775 
776  $tpl = new ilTemplate("tpl.infoscreen.html", true, true, "Services/InfoScreen");
777 
778  // other class handles form action (@todo: this is not implemented/tested)
779  if ($this->form_action == "") {
780  $this->setFormAction($ilCtrl->getFormAction($this));
781  }
782 
783  require_once 'Services/jQuery/classes/class.iljQueryUtil.php';
785 
786  if ($this->hidden) {
787  $tpl->touchBlock("hidden_js");
788  if ($this->show_hidden_toggle) {
789  $this->addButton($lng->txt("show_hidden_sections"), "JavaScript:toggleSections(this, '" . $lng->txt("show_hidden_sections") . "', '" . $lng->txt("hide_visible_sections") . "');");
790  }
791  }
792 
793 
794  // DEPRECATED - use ilToolbarGUI
795 
796  // add top buttons
797  if (count($this->top_buttons) > 0) {
798  $tpl->addBlockfile("TOP_BUTTONS", "top_buttons", "tpl.buttons.html");
799 
800  foreach ($this->top_buttons as $button) {
801  // view button
802  $tpl->setCurrentBlock("btn_cell");
803  $tpl->setVariable("BTN_LINK", $button["link"]);
804  $tpl->setVariable("BTN_TARGET", $button["target"]);
805  $tpl->setVariable("BTN_TXT", $button["title"]);
806  if ($button["primary"]) {
807  $tpl->setVariable("BTN_CLASS", " btn-primary");
808  }
809  $tpl->parseCurrentBlock();
810  }
811  }
812 
813  // add top formbuttons
814  if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0)) {
815  $tpl->addBlockfile("TOP_FORMBUTTONS", "top_submitbuttons", "tpl.submitbuttons.html", "Services/InfoScreen");
816 
817  foreach ($this->top_formbuttons as $button) {
818  // view button
819  $tpl->setCurrentBlock("btn_submit_cell");
820  $tpl->setVariable("BTN_COMMAND", $button["command"]);
821  $tpl->setVariable("BTN_NAME", $button["title"]);
822  $tpl->parseCurrentBlock();
823  }
824  }
825 
826  // add form action
827  if (strlen($this->form_action) > 0) {
828  if ($this->open_form_tag) {
829  $tpl->setCurrentBlock("formtop");
830  $tpl->setVariable("FORMACTION", $this->form_action);
831  $tpl->parseCurrentBlock();
832  }
833 
834  if ($this->close_form_tag) {
835  $tpl->touchBlock("formbottom");
836  }
837  }
838 
839  if (count($this->hiddenelements)) {
840  foreach ($this->hiddenelements as $hidden) {
841  $tpl->setCurrentBlock("hidden_element");
842  $tpl->setVariable("HIDDEN_NAME", $hidden["name"]);
843  $tpl->setVariable("HIDDEN_VALUE", $hidden["value"]);
844  $tpl->parseCurrentBlock();
845  }
846  }
847 
848  if ($this->availability_enabled) {
849  $this->addAvailability();
850  }
851 
852  $this->addPreconditions();
853 
854  // learning progress
855  if ($this->learning_progress_enabled and $html = $this->showLearningProgress($tpl)) {
856  $tpl->setCurrentBlock("learning_progress");
857  $tpl->setVariable("LP_TABLE", $html);
858  $tpl->parseCurrentBlock();
859  }
860 
861  // notes section
862  if ($this->private_notes_enabled && !$ilSetting->get('disable_notes')) {
863  $html = $this->showNotesSection();
864  $tpl->setCurrentBlock("notes");
865  $tpl->setVariable("NOTES", $html);
866  $tpl->parseCurrentBlock();
867  }
868 
869  // tagging
870  if (is_object($this->gui_object->object)) {
871  $tags_set = new ilSetting("tags");
872  if ($tags_set->get("enable") && $ilUser->getId() != ANONYMOUS_USER_ID) {
873  $this->addTagging();
874  }
875  }
876 
877  if (is_object($this->gui_object->object)) {
878  $this->addObjectSections();
879  }
880 
881  // render all sections
882  for ($i = 1; $i <= $this->sec_nr; $i++) {
883  if (is_array($this->section[$i]["properties"])) {
884  // section properties
885  foreach ($this->section[$i]["properties"] as $property) {
886  if ($property["name"] != "") {
887  if ($property["link"] == "") {
888  $tpl->setCurrentBlock("pv");
889  $tpl->setVariable("TXT_PROPERTY_VALUE", $property["value"]);
890  $tpl->parseCurrentBlock();
891  } else {
892  $tpl->setCurrentBlock("lpv");
893  $tpl->setVariable("TXT_PROPERTY_LVALUE", $property["value"]);
894  $tpl->setVariable("LINK_PROPERTY_VALUE", $property["link"]);
895  $tpl->parseCurrentBlock();
896  }
897  $tpl->setCurrentBlock("property_row");
898  $tpl->setVariable("TXT_PROPERTY", $property["name"]);
899  $tpl->parseCurrentBlock();
900  } else {
901  $tpl->setCurrentBlock("property_full_row");
902  $tpl->setVariable("TXT_PROPERTY_FULL_VALUE", $property["value"]);
903  $tpl->parseCurrentBlock();
904  }
905  }
906 
907  // section header
908  if ($this->section[$i]["hidden"]) {
909  $tpl->setVariable("SECTION_HIDDEN", " style=\"display:none;\"");
910  $tpl->setVariable("SECTION_ID", "hidable_" . $i);
911  } else {
912  $tpl->setVariable("SECTION_ID", $i);
913  }
914  $tpl->setVariable("TCLASS", $this->getTableClass());
915  $tpl->setVariable("TXT_SECTION", $this->section[$i]["title"]);
916  $tpl->setCurrentBlock("row");
917  $tpl->parseCurrentBlock();
918  }
919  }
920 
921  return $tpl->get();
922  }
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
showNotesSection()
show notes section
$ilUser
Definition: imgupload.php:18
addAvailability()
Add preconditions.
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
global $ilSetting
Definition: privfeed.php:17
addObjectSections()
add standard object section
$i
Definition: metadata.php:24
+ 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 716 of file class.ilInfoScreenGUI.php.

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

Referenced by showSummary().

717  {
719  $lng = $this->lng;
721 
722  include_once("Services/Block/classes/class.ilColumnGUI.php");
723  $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
724  $this->setColumnSettings($column_gui);
725 
726  if ($ilCtrl->getNextClass() == "ilcolumngui" &&
727  $column_gui->getCmdSide() == IL_COL_RIGHT &&
728  $column_gui->getScreenMode() == IL_SCREEN_SIDE) {
729  $html = $ilCtrl->forwardCommand($column_gui);
730  } else {
731  if (!$ilCtrl->isAsynch()) {
732  if ($this->news_enabled) {
733  $html = $ilCtrl->getHTML($column_gui);
734  }
735  }
736  }
737 
738  return $html;
739  }
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
+ 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 191 of file class.ilInfoScreenGUI.php.

References $table_class.

Referenced by getHTML().

192  {
193  return $this->table_class;
194  }
+ Here is the caller graph for this function:

◆ getTabs()

ilInfoScreenGUI::getTabs ( $tabs_gui)

get tabs

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

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

Referenced by setTabs().

1213  {
1215  $ilUser = $this->user;
1216  $ilAccess = $this->access;
1217 
1218  $next_class = $this->ctrl->getNextClass($this);
1219  $force_active = ($next_class == "ilnotegui")
1220  ? true
1221  : false;
1222 
1223  $tabs_gui->addSubTabTarget(
1224  'summary',
1225  $this->ctrl->getLinkTarget($this, "showSummary"),
1226  array("showSummary", ""),
1227  get_class($this),
1228  "",
1229  $force_active
1230  );
1231  }
$ilUser
Definition: imgupload.php:18
+ Here is the caller graph for this function:

◆ hideFurtherSections()

ilInfoScreenGUI::hideFurtherSections (   $a_add_toggle = true)

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

1284  {
1285  $this->hidden = true;
1286  $this->show_hidden_toggle = (bool) $a_add_toggle;
1287  }

◆ removeFormAction()

ilInfoScreenGUI::removeFormAction ( )

remove form action

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

293  {
294  $this->form_action = "";
295  }

◆ saveProgress()

ilInfoScreenGUI::saveProgress (   $redirect = true)

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

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

1102  {
1103  $ilUser = $this->user;
1104 
1105  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1106 
1107  $lp_marks = new ilLPMarks($this->getContextObjId(), $ilUser->getId());
1108  $lp_marks->setCompleted((bool) $_POST['lp_edit']);
1109  $lp_marks->update();
1110 
1111  require_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1113 
1114  $this->lng->loadLanguageModule('trac');
1115  ilUtil::sendSuccess($this->lng->txt('trac_updated_status'), true);
1116 
1117  if ($redirect) {
1118  $this->ctrl->redirect($this, ""); // #14993
1119  }
1120  }
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 1267 of file class.ilInfoScreenGUI.php.

1268  {
1269  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1270  $tagging_gui = new ilTaggingGUI();
1271  $tagging_gui->setObject(
1272  $this->gui_object->object->getId(),
1273  $this->gui_object->object->getType()
1274  );
1275  $tagging_gui->saveInput();
1276 
1277  ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
1278  $this->ctrl->redirect($this, ""); // #14993
1279 
1280  // return $this->showSummary();
1281  }
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 261 of file class.ilInfoScreenGUI.php.

262  {
263  $this->block_property[$a_block_type][$a_property] = $a_value;
264  }

◆ setCloseFormTag()

ilInfoScreenGUI::setCloseFormTag (   $a_val)

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

760  {
761  $this->close_form_tag = $a_val;
762  }

◆ setColumnSettings()

ilInfoScreenGUI::setColumnSettings (   $column_gui)

Set column settings.

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

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

Referenced by getCenterColumnHTML(), and getRightColumnHTML().

745  {
746  $lng = $this->lng;
747  $ilAccess = $this->access;
748 
749  $column_gui->setEnableEdit($this->news_editing);
750  $column_gui->setRepositoryMode(true);
751  $column_gui->setAllBlockProperties($this->getAllBlockProperties());
752  }
+ 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 979 of file class.ilInfoScreenGUI.php.

References $contentObjType.

980  {
981  $this->contentObjType = $contentObjType;
982  }

◆ setContextObjId()

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

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

References $contextObjId.

960  {
961  $this->contextObjId = $contextObjId;
962  }

◆ setContextRefId()

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

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

References $contextRefId.

940  {
941  $this->contextRefId = $contextRefId;
942  }

◆ setFormAction()

ilInfoScreenGUI::setFormAction (   $a_form_action)

set a form action

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

Referenced by getHTML().

285  {
286  $this->form_action = $a_form_action;
287  }
+ Here is the caller graph for this function:

◆ setOpenFormTag()

ilInfoScreenGUI::setOpenFormTag (   $a_val)

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

755  {
756  $this->open_form_tag = $a_val;
757  }

◆ setTableClass()

ilInfoScreenGUI::setTableClass (   $a_val)

Set table class.

Parameters
stringtable class

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

182  {
183  $this->table_class = $a_val;
184  }

◆ setTabs()

ilInfoScreenGUI::setTabs ( )

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

References $tpl, and getTabs().

Referenced by executeCommand().

1203  {
1204  $tpl = $this->tpl;
1205 
1206  $this->getTabs($this->tabs_gui);
1207  }
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 1180 of file class.ilInfoScreenGUI.php.

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

1181  {
1182  if (strlen($a_section)) {
1183  $this->addSection($a_section);
1184  }
1185  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1186  $ldap_mapping = ilLDAPRoleGroupMapping::_getInstance();
1187  if ($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId())) {
1188  $info_combined = '<div style="color:green;">';
1189  $counter = 0;
1190  foreach ($infos as $info_string) {
1191  if ($counter++) {
1192  $info_combined .= '<br />';
1193  }
1194  $info_combined .= $info_string;
1195  }
1196  $info_combined .= '</div>';
1197  $this->addProperty($this->lng->txt('applications'), $info_combined);
1198  }
1199  return true;
1200  }
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 984 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().

985  {
988 
989  if (!$rbacsystem->checkAccess('read', $this->getContextRefId())) {
990  return false;
991  }
992  if ($ilUser->getId() == ANONYMOUS_USER_ID) {
993  return false;
994  }
995 
996  include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
998  return false;
999  }
1000 
1001  include_once './Services/Object/classes/class.ilObjectLP.php';
1002  $olp = ilObjectLP::getInstance($this->getContextObjId());
1003  if ($olp->getCurrentMode() != ilLPObjSettings::LP_MODE_MANUAL) {
1004  return false;
1005  }
1006 
1007  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1008 
1009  $this->lng->loadLanguageModule('trac');
1010 
1011  // section header
1012  // $a_tpl->setCurrentBlock("header_row");
1013  $a_tpl->setVariable(
1014  "TXT_SECTION",
1015  $this->lng->txt('learning_progress')
1016  );
1017  $a_tpl->parseCurrentBlock();
1018  // $a_tpl->touchBlock("row");
1019 
1020  // status
1021  $i_tpl = new ilTemplate("tpl.lp_edit_manual_info_page.html", true, true, "Services/Tracking");
1022  $i_tpl->setVariable("INFO_EDITED", $this->lng->txt("trac_info_edited"));
1023  $i_tpl->setVariable("SELECT_STATUS", ilUtil::formSelect(
1025  $ilUser->getId(),
1026  $this->getContextObjId()
1027  ),
1028  'lp_edit',
1029  array(0 => $this->lng->txt('trac_not_completed'),
1030  1 => $this->lng->txt('trac_completed')),
1031  false,
1032  true
1033  ));
1034  $i_tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
1035  $a_tpl->setCurrentBlock("pv");
1036  $a_tpl->setVariable("TXT_PROPERTY_VALUE", $i_tpl->get());
1037  $a_tpl->parseCurrentBlock();
1038  $a_tpl->setCurrentBlock("property_row");
1039  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_status'));
1040  $a_tpl->parseCurrentBlock();
1041  // $a_tpl->touchBlock("row");
1042 
1043 
1044  // More infos for lm's
1045  if ($this->getContentObjType() == 'lm' ||
1046  $this->getContentObjType() == 'htlm') {
1047  $a_tpl->setCurrentBlock("pv");
1048 
1049  include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
1050  $progress = ilLearningProgress::_getProgress($ilUser->getId(), $this->getContextObjId());
1051  if ($progress['access_time']) {
1052  $a_tpl->setVariable(
1053  "TXT_PROPERTY_VALUE",
1054  ilDatePresentation::formatDate(new ilDateTime($progress['access_time'], IL_CAL_UNIX))
1055  );
1056  } else {
1057  $a_tpl->setVariable(
1058  "TXT_PROPERTY_VALUE",
1059  $this->lng->txt('trac_not_accessed')
1060  );
1061  }
1062 
1063  $a_tpl->parseCurrentBlock();
1064  $a_tpl->setCurrentBlock("property_row");
1065  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_last_access'));
1066  $a_tpl->parseCurrentBlock();
1067  // $a_tpl->touchBlock("row");
1068 
1069  // tags of all users
1070  $a_tpl->setCurrentBlock("pv");
1071  $a_tpl->setVariable(
1072  "TXT_PROPERTY_VALUE",
1073  (int) $progress['visits']
1074  );
1075  $a_tpl->parseCurrentBlock();
1076  $a_tpl->setCurrentBlock("property_row");
1077  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_visits'));
1078  $a_tpl->parseCurrentBlock();
1079  // $a_tpl->touchBlock("row");
1080 
1081 
1082  if ($this->getContentObjType() == 'lm') {
1083  // tags of all users
1084  $a_tpl->setCurrentBlock("pv");
1085  $a_tpl->setVariable(
1086  "TXT_PROPERTY_VALUE",
1087  ilDatePresentation::secondsToString($progress['spent_seconds'])
1088  );
1089  $a_tpl->parseCurrentBlock();
1090  $a_tpl->setCurrentBlock("property_row");
1091  $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_spent_time'));
1092  $a_tpl->parseCurrentBlock();
1093  // $a_tpl->touchBlock("row");
1094  }
1095  }
1096 
1097  // #10493
1098  $a_tpl->touchBlock("row");
1099  }
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) ...
$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 1126 of file class.ilInfoScreenGUI.php.

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

Referenced by getHTML().

1127  {
1128  $ilAccess = $this->access;
1130 
1131  $next_class = $this->ctrl->getNextClass($this);
1132  include_once("Services/Notes/classes/class.ilNoteGUI.php");
1133  $notes_gui = new ilNoteGUI(
1134  $this->gui_object->object->getId(),
1135  0,
1136  $this->gui_object->object->getType()
1137  );
1138 
1139  // global switch
1140  if ($ilSetting->get("disable_comments")) {
1141  $notes_gui->enablePublicNotes(false);
1142  } else {
1143  $ref_id = $this->gui_object->object->getRefId();
1144  $has_write = $ilAccess->checkAccess("write", "", $ref_id);
1145 
1146  if ($has_write && $ilSetting->get("comments_del_tutor", 1)) {
1147  $notes_gui->enablePublicNotesDeletion(true);
1148  }
1149 
1150  /* should probably be discussed further
1151  for now this will only work properly with comments settings
1152  (see ilNoteGUI constructor)
1153  */
1154  if ($has_write ||
1155  $ilAccess->checkAccess("edit_permissions", "", $ref_id)) {
1156  $notes_gui->enableCommentsSettings();
1157  }
1158  }
1159 
1160  /* moved to action menu
1161  $notes_gui->enablePrivateNotes();
1162  */
1163 
1164  if ($next_class == "ilnotegui") {
1165  $html = $this->ctrl->forwardCommand($notes_gui);
1166  } else {
1167  $html = $notes_gui->getNotesHTML();
1168  }
1169 
1170  return $html;
1171  }
enablePublicNotes($a_enable=true)
enable public notes
Notes GUI class.
global $ilSetting
Definition: privfeed.php:17
+ 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 670 of file class.ilInfoScreenGUI.php.

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

Referenced by executeCommand().

671  {
672  $tpl = $this->tpl;
673  $ilAccess = $this->access;
674 
675  $tpl->setContent($this->getCenterColumnHTML());
676  $tpl->setRightContent($this->getRightColumnHTML());
677  }
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

◆ $availability_enabled

ilInfoScreenGUI::$availability_enabled = true
protected

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

◆ $booking_enabled

ilInfoScreenGUI::$booking_enabled = false
protected

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

◆ $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: