ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCourseObjectiveListGUI Class Reference

List gui for course objectives. More...

+ Inheritance diagram for ilCourseObjectiveListGUI:
+ Collaboration diagram for ilCourseObjectiveListGUI:

Public Member Functions

 init ()
 @inheritDoc More...
 
 getObjectiveListItemHTML (int $a_ref_id, int $a_obj_id, string $a_title, string $a_description, bool $a_manage=false)
 
 insertTitle ()
 @inheritDoc More...
 
 insertProgressInfo ()
 @inheritDoc More...
 
- Public Member Functions inherited from ilObjectListGUI
 setContainerObject (object $container_obj)
 
 getContainerObject ()
 
 init ()
 initialisation More...
 
 enableProperties (bool $status)
 
 getPropertiesStatus ()
 
 enablePreconditions (bool $status)
 
 getPreconditionsStatus ()
 
 enableNoticeProperties (bool $status)
 
 getNoticePropertiesStatus ()
 
 enableDescription (bool $status)
 
 getDescriptionStatus ()
 
 enableSearchFragments (bool $status)
 
 getSearchFragmentStatus ()
 
 enableLinkedPath (bool $status)
 
 setRelevance (int $rel)
 
 getRelevance ()
 
 enableIcon (bool $status)
 
 getIconStatus ()
 
 enableCheckbox (bool $status)
 
 getCheckboxStatus ()
 
 enableExpand (bool $status)
 
 getExpandStatus ()
 
 setExpanded (bool $status)
 
 isExpanded ()
 
 setPositionInputField (string $field_index, string $position_value)
 
 enableDelete (bool $status)
 
 getDeleteStatus ()
 
 enableCut (bool $status)
 
 getCutStatus ()
 
 enableCopy (bool $status)
 
 getCopyStatus ()
 
 enableSubscribe (bool $status)
 
 getSubscribeStatus ()
 
 enableLink (bool $status)
 
 getLinkStatus ()
 
 enablePath (bool $path, int $start_node=0, ?\ilPathGUI $path_gui=null)
 
 getPathStatus ()
 
 enableCommands (bool $status, bool $std_only=false)
 
 getCommandsStatus ()
 
 enableInfoScreen (bool $info_screen)
 
 getInfoScreenStatus ()
 
 addSubItemHTML (string $html)
 Add HTML for sub item (used for sessions) More...
 
 enableProgressInfo (bool $status)
 
 getProgressInfoStatus ()
 
 enableSubstitutions (bool $status)
 
 getSubstitutionStatus ()
 
 enableItemDetailLinks (bool $status)
 enable item detail links E.g Direct links to chapters or pages More...
 
 getItemDetailLinkStatus ()
 get item detail link status More...
 
 setItemDetailLinks (array $detail_links, string $intro_txt='')
 set items detail links More...
 
 insertItemDetailLinks ()
 
 setTitle (string $title)
 
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php More...
 
 setDescription (string $description)
 
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php More...
 
 setSearchFragment (string $text)
 
 getSearchFragment ()
 
 setSeparateCommands (bool $val)
 
 getSeparateCommands ()
 
 getCommandId ()
 get command id Normally the ref id. More...
 
 setAdditionalInformation (?string $val)
 
 getAdditionalInformation ()
 
 setDetailsLevel (int $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) More...
 
 getDetailsLevel ()
 
 enableRepositoryTransfer (bool $value)
 Enable copy/move to repository (from personal workspace) More...
 
 restrictToGoto (bool $value)
 Restrict all actions/links to goto. More...
 
 getDefaultCommand ()
 
 checkCommandAccess (string $permission, string $cmd, int $ref_id, string $type, ?int $obj_id=null)
 
 initItem (int $ref_id, int $obj_id, string $type, string $title='', string $description='')
 initialize new item (is called by getItemHTML()) More...
 
 setConditionTarget (int $ref_id, int $obj_id, string $target_type)
 
 resetConditionTarget ()
 
 disableTitleLink (bool $status)
 
 setDefaultCommandParameters (array $params)
 
 createDefaultCommand (array $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. More...
 
 getCommandLink (string $cmd)
 Get command link url. More...
 
 getCommandFrame (string $cmd)
 Get command target frame. More...
 
 getCommandImage (string $cmd)
 Get command icon image. More...
 
 getProperties ()
 Get item properties. More...
 
 addCustomProperty (string $property='', string $value='', bool $alert=false, bool $newline=false)
 
 getCustomProperties (array $prop)
 
 getAlertProperties ()
 
 getNoticeProperties ()
 
 addCustomCommand (string $link, string $lang_var, string $frame='', string $onclick='')
 
 addCustomCommandButton (Button $button, ?Modal $triggeredModal=null)
 
 forceVisibleOnly (bool $stat)
 
 isVisibleOnlyForced ()
 
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user) More...
 
 getIconImageType ()
 Returns the icon image type. More...
 
 insertTitle ()
 
 insertSubstitutions ()
 
 insertDescription ()
 
 insertSearchFragment ()
 Insert highlighted search fragment. More...
 
 setMode (string $mode)
 set output mode More...
 
 getMode ()
 get output mode More...
 
 setConditionDepth (int $depth)
 set depth for precondition output (stops at level 5) More...
 
 isMode (string $mode)
 check current output mode More...
 
 determineProperties ()
 
 insertProperties ()
 
 insertNoticeProperties ()
 
 insertPreconditions ()
 insert all missing preconditions More...
 
 insertCommand (string $href, string $text, string $frame='', string $img='', string $cmd='', string $onclick='')
 insert command button More...
 
 insertDeleteCommand ()
 
 insertLinkCommand ()
 
 insertCutCommand (bool $to_repository=false)
 
 insertCopyCommand (bool $to_repository=false)
 
 insertPasteCommand ()
 
 insertSubscribeCommand ()
 
 insertInfoScreenCommand ()
 
 insertCommonSocialCommands (bool $header_actions=false)
 Insert common social commands (comments, notes, tagging) More...
 
 insertTimingsCommand ()
 ks, 23 OCT 2023: This function is badly named and it already was before the changes made today. More...
 
 enableComments (bool $value, bool $enable_comments_settings=true)
 
 enableNotes (bool $value)
 
 enableTags (bool $value)
 
 enableRating (bool $value, ?string $text=null, bool $categories=false, ?array $ctrl_path=null, bool $force_rate_parent=false)
 
 enableMultiDownload (bool $value)
 Toggles whether multiple objects can be downloaded at once or not. More...
 
 insertMultiDownloadCommand ()
 
 enableDownloadCheckbox (int $ref_id)
 
 getDownloadCheckboxState ()
 
 setHeaderSubObject (?string $type, ?int $id)
 
 addHeaderIcon (string $id, string $img, ?string $tooltip=null, ?string $onclick=null, ?string $status_text=null, ?string $href=null)
 
 addHeaderIconHTML (string $id, string $html)
 
 addHeaderGlyph (string $id, ILIAS\UI\Component\Symbol\Glyph\Glyph $glyph, $onclick=null)
 
 setAjaxHash (string $hash)
 
 getHeaderAction (?ilGlobalTemplateInterface $main_tpl=null)
 
 appendRepositoryFrameParameter (string $link)
 workaround: all links into the repository (from outside) must tell repository to set up the frameset More...
 
 modifySAHSlaunch (string $link, string $target)
 workaround: SAHS in new javavasript-created window or iframe More...
 
 insertPath ()
 
 insertProgressInfo ()
 
 insertIconsAndCheckboxes ()
 
 getTypeIcon ()
 Get object type specific type icon. More...
 
 insertSubItems ()
 
 insertPositionField ()
 
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output More...
 
 getListItemHTML (int $ref_id, int $obj_id, string $title, string $description)
 Get all item information (title, commands, description) in HTML. More...
 
 setParentRefId (int $ref_id)
 Set current parent ref id to enable unique js-ids (sessions, etc.) More...
 
 getUniqueItemId (bool $as_div=false)
 Get unique item identifier (for js-actions) More...
 
 getCommandsHTML (string $title='')
 Get commands HTML (must be called after get list item html) More...
 
 isSideBlock ()
 Returns whether current item is a block in a side column or not. More...
 
 setBoldTitle (bool $bold_title)
 
 isTitleBold ()
 
 enableTimings (bool $status)
 enable timings link More...
 
 getAsListItem (int $ref_id, int $obj_id, string $type, string $title, string $description)
 Get list item ui object. More...
 
 getAsCard (int $ref_id, int $obj_id, string $type, string $title, string $description)
 Get card object. More...
 
 checkInfoPageOnAsynchronousRendering ()
 
 insertLPCommand ()
 insert learning progress command More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectListGUI
