ILIAS  release_7 Revision v7.30-3-g800a261c036
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.

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 }
user()
Definition: user.php:4
global $DIC
Definition: goto.php:24
settings()
Definition: settings.php:2

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

+ Here is the call graph for this function:

Member Function Documentation

◆ addAccessPeriodProperty()

ilInfoScreenGUI::addAccessPeriodProperty ( )

Add access period property.

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

1431 : void
1432 {
1433 $a_obj = $this->gui_object->object;
1434
1435 $this->lng->loadLanguageModule("rep");
1436 $this->lng->loadLanguageModule("crs");
1437
1438 // links to the object
1439 if (is_object($a_obj)) {
1440 $act = new ilObjectActivation();
1441 $act->read($a_obj->getRefId());
1442 if ($act->getTimingType() == ilObjectActivation::TIMINGS_ACTIVATION) {
1443 $this->addProperty(
1444 $this->lng->txt('rep_activation_access'),
1446 new ilDateTime($act->getTimingStart(), IL_CAL_UNIX),
1447 new ilDateTime($act->getTimingEnd(), IL_CAL_UNIX)
1448 )
1449 );
1450 } else {
1451 $this->addProperty(
1452 $this->lng->txt('rep_activation_access'),
1453 $this->lng->txt('crs_visibility_limitless')
1454 );
1455 }
1456 }
1457 }
const IL_CAL_UNIX
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
@classDescription Date and time handling
addProperty($a_name, $a_value, $a_link="")
add a property to current section
Class ilObjectActivation.

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

Referenced by addAvailability().

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

1306 {
1307 if (!is_object($this->gui_object) || !is_object($this->gui_object->object)) {
1308 return;
1309 }
1310
1311 $obj = $this->gui_object->object;
1312 if ($obj->getRefId() <= 0) {
1313 return;
1314 }
1315
1316 $act = new ilObjectActivation();
1317 $act->read($obj->getRefId());
1318 if ($act->getTimingType() == ilObjectActivation::TIMINGS_ACTIVATION) {
1319 $this->lng->loadLanguageModule("rep");
1320 $this->addSection($this->lng->txt("rep_activation_availability"));
1321 $this->addAccessPeriodProperty();
1322 }
1323 }
addAccessPeriodProperty()
Add access period property.
addSection($a_title)
add a new section

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

Referenced by getHTML().

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

361 {
362 if ($a_position == "top") {
363 $this->top_buttons[] =
364 array("title" => $a_title,"link" => $a_link,"target" => $a_frame,"primary" => $a_primary);
365 }
366 }

Referenced by getHTML().

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

373 {
374 if ($a_position == "top") {
375 array_push(
376 $this->top_formbuttons,
377 array("command" => $a_command, "title" => $a_title)
378 );
379 }
380 }

◆ addHiddenElement()

ilInfoScreenGUI::addHiddenElement (   $a_name,
  $a_value 
)

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

383 {
384 array_push($this->hiddenelements, array("name" => $a_name, "value" => $a_value));
385 }

◆ addMetaDataSections()

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

add standard meta data sections

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

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

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

+ Here is the call graph for this function:

◆ addObjectSections()

ilInfoScreenGUI::addObjectSections ( )

add standard object section

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

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

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

Referenced by getHTML().

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

