ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjLearningModuleListGUI Class Reference

Class ilObjLearningModuleListGUI. More...

+ Inheritance diagram for ilObjLearningModuleListGUI:
+ Collaboration diagram for ilObjLearningModuleListGUI:

Public Member Functions

 ilObjLearningModuleListGUI ()
 constructor
 init ()
 initialisation
 setChildId ($a_child_id)
 getChildId ()
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="")
 inititialize new item (is called by getItemHTML())
 getCommandLink ($a_cmd)
 Overwrite this method, if link target is not build by ctrl class (e.g.
 getCommandFrame ($a_cmd)
 Get command target frame.
 getProperties ()
 Get item properties.
 getCommandImage ($a_cmd)
 Get command icon image.
- Public Member Functions inherited from ilObjectListGUI
 ilObjectListGUI ()
 constructor
 setContainerObject (&$container_obj)
 set the container object (e.g categorygui) Used for link, delete ...
 getContainerObject ()
 get container object
 enableProperties ($a_status)
 En/disable properties.
 getPropertiesStatus ()
 enablePreconditions ($a_status)
 En/disable preconditions.
 getNoticePropertiesStatus ()
 enableNoticeProperties ($a_status)
 En/disable notices.
 getPreconditionsStatus ()
 enableDescription ($a_status)
 En/disable description.
 getDescriptionStatus ()
 getSearchFragmentStatus ()
 Show hide search result fragments.
 enableSearchFragments ($a_status)
 En/disable description.
 enableLinkedPath ($a_status)
 Enable linked path.
 enabledRelevance ()
 enabled relevance
 enableRelevance ($a_status)
 enable relevance
 setRelevance ($a_rel)
 set relevance
 getRelevance ()
 get relevance
 enableIcon ($a_status)
 En/Dis-able icons.
 getIconStatus ()
 Are icons enabled?
 enableCheckbox ($a_status)
 En/Dis-able checkboxes.
 getCheckboxStatus ()
 Are checkboxes enabled?
 enableExpand ($a_status)
 En/Dis-able expand/collapse link.
 getExpandStatus ()
 Is expand/collapse enabled.
 setExpanded ($a_status)
 isExpanded ()
 setPositionInputField ($a_field_index, $a_position_value)
 Set position input field.
 enableDelete ($a_status)
 En/disable delete.
 getDeleteStatus ()
 enableCut ($a_status)
 En/disable cut.
 getCutStatus ()
 enableCopy ($a_status)
 En/disable copy.
 getCopyStatus ()
 enableSubscribe ($a_status)
 En/disable subscribe.
 getSubscribeStatus ()
 enablePayment ($a_status)
 En/disable payment.
 getPaymentStatus ()
 enableLink ($a_status)
 En/disable link.
 getLinkStatus ()
 enablePath ($a_path)
 En/disable path.
 getPathStatus ()
 enableCommands ($a_status, $a_std_only=false)
 En/disable commands.
 getCommandsStatus ()
 enableInfoScreen ($a_info_screen)
 En/disable path.
 addSubItemHTML ($a_html)
 Add HTML for subitem (used for sessions)
 getInfoScreenStatus ()
 enableProgressInfo ($a_status)
 enable progress info
 getProgressInfoStatus ()
 get progress info status
 enableSubstitutions ($a_status)
 Enable substitutions.
 getSubstitutionStatus ()
 Get substitution status.
 enableItemDetailLinks ($a_status)
 enable item detail links E.g Direct links to chapters or pages
 getItemDetailLinkStatus ()
 get item detail link status
 setItemDetailLinks ($a_detail_links, $a_intro_txt= '')
 set items detail links
 insertItemDetailLinks ()
 insert item detail links
 setTitle ($a_title)
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php
 setDescription ($a_description)
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php
 setSearchFragment ($a_text)
 set search fragment
 getSearchFragment ()
 get search fragment
 setSeparateCommands ($a_val)
 Set separate commands.
 getSeparateCommands ()
 Get separate commands.
 getCommandId ()
 get command id Normally the ref id.
 setAdditionalInformation ($a_val)
 Set additional information.
 getAdditionalInformation ()
 Get additional information.
 setDetailsLevel ($a_level)
 Details level Currently used in Search which shows only limited properties of forums Currently used for Sessions (switch between minimal and extended view for each session)
 getDetailsLevel ()
 Get current details level.
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
 createDefaultCommand ($command)
 Get default command link Overwritten for e.g categories,courses => they return a goto link If search engine visibility is enabled these object type return a goto_CLIENT_ID_cat_99.html link.
 getProperties ($a_item= '')
 Get item properties.
 addCustomProperty ($a_property="", $a_value="", $a_alert=false, $a_newline=false)
 add custom property
 getCustomProperties ($a_prop)
 get custom properties
 getNoticeProperties ()
 get notice properties
 addCustomCommand ($a_link, $a_lang_var, $a_frame="")
 add a custom command
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user)
 getIconImageType ()
 Returns the icon image type.
 insertTitle ()
 insert item title
 insertSubstitutions ()
 Insert substitutions.
 insertDescription ()
 insert item description
 insertSearchFragment ()
 Insert highlighted search fragment.
 insertRelevance ()
 insert relevance
 setMode ($a_mode)
 set output mode
 getMode ()
 get output mode
 setConditionDepth ($a_depth)
 set depth for precondition output (stops at level 5)
 isMode ($a_mode)
 check current output mode
 insertProperties ($a_item= '')
 insert properties
 insertNoticeProperties ()
 insertPayment ()
 insert payment information
 insertPreconditions ()
 insert all missing preconditions
 insertCommand ($a_href, $a_text, $a_frame="", $a_img="")
 insert command button
 insertDeleteCommand ()
 insert cut command
 insertLinkCommand ()
 insert link command
 insertCutCommand ()
 insert cut command
 insertCopyCommand ()
 Insert copy command.
 insertPasteCommand ()
 Insert paste command.
 insertSubscribeCommand ()
 insert subscribe command
 insertInfoScreenCommand ()
 insert info screen command
 insertCommands ($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="")
 insert all commands into html code
 appendRepositoryFrameParameter ($a_link)
 workaround: all links into the repository (from outside) must tell repository to setup the frameset
 insertPath ()
 insert path
 insertProgressInfo ()
 insert progress info
 insertIconsAndCheckboxes ()
 Insert icons and checkboxes.
 insertSubItems ()
 Insert subitems.
 insertPositionField ()
 Insert field for positioning.
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output
 storeAccessCache ()
 Store access cache.
 getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="")
 Get all item information (title, commands, description) in HTML.
 getCommandsHTML ()
 Get commands HTML (must be called after get list item html)
 isSideBlock ()
 Returns whether current item is a block in a side column or not.
 setBoldTitle ($a_bold_title)
 public boolean $a_bold_title set the item title bold
 isTitleBold ()
 public
 ilObjectListGUI ()
 constructor
 setContainerObject (&$container_obj)
 set the container object (e.g categorygui) Used for link, delete ...
 getContainerObject ()
 get container object
 enableProperties ($a_status)
 En/disable properties.
 getPropertiesStatus ()
 enablePreconditions ($a_status)
 En/disable preconditions.
 getNoticePropertiesStatus ()
 enableNoticeProperties ($a_status)
 En/disable notices.
 getPreconditionsStatus ()
 enableDescription ($a_status)
 En/disable description.
 getDescriptionStatus ()
 getSearchFragmentStatus ()
 Show hide search result fragments.
 enableSearchFragments ($a_status)
 En/disable description.
 enableLinkedPath ($a_status)
 Enable linked path.
 enabledRelevance ()
 enabled relevance
 enableRelevance ($a_status)
 enable relevance
 setRelevance ($a_rel)
 set relevance
 getRelevance ()
 get relevance
 enableIcon ($a_status)
 En/Dis-able icons.
 getIconStatus ()
 Are icons enabled?
 enableCheckbox ($a_status)
 En/Dis-able checkboxes.
 getCheckboxStatus ()
 Are checkboxes enabled?
 enableExpand ($a_status)
 En/Dis-able expand/collapse link.
 getExpandStatus ()
 Is expand/collapse enabled.
 setExpanded ($a_status)
 isExpanded ()
 setPositionInputField ($a_field_index, $a_position_value)
 Set position input field.
 enableDelete ($a_status)
 En/disable delete.
 getDeleteStatus ()
 enableCut ($a_status)
 En/disable cut.
 getCutStatus ()
 enableCopy ($a_status)
 En/disable copy.
 getCopyStatus ()
 enableSubscribe ($a_status)
 En/disable subscribe.
 getSubscribeStatus ()
 enablePayment ($a_status)
 En/disable payment.
 getPaymentStatus ()
 enableLink ($a_status)
 En/disable link.
 getLinkStatus ()
 enablePath ($a_path)
 En/disable path.
 getPathStatus ()
 enableCommands ($a_status, $a_std_only=false)
 En/disable commands.
 getCommandsStatus ()
 enableInfoScreen ($a_info_screen)
 En/disable path.
 addSubItemHTML ($a_html)
 Add HTML for subitem (used for sessions)
 getInfoScreenStatus ()
 enableProgressInfo ($a_status)
 enable progress info
 getProgressInfoStatus ()
 get progress info status
 enableSubstitutions ($a_status)
 Enable substitutions.
 getSubstitutionStatus ()
 Get substitution status.
 enableItemDetailLinks ($a_status)
 enable item detail links E.g Direct links to chapters or pages
 getItemDetailLinkStatus ()
 get item detail link status
 setItemDetailLinks ($a_detail_links, $a_intro_txt= '')
 set items detail links
 insertItemDetailLinks ()
 insert item detail links
 setTitle ($a_title)
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php
 setDescription ($a_description)
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php
 setSearchFragment ($a_text)
 set search fragment
 getSearchFragment ()
 get search fragment
 setSeparateCommands ($a_val)
 Set separate commands.
 getSeparateCommands ()
 Get separate commands.
 getCommandId ()
 get command id Normally the ref id.
 setAdditionalInformation ($a_val)
 Set additional information.
 getAdditionalInformation ()
 Get additional information.
 setDetailsLevel ($a_level)
 Details level Currently used in Search which shows only limited properties of forums Currently used for Sessions (switch between minimal and extended view for each session)
 getDetailsLevel ()
 Get current details level.
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
 createDefaultCommand ($command)
 Get default command link Overwritten for e.g categories,courses => they return a goto link If search engine visibility is enabled these object type return a goto_CLIENT_ID_cat_99.html link.
 getProperties ($a_item= '')
 Get item properties.
 addCustomProperty ($a_property="", $a_value="", $a_alert=false, $a_newline=false)
 add custom property
 getCustomProperties ($a_prop)
 get custom properties
 getNoticeProperties ()
 get notice properties
 addCustomCommand ($a_link, $a_lang_var, $a_frame="")
 add a custom command
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user)
 getIconImageType ()
 Returns the icon image type.
 insertTitle ()
 insert item title
 insertSubstitutions ()
 Insert substitutions.
 insertDescription ()
 insert item description
 insertSearchFragment ()
 Insert highlighted search fragment.
 insertRelevance ()
 insert relevance
 setMode ($a_mode)
 set output mode
 getMode ()
 get output mode
 setConditionDepth ($a_depth)
 set depth for precondition output (stops at level 5)
 isMode ($a_mode)
 check current output mode
 insertProperties ($a_item= '')
 insert properties
 insertNoticeProperties ()
 insertPayment ()
 insert payment information
 insertPreconditions ()
 insert all missing preconditions
 insertCommand ($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="")
 insert command button
 insertDeleteCommand ()
 insert cut command
 insertLinkCommand ()
 insert link command
 insertCutCommand ()
 insert cut command
 insertCopyCommand ()
 Insert copy command.
 insertPasteCommand ()
 Insert paste command.
 insertSubscribeCommand ()
 insert subscribe command
 insertInfoScreenCommand ()
 insert info screen command
 insertCommands ($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="")
 insert all commands into html code
 appendRepositoryFrameParameter ($a_link)
 workaround: all links into the repository (from outside) must tell repository to setup the frameset
 insertPath ()
 insert path
 insertProgressInfo ()
 insert progress info
 insertIconsAndCheckboxes ()
 Insert icons and checkboxes.
 insertSubItems ()
 Insert subitems.
 insertPositionField ()
 Insert field for positioning.
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output
 storeAccessCache ()
 Store access cache.
 getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="")
 Get all item information (title, commands, description) in HTML.
 getCommandsHTML ()
 Get commands HTML (must be called after get list item html)
 isSideBlock ()
 Returns whether current item is a block in a side column or not.
 setBoldTitle ($a_bold_title)
 public boolean $a_bold_title set the item title bold
 isTitleBold ()
 public

