ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilInfoScreenGUI Class Reference

Class ilInfoScreenGUI. More...

+ Collaboration diagram for ilInfoScreenGUI:

Public Member Functions

 ilInfoScreenGUI ($a_gui_object)
 Constructor.
executeCommand ()
 execute command
 setTableClass ($a_val)
 Set table class.
 getTableClass ()
 Get table class.
 enablePrivateNotes ($a_enable=true)
 enable notes
 enableLearningProgress ($a_enable=true)
 enable learning progress
 enableFeedback ($a_enable=true)
 enable feedback
 enableNews ($a_enable=true)
 enable news
 enableNewsEditing ($a_enable=true)
 enable news editing
 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.
 getAllBlockProperties ()
 addSection ($a_title)
 add a new section
 setFormAction ($a_form_action, $a_form_target= '')
 set a form action
 removeFormAction ()
 remove form action
 addProperty ($a_name, $a_value, $a_link="")
 add a property to current section
 addPropertyCheckbox ($a_name, $a_checkbox_name, $a_checkbox_value, $a_checkbox_label="", $a_checkbox_checked=false)
 add a property to current section
 addPropertyTextinput ($a_name, $a_input_name, $a_input_value="", $a_input_size="", $direct_button_command="", $direct_button_label="")
 add a property to current section
 addButton ($a_title, $a_link, $a_frame="", $a_position="top")
 add a property to current section
 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
 addHiddenElement ($a_name, $a_value)
 addMetaDataSections ($a_rep_obj_id, $a_obj_id, $a_type)
 add standard meta data sections
 addObjectSections ()
 add standard object section
 showSummary ()
 show summary page
 getCenterColumnHTML ()
 Display center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 Set column settings.
 getHTML ()
 get html
 showLearningProgress ($a_tpl)
 saveProgress ()
 showNotesSection ()
 show notes section
 showLDAPRoleGroupMappingInfo ($a_section= '')
 show LDAP role group mapping info
 setTabs ()
 getTabs (&$tabs_gui)
 get tabs
 addTagging ()
 Add tagging.
 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"
 $form_action
 a form action parameter.

Detailed Description

Member Function Documentation

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

add a property to current section

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

Referenced by getHTML().

{
if ($a_position == "top")
{
$this->top_buttons[] =
array("title" => $a_title,"link" => $a_link,"target" => $a_frame);
}
}

+ Here is the caller graph for this function:

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

{
if ($a_position == "top")
{
array_push($this->top_formbuttons,
array("command" => $a_command, "title" => $a_title)
);
}
}
ilInfoScreenGUI::addHiddenElement (   $a_name,
  $a_value 
)

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

{
array_push($this->hiddenelements, array("name" => $a_name, "value" => $a_value));
}
ilInfoScreenGUI::addMetaDataSections (   $a_rep_obj_id,
  $a_obj_id,
  $a_type 
)

add standard meta data sections

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

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