static prepareJsLinks (string $redraw_url, string $notes_url, string $tags_url, ?ilGlobalTemplateInterface $tpl=null)
 Insert js/ajax links into template. More...
 
static preloadCommonProperties (array $obj_ids, int $context)
 
- Data Fields inherited from ilObjectListGUI
const IL_LIST_AS_TRIGGER = 'trigger'
 
const IL_LIST_FULL = 'full'
 
const DETAILS_MINIMAL = 10
 
const DETAILS_SEARCH = 20
 
const DETAILS_ALL = 30
 
const CONTEXT_REPOSITORY = 1
 
const CONTEXT_WORKSPACE = 2
 
const CONTEXT_WORKSPACE_SHARING = 4
 
const CONTEXT_PERSONAL_DESKTOP = 5
 
const CONTEXT_SEARCH = 6
 
const DOWNLOAD_CHECKBOX_NONE = 0
 
const DOWNLOAD_CHECKBOX_ENABLED = 1
 
const DOWNLOAD_CHECKBOX_DISABLED = 2
 
- Protected Member Functions inherited from ilObjectListGUI
 enableLearningProgress (bool $enabled)
 
 enableLPSettingsCommand (bool $enabled)
 
 buildGotoLink ()
 
 parseConditions (int $toggle_id, array $conditions, bool $obligatory=true)
 
 modifyTitleLink (string $default_link)
 
 resetCustomData ()
 reset properties and commands More...
 
 isCommentsActivated (string $type, int $ref_id, int $obj_id, bool $header_actions, bool $check_write_access=true)
 Check comments status against comments settings and context. More...
 