Additional Inherited Members

- Data Fields inherited from ilObjectListGUI
const DETAILS_MINIMAL = 10
const DETAILS_SEARCH = 20
const DETAILS_ALL = 30
 $ctrl
 $description_enabled = true
 $preconditions_enabled = true
 $properties_enabled = true
 $notice_properties_enabled = true
 $commands_enabled = true
 $cust_prop = array()
 $cust_commands = array()
 $info_screen_enabled = false
 $condition_depth = 0
 $std_cmd_only = false
 $sub_item_html = array()
- Protected Member Functions inherited from ilObjectListGUI
 insertPaymentCommand ()
 insertPaymentCommand ()
- Protected Attributes inherited from ilObjectListGUI
 $substitutions = null
 $substitutions_enabled = false
 $icons_enabled = false
 $checkboxes_enabled = false
 $position_enabled = false
 $progress_enabled = false
 $item_detail_links_enabled = false
 $item_detail_links = array()
 $item_detail_links_intro = ''
 $search_fragments_enabled = false
 $search_fragment = ''
 $path_linked = false
 $enabled_relevance = false
 $relevance = 0
 $expand_enabled = false
 $is_expanded = true
 $bold_title = false
 $copy_enabled = true
 $details_level = self::DETAILS_ALL
 $reference_ref_id = false
 $separate_commands = false
 $search_fragment_enabled = false
 $additional_information = false
 $static_link_enabled = false