{
global $lng;
$lng->loadLanguageModule("meta");
include_once("./Services/MetaData/classes/class.ilMD.php");
$md = new ilMD($a_rep_obj_id,$a_obj_id, $a_type);
if ($md_gen = $md->getGeneral())
{
// get first descrption
// The description is shown on the top of the page.
// Thus it is not necessary to show it again.
foreach($md_gen->getDescriptionIds() as $id)
{
$md_des = $md_gen->getDescription($id);
$description = $md_des->getDescription();
break;
}
// get language(s)
$langs = array();
foreach($ids = $md_gen->getLanguageIds() as $id)
{
$md_lan = $md_gen->getLanguage($id);
if ($md_lan->getLanguageCode() != "")
{
$langs[] = $lng->txt("meta_l_".$md_lan->getLanguageCode());
}
}
$langs = implode($langs, ", ");
// keywords
$keywords = array();
foreach($ids = $md_gen->getKeywordIds() as $id)
{
$md_key = $md_gen->getKeyword($id);
$keywords[] = $md_key->getKeyword();
}
$keywords = implode($keywords, ", ");
}
// authors
if(is_object($lifecycle = $md->getLifecycle()))
{
$sep = $author = "";
foreach(($ids = $lifecycle->getContributeIds()) as $con_id)
{
$md_con = $lifecycle->getContribute($con_id);
if ($md_con->getRole() == "Author")
{
foreach($ent_ids = $md_con->getEntityIds() as $ent_id)
{
$md_ent = $md_con->getEntity($ent_id);
$author = $author.$sep.$md_ent->getEntity();
$sep = ", ";
}
}
}
}
// copyright
$copyright = "";
if(is_object($rights = $md->getRights()))
{
include_once('Services/MetaData/classes/class.ilMDUtils.php');
$copyright = ilMDUtils::_parseCopyright($rights->getDescription());
}
// learning time
#if(is_object($educational = $md->getEducational()))
#{
# $learning_time = $educational->getTypicalLearningTime();
#}
$learning_time = "";
if(is_object($educational = $md->getEducational()))
{
if($seconds = $educational->getTypicalLearningTimeSeconds())
{
$learning_time = ilFormat::_secondsToString($seconds);
}
}
// output
// description
if ($description != "")
{
$this->addSection($lng->txt("description"));
$this->addProperty("", nl2br($description));
}
// general section
$this->addSection($lng->txt("meta_general"));
if ($langs != "") // language
{
$this->addProperty($lng->txt("language"),
$langs);
}
if ($keywords != "") // keywords
{
$this->addProperty($lng->txt("keywords"),
$keywords);
}
if ($author != "") // author
{
$this->addProperty($lng->txt("author"),
$author);
}
if ($copyright != "") // copyright
{
$this->addProperty($lng->txt("meta_copyright"),
$copyright);
}
if ($learning_time != "") // typical learning time
{
$this->addProperty($lng->txt("meta_typical_learning_time"),
$learning_time);
}
}

+ Here is the call graph for this function:

ilInfoScreenGUI::addObjectSections ( )

add standard object section

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

References $ilCtrl, $ilias, $ilSetting, $lng, $ref_id, $size, $title, 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(), and IL_CAL_DATETIME.

Referenced by getHTML().