- Protected Attributes inherited from ilObjectListGUI
bool $force_rate_parent = false
 
array $access_cache
 
ilAccessHandler $access
 
ilObjUser $user
 
LocalDIC $object_dic
 
Properties $object_properties
 
ilObjectDefinition $obj_definition
 
ilTree $tree
 
ilSetting $settings
 
HTTPServices $http
 
UIServices $ui
 
ilGlobalTemplateInterface $main_tpl
 
ilRbacSystem $rbacsystem
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
string $mode
 
bool $path_enabled
 
int $context
 
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
 
ILIAS Refinery Factory $refinery
 
bool $static_link_enabled = false
 
bool $delete_enabled = false
 
bool $cut_enabled = false
 
bool $subscribe_enabled = false
 
bool $link_enabled = false
 
bool $copy_enabled = true
 
bool $progress_enabled = false
 
bool $notice_properties_enabled = true
 
bool $info_screen_enabled = false
 
string $type
 
string $gui_class_name = ''
 
array $commands = []
 
ilLDAPRoleGroupMapping $ldap_mapping
 
ilFavouritesManager $fav_manager
 
int $requested_ref_id
 
string $requested_cmd
 
string $requested_base_class
 
ClipboardManager $clipboard
 
bool $description_enabled = true
 
bool $preconditions_enabled = true
 
bool $properties_enabled = true
 
bool $commands_enabled = true
 
array $cust_prop = []
 
array $cust_commands = []
 
array $cust_modals = []
 
int $condition_depth = 0
 
bool $std_cmd_only = false
 
array $sub_item_html = []
 
bool $multi_download_enabled = false
 
int $download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE
 
int $obj_id
 
int $ref_id
 
int $sub_obj_id
 
string $sub_obj_type
 
ilAdvancedMDSubstitution $substitutions = null
 
bool $substitutions_enabled = false
 
bool $icons_enabled = false
 
bool $checkboxes_enabled = false
 
bool $position_enabled = false
 
bool $item_detail_links_enabled = false
 
array $item_detail_links = []
 
string $item_detail_links_intro = ''
 
bool $search_fragments_enabled = false
 
string $search_fragment = ''
 
bool $path_linked = false
 
int $relevance = 0
 
bool $expand_enabled = false
 
bool $is_expanded = true
 
bool $bold_title = false
 
int $details_level = self::DETAILS_ALL
 
int $reference_ref_id = 0
 
int $reference_obj_id = null
 
bool $separate_commands = false
 
bool $search_fragment_enabled = false
 
string $additional_information = ''
 
bool $repository_transfer_enabled = false
 
bool $shared = false
 
bool $restrict_to_goto = false
 
bool $comments_enabled = false
 
bool $comments_settings_enabled = false
 
bool $notes_enabled = false
 
bool $tags_enabled = false
 
bool $rating_enabled = false
 
bool $rating_categories_enabled = false
 
string $rating_text = null
 
array $rating_ctrl_path = null
 
bool $timings_enabled = true
 
