ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilInfoScreenGUI Class Reference

Class ilInfoScreenGUI. More...

+ Collaboration diagram for ilInfoScreenGUI:

Public Member Functions

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

Data Fields

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

Detailed Description

Member Function Documentation

◆ addButton()

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

add a property to current section

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

Referenced by getHTML().

278  {
279  if ($a_position == "top")
280  {
281  $this->top_buttons[] =
282  array("title" => $a_title,"link" => $a_link,"target" => $a_frame,"primary" => $a_primary);
283  }
284  }
+ 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 290 of file class.ilInfoScreenGUI.php.

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

◆ addHiddenElement()

ilInfoScreenGUI::addHiddenElement (   $a_name,
  $a_value 
)

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

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

◆ addMetaDataSections()

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

add standard meta data sections

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

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

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

◆ addObjectSections()

ilInfoScreenGUI::addObjectSections ( )

add standard object section

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

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

Referenced by getHTML().

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

◆ addProperty()

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

add a property to current section

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

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

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

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

◆ addPropertyCheckbox()

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

add a property to current section

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

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

◆ addPropertyTextinput()

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

add a property to current section

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

References ilUtil\prepareFormOutput().

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

◆ addSection()

ilInfoScreenGUI::addSection (   $a_title)

add a new section

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

Referenced by addMetaDataSections(), addObjectSections(), addTagging(), and showLDAPRoleGroupMappingInfo().

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

◆ addTagging()

ilInfoScreenGUI::addTagging ( )

Add tagging.

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

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

Referenced by getHTML().

1158  {
1159  global $lng, $ilCtrl;
1160 
1161  $lng->loadLanguageModule("tagging");
1162  $tags_set = new ilSetting("tags");
1163 
1164  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1165  $tagging_gui = new ilTaggingGUI();
1166  $tagging_gui->setObject($this->gui_object->object->getId(),
1167  $this->gui_object->object->getType());
1168 
1169  $this->addSection($lng->txt("tagging_tags"));
1170 
1171  if ($tags_set->get("enable_all_users"))
1172  {
1173  $this->addProperty($lng->txt("tagging_all_users"),
1174  $tagging_gui->getAllUserTagsForObjectHTML());
1175  }
1176 
1177  $this->addProperty($lng->txt("tagging_my_tags"),
1178  $tagging_gui->getTaggingInputHTML());
1179  }
ILIAS Setting Class.
Class ilTaggingGUI.
addSection($a_title)
add a new section
global $ilCtrl
Definition: ilias.php:18
addProperty($a_name, $a_value, $a_link="")
add a property to current section
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableFeedback()

ilInfoScreenGUI::enableFeedback (   $a_enable = true)

enable feedback

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

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

◆ enableLearningProgress()

ilInfoScreenGUI::enableLearningProgress (   $a_enable = true)

enable learning progress

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

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

◆ enableNews()

ilInfoScreenGUI::enableNews (   $a_enable = true)

enable news

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

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

◆ enableNewsEditing()

ilInfoScreenGUI::enableNewsEditing (   $a_enable = true)

enable news editing

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

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

◆ enablePrivateNotes()

ilInfoScreenGUI::enablePrivateNotes (   $a_enable = true)

enable notes

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

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

◆ executeCommand()

& ilInfoScreenGUI::executeCommand ( )

execute command

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

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

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

◆ getAllBlockProperties()

ilInfoScreenGUI::getAllBlockProperties ( )

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

Referenced by setColumnSettings().

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

◆ getCenterColumnHTML()

ilInfoScreenGUI::getCenterColumnHTML ( )

Display center column.

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

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

Referenced by showSummary().

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

◆ getHiddenToggleButton()

ilInfoScreenGUI::getHiddenToggleButton ( )

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

References $lng.

1201  {
1202  global $lng;
1203 
1204  return "<a onClick=\"toggleSections(this, '".$lng->txt("show_hidden_sections") ."', '".$lng->txt("hide_visible_sections") ."');\" href=\"#\">".$lng->txt("show_hidden_sections")."</a>";
1205  }

◆ getHTML()

ilInfoScreenGUI::getHTML ( )

get html

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

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

Referenced by getCenterColumnHTML().

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

◆ getRightColumnHTML()

ilInfoScreenGUI::getRightColumnHTML ( )

Display right column.

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

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

Referenced by showSummary().

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

◆ getTableClass()

ilInfoScreenGUI::getTableClass ( )

Get table class.

Returns
string table class

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

References $table_class.

Referenced by getHTML().

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

◆ getTabs()

ilInfoScreenGUI::getTabs ( $tabs_gui)

get tabs

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

References $ilUser.

Referenced by setTabs().

1139  {
1140  global $rbacsystem,$ilUser,$ilAccess;
1141 
1142  $next_class = $this->ctrl->getNextClass($this);
1143  $force_active = ($next_class == "ilnotegui")
1144  ? true
1145  : false;
1146 
1147  $tabs_gui->addSubTabTarget('summary',
1148  $this->ctrl->getLinkTarget($this, "showSummary"),
1149  array("showSummary", ""),
1150  get_class($this), "", $force_active);
1151  }
global $ilUser
Definition: imgupload.php:15
+ Here is the caller graph for this function:

◆ hideFurtherSections()

ilInfoScreenGUI::hideFurtherSections (   $a_add_toggle = true)

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

1195  {
1196  $this->hidden = true;
1197  $this->show_hidden_toggle = (bool)$a_add_toggle;
1198  }

◆ ilInfoScreenGUI()

ilInfoScreenGUI::ilInfoScreenGUI (   $a_gui_object)

Constructor.

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

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

References $ilCtrl, $ilias, and $lng.

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

◆ removeFormAction()

ilInfoScreenGUI::removeFormAction ( )