{
global $lng, $ilCtrl, $ilUser, $ilAccess, $tree, $ilSetting, $ilObjDataCache;
$this->addSection($lng->txt("additional_info"));
$a_obj = $this->gui_object->object;
// links to the object
if (is_object($a_obj))
{
// permanent link
$type = $a_obj->getType();
$ref_id = $a_obj->getRefId();
if($ref_id)
{
include_once('classes/class.ilLink.php');
$href = ilLink::_getStaticLink($ref_id,$type,true);
// delicous link
$d_set = new ilSetting("delicious");
if (true || $d_set->get("add_info_links") == "1")
{
$lng->loadLanguageModule("delic");
$del_link = '<br/><a class="small" href="http://del.icio.us/post?desc=nn&url='.
urlencode($href).'"><img border="0" src="'.ilUtil::getImagePath("icon_delicious_s.gif").
'" /> '.$lng->txt("delic_add_to_delicious").
'</a>';
}
include_once 'Services/WebServices/ECS/classes/class.ilECSServerSettings.php';
if(ilECSServerSettings::getInstance()->activeServerExists())
{
$this->addProperty($lng->txt("object_id"),
$a_obj->getId()
);
}
include_once 'Services/PermanentLink/classes/class.ilPermanentLinkGUI.php';
$pm = new ilPermanentLinkGUI($type, $ref_id);
$pm->setIncludePermanentLinkText(false);
$pm->setAlignCenter(false);
$this->addProperty($lng->txt("perma_link"),
$pm->getHTML(),
""
);
// bookmarks
$title = $ilObjDataCache->lookupTitle($a_obj->getId());
// links to resource
if ($ilAccess->checkAccess("write", "", $ref_id) ||
$ilAccess->checkAccess("edit_permissions", "", $ref_id))
{
$obj_id = $a_obj->getId();
$refs = array();
foreach($rs as $r)
{
if ($tree->isInTree($r))
{
$refs[] = $r;
}
}
if (count($refs) > 1)
{
$links = $sep = "";
foreach($refs as $r)
{
$cont_loc = new ilLocatorGUI();
$cont_loc->addContextItems($r, true);
$links.= $sep.$cont_loc->getHTML();
$sep = "<br />";
}
$this->addProperty($lng->txt("res_links"),
'<div class="small">'.$links.'</div>'
);
}
}
}
}
// creation date
$this->addProperty(
$lng->txt("create_date"),
// owner
if ($ilUser->getId() != ANONYMOUS_USER_ID and $a_obj->getOwner())
{
include_once 'classes/class.ilObjectFactory.php';
if(!$ownerObj = ilObjectFactory::getInstanceByObjId($a_obj->getOwner(),false))
{
$ownerObj = ilObjectFactory::getInstanceByObjId(6, false);
}
if (! is_object($ownerObj)) // root user deleted
{
$this->addProperty($lng->txt("owner"), $lng->txt("no_owner"));
}
else if ($ownerObj->hasPublicProfile())
{
$ilCtrl->setParameterByClass("ilpublicuserprofilegui", "user_id", $ownerObj->getId());
$this->addProperty($lng->txt("owner"),$ownerObj->getPublicName(),$ilCtrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML"));
}
else
{
$this->addProperty($lng->txt("owner"),$ownerObj->getPublicName());
}
}
// disk usage
require_once 'Services/WebDAV/classes/class.ilDiskQuotaActivationChecker.php';
if ($ilUser->getId() != ANONYMOUS_USER_ID &&
{
$size = $a_obj->getDiskUsage();
if ($size !== null) {
$this->addProperty($lng->txt("disk_usage"),ilFormat::formatSize($size,'long'));
}
}
// change event
require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
{
if ($ilUser->getId() != ANONYMOUS_USER_ID)
{
$readEvents = ilChangeEvent::_lookupReadEvents($a_obj->getId());
$count_users = 0;
$count_members = 0;
$count_user_reads = 0;
$count_anonymous_reads = 0;
foreach ($readEvents as $evt)
{
if ($evt['usr_id'] == ANONYMOUS_USER_ID)
{
$count_anonymous_reads += $evt['read_count'];
}
else
{
$count_user_reads += $evt['read_count'];
$count_users++;
/* to do: if ($evt['user_id'] is member of $this->getRefId())
{
$count_members++;
}*/
}
}
if ($count_anonymous_reads > 0)
{
$this->addProperty($this->lng->txt("readcount_anonymous_users"),$count_anonymous_reads);
}
if ($count_user_reads > 0)
{
$this->addProperty($this->lng->txt("readcount_users"),$count_user_reads);
}
if ($count_users > 0)
{
$this->addProperty($this->lng->txt("accesscount_registered_users"),$count_users);
}
}
}
// END ChangeEvent: Display change event info
// BEGIN WebDAV: Display locking information
require_once('Services/WebDAV/classes/class.ilDAVServer.php');
{
global $ilias, $ilUser;
if ($ilUser->getId() != ANONYMOUS_USER_ID)
{
$davLocks = new ilDAVLocks();
// Show lock info
if ($ilias->account->getId() != ANONYMOUS_USER_ID)
{
$locks =& $davLocks->getLocksOnObjectObj($a_obj->getId());
if (count($locks) > 0)
{
$lockUser = new ilObjUser($locks[0]['ilias_owner']);
$this->addProperty($this->lng->txt("in_use_by"),
$lockUser->getPublicName()
,
"./ilias.php?user=".$locks[0]['ilias_owner'].'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI'
);
}
}
}
}
// END WebDAV: Display locking information
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

+ Here is the caller graph for this function:

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

{
$checkbox = "<input type=\"checkbox\" name=\"$a_checkbox_name\" value=\"$a_checkbox_value\" id=\"$a_checkbox_name$a_checkbox_value\"";
if ($a_checkbox_checked)
{
$checkbox .= " checked=\"checked\"";
}
$checkbox .= " />";
if (strlen($a_checkbox_label))
{
$checkbox .= "&nbsp;<label for=\"$a_checkbox_name$a_checkbox_value\">$a_checkbox_label</label>";
}
$this->section[$this->sec_nr]["properties"][] =
array("name" => $a_name, "value" => $checkbox);
}
ilInfoScreenGUI::addPropertyTextinput (   $a_name,
  $a_input_name,
  $a_input_value = "",
  $a_input_size = "",
  $direct_button_command = "",
  $direct_button_label = "" 
)

add a property to current section

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

References ilUtil\prepareFormOutput().

{
$input = "<input type=\"text\" name=\"$a_input_name\" id=\"$a_input_name\"";
if (strlen($a_input_value))
{
$input .= " value=\"" . ilUtil::prepareFormOutput($a_input_value) . "\"";
}
if (strlen($a_input_size))
{
$input .= " size=\"" . $a_input_size . "\"";
}
$input .= " />";
if (strlen($direct_button_command) && strlen($direct_button_label))
{
$input .= " <input type=\"submit\" class=\"submit\" name=\"cmd[$direct_button_command]\" value=\"$direct_button_label\" />";
}
$this->section[$this->sec_nr]["properties"][] =
array("name" => "<label for=\"$a_input_name\">$a_name</label>", "value" => $input);
}

+ Here is the call graph for this function:

ilInfoScreenGUI::addSection (   $a_title)

add a new section

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

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

{
$this->sec_nr++;
$this->section[$this->sec_nr]["title"] = $a_title;
$this->section[$this->sec_nr]["hidden"] = (bool)$this->hidden;
}

+ Here is the caller graph for this function:

ilInfoScreenGUI::addTagging ( )

Add tagging.

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

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

Referenced by getHTML().

{
global $lng, $ilCtrl;
$lng->loadLanguageModule("tagging");
$tags_set = new ilSetting("tags");
include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
$tagging_gui = new ilTaggingGUI();
$tagging_gui->setObject($this->gui_object->object->getId(),
$this->gui_object->object->getType());
$this->addSection($lng->txt("tagging_tags"));
if ($tags_set->get("enable_all_users"))
{
$this->addProperty($lng->txt("tagging_all_users"),
$tagging_gui->getAllUserTagsForObjectHTML());
}
$this->addProperty($lng->txt("tagging_my_tags"),
$tagging_gui->getTaggingInputHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInfoScreenGUI::enableFeedback (   $a_enable = true)

enable feedback

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

{
$this->feedback_enabled = $a_enable;
}
ilInfoScreenGUI::enableLearningProgress (   $a_enable = true)

enable learning progress

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

{
$this->learning_progress_enabled = $a_enable;
}
ilInfoScreenGUI::enableNews (   $a_enable = true)

enable news

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

{
$this->news_enabled = $a_enable;
}
ilInfoScreenGUI::enableNewsEditing (   $a_enable = true)

enable news editing

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

{
$this->news_editing = $a_enable;
}
ilInfoScreenGUI::enablePrivateNotes (   $a_enable = true)

enable notes

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

{
$this->private_notes_enabled = $a_enable;
}
& ilInfoScreenGUI::executeCommand ( )

execute command

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

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

{
global $rbacsystem, $tpl, $ilAccess;
// load additional language modules
$this->lng->loadLanguageModule("barometer");
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd("showSummary");
$this->ctrl->setReturn($this, "showSummary");
$this->setTabs();
switch($next_class)
{
case "ilnotegui":
$this->showSummary(); // forwards command
break;
case "ilfeedbackgui":
include_once("Services/Feedback/classes/class.ilFeedbackGUI.php");
$fb_gui = new ilFeedbackGUI();
$this->ctrl->setParameterByClass("ilFeedbackGUI","obj_id",$this->gui_object->object->getId());
$this->ctrl->setParameterByClass("ilFeedbackGUI","ref_id",$_GET['ref_id']);
$html = $this->ctrl->forwardCommand($fb_gui);
$tpl->setContent($html);
break;
case "ilcolumngui":
$this->showSummary();
break;
case "ilpublicuserprofilegui":
include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
$user_profile = new ilPublicUserProfileGUI($_GET["user_id"]);
$user_profile->setBackUrl($this->ctrl->getLinkTarget($this, "showSummary"));
$html = $this->ctrl->forwardCommand($user_profile);
$tpl->setContent($html);
break;
case "ilcommonactiondispatchergui":
include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
$this->ctrl->forwardCommand($gui);
break;
default:
return $this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilInfoScreenGUI::getAllBlockProperties ( )

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

Referenced by setColumnSettings().

{
return $this->block_property;
}

+ Here is the caller graph for this function:

ilInfoScreenGUI::getCenterColumnHTML ( )

Display center column.

Definition at line 652 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().

{
global $ilCtrl;
include_once("Services/Block/classes/class.ilColumnGUI.php");
$column_gui = new ilColumnGUI("info", IL_COL_CENTER);
$this->setColumnSettings($column_gui);
if (!$ilCtrl->isAsynch())
{
if ($column_gui->getScreenMode() != IL_SCREEN_SIDE)
{
// right column wants center
if ($column_gui->getCmdSide() == IL_COL_RIGHT)
{
$column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
$this->setColumnSettings($column_gui);
$html = $ilCtrl->forwardCommand($column_gui);
}
// left column wants center
if ($column_gui->getCmdSide() == IL_COL_LEFT)
{
$column_gui = new ilColumnGUI("info", IL_COL_LEFT);
$this->setColumnSettings($column_gui);
$html = $ilCtrl->forwardCommand($column_gui);
}
}
else
{
$html = $this->getHTML();
}
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInfoScreenGUI::getHiddenToggleButton ( )

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

References $lng.

{
global $lng;
return "<a class=\"submit\" onClick=\"toggleSections();\" href=\"#\">".$lng->txt("toggle_hidden_sections")."</a>";
}
ilInfoScreenGUI::getHTML ( )

get html

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

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

Referenced by getCenterColumnHTML().

{
global $lng, $ilSetting, $tree, $ilAccess, $ilCtrl, $ilUser;
$tpl = new ilTemplate("tpl.infoscreen.html" ,true, true, "Services/InfoScreen");
// other class handles form action (@todo: this is not implemented/tested)
if ($this->form_action == "")
{
$this->setFormAction($ilCtrl->getFormAction($this));
}
if($this->hidden)
{
$tpl->touchBlock("hidden_js");
if($this->show_hidden_toggle)
{
$this->addButton($lng->txt("toggle_hidden_sections"), "JavaScript:toggleSections();");
}
}
// add top buttons
if (count($this->top_buttons) > 0)
{
$tpl->addBlockfile("TOP_BUTTONS", "top_buttons", "tpl.buttons.html");
foreach($this->top_buttons as $button)
{
// view button
$tpl->setCurrentBlock("btn_cell");
$tpl->setVariable("BTN_LINK", $button["link"]);
$tpl->setVariable("BTN_TARGET", $button["target"]);
$tpl->setVariable("BTN_TXT", $button["title"]);
$tpl->parseCurrentBlock();
}
}
// add top formbuttons
if ((count($this->top_formbuttons) > 0) && (strlen($this->form_action) > 0))
{
$tpl->addBlockfile("TOP_FORMBUTTONS", "top_submitbuttons", "tpl.submitbuttons.html");
foreach($this->top_formbuttons as $button)
{
// view button
$tpl->setCurrentBlock("btn_submit_cell");
$tpl->setVariable("BTN_COMMAND", $button["command"]);
$tpl->setVariable("BTN_NAME", $button["title"]);
$tpl->parseCurrentBlock();
}
}
// add form action
if (strlen($this->form_action) > 0)
{
if(strlen($this->form_target))
{
$tpl->setCurrentBlock('formtarg');
$tpl->setVariable('FORMTARGET',$this->form_target);
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("formtop");
$tpl->setVariable("FORMACTION", $this->form_action);
$tpl->parseCurrentBlock();
$tpl->touchBlock("formbottom");
}
if (count($this->hiddenelements))
{
foreach ($this->hiddenelements as $hidden)
{
$tpl->setCurrentBlock("hidden_element");
$tpl->setVariable("HIDDEN_NAME", $hidden["name"]);
$tpl->setVariable("HIDDEN_VALUE", $hidden["value"]);
$tpl->parseCurrentBlock();
}
}
// learning progress
if($this->learning_progress_enabled and $html = $this->showLearningProgress($tpl))
{
$tpl->setCurrentBlock("learning_progress");
$tpl->setVariable("LP_TABLE",$html);
$tpl->parseCurrentBlock();
}
// notes section
if ($this->private_notes_enabled && !$ilSetting->get('disable_notes'))
{
$html = $this->showNotesSection();
$tpl->setCurrentBlock("notes");
$tpl->setVariable("NOTES", $html);
$tpl->parseCurrentBlock();
}
// tagging
if (is_object($this->gui_object->object))
{
$tags_set = new ilSetting("tags");
if ($tags_set->get("enable") && $ilUser->getId() != ANONYMOUS_USER_ID)
{
$this->addTagging();
}
}
if(is_object($this->gui_object->object))
{
}
// render all sections
for($i = 1; $i <= $this->sec_nr; $i++)
{
if (is_array($this->section[$i]["properties"]))
{
// section properties
foreach($this->section[$i]["properties"] as $property)
{
if ($property["name"] != "")
{
if ($property["link"] == "")
{
$tpl->setCurrentBlock("pv");
$tpl->setVariable("TXT_PROPERTY_VALUE", $property["value"]);
$tpl->parseCurrentBlock();
}
else
{
$tpl->setCurrentBlock("lpv");
$tpl->setVariable("TXT_PROPERTY_LVALUE", $property["value"]);
$tpl->setVariable("LINK_PROPERTY_VALUE", $property["link"]);
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("property_row");
$tpl->setVariable("TXT_PROPERTY", $property["name"]);
$tpl->parseCurrentBlock();
}
else
{
$tpl->setCurrentBlock("property_full_row");
$tpl->setVariable("TXT_PROPERTY_FULL_VALUE", $property["value"]);
$tpl->parseCurrentBlock();
}
}
// section header
if($this->section[$i]["hidden"])
{
$tpl->setVariable("SECTION_HIDDEN", " style=\"display:none;\"");
$tpl->setVariable("SECTION_ID", "hidable_".$i);
}
else
{
$tpl->setVariable("SECTION_ID", $i);
}
$tpl->setVariable("TCLASS", $this->getTableClass());
$tpl->setVariable("TXT_SECTION", $this->section[$i]["title"]);
$tpl->touchBlock("row");
}
}
return $tpl->get();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInfoScreenGUI::getRightColumnHTML ( )

Display right column.

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

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

Referenced by showSummary().

{
global $ilUser, $lng, $ilCtrl;
include_once("Services/Block/classes/class.ilColumnGUI.php");
$column_gui = new ilColumnGUI("info", IL_COL_RIGHT);
$this->setColumnSettings($column_gui);
if ($ilCtrl->getNextClass() == "ilcolumngui" &&
$column_gui->getCmdSide() == IL_COL_RIGHT &&
$column_gui->getScreenMode() == IL_SCREEN_SIDE)
{
$html = $ilCtrl->forwardCommand($column_gui);
}
else
{
if (!$ilCtrl->isAsynch())
{
if ($this->news_enabled)
{
$html = $ilCtrl->getHTML($column_gui);
}
}
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInfoScreenGUI::getTableClass ( )

Get table class.

Returns
string table class

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

References $table_class.

Referenced by getHTML().

{
}

+ Here is the caller graph for this function:

ilInfoScreenGUI::getTabs ( $tabs_gui)

get tabs

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

References $_GET.

Referenced by setTabs().

{
global $rbacsystem,$ilUser,$ilAccess;
$next_class = $this->ctrl->getNextClass($this);
$force_active = ($next_class == "ilnotegui")
? true
: false;
$tabs_gui->addSubTabTarget('summary',
$this->ctrl->getLinkTarget($this, "showSummary"),
array("showSummary", ""),
get_class($this), "", $force_active);
if ($this->feedback_enabled)
{
$show_feedback_tab=false;
if($ilAccess->checkAccess('write','edit',$_GET['ref_id']))
{
$show_feedback_tab=true;
}
else
{
// this should work with feedback class available
// maybe a line... "@ ilCtrl_Calls ilFeedbackGUI:"
// in the header of feedbackgui is necessary
include_once('Services/Feedback/classes/class.ilFeedback.php');
$feedback = new ilFeedback();
$feedback->setRefId($_GET['ref_id']);
$barometers = $feedback->getAllBarometer(0);
if(count($barometers))
{
foreach ($barometers as $barometer)
{
if($barometer->canVote($ilUser->getId(),$barometer->getId())==1)
{
$show_feedback_tab=true;
break;
}
}
}
}
if ($show_feedback_tab)
{
$tabs_gui->addSubTabTarget("feedback",
$this->ctrl->getLinkTargetByClass("ilfeedbackgui", "fbList"),
"", "ilfeedbackgui");
}
/*
$tabs_gui->addSubTabTarget("feedb_feedback_settings",
$this->ctrl->getLinkTargetByClass("ilfeedbackgui", "fbList"),
"", "ilfeedbackgui");*/
}
}

+ Here is the caller graph for this function:

ilInfoScreenGUI::hideFurtherSections (   $a_add_toggle = true)

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

{
$this->hidden = true;
$this->show_hidden_toggle = (bool)$a_add_toggle;
}
ilInfoScreenGUI::ilInfoScreenGUI (   $a_gui_object)

Constructor.

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

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

References $ilCtrl, $ilias, and $lng.

{
global $ilias, $ilCtrl, $lng,$ilTabs;
$this->ilias =& $ilias;
$this->ctrl =& $ilCtrl;
$this->lng =& $lng;
$this->tabs_gui =& $ilTabs;
$this->gui_object =& $a_gui_object;
$this->sec_nr = 0;
$this->private_notes_enabled = false;
$this->news_enabled = false;
$this->feedback_enabled = false;
$this->learning_progress_enabled = false;
$this->form_action = "";
$this->top_formbuttons = array();
$this->hiddenelements = array();
}
ilInfoScreenGUI::removeFormAction ( )

remove form action

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

{
$this->form_action = "";
}
ilInfoScreenGUI::saveProgress ( )

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

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

{
global $ilUser;
include_once 'Services/Tracking/classes/class.ilLPObjSettings.php';
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
$lp_marks = new ilLPMarks($this->gui_object->object->getId(),$ilUser->getId());
$lp_marks->setCompleted((bool) $_POST['lp_edit']);
$lp_marks->update();
require_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
ilLPStatusWrapper::_updateStatus($this->gui_object->object->getId(),$ilUser->getId());
$this->lng->loadLanguageModule('trac');
ilUtil::sendSuccess($this->lng->txt('trac_updated_status'));
$this->showSummary();
}

+ Here is the call graph for this function:

ilInfoScreenGUI::saveTags ( )

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

References $ilCtrl, and showSummary().

{
global $ilCtrl;
include_once("Services/Tagging/classes/class.ilTaggingGUI.php");
$tagging_gui = new ilTaggingGUI();
$tagging_gui->setObject($this->gui_object->object->getId(),
$this->gui_object->object->getType());
$tagging_gui->saveInput();
return $this->showSummary();
}

+ Here is the call graph for this function:

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

{
$this->block_property[$a_block_type][$a_property] = $a_value;
}
ilInfoScreenGUI::setColumnSettings (   $column_gui)

Set column settings.

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

References $lng, and getAllBlockProperties().

Referenced by getCenterColumnHTML(), and getRightColumnHTML().

{
global $lng, $ilAccess;
$column_gui->setEnableEdit($this->news_editing);
$column_gui->setRepositoryMode(true);
$column_gui->setAllBlockProperties($this->getAllBlockProperties());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInfoScreenGUI::setFormAction (   $a_form_action,
  $a_form_target = '' 
)

set a form action

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

Referenced by getHTML().

{
$this->form_action = $a_form_action;
$this->form_target = $a_form_target;
}

+ Here is the caller graph for this function:

ilInfoScreenGUI::setTableClass (   $a_val)

Set table class.

Parameters
stringtable class

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

{
$this->table_class = $a_val;
}
ilInfoScreenGUI::setTabs ( )

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

References $tpl, and getTabs().

Referenced by executeCommand().

{
global $tpl;
$this->getTabs($this->tabs_gui);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

{
if(strlen($a_section))
{
$this->addSection($a_section);
}
include_once('Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
if($infos = $ldap_mapping->getInfoStrings($this->gui_object->object->getId()))
{
$info_combined = '<div style="color:green;">';
$counter = 0;
foreach($infos as $info_string)
{
if($counter++)
{
$info_combined .= '<br />';
}
$info_combined .= $info_string;
}
$info_combined .= '</div>';
$this->addProperty($this->lng->txt('applications'),$info_combined);
}
return true;
}

+ Here is the call graph for this function:

ilInfoScreenGUI::showLearningProgress (   $a_tpl)

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

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

Referenced by getHTML().

{
global $ilUser,$rbacsystem;
if(!$rbacsystem->checkAccess('read',$this->gui_object->object->getRefId()))
{
return false;
}
if($ilUser->getId() == ANONYMOUS_USER_ID)
{
return false;
}
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
if (!ilObjUserTracking::_enabledLearningProgress() and $ilUser->getId() != ANONYMOUS_USER_ID)
{
return false;
}
include_once 'Services/Tracking/classes/class.ilLPObjSettings.php';
include_once 'Services/Tracking/classes/class.ilLPMarks.php';
if(ilLPObjSettings::_lookupMode($this->gui_object->object->getId()) != LP_MODE_MANUAL)
{
return false;
}
$this->lng->loadLanguageModule('trac');
// section header
// $a_tpl->setCurrentBlock("header_row");
$a_tpl->setVariable("TXT_SECTION",
$this->lng->txt('learning_progress'));
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("row");
// status
$i_tpl = new ilTemplate("tpl.lp_edit_manual_info_page.html", true, true, "Services/Tracking");
$i_tpl->setVariable("INFO_EDITED", $this->lng->txt("trac_info_edited"));
$i_tpl->setVariable("SELECT_STATUS", ilUtil::formSelect((int) ilLPMarks::_hasCompleted($ilUser->getId(),
$this->gui_object->object->getId()),
'lp_edit',
array(0 => $this->lng->txt('trac_not_completed'),
1 => $this->lng->txt('trac_completed')),
false,
true));
$i_tpl->setVariable("TXT_SAVE", $this->lng->txt("save"));
$a_tpl->setCurrentBlock("pv");
$a_tpl->setVariable("TXT_PROPERTY_VALUE", $i_tpl->get());
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("property_row");
$a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_status'));
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("row");
// More infos for lm's
if($this->gui_object->object->getType() == 'lm' ||
$this->gui_object->object->getType() == 'htlm')
{
$a_tpl->setCurrentBlock("pv");
include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
$progress = ilLearningProgress::_getProgress($ilUser->getId(),$this->gui_object->object->getId());
if($progress['access_time'])
{
$a_tpl->setVariable("TXT_PROPERTY_VALUE",
}
else
{
$a_tpl->setVariable("TXT_PROPERTY_VALUE",
$this->lng->txt('trac_not_accessed'));
}
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("property_row");
$a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_last_access'));
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("row");
// tags of all users
$a_tpl->setCurrentBlock("pv");
$a_tpl->setVariable("TXT_PROPERTY_VALUE",
(int) $progress['visits']);
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("property_row");
$a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_visits'));
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("row");
if($this->gui_object->object->getType() == 'lm')
{
// tags of all users
$a_tpl->setCurrentBlock("pv");
$a_tpl->setVariable("TXT_PROPERTY_VALUE",
ilFormat::_secondsToString($progress['spent_seconds']));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("property_row");
$a_tpl->setVariable("TXT_PROPERTY", $this->lng->txt('trac_spent_time'));
$a_tpl->parseCurrentBlock();
$a_tpl->touchBlock("row");
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInfoScreenGUI::showNotesSection ( )

show notes section

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

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

Referenced by getHTML().

{
global $ilAccess, $ilSetting;
$next_class = $this->ctrl->getNextClass($this);
include_once("Services/Notes/classes/class.ilNoteGUI.php");
$notes_gui = new ilNoteGUI($this->gui_object->object->getId(), 0,
$this->gui_object->object->getType());
// global switch
if($ilSetting->get("disable_comments"))
{
$notes_gui->enablePublicNotes(false);
}
else
{
/* should probably be discussed further
for now this will only work properly with comments settings
(see ilNoteGUI constructor)
*/
$ref_id = $this->gui_object->object->getRefId();
if ($ilAccess->checkAccess("write", "", $ref_id) ||
$ilAccess->checkAccess("edit_permissions", "", $ref_id))
{
$notes_gui->enableCommentsSettings();
}
}
/* moved to action menu
$notes_gui->enablePrivateNotes();
*/
if ($next_class == "ilnotegui")
{
$html = $this->ctrl->forwardCommand($notes_gui);
}
else
{
$html = $notes_gui->getNotesHTML();
}
return $html;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilInfoScreenGUI::showSummary ( )

show summary page

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

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

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

{
global $tpl, $ilAccess;
$tpl->setContent($this->getCenterColumnHTML());
$tpl->setRightContent($this->getRightColumnHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilInfoScreenGUI::$ctrl

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

ilInfoScreenGUI::$form_action

a form action parameter.

if set a form is generated

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

ilInfoScreenGUI::$gui_object

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

ilInfoScreenGUI::$hiddenelements = array()

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

ilInfoScreenGUI::$ilias

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

Referenced by addObjectSections(), and ilInfoScreenGUI().

ilInfoScreenGUI::$table_class = "il_InfoScreen"

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

Referenced by getTableClass().

ilInfoScreenGUI::$top_buttons = array()

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

ilInfoScreenGUI::$top_formbuttons = array()

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


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