Detailed Description

Member Function Documentation

ilObjLearningModuleListGUI::getChildId ( )

Definition at line 72 of file class.ilObjLearningModuleListGUI.php.

{
return $this->child_id;
}
ilObjLearningModuleListGUI::getCommandFrame (   $a_cmd)

Get command target frame.

Parameters
string$a_cmdcommand
Returns
string command target frame

Reimplemented from ilObjectListGUI.

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

References ilFrameTargetInfo\_getFrame(), ilPaymentObject\_hasAccess(), and ilPaymentObject\_isBuyable().

{
global $ilias;
switch($a_cmd)
{
case "view":
case "continue":
case 'list':
include_once 'Services/Payment/classes/class.ilPaymentObject.php';
if (ilPaymentObject::_isBuyable($this->ref_id) &&
!ilPaymentObject::_hasAccess($this->ref_id))
{
$frame = '';
}
else
{
$frame = ilFrameTargetInfo::_getFrame("MainContent");
//$frame = "ilContObj".$this->obj_id;
}
break;
case "edit":
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
case "infoScreen":
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
default:
$frame = "";
break;
}
return $frame;
}

+ Here is the call graph for this function:

ilObjLearningModuleListGUI::getCommandImage (   $a_cmd)

Get command icon image.

Reimplemented from ilObjectListGUI.