1329 {
1330 if (!is_object($this->gui_object) || !is_object($this->gui_object->object)) {
1331 return;
1332 }
1333
1334 $obj = $this->gui_object->object;
1335 if ($obj->getRefId() <= 0) {
1336 return;
1337 }
1338
1339 $conditions = ilConditionHandler::_getEffectiveConditionsOfTarget($obj->getRefId(), $obj->getId());
1340
1341 if (sizeof($conditions)) {
1342 for ($i = 0; $i < count($conditions); $i++) {
1343 $conditions[$i]['title'] = ilObject::_lookupTitle($conditions[$i]['trigger_obj_id']);
1344 }
1345 $conditions = ilUtil::sortArray($conditions, 'title', 'DESC');
1346
1347 // Show obligatory and optional preconditions seperated
1348 $this->addPreconditionSection($obj, $conditions, true);
1349 $this->addPreconditionSection($obj, $conditions, false);
1350 }
1351 }
addPreconditionSection($obj, $conditions, $obligatory=true)
static _lookupTitle($a_id)
lookup object title
static sortArray( $array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
$i
Definition: metadata.php:24

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

Referenced by getHTML().

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

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

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

Referenced by addPreconditions().

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

309 {
310 $this->section[$this->sec_nr]["properties"][] =
311 array("name" => $a_name, "value" => $a_value,
312 "link" => $a_link);
313 }

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

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

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

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

336 {
337 $input = "<span class=\"form-inline\"><input class=\"form-control\" type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
338 if (strlen($a_input_value)) {
339 $input .= " value=\"" . ilUtil::prepareFormOutput($a_input_value) . "\"";
340 }
341 if (strlen($a_input_size)) {
342 $input .= " size=\"" . $a_input_size . "\"";
343 }
344 $input .= " />";
345 if (strlen($direct_button_command) && strlen($direct_button_label)) {
346 $css = "";
347 if ($direct_button_primary) {
348 $css = " btn-primary";
349 }
350 $input .= " <input type=\"submit\" class=\"btn btn-default" . $css . "\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
351 }
352 $input .= "</span>";
353 $this->section[$this->sec_nr]["properties"][] =
354 array("name" => "<label for=\"$a_input_name\">$a_name</label>", "value" => $input);
355 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public

References ilUtil\prepareFormOutput().

+ Here is the call graph for this function:

◆ addSection()

ilInfoScreenGUI::addSection (   $a_title)

◆ addTagging()

ilInfoScreenGUI::addTagging ( )

Add tagging.

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

1243 {
1244 $lng = $this->lng;
1245 $ilCtrl = $this->ctrl;
1246
1247 $lng->loadLanguageModule("tagging");
1248 $tags_set = new ilSetting("tags");
1249
1250 include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1251 $tagging_gui = new ilTaggingGUI();
1252 $tagging_gui->setObject(
1253 $this->gui_object->object->getId(),
1254 $this->gui_object->object->getType()
1255 );
1256
1257 $this->addSection($lng->txt("tagging_tags"));
1258
1259 if ($tags_set->get("enable_all_users")) {
1260 $this->addProperty(
1261 $lng->txt("tagging_all_users"),
1262 $tagging_gui->getAllUserTagsForObjectHTML()
1263 );
1264 }
1265
1266 $this->addProperty(
1267 $lng->txt("tagging_my_tags"),
1268 $tagging_gui->getTaggingInputHTML()
1269 );
1270 }
ILIAS Setting Class.
Class ilTaggingGUI.

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

Referenced by getHTML().

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

220 {
221 $this->availability_enabled = $a_enable;
222 }

◆ enableBookingInfo()

ilInfoScreenGUI::enableBookingInfo (   $a_enable = true)

booking info

Parameters
bool$a_enable

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

229 {
230 $this->booking_enabled = $a_enable;
231 }

◆ enableFeedback()

ilInfoScreenGUI::enableFeedback (   $a_enable = true)

enable feedback

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

238 {
239 $this->feedback_enabled = $a_enable;
240 }

◆ enableLearningProgress()

ilInfoScreenGUI::enableLearningProgress (   $a_enable = true)

enable learning progress

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

212 {
213 $this->learning_progress_enabled = $a_enable;
214 }

◆ enableNews()

ilInfoScreenGUI::enableNews (   $a_enable = true)

enable news

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

246 {
247 $this->news_enabled = $a_enable;
248 }

◆ enableNewsEditing()

ilInfoScreenGUI::enableNewsEditing (   $a_enable = true)

enable news editing

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

254 {
255 $this->news_editing = $a_enable;
256 }

◆ enablePrivateNotes()

ilInfoScreenGUI::enablePrivateNotes (   $a_enable = true)

enable notes

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

204 {
205 $this->private_notes_enabled = $a_enable;
206 }

◆ executeCommand()

ilInfoScreenGUI::executeCommand ( )

execute command

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

134 {
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 if ($this->ctrl->isAsynch()) {
149 $this->showNotesSection();
150 } else {
151 $this->showSummary(); // forwards command
152 }
153 break;
154
155 case "ilcolumngui":
156 $this->showSummary();
157 break;
158
159 case "ilpublicuserprofilegui":
160 include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
161 $user_profile = new ilPublicUserProfileGUI($_GET["user_id"]);
162 $user_profile->setBackUrl($this->ctrl->getLinkTarget($this, "showSummary"));
163 $html = $this->ctrl->forwardCommand($user_profile);
164 $tpl->setContent($html);
165 break;
166
167 case "ilcommonactiondispatchergui":
168 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
170 $this->ctrl->forwardCommand($gui);
171 break;
172
173 default:
174 return $this->$cmd();
175 break;
176 }
177 return true;
178 }
$_GET["client_id"]
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
showSummary()
show summary page
showNotesSection()
show notes section
GUI class for public user profile presentation.

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

+ Here is the call graph for this function:

◆ getAllBlockProperties()

ilInfoScreenGUI::getAllBlockProperties ( )

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

271 {
272 return $this->block_property;
273 }

Referenced by setColumnSettings().

+ Here is the caller graph for this function:

◆ getCenterColumnHTML()

ilInfoScreenGUI::getCenterColumnHTML ( )

Display center column.

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

689 {
690 $ilCtrl = $this->ctrl;
691
692 include_once("Services/Block/classes/class.ilColumnGUI.php");
693 $column_gui = new ilColumnGUI("info", IL_COL_CENTER);
694 $this->setColumnSettings($column_gui);
695
696 if (!$ilCtrl->isAsynch()) {
697 if ($column_gui->getScreenMode() != IL_SCREEN_SIDE) {
698 // right column wants center
699 if ($column_gui->getCmdSide() == IL_COL_RIGHT) {
700 $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
701 $this->setColumnSettings($column_gui);
702 $html = $ilCtrl->forwardCommand($column_gui);
703 }
704 // left column wants center
705 if ($column_gui->getCmdSide() == IL_COL_LEFT) {
706 $column_gui = new ilColumnGUI("info", IL_COL_LEFT);
707 $this->setColumnSettings($column_gui);
708 $html = $ilCtrl->forwardCommand($column_gui);
709 }
710 } else {
711 $html = $this->getHTML();
712 }
713 }
714
715 return $html;
716 }
const IL_SCREEN_SIDE
const IL_COL_RIGHT
const IL_COL_CENTER
const IL_COL_LEFT
Column user interface class.
setColumnSettings($column_gui)
Set column settings.

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

Referenced by showSummary().

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

972 : string
973 {
974 if ($this->contentObjType !== null) {
976 }
977
978 return $this->gui_object->object->getType();
979 }

References $contentObjType.

Referenced by showLearningProgress().

+ Here is the caller graph for this function:

◆ getContextObjId()

ilInfoScreenGUI::getContextObjId ( )
Returns
int|null

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

952 : int
953 {
954 if ($this->contextObjId !== null) {
955 return $this->contextObjId;
956 }
957
958 return $this->gui_object->object->getId();
959 }

References $contextObjId.

Referenced by saveProgress(), and showLearningProgress().

+ Here is the caller graph for this function:

◆ getContextRefId()

ilInfoScreenGUI::getContextRefId ( )
Returns
int|null

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

932 : int
933 {
934 if ($this->contextRefId !== null) {
935 return $this->contextRefId;
936 }
937
938 return $this->gui_object->object->getRefId();
939 }

References $contextRefId.

◆ getHiddenToggleButton()

ilInfoScreenGUI::getHiddenToggleButton ( )

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

1295 {
1296 $lng = $this->lng;
1297
1298 return "<a onClick=\"toggleSections(this, '" . $lng->txt("show_hidden_sections") . "', '" . $lng->txt("hide_visible_sections") . "'); return false;\" href=\"#\">" . $lng->txt("show_hidden_sections") . "</a>";
1299 }

References $lng.

◆ getHTML()

ilInfoScreenGUI::getHTML ( )

get html

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

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

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

Referenced by getCenterColumnHTML().

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

722 {
725 $ilCtrl = $this->ctrl;
726
727 include_once("Services/Block/classes/class.ilColumnGUI.php");
728 $column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
729 $this->setColumnSettings($column_gui);
730
731 if ($ilCtrl->getNextClass() == "ilcolumngui" &&
732 $column_gui->getCmdSide() == IL_COL_RIGHT &&
733 $column_gui->getScreenMode() == IL_SCREEN_SIDE) {
734 $html = $ilCtrl->forwardCommand($column_gui);
735 } else {
736 if (!$ilCtrl->isAsynch()) {
737 if ($this->news_enabled) {
738 $html = $ilCtrl->getHTML($column_gui);
739 }
740 }
741 }
742
743 return $html;
744 }

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

Referenced by showSummary().

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

196 {
197 return $this->table_class;
198 }

References $table_class.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getTabs()

ilInfoScreenGUI::getTabs ( $tabs_gui)

get tabs

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

1218 {
1221 $ilAccess = $this->access;
1222
1223 $next_class = $this->ctrl->getNextClass($this);
1224 $force_active = ($next_class == "ilnotegui")
1225 ? true
1226 : false;
1227
1228 $tabs_gui->addSubTabTarget(
1229 'summary',
1230 $this->ctrl->getLinkTarget($this, "showSummary"),
1231 array("showSummary", ""),
1232 get_class($this),
1233 "",
1234 $force_active
1235 );
1236 }

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

Referenced by setTabs().

+ Here is the caller graph for this function:

◆ hideFurtherSections()

ilInfoScreenGUI::hideFurtherSections (   $a_add_toggle = true)

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

1289 {
1290 $this->hidden = true;
1291 $this->show_hidden_toggle = (bool) $a_add_toggle;
1292 }

◆ removeFormAction()

ilInfoScreenGUI::removeFormAction ( )

remove form action

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

297 {
298 $this->form_action = "";
299 }

◆ saveProgress()

ilInfoScreenGUI::saveProgress (   $redirect = true)

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

1107 {
1109
1110 include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1111
1112 $lp_marks = new ilLPMarks($this->getContextObjId(), $ilUser->getId());
1113 $lp_marks->setCompleted((bool) $_POST['lp_edit']);
1114 $lp_marks->update();
1115
1116 require_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1118
1119 $this->lng->loadLanguageModule('trac');
1120 ilUtil::sendSuccess($this->lng->txt('trac_updated_status'), true);
1121
1122 if ($redirect) {
1123 $this->ctrl->redirect($this, ""); // #14993
1124 }
1125 }
$_POST["username"]
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_force_raise=false)
Update status.

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