bool $force_visible_only = false
 
array $prevent_duplicate_commands = []
 
int $parent_ref_id
 
string $title_link = ''
 
bool $title_link_disabled = false
 
bool $lp_cmd_enabled = false
 
bool $lp_settings_cmd_enabled = true
 
array $current_actions = []
 
ilPathGUI $path_gui = null
 
array $default_command_params = []
 
array $header_icons = []
 
object $container_obj = null
 
ilTemplate $tpl
 
string $position_value
 
int $path_start_node
 
array $default_command = []
 
bool $adm_commands_included
 
bool $prevent_access_caching
 
array $condition_target
 
array $notice_prop = []
 
string $ajax_hash
 
ilListItemAccessCache $acache
 
string $position_field_index = ''
 
string $title = ''
 
string $description = ''
 
ilWorkspaceAccessHandler $ws_access
 
- Static Protected Attributes inherited from ilObjectListGUI
static array $cnt_notes = []
 
static array $cnt_tags = []
 
static array $tags = []
 
static array $comments_activation = []
 
static bool $preload_done = false
 
static int $js_unique_id = 0
 
static string $tpl_file_name = 'tpl.container_list_item.html'
 
static string $tpl_component = 'components/ILIAS/Container'
 

Detailed Description

List gui for course objectives.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e \

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

Member Function Documentation

◆ getObjectiveListItemHTML()

ilCourseObjectiveListGUI::getObjectiveListItemHTML ( int  $a_ref_id,
int  $a_obj_id,
string  $a_title,
string  $a_description,
bool  $a_manage = false 
)

Definition at line 46 of file class.ilCourseObjectiveListGUI.php.

52 : string {
53 $this->tpl = new ilTemplate(
54 "tpl.container_list_item.html",
55 true,
56 true,
57 "components/ILIAS/Container"
58 );
59
60 /*
61 * Previously, ilObjectListGUI::initItem was called here, but changes were made
62 * to that method with the assumption that only repository objects would be referenced,
63 * breaking it here for objectives.
64 * Currently, we have to initialize what we need manually, and cross
65 * our fingers that no changes are made to e.g. ilObjectListGUI::insertDescription
66 * or ilObjectListGUI::insertIconsAndCheckboxes that break things again.
67 */
68 $this->ref_id = $a_ref_id;
69 $this->obj_id = $a_obj_id;
70 $this->setTitle($a_title);
71 $this->setDescription($a_description);
72
74 $this->insertTitle();
75 $this->insertDescription();
76
77 if (!$a_manage) {
78 $this->insertProgressInfo();
79 }
80 $this->insertPositionField();
81
82 // subitems
83 $this->insertSubItems();
84
85 // reset properties and commands
86 $this->cust_prop = array();
87 $this->cust_commands = array();
88 $this->sub_item_html = array();
89 $this->position_enabled = false;
90
91 return $this->tpl->get();
92 }
setDescription(string $description)
special template class to simplify handling of ITX/PEAR

◆ init()

ilCourseObjectiveListGUI::init ( )

@inheritDoc

Reimplemented from ilObjectListGUI.

Definition at line 30 of file class.ilCourseObjectiveListGUI.php.

30 : void
31 {
32 $this->static_link_enabled = true;
33 $this->delete_enabled = false;
34 $this->cut_enabled = false;
35 $this->subscribe_enabled = false;
36 $this->link_enabled = false;
37 $this->info_screen_enabled = false;
38 $this->progress_enabled = true;
39 $this->type = "lobj";
40 //$this->gui_class_name = "ilobjcoursegui";
41
42 // general commands array
43 $this->commands = array();
44 }

◆ insertProgressInfo()

ilCourseObjectiveListGUI::insertProgressInfo ( )

@inheritDoc

Reimplemented from ilObjectListGUI.

Definition at line 135 of file class.ilCourseObjectiveListGUI.php.