Definition at line 246 of file class.ilObjLearningModuleListGUI.php.

References ilUtil\getImagePath().

{
switch ($a_cmd)
{
case "continue":
return ilUtil::getImagePath("cmd_continue_s.gif");
default:
return "";
}
}

+ Here is the call graph for this function:

ilObjLearningModuleListGUI::getCommandLink (   $a_cmd)

Overwrite this method, if link target is not build by ctrl class (e.g.

"forum.php"). This is the case for all links now, but bringing everything to ilCtrl should be realised in the future.

Parameters
string$a_cmdcommand

Reimplemented from ilObjectListGUI.

Definition at line 100 of file class.ilObjLearningModuleListGUI.php.

{
switch($a_cmd)
{
case "continue":
$cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->ref_id.
"&obj_id=".$this->last_accessed_page;
break;
case "page":
// Used for presentation of single pages chapters in search results
$cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->ref_id.
"&obj_id=".$this->getChildId();
break;
case "view":
$cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->ref_id;
break;
case "edit":
$cmd_link = "ilias.php?baseClass=ilLMEditorGUI&ref_id=".$this->ref_id;
break;
case "infoScreen":
$cmd_link = "ilias.php?baseClass=ilLMPresentationGUI&ref_id=".$this->ref_id.
"&cmd=infoScreen&file_id".$this->getChildId();
break;
case 'downloadFile':
$cmd_link = 'ilias.php?baseClass=ilLMPresentationGUI&ref_id='.$this->ref_id.
'&cmd=downloadFile&file_id='.$this->getChildId();
break;
default:
$cmd_link = "repository.php?ref_id=".$this->ref_id."&cmd=$a_cmd";
break;
}
return $cmd_link;
}
ilObjLearningModuleListGUI::getProperties ( )