+ Here is the call graph for this function:

◆ saveTags()

ilInfoScreenGUI::saveTags ( )

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

1273 {
1274 include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1275 $tagging_gui = new ilTaggingGUI();
1276 $tagging_gui->setObject(
1277 $this->gui_object->object->getId(),
1278 $this->gui_object->object->getType()
1279 );
1280 $tagging_gui->saveInput();
1281
1282 ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
1283 $this->ctrl->redirect($this, ""); // #14993
1284
1285 // return $this->showSummary();
1286 }

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

266 {
267 $this->block_property[$a_block_type][$a_property] = $a_value;
268 }

◆ setCloseFormTag()

ilInfoScreenGUI::setCloseFormTag (   $a_val)

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

765 {
766 $this->close_form_tag = $a_val;
767 }

◆ setColumnSettings()

ilInfoScreenGUI::setColumnSettings (   $column_gui)

Set column settings.

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

750 {
752 $ilAccess = $this->access;
753
754 $column_gui->setEnableEdit($this->news_editing);
755 $column_gui->setRepositoryMode(true);
756 $column_gui->setAllBlockProperties($this->getAllBlockProperties());
757 }

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

Referenced by getCenterColumnHTML(), and getRightColumnHTML().

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

985 {
986 $this->contentObjType = $contentObjType;
987 }