135 : void
136 {
137 $this->lng->loadLanguageModule('trac');
138 $this->tpl->setCurrentBlock('item_progress');
139
141
143 $this->user->getId(),
144 $this->getContainerObject()->getObject()->getId()
145 )) {
147 $this->tpl->setVariable('TXT_PROGRESS_INFO', $this->lng->txt('crs_objective_status'));
148 $this->tpl->setVariable(
149 'PROGRESS_ICON',
150 $icons->renderIconForStatus(ilLPStatus::LP_STATUS_NOT_ATTEMPTED_NUM)
151 );
152 break;
153
156 $this->tpl->setVariable('TXT_PROGRESS_INFO', $this->lng->txt('crs_objective_pretest'));
158 $this->user->getId(),
159 $this->getContainerObject()->getObject()->getId(),
160 $this->obj_id
161 )) {
162 $this->tpl->setVariable(
163 'PROGRESS_ICON',
164 $icons->renderIconForStatus(ilLPStatus::LP_STATUS_FAILED_NUM)
165 );
166 } else {
167 $this->tpl->setVariable(
168 'PROGRESS_ICON',
169 $icons->renderIconForStatus(ilLPStatus::LP_STATUS_COMPLETED_NUM)
170 );
171 }
172 break;
173
176 $this->tpl->setVariable('TXT_PROGRESS_INFO', $this->lng->txt('crs_objective_result'));
178 $this->user->getId(),
179 $this->getContainerObject()->getObject()->getId(),
180 $this->obj_id
181 )) {
182 $this->tpl->setVariable(
183 'PROGRESS_ICON',
184 $icons->renderIconForStatus(ilLPStatus::LP_STATUS_FAILED_NUM)
185 );
186 } else {
187 $this->tpl->setVariable(
188 'PROGRESS_ICON',
189 $icons->renderIconForStatus(ilLPStatus::LP_STATUS_COMPLETED_NUM)
190 );
191 }
192 break;
193 }
194 $this->tpl->parseCurrentBlock();
195 }
static getStatus(int $a_usr_id, int $a_crs_id)
static isSuggested(int $a_usr_id, int $a_crs_id, int $a_objective_id)
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
const LP_STATUS_COMPLETED_NUM
const LP_STATUS_NOT_ATTEMPTED_NUM
const LP_STATUS_FAILED_NUM

References ilLPStatusIcons\getInstance(), ilCourseObjectiveResultCache\getStatus(), ilLPStatusIcons\ICON_VARIANT_LONG, ilCourseObjectiveResult\IL_OBJECTIVE_STATUS_FINAL, ilCourseObjectiveResult\IL_OBJECTIVE_STATUS_FINISHED, ilCourseObjectiveResult\IL_OBJECTIVE_STATUS_NONE, ilCourseObjectiveResult\IL_OBJECTIVE_STATUS_PRETEST, ilCourseObjectiveResult\IL_OBJECTIVE_STATUS_PRETEST_NON_SUGGEST, ilCourseObjectiveResultCache\isSuggested(), ILIAS\Repository\lng(), ilLPStatus\LP_STATUS_COMPLETED_NUM, ilLPStatus\LP_STATUS_FAILED_NUM, ilLPStatus\LP_STATUS_NOT_ATTEMPTED_NUM, and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ insertTitle()

ilCourseObjectiveListGUI::insertTitle ( )

@inheritDoc

Reimplemented from ilObjectListGUI.

Definition at line 97 of file class.ilCourseObjectiveListGUI.php.

97 : void
98 {
99 if (
101 $this->user->getId(),
102 $this->getContainerObject()->getObject()->getId()
104 $this->user->getId(),
105 $this->getContainerObject()->getObject()->getId(),
106 $this->obj_id
107 )
108 ) {
109 $this->tpl->setVariable('DIV_CLASS', 'ilContainerListItemOuterHighlight');
110 } else {
111 $this->tpl->setVariable('DIV_CLASS', 'ilContainerListItemOuter');
112 }
113
114 if (!$this->getCommandsStatus()) {
115 $this->tpl->setCurrentBlock("item_title");
116 $this->tpl->setVariable("TXT_TITLE", $this->getTitle());
117 $this->tpl->parseCurrentBlock();
118 return;
119 }
120 $this->tpl->setCurrentBlock("item_title_linked");
121 $this->tpl->setVariable("TXT_TITLE_LINKED", $this->getTitle());
122
123 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->getContainerObject()->getObject()->getRefId());
124 $this->ctrl->setParameterByClass("ilrepositorygui", "objective_details", $this->obj_id);
125 $link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", "");
126 $this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
127
128 $this->tpl->setVariable("HREF_TITLE_LINKED", $link);
129 $this->tpl->parseCurrentBlock();
130 }
getTitle()
getTitle overwritten in class.ilObjLinkResourceList.php

References ILIAS\Repository\ctrl(), ilCourseObjectiveResultCache\getStatus(), ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), ilCourseObjectiveResult\IL_OBJECTIVE_STATUS_NONE, ilCourseObjectiveResultCache\isSuggested(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

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