Get item properties.

Returns
array array of property arrays: "alert" (boolean) => display as an alert property (usually in red) "property" (string) => property name "value" (string) => property value

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

References $lng, ilPaymentObject\_hasAccess(), ilPaymentObject\_isBuyable(), ilPaymentObject\_isInCart(), and ilObjContentObjectAccess\_lookupOnline().

{
global $lng, $rbacsystem;
$props = array();
include_once("./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php");
{
$props[] = array("alert" => true, "property" => $lng->txt("status"),
"value" => $lng->txt("offline"));
}
if ($rbacsystem->checkAccess('write',$this->ref_id))
{
$props[] = array("alert" => false, "property" => $lng->txt("type"),
"value" => $lng->txt("lm"));
}
if(IS_PAYMENT_ENABLED)
{
include_once("Services/Payment/classes/class.ilPaymentObject.php");
if (ilPaymentObject::_isBuyable($this->ref_id))
{
if (ilPaymentObject::_hasAccess($this->ref_id))
{
$props[] = array("alert" => false, "property" => $lng->txt("payment_system"),
"value" => $lng->txt("payment_payed_access"));
}
else if (ilPaymentObject::_isInCart($this->ref_id))
{
$props[] = array("alert" => true, "property" => $lng->txt("payment_system"),
"value" => $lng->txt("payment_in_sc"));
}
else
{
$props[] = array("alert" => true, "property" => $lng->txt("payment_system"),
"value" => $lng->txt("payment_buyable"));
}
}
}
return $props;
}

+ Here is the call graph for this function:

ilObjLearningModuleListGUI::ilObjLearningModuleListGUI ( )

constructor

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

References ilObjectListGUI\ilObjectListGUI().

{
$this->ilObjectListGUI();
}

+ Here is the call graph for this function:

ilObjLearningModuleListGUI::init ( )

initialisation

this method should be overwritten by derived classes

Reimplemented from ilObjectListGUI.

Definition at line 50 of file class.ilObjLearningModuleListGUI.php.

References ilObjLearningModuleAccess\_getCommands().

{
$this->static_link_enabled = true;
$this->delete_enabled = true;
$this->cut_enabled = true;
$this->copy_enabled = false;
$this->subscribe_enabled = true;
$this->link_enabled = true;
$this->payment_enabled = true;
$this->info_screen_enabled = true;
$this->type = "lm";
$this->gui_class_name = "ilobjlearningmodulegui";
// general commands array
include_once('./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php');
}

+ Here is the call graph for this function:

ilObjLearningModuleListGUI::initItem (   $a_ref_id,
  $a_obj_id,
  $a_title = "",
  $a_description = "" 
)

inititialize new item (is called by getItemHTML())

Parameters
int$a_ref_idreference id
int$a_obj_idobject id
string$a_titletitle
string$a_descriptiondescription

Reimplemented from ilObjectListGUI.

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

References ilObjContentObjectAccess\_getLastAccessedPage().

{
global $ilUser;
parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
include_once("./Modules/LearningModule/classes/class.ilObjLearningModuleAccess.php");
$this->last_accessed_page =
}

+ Here is the call graph for this function:

ilObjLearningModuleListGUI::setChildId (   $a_child_id)

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

{
$this->child_id = $a_child_id;
}

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