References $contentObjType.

◆ setContextObjId()

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

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

965 {
966 $this->contextObjId = $contextObjId;
967 }

References $contextObjId.

◆ setContextRefId()

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

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

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

References $contextRefId.

◆ setFormAction()

ilInfoScreenGUI::setFormAction (   $a_form_action)

set a form action

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

289 {
290 $this->form_action = $a_form_action;
291 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ setOpenFormTag()

ilInfoScreenGUI::setOpenFormTag (   $a_val)

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

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

◆ setTableClass()

ilInfoScreenGUI::setTableClass (   $a_val)

Set table class.

Parameters
stringtable class

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

186 {
187 $this->table_class = $a_val;
188 }

◆ setTabs()

ilInfoScreenGUI::setTabs ( )

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

1208 {
1209 $tpl = $this->tpl;
1210
1211 $this->getTabs($this->tabs_gui);
1212 }
getTabs(&$tabs_gui)
get tabs

References $tpl, and getTabs().

Referenced by executeCommand().

+ 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

@access public

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

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

1186 {
1187 if (strlen($a_section)) {
1188 $this->addSection($a_section);
1189 }
1190 include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1191 $ldap_mapping = ilLDAPRoleGroupMapping::_getInstance();
1192 if ($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId())) {
1193 $info_combined = '<div style="color:green;">';
1194 $counter = 0;
1195 foreach ($infos as $info_string) {
1196 if ($counter++) {
1197 $info_combined .= '<br />';
1198 }
1199 $info_combined .= $info_string;
1200 }
1201 $info_combined .= '</div>';
1202 $this->addProperty($this->lng->txt('applications'), $info_combined);
1203 }
1204 return true;
1205 }
static _getInstance()
Get singleton instance of this class.

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

+ Here is the call graph for this function:

◆ showLearningProgress()

ilInfoScreenGUI::showLearningProgress (   $a_tpl)

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