remove form action

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

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

◆ saveProgress()

ilInfoScreenGUI::saveProgress ( )

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

References $_POST, $ilUser, ilLPStatusWrapper\_updateStatus(), ilUtil\sendSuccess(), ilLPMarks\setCompleted(), and showSummary().

1029  {
1030  global $ilUser;
1031 
1032  include_once 'Services/Tracking/classes/class.ilLPMarks.php';
1033 
1034  $lp_marks = new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
1035  $lp_marks->setCompleted((bool) $_POST['lp_edit']);
1036  $lp_marks->update();
1037 
1038  require_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
1039  ilLPStatusWrapper::_updateStatus($this->gui_object->object->getId(),$ilUser->getId());
1040 
1041  $this->lng->loadLanguageModule('trac');
1042  ilUtil::sendSuccess($this->lng->txt('trac_updated_status'));
1043 
1044  $this->showSummary();
1045  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
$_POST['username']
Definition: cron.php:12
static _updateStatus($a_obj_id, $a_usr_id, $a_obj=null, $a_percentage=false, $a_no_raise=false, $a_force_raise=false)
Update status.
showSummary()
show summary page
global $ilUser
Definition: imgupload.php:15
setCompleted($a_status)
+ Here is the call graph for this function:

◆ saveTags()

ilInfoScreenGUI::saveTags ( )

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

References $ilCtrl, and showSummary().

1182  {
1183  global $ilCtrl;
1184 
1185  include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
1186  $tagging_gui = new ilTaggingGUI();
1187  $tagging_gui->setObject($this->gui_object->object->getId(),
1188  $this->gui_object->object->getType());
1189  $tagging_gui->saveInput();
1190 
1191  return $this->showSummary();
1192  }
Class ilTaggingGUI.
showSummary()
show summary page
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

◆ setBlockProperty()

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

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

Parameters
string$a_propertyproperty name
string$a_valueproperty value

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

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

◆ setCloseFormTag()

ilInfoScreenGUI::setCloseFormTag (   $a_val)

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

739  {
740  $this->close_form_tag = $a_val;
741  }

◆ setColumnSettings()

ilInfoScreenGUI::setColumnSettings (   $column_gui)

Set column settings.

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

References $lng, and getAllBlockProperties().

Referenced by getCenterColumnHTML(), and getRightColumnHTML().

725  {
726  global $lng, $ilAccess;
727 
728  $column_gui->setEnableEdit($this->news_editing);
729  $column_gui->setRepositoryMode(true);
730  $column_gui->setAllBlockProperties($this->getAllBlockProperties());
731  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFormAction()

ilInfoScreenGUI::setFormAction (   $a_form_action)

set a form action

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

Referenced by getHTML().

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

◆ setOpenFormTag()

ilInfoScreenGUI::setOpenFormTag (   $a_val)

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

734  {
735  $this->open_form_tag = $a_val;
736  }

◆ setTableClass()

ilInfoScreenGUI::setTableClass (   $a_val)

Set table class.

Parameters
stringtable class

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

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

◆ setTabs()

ilInfoScreenGUI::setTabs ( )

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

References $tpl, and getTabs().

Referenced by executeCommand().

1129  {
1130  global $tpl;
1131 
1132  $this->getTabs($this->tabs_gui);
1133  }
getTabs(&$tabs_gui)
get tabs
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
+ 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 1102 of file class.ilInfoScreenGUI.php.

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

1103  {
1104  if(strlen($a_section))
1105  {
1106  $this->addSection($a_section);
1107  }
1108  include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
1109  $ldap_mapping = ilLDAPRoleGroupMapping::_getInstance();
1110  if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
1111  {
1112  $info_combined = '<div style="color:green;">';
1113  $counter = 0;
1114  foreach($infos as $info_string)
1115  {
1116  if($counter++)
1117  {
1118  $info_combined .= '<br />';
1119  }
1120  $info_combined .= $info_string;
1121  }
1122  $info_combined .= '</div>';
1123  $this->addProperty($this->lng->txt('applications'),$info_combined);
1124  }
1125  return true;
1126  }
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 917 of file class.ilInfoScreenGUI.php.

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

Referenced by getHTML().

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

◆ showNotesSection()

ilInfoScreenGUI::showNotesSection ( )

show notes section

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

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

Referenced by getHTML().

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

◆ showSummary()

ilInfoScreenGUI::showSummary ( )

show summary page

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

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

Referenced by executeCommand(), saveProgress(), and saveTags().

643  {
644  global $tpl, $ilAccess;
645 
646  $tpl->setContent($this->getCenterColumnHTML());
647  $tpl->setRightContent($this->getRightColumnHTML());
648  }
getCenterColumnHTML()
Display center column.
getRightColumnHTML()
Display right column.
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $close_form_tag

ilInfoScreenGUI::$close_form_tag = true

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

◆ $ctrl

ilInfoScreenGUI::$ctrl

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

◆ $form_action

ilInfoScreenGUI::$form_action

a form action parameter.

if set a form is generated

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

◆ $gui_object

ilInfoScreenGUI::$gui_object

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

◆ $hiddenelements

ilInfoScreenGUI::$hiddenelements = array()

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

◆ $ilias

ilInfoScreenGUI::$ilias

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

Referenced by addObjectSections(), and ilInfoScreenGUI().

◆ $lng

◆ $open_form_tag

ilInfoScreenGUI::$open_form_tag = true

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

◆ $table_class

ilInfoScreenGUI::$table_class = "il_InfoScreen"

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

Referenced by getTableClass().

◆ $top_buttons

ilInfoScreenGUI::$top_buttons = array()

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

◆ $top_formbuttons

ilInfoScreenGUI::$top_formbuttons = array()

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


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