990 {
993
994 if (!$rbacsystem->checkAccess('read', $this->getContextRefId())) {
995 return false;
996 }
997 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
998 return false;
999 }
1000
1001 include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
1003 return false;
1004 }
1005
1006 include_once './Services/Object/classes/class.ilObjectLP.php';
1008 if ($olp->getCurrentMode() != ilLPObjSettings::LP_MODE_MANUAL) {
1009 return false;
1010 }
1011
1012 include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1013
1014 $this->lng->loadLanguageModule('trac');
1015
1016 // section header
1017 // $a_tpl->setCurrentBlock("header_row");
1018 $a_tpl->setVariable(
1019 "TXT_SECTION",
1020 $this->lng->txt('learning_progress')
1021 );
1022 $a_tpl->parseCurrentBlock();
1023 // $a_tpl->touchBlock("row");
1024
1025 // status
1026 $i_tpl = new ilTemplate("tpl.lp_edit_manual_info_page.html", true, true, "Services/Tracking");
1027 $i_tpl->setVariable("INFO_EDITED", $this->lng->txt("trac_info_edited"));
1028 $i_tpl->setVariable("SELECT_STATUS", ilUtil::formSelect(
1030 $ilUser->getId(),
1031 $this->getContextObjId()
1032 ),
1033 'lp_edit',
1034 array(0 => $this->lng->txt('trac_not_completed'),
1035 1 => $this->lng->txt('trac_completed')),
1036 false,
1037 true
1038 ));
1039 $i_tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
1040 $a_tpl->setCurrentBlock("pv");
1041 $a_tpl->setVariable("TXT_PROPERTY_VALUE", $i_tpl->get());
1042 $a_tpl->parseCurrentBlock();
1043 $a_tpl->setCurrentBlock("property_row");
1044 $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_status'));
1045 $a_tpl->parseCurrentBlock();
1046 // $a_tpl->touchBlock("row");
1047
1048
1049 // More infos for lm's
1050 if ($this->getContentObjType() == 'lm' ||
1051 $this->getContentObjType() == 'htlm') {
1052 $a_tpl->setCurrentBlock("pv");
1053
1054 include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
1055 $progress = ilLearningProgress::_getProgress($ilUser->getId(), $this->getContextObjId());
1056 if ($progress['access_time']) {
1057 $a_tpl->setVariable(
1058 "TXT_PROPERTY_VALUE",
1059 ilDatePresentation::formatDate(new ilDateTime($progress['access_time'], IL_CAL_UNIX))
1060 );
1061 } else {
1062 $a_tpl->setVariable(
1063 "TXT_PROPERTY_VALUE",
1064 $this->lng->txt('trac_not_accessed')
1065 );
1066 }
1067
1068 $a_tpl->parseCurrentBlock();
1069 $a_tpl->setCurrentBlock("property_row");
1070 $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_last_access'));
1071 $a_tpl->parseCurrentBlock();
1072 // $a_tpl->touchBlock("row");
1073
1074 // tags of all users
1075 $a_tpl->setCurrentBlock("pv");
1076 $a_tpl->setVariable(
1077 "TXT_PROPERTY_VALUE",
1078 (int) $progress['visits']
1079 );
1080 $a_tpl->parseCurrentBlock();
1081 $a_tpl->setCurrentBlock("property_row");
1082 $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_visits'));
1083 $a_tpl->parseCurrentBlock();
1084 // $a_tpl->touchBlock("row");
1085
1086
1087 if ($this->getContentObjType() == 'lm') {
1088 // tags of all users
1089 $a_tpl->setCurrentBlock("pv");
1090 $a_tpl->setVariable(
1091 "TXT_PROPERTY_VALUE",
1092 ilDatePresentation::secondsToString($progress['spent_seconds'])
1093 );
1094 $a_tpl->parseCurrentBlock();
1095 $a_tpl->setCurrentBlock("property_row");
1096 $a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_spent_time'));
1097 $a_tpl->parseCurrentBlock();
1098 // $a_tpl->touchBlock("row");
1099 }
1100 }
1101
1102 // #10493
1103 $a_tpl->touchBlock("row");
1104 }
static _hasCompleted($a_usr_id, $a_obj_id)
static _getProgress($a_user_id, $a_obj_id)
static _enabledLearningProgress()
check wether learing progress is enabled or not
static getInstance($a_obj_id)
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.

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

Referenced by getHTML().

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

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

References $access, $ilSetting, and $settings.

Referenced by executeCommand(), and getHTML().

+ Here is the caller graph for this function:

◆ showSummary()

ilInfoScreenGUI::showSummary ( )

show summary page

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

676 {
678 $ilAccess = $this->access;
679
680 $tpl->setContent($this->getCenterColumnHTML());
681 $tpl->setRightContent($this->getRightColumnHTML());
682 }
getRightColumnHTML()
Display right column.
getCenterColumnHTML()
Display center column.

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

Referenced by executeCommand().

+ 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: