4 define (
"IL_LIST_AS_TRIGGER",
"trigger");
5 define (
"IL_LIST_FULL",
"full");
125 $this->rbacsystem = $rbacsystem;
126 $this->
ilias = $ilias;
130 $this->path_enabled =
false;
142 include_once(
'Services/LDAP/classes/class.ilLDAPRoleGroupMapping.php');
145 $lng->loadLanguageModule(
"obj");
157 $this->container_obj = $container_obj;
169 return $this->container_obj;
181 $this->static_link_enabled =
true;
182 $this->delete_enabled =
true;
183 $this->cut_enabled =
true;
184 $this->subscribe_enabled =
true;
185 $this->link_enabled =
false;
186 $this->copy_enabled =
false;
187 $this->payment_enabled =
false;
188 $this->progress_enabled =
false;
189 $this->notice_properties_enabled =
true;
190 $this->info_screen_enabled =
false;
192 $this->gui_class_name =
"";
195 include_once(
'./Services/Object/classes/class.ilObjectAccess.php');
208 $this->properties_enabled = $a_status;
230 $this->preconditions_enabled = $a_status;
248 $this->notice_properties_enabled = $a_status;
270 $this->description_enabled = $a_status;
304 $this->search_fragment_enabled = $a_status;
316 $this->path_linked = $a_status;
334 $this->enabled_relevance = $a_status;
344 $this->relevance = $a_rel;
364 $this->icons_enabled = $a_status;
384 $this->checkboxes_enabled = $a_status;
404 $this->expand_enabled = $a_status;
419 $this->is_expanded = $a_status;
434 $this->position_enabled =
true;
435 $this->position_field_index = $a_field_index;
436 $this->position_value = $a_position_value;
447 $this->delete_enabled = $a_status;
459 return $this->delete_enabled;
470 $this->cut_enabled = $a_status;
481 return $this->cut_enabled;
492 $this->copy_enabled = $a_status;
514 $this->subscribe_enabled = $a_status;
525 return $this->subscribe_enabled;
535 $this->payment_enabled = $a_status;
546 return $this->payment_enabled;
556 $this->link_enabled = $a_status;
567 return $this->link_enabled;
578 $this->path_enabled = $a_path;
588 return $this->path_enabled;
599 $this->commands_enabled = $a_status;
600 $this->std_cmd_only = $a_std_only;
620 $this->info_screen_enabled = $a_info_screen;
630 $this->sub_item_html[] = $a_html;
652 $this->progress_enabled = $a_status;
676 $this->substitutions_enabled = $a_status;
700 $this->item_detail_links_enabled = $a_status;
723 $this->item_detail_links = $a_detail_links;
724 $this->item_detail_links_intro = $a_intro_txt;
736 if(!count($this->item_detail_links))
740 if(strlen($this->item_detail_links_intro))
742 $this->tpl->setCurrentBlock(
'item_detail_intro');
743 $this->tpl->setVariable(
'ITEM_DETAIL_INTRO_TXT',$this->item_detail_links_intro);
744 $this->tpl->parseCurrentBlock();
747 foreach($this->item_detail_links as $info)
749 $this->tpl->setCurrentBlock(
'item_detail_link');
750 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_TARGET',$info[
'target']);
751 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_DESC',$info[
'desc']);
752 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_HREF',$info[
'link']);
753 $this->tpl->setVariable(
'ITEM_DETAIL_LINK_NAME',$info[
'name']);
754 $this->tpl->parseCurrentBlock();
756 $this->tpl->setCurrentBlock(
'item_detail_links');
757 $this->tpl->parseCurrentBlock();
768 $this->title = $a_title;
787 $this->description = $a_description;
797 return $this->description;
807 $this->search_fragment = $a_text;
826 $this->separate_commands = $a_val;
859 $this->additional_information = $a_val;
881 $this->details_level = $a_level;
900 $this->repository_transfer_enabled = (bool)$a_value;
910 $this->restrict_to_goto = (bool)$a_value;
928 $cache_prefix = null;
929 if($this->context == self::CONTEXT_WORKSPACE || $this->context == self::CONTEXT_WORKSPACE_SHARING)
931 $cache_prefix =
"wsp";
932 if(!$this->ws_access)
934 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
939 if (isset($this->access_cache[$a_permission][
"-".$a_cmd][$cache_prefix.$a_ref_id]))
941 return $this->access_cache[$a_permission][
"-".$a_cmd][$cache_prefix.$a_ref_id];
944 if($this->context == self::CONTEXT_REPOSITORY || $this->context == self::CONTEXT_SHOP)
946 $access = $ilAccess->checkAccess($a_permission,$a_cmd,$a_ref_id,$a_type,$a_obj_id);
947 if ($ilAccess->getPreventCachingLastResult())
949 $this->prevent_access_caching =
true;
954 $access = $this->ws_access->checkAccess($a_permission,$a_cmd,$a_ref_id,$a_type);
957 $this->access_cache[$a_permission][
"-".$a_cmd][$cache_prefix.$a_ref_id] = $access;
970 function initItem($a_ref_id, $a_obj_id, $a_title =
"", $a_description =
"", $a_context = self::CONTEXT_REPOSITORY)
972 $this->offline_mode =
false;
973 include_once(
'Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleAccess.php');
974 if ($this->type ==
"sahs") {
977 $this->access_cache = array();
978 $this->ref_id = $a_ref_id;
979 $this->obj_id = $a_obj_id;
980 $this->context = $a_context;
983 #$this->description = $a_description; 986 $this->adm_commands_included =
false;
987 $this->prevent_access_caching =
false;
1002 if($this->static_link_enabled)
1004 include_once(
'./Services/Link/classes/class.ilLink.php');
1007 $command[
'link'] = $link;
1008 $command[
'frame'] =
'_top';
1029 if($this->context == self::CONTEXT_REPOSITORY || $this->context == self::CONTEXT_SHOP)
1032 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1035 require_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
1042 return $davServer->getMountURI($this->ref_id).
1043 '" folder="'.$davServer->getFolderURI($this->ref_id);
1047 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $this->
getCommandId());
1048 $cmd_link = $this->ctrl->getLinkTargetByClass(
"ilrepositorygui", $a_cmd);
1049 $this->ctrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
1060 $this->ctrl->setParameterByClass($this->gui_class_name,
"ref_id",
"");
1061 $this->ctrl->setParameterByClass($this->gui_class_name,
"wsp_id", $this->ref_id);
1062 return $this->ctrl->getLinkTargetByClass($this->gui_class_name, $a_cmd);
1079 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1085 if($a_cmd ==
'fileManagerLaunch')
1120 global $objDefinition;
1130 if($this->context == self::CONTEXT_REPOSITORY)
1133 require_once (
'Services/WebDAV/classes/class.ilDAVActivationChecker.php');
1136 require_once (
'Services/WebDAV/classes/class.ilDAVServer.php');
1137 global $ilias,
$lng;
1140 require_once(
'Services/WebDAV/classes/class.ilDAVLocks.php');
1142 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
1144 $locks =& $davLocks->getLocksOnObjectObj($this->obj_id);
1145 if (count($locks) > 0)
1147 $lockUser =
new ilObjUser($locks[0][
'ilias_owner']);
1151 "property" => $lng->txt(
"in_use_by"),
1152 "value" => $lockUser->getLogin(),
1153 "link" =>
"./ilias.php?user=".$locks[0][
'ilias_owner'].
'&cmd=showUserProfile&cmdClass=ilpersonaldesktopgui&cmdNode=1&baseClass=ilPersonalDesktopGUI',
1165 if (preg_match(
'/^(\\.|\\.\\.)$/', $this->title))
1167 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_interoperability"),
1168 "value" => $lng->txt(
"filename_special_filename"),
1169 'propertyNameVisible' =>
false);
1171 else if (preg_match(
'/^\\./', $this->title))
1173 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_visibility"),
1174 "value" => $lng->txt(
"filename_hidden_unix_file"),
1175 'propertyNameVisible' =>
false);
1177 else if (preg_match(
'/~$/', $this->title))
1179 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_visibility"),
1180 "value" => $lng->txt(
"filename_hidden_backup_file"),
1181 'propertyNameVisible' =>
false);
1183 else if (preg_match(
'/[\\/]/', $this->title))
1185 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_interoperability"),
1186 "value" => $lng->txt(
"filename_special_characters"),
1187 'propertyNameVisible' =>
false);
1189 else if (preg_match(
'/[\\\\\\/:*?"<>|]/', $this->title))
1191 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_interoperability"),
1192 "value" => $lng->txt(
"filename_windows_special_characters"),
1193 'propertyNameVisible' =>
false);
1195 else if (preg_match(
'/\\.$/', $this->title))
1197 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_interoperability"),
1198 "value" => $lng->txt(
"filename_windows_empty_extension"),
1199 'propertyNameVisible' =>
false);
1201 else if (preg_match(
'/^(\\.|\\.\\.)$/', $this->title))
1203 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_interoperability"),
1204 "value" => $lng->txt(
"filename_special_filename"),
1205 'propertyNameVisible' =>
false);
1207 else if (preg_match(
'/#/', $this->title))
1209 $props[] = array(
"alert" =>
false,
"property" => $lng->txt(
"filename_interoperability"),
1210 "value" => $lng->txt(
"filename_windows_webdav_issue"),
1211 'propertyNameVisible' =>
false);
1217 require_once(
'Services/Tracking/classes/class.ilChangeEvent.php');
1221 if ($ilias->account->getId() != ANONYMOUS_USER_ID)
1227 $isContainer = in_array($this->type, array(
'cat',
'fold',
'crs',
'grp'));
1235 "value" => $lng->txt(
'state_changed_inside'),
1236 'propertyNameVisible' =>
false);
1244 elseif($this->type ==
"file")
1251 "value" => $lng->txt(($state == 1) ?
'state_unread' :
'state_changed'),
1252 'propertyNameVisible' =>
false);
1267 $a_alert =
false, $a_newline =
false)
1269 $this->cust_prop[] = array(
"property" => $a_property,
"value" => $a_value,
1270 "alert" => $a_alert,
"newline" => $a_newline);
1278 if (is_array($this->cust_prop))
1280 foreach($this->cust_prop as $prop)
1297 if($prop[
'alert'] ==
true)
1310 $this->notice_prop = array();
1311 if($infos = $this->ldap_mapping->getInfoStrings($this->obj_id,
true))
1313 foreach($infos as $info)
1315 $this->notice_prop[] = array(
'value' => $info);
1318 return $this->notice_prop ? $this->notice_prop : array();
1325 $this->cust_commands[] =
1326 array(
"link" => $a_link,
"lang_var" => $a_lang_var,
1327 "frame" => $a_frame,
"onclick" => $onclick);
1336 $this->force_visible_only = $a_stat;
1375 $ref_commands = array();
1376 foreach($this->commands as $command)
1378 $permission = $command[
"permission"];
1379 $cmd = $command[
"cmd"];
1380 $lang_var = $command[
"lang_var"];
1382 $info_object = null;
1384 if (isset($command[
"txt"]))
1386 $txt = $command[
"txt"];
1392 if ($ilias->account->getId() == ANONYMOUS_USER_ID &&
1393 $command[
'enable_anonymous'] ==
'false')
1401 $ilBench->start(
"ilObjectListGUI",
"4110_get_commands_check_access");
1404 $ilBench->stop(
"ilObjectListGUI",
"4110_get_commands_check_access");
1411 $access_granted =
true;
1415 $access_granted =
false;
1416 $info_object = $ilAccess->getInfo();
1419 if (!isset($command[
"default"]))
1421 $command[
"default"] =
"";
1423 $ref_commands[] = array(
1424 "permission" => $permission,
1426 "link" => $cmd_link,
1427 "frame" => $cmd_frame,
1428 "lang_var" => $lang_var,
1430 "granted" => $access_granted,
1431 "access_info" => $info_object,
1432 "img" => $cmd_image,
1433 "default" => $command[
"default"]
1437 return $ref_commands;
1450 if ($this->type ==
"sahs" && $this->offline_mode) {
1451 return $this->type .
"_offline";
1466 if($this->restrict_to_goto)
1468 $this->default_command = array(
"frame" =>
"",
1472 if (!$this->default_command || (!$this->
getCommandsStatus() && !$this->restrict_to_goto))
1474 $this->tpl->setCurrentBlock(
"item_title");
1475 $this->tpl->setVariable(
"TXT_TITLE", $this->
getTitle());
1476 $this->tpl->parseCurrentBlock();
1480 $this->default_command[
"link"] =
1481 $this->
modifySAHSlaunch($this->default_command[
"link"],$this->default_command[
"frame"]);
1483 if ($this->default_command[
"frame"] !=
"")
1485 $this->tpl->setCurrentBlock(
"title_linked_frame");
1486 $this->tpl->setVariable(
"TARGET_TITLE_LINKED", $this->default_command[
"frame"]);
1487 $this->tpl->parseCurrentBlock();
1491 #var_dump("<pre>",$this->default_command['link'],"</pre>"); 1492 $this->default_command[
"link"] =
1495 #var_dump("<pre>",$this->default_command['link'],"</pre>"); 1499 $this->tpl->setCurrentBlock(
"item_title_linked");
1500 $this->tpl->setVariable(
"TXT_TITLE_LINKED", $this->
getTitle());
1501 $this->tpl->setVariable(
"HREF_TITLE_LINKED", $this->default_command[
"link"]);
1504 include_once(
"./Services/Preview/classes/class.ilPreview.php");
1507 include_once(
"./Services/Preview/classes/class.ilPreviewGUI.php");
1510 $access_handler = null;
1512 switch ($this->context)
1514 case self::CONTEXT_WORKSPACE:
1515 case self::CONTEXT_WORKSPACE_SHARING:
1517 include_once(
"./Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php");
1524 $access_handler = $ilAccess;
1530 $preview_status_class =
"";
1531 $preview_text_topic =
"preview_show";
1534 $preview_status_class =
"ilPreviewStatusNone";
1535 $preview_text_topic =
"preview_none";
1537 $this->tpl->setCurrentBlock(
"item_title_linked");
1538 $this->tpl->setVariable(
"PREVIEW_STATUS_CLASS", $preview_status_class);
1539 $this->tpl->setVariable(
"SRC_PREVIEW_ICON",
ilUtil::getImagePath(
"preview.png",
"Services/Preview"));
1540 $this->tpl->setVariable(
"TXT_PREVIEW", $this->lng->txt($preview_text_topic));
1541 $this->tpl->setVariable(
"SCRIPT_PREVIEW_CLICK",
$preview->getJSCall($this->getUniqueItemId(
true)));
1542 $this->tpl->parseCurrentBlock();
1545 $this->tpl->parseCurrentBlock();
1548 if ($this->bold_title ==
true)
1550 $this->tpl->touchBlock(
'bold_title_start');
1551 $this->tpl->touchBlock(
'bold_title_end');
1557 switch($this->context)
1559 case self::CONTEXT_WORKSPACE_SHARING:
1560 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceAccessHandler.php";
1577 $fields_shown =
false;
1578 foreach($this->substitutions->getParsedSubstitutions($this->ref_id,$this->obj_id) as
$data)
1582 $data[
'name'] =
'<strong>'.$data[
'name'].
'</strong>';
1583 $data[
'value'] =
'<strong>'.$data[
'value'].
'</strong>';
1585 $this->tpl->touchBlock(
"std_prop");
1586 $this->tpl->setCurrentBlock(
'item_property');
1587 if(
$data[
'show_field'])
1589 $this->tpl->setVariable(
'TXT_PROP',
$data[
'name']);
1591 $this->tpl->setVariable(
'VAL_PROP',
$data[
'value']);
1592 $this->tpl->parseCurrentBlock();
1594 if(
$data[
'newline'])
1596 $this->tpl->touchBlock(
'newline_prop');
1598 $fields_shown =
false;
1603 $this->tpl->touchBlock(
'newline_prop');
1620 if(!$this->substitutions->isDescriptionEnabled())
1626 $this->tpl->setCurrentBlock(
"item_description");
1628 $this->tpl->parseCurrentBlock();
1639 $this->tpl->setCurrentBlock(
'search_fragment');
1640 $this->tpl->setVariable(
'TXT_SEARCH_FRAGMENT',$this->
getSearchFragment().
' ...');
1641 $this->tpl->parseCurrentBlock();
1660 $width2 = (int) (100 - $width1);
1662 $this->tpl->setCurrentBlock(
'relevance');
1663 #$this->tpl->setVariable('TXT_RELEVANCE',$lng->txt('search_relevance')); 1664 $this->tpl->setVariable(
'VAL_REL',sprintf(
"%.02f %%",$this->
getRelevance()));
1665 $this->tpl->setVariable(
'WIDTH_A',$width1);
1666 $this->tpl->setVariable(
'WIDTH_B',$width2);
1669 $this->tpl->parseCurrentBlock();
1680 $this->mode = $a_mode;
1698 $this->condition_depth = $a_depth;
1710 if ($a_mode == $this->mode)
1732 if($this->context != self::CONTEXT_WORKSPACE && $this->context != self::CONTEXT_WORKSPACE_SHARING)
1735 include_once
"Services/Tracking/classes/class.ilLPStatus.php";
1739 $props[] = array(
"alert" =>
false,
1740 "property" => $lng->txt(
"learning_progress"),
1747 if ($this->
ilias->account->getId() == ANONYMOUS_USER_ID)
1749 if (!$ilAccess->checkAccess(
"read",
"", $this->ref_id, $this->type, $this->obj_id))
1751 $props[] = array(
"alert" =>
true,
1752 "value" => $lng->txt(
"no_access_item_public"),
1761 if($this->reference_ref_id)
1764 $note_obj_id = $this->reference_obj_id;
1767 $redraw_js =
"il.Object.redrawListItem(".$note_ref_id.
");";
1772 self::$cnt_tags[$note_obj_id] > 0) &&
1773 ($ilUser->getId() != ANONYMOUS_USER_ID))
1775 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
1776 include_once(
"./Services/Tagging/classes/class.ilTaggingGUI.php");
1782 $props[] = array(
"alert" =>
false,
1783 "property" => $lng->txt(
"notes_comments"),
1784 "value" =>
"<a href='#' onclick=\"return ".
1791 if ($this->notes_enabled && self::$cnt_notes[$note_obj_id][
IL_NOTE_PRIVATE] > 0)
1793 $props[] = array(
"alert" =>
false,
1794 "property" => $lng->txt(
"notes"),
1795 "value" =>
"<a href='#' onclick=\"return ".
1801 if ($this->tags_enabled && self::$cnt_tags[$note_obj_id] > 0)
1804 if ($tags_set->get(
"enable"))
1806 $props[] = array(
"alert" =>
false,
1807 "property" => $lng->txt(
"tagging_tags"),
1808 "value" =>
"<a href='#' onclick=\"return ".
1810 self::$cnt_tags[$note_obj_id].
"</a>",
1818 if (is_array($props) && count($props) > 0)
1820 foreach($props as $prop)
1825 $this->tpl->touchBlock(
"separator_prop");
1829 if ($prop[
"alert"] ==
true)
1831 $this->tpl->touchBlock(
"alert_prop");
1835 $this->tpl->touchBlock(
"std_prop");
1837 if ($prop[
"newline"] ==
true && $cnt > 1)
1839 $this->tpl->touchBlock(
"newline_prop");
1842 if (isset($prop[
"property"]) && $prop[
'propertyNameVisible'] !==
false)
1845 $this->tpl->setCurrentBlock(
"prop_name");
1846 $this->tpl->setVariable(
"TXT_PROP", $prop[
"property"]);
1847 $this->tpl->parseCurrentBlock();
1849 $this->tpl->setCurrentBlock(
"item_property");
1853 $this->tpl->setVariable(
"LINK_PROP", $prop[
'link']);
1854 $this->tpl->setVariable(
"LINK_VAL_PROP", $prop[
"value"]);
1858 $this->tpl->setVariable(
"VAL_PROP", $prop[
"value"]);
1861 $this->tpl->parseCurrentBlock();
1865 $this->tpl->setCurrentBlock(
"item_properties");
1866 $this->tpl->parseCurrentBlock();
1873 foreach($this->notice_prop as $property)
1875 $this->tpl->setCurrentBlock(
'notice_item');
1876 $this->tpl->setVariable(
'NOTICE_ITEM_VALUE',$property[
'value']);
1877 $this->tpl->parseCurrentBlock();
1879 $this->tpl->setCurrentBlock(
'notice_property');
1880 $this->tpl->parseCurrentBlock();
1891 global $ilAccess,$ilObjDataCache,
$ilUser;
1893 if(IS_PAYMENT_ENABLED && $this->payment_enabled)
1895 include_once
'./Services/Payment/classes/class.ilPaymentObject.php';
1896 include_once
'./Services/Payment/classes/class.ilPaymentBookings.php';
1898 if(ilPaymentobject::_requiresPurchaseToAccess($this->ref_id))
1904 $order_infos = array();
1907 if(count($order_infos) > 0)
1911 $pay_lang->loadLanguageModule(
'payment');
1914 $a_property = $pay_lang->txt(
'object_purchased_date');
1921 $a_property = $this->lng->txt(
'object_duration');
1922 if($order_infos[
'duration'] == 0)
1923 $a_value = $pay_lang->txt(
'unlimited_duration');
1925 $a_value = $order_infos[
'duration'] .
' '.$this->lng->txt(
'months');
1932 $has_extension_prices =
true;
1941 $this->ctpl =
new ilTemplate(
"tpl.container_list_item_commands.html",
true,
true,
1942 "Services/Container",
"DEFAULT",
false,
true);
1943 $this->ctpl->setCurrentBlock(
'payment');
1945 $this->ctpl->setVariable(
'PAYMENT_ALT_IMG', $this->lng->txt(
'payment_system') .
': ' . $this->lng->txt(
'payment_buyable'));
1946 $this->ctpl->parseCurrentBlock();
1956 $commands = $this->
getCommands($this->ref_id, $this->obj_id);
1957 foreach($commands as $command)
1959 if($command[
'default'] ===
true)
1967 $command[
'link'] =
'ilias.php?baseClass=ilSAHSPresentationGUI&ref_id='.$this->ref_id;
1971 $command[
'link'] =
'ilias.php?baseClass=ilLMPresentationGUI&ref_id='.$this->ref_id;
1975 $command[
'link'] =
'ilias.php?baseClass=ilShopController&cmdClass=ilshoppurchasegui&ref_id='.$this->ref_id;
1981 if(strpos($command[
'link'],
'_'.
$type.
'_') !==
false)
1983 $demo_link = str_replace(
'_'.
$type.
'_',
'_'.$type.
'purchasetypedemo_', $command[
'link']);
1984 $buy_link = str_replace(
'_'.
$type.
'_',
'_'.$type.
'purchasetypebuy_', $command[
'link']);
1988 $demo_link = $command[
'link'].(strpos($command[
'link'],
'?') ===
false ?
'?' :
'&').
'purchasetype=demo';
1989 $buy_link = $command[
'link'].(strpos($command[
'link'],
'?') ===
false ?
'?' :
'&').
'purchasetype=buy';
1992 $this->current_selection_list->addItem($this->lng->txt(
'payment_demo'),
"", $demo_link, $a_img, $this->lng->txt(
'payment_demo'), $command[
'frame']);
1993 if($has_extension_prices ==
true)
1995 $this->current_selection_list->addItem($this->lng->txt(
'buy_extension'),
"", $buy_link, $a_img, $this->lng->txt(
'buy_extension'), $command[
'frame']);
1998 $this->current_selection_list->addItem($this->lng->txt(
'buy'),
"", $buy_link, $a_img, $this->lng->txt(
'buy'), $command[
'frame']);
2006 global $ilAccess,
$lng, $objDefinition,$tree;
2009 $num_optional_required =
2013 $visible_conditions = array();
2014 $passed_optional = 0;
2015 foreach($conditions as $condition)
2017 if($obligatory and !$condition[
'obligatory'])
2021 if(!$obligatory and $condition[
'obligatory'])
2026 if($tree->isDeleted($condition[
'trigger_ref_id']))
2031 include_once
'Services/Container/classes/class.ilMemberViewSettings.php';
2037 $visible_conditions[] = $condition[
'id'];
2040 if(!$obligatory and
$ok)
2044 if($passed_optional >= $num_optional_required)
2051 foreach($conditions as $condition)
2053 if(!in_array($condition[
'id'], $visible_conditions))
2058 $cond_txt = $lng->txt(
"condition_".$condition[
"operator"]).
" ".
2059 $condition[
"value"];
2062 $class = $objDefinition->getClassName($condition[
"trigger_type"]);
2063 $location = $objDefinition->getLocation($condition[
"trigger_type"]);
2068 $missing_cond_exist =
true;
2070 $full_class =
"ilObj".$class.
"ListGUI";
2071 include_once(
$location.
"/class.".$full_class.
".php");
2072 $item_list_gui =
new $full_class($this);
2074 $item_list_gui->enablePath(
false);
2075 $item_list_gui->enableIcon(
true);
2076 $item_list_gui->setConditionDepth($this->condition_depth + 1);
2078 $item_list_gui->addCustomProperty($this->lng->txt(
"precondition_required_itemlist"), $cond_txt,
false,
true);
2079 $trigger_html = $item_list_gui->getListItemHTML($condition[
'trigger_ref_id'],
2082 $this->tpl->setCurrentBlock(
"precondition");
2083 if ($trigger_html ==
"")
2085 $trigger_html = $this->lng->txt(
"precondition_not_accessible");
2087 $this->tpl->setVariable(
"TXT_CONDITION", trim($cond_txt));
2088 $this->tpl->setVariable(
"TRIGGER_ITEM", $trigger_html);
2089 $this->tpl->parseCurrentBlock();
2092 if ($missing_cond_exist and $obligatory)
2094 $this->tpl->setCurrentBlock(
"preconditions");
2095 $this->tpl->setVariable(
"CONDITION_TOGGLE_ID",
"_obl_".$toggle_id);
2096 $this->tpl->setVariable(
"TXT_PRECONDITIONS", $lng->txt(
"preconditions_obligatory_hint"));
2097 $this->tpl->parseCurrentBlock();
2100 elseif($missing_cond_exist and !$obligatory)
2102 $this->tpl->setCurrentBlock(
"preconditions");
2103 $this->tpl->setVariable(
"CONDITION_TOGGLE_ID",
"_opt_".$toggle_id);
2104 $this->tpl->setVariable(
"TXT_PRECONDITIONS", sprintf($lng->txt(
"preconditions_optional_hint"),$num_optional_required));
2105 $this->tpl->parseCurrentBlock();
2108 return !$missing_cond_exist;
2116 global $ilAccess,
$lng, $objDefinition,$tree;
2118 include_once(
"./Services/AccessControl/classes/class.ilConditionHandler.php");
2120 $missing_cond_exist =
false;
2123 if ($this->condition_depth > 0)
2137 if(
sizeof($conditions))
2139 for($i = 0; $i < count($conditions); $i++)
2151 if(!$all_done_obl || !$all_done_opt)
2153 $this->tpl->setCurrentBlock(
"preconditions_toggle");
2154 $this->tpl->setVariable(
"PRECONDITION_TOGGLE_INTRO", $this->lng->txt(
"precondition_toggle"));
2155 $this->tpl->setVariable(
"PRECONDITION_TOGGLE_TRIGGER", $this->lng->txt(
"show"));
2156 $this->tpl->setVariable(
"PRECONDITION_TOGGLE_ID", $div_id);
2157 $this->tpl->setVariable(
"TXT_PRECONDITION_SHOW", $this->lng->txt(
"show"));
2158 $this->tpl->setVariable(
"TXT_PRECONDITION_HIDE", $this->lng->txt(
"hide"));
2159 $this->tpl->parseCurrentBlock();
2172 function insertCommand($a_href, $a_text, $a_frame =
"", $a_img =
"", $a_cmd =
"", $a_onclick =
"")
2175 $chksum = md5($a_href.$a_text);
2176 if($a_href ==
"#" ||
2177 !in_array($chksum, $this->prevent_duplicate_commands))
2181 $this->prevent_duplicate_commands[] = $chksum;
2184 $prevent_background_click =
false;
2185 if ($a_cmd ==
'mount_webfolder')
2187 $prevent_background_click =
true;
2189 $this->current_selection_list->addItem($a_text,
"", $a_href, $a_img, $a_text, $a_frame,
2190 "", $prevent_background_click, $a_onclick);
2203 if ($this->std_cmd_only)
2216 $this->adm_commands_included =
true;
2224 $this->ctrl->setParameter($this->container_obj,
"ref_id",
2225 $this->container_obj->object->getRefId());
2226 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2227 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"delete");
2228 $this->
insertCommand($cmd_link, $this->lng->txt(
"delete"),
"",
2230 $this->adm_commands_included =
true;
2245 if ($this->std_cmd_only)
2254 global $objDefinition;
2262 $this->adm_commands_included =
true;
2273 $this->ctrl->setParameter($this->container_obj,
"ref_id",
2274 $this->container_obj->object->getRefId());
2275 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2276 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"link");
2277 $this->
insertCommand($cmd_link, $this->lng->txt(
"link"),
"",
2279 $this->adm_commands_included =
true;
2293 if ($this->std_cmd_only)
2306 $this->adm_commands_included =
true;
2316 $this->container_obj->object)
2318 $this->ctrl->setParameter($this->container_obj,
"ref_id",
2319 $this->container_obj->object->getRefId());
2320 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2322 if(!$a_to_repository)
2324 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"cut");
2325 $this->
insertCommand($cmd_link, $this->lng->txt(
"move"),
"",
2330 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"cut_for_repository");
2331 $this->
insertCommand($cmd_link, $this->lng->txt(
"wsp_move_to_repository"),
"",
2335 $this->adm_commands_included =
true;
2346 if($this->std_cmd_only)
2353 if($this->context != self::CONTEXT_WORKSPACE && $this->context != self::CONTEXT_WORKSPACE_SHARING)
2355 $this->ctrl->setParameterByClass(
'ilobjectcopygui',
'source_id',$this->
getCommandId());
2356 $cmd_copy = $this->ctrl->getLinkTargetByClass(
'ilobjectcopygui',
'initTargetSelection');
2361 $this->ctrl->setParameter($this->container_obj,
"ref_id",
2362 $this->container_obj->object->getRefId());
2363 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2365 if(!$a_to_repository)
2367 $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj,
'copy');
2372 $cmd_copy = $this->ctrl->getLinkTarget($this->container_obj,
'copy_to_repository');
2373 $this->
insertCommand($cmd_copy, $this->lng->txt(
'wsp_copy_to_repository'));
2377 $this->adm_commands_included =
true;
2388 global $ilAccess, $objDefinition;
2390 if ($this->std_cmd_only)
2407 $this->adm_commands_included =
true;
2424 if ($this->std_cmd_only)
2429 if((
int)$ilSetting->get(
'disable_my_offers'))
2436 if ($ilUser->getId() != ANONYMOUS_USER_ID)
2465 if (!$ilUser->isDesktopItem($this->getCommandId(),
$type))
2469 if ($this->
checkCommandAccess(
"read",
"", $this->ref_id, $this->type, $this->obj_id))
2473 $this->ctrl->setParameter($this->container_obj,
"type",
$type);
2474 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2475 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"addToDesk");
2476 $this->
insertCommand($cmd_link, $this->lng->txt(
"to_desktop"),
"",
2485 $this->ctrl->setParameter($this->container_obj,
"type",
$type);
2486 $this->ctrl->setParameter($this->container_obj,
"item_ref_id", $this->
getCommandId());
2487 $cmd_link = $this->ctrl->getLinkTarget($this->container_obj,
"removeFromDesk");
2488 $this->
insertCommand($cmd_link, $this->lng->txt(
"unsubscribe"),
"",
2500 if ($this->std_cmd_only)
2506 $this->
insertCommand($cmd_link, $this->lng->txt(
"info_short"), $cmd_frame,
2520 if ($this->std_cmd_only ||
2521 ($ilUser->getId() == ANONYMOUS_USER_ID))
2525 $lng->loadLanguageModule(
"notes");
2526 $lng->loadLanguageModule(
"tagging");
2530 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
2534 if($this->reference_ref_id)
2539 $js_updater = $a_header_actions
2540 ?
"il.Object.redrawActionHeader();" 2541 :
"il.Object.redrawListItem(".$note_ref_id.
")";
2546 $this->
insertCommand(
"#", $this->lng->txt(
"notes_comments"), $cmd_frame,
2550 if($this->notes_enabled)
2552 $this->
insertCommand(
"#", $this->lng->txt(
"notes"), $cmd_frame,
2556 if ($this->tags_enabled)
2558 include_once(
"./Services/Tagging/classes/class.ilTaggingGUI.php");
2560 $this->
insertCommand(
"#", $this->lng->txt(
"tagging_set_tag"), $cmd_frame,
2572 if ($this->std_cmd_only || !$this->container_obj->object)
2578 $parent_type = $this->container_obj->object->getType();
2583 $this->ctrl->setParameterByClass(
'ilobjectactivationgui',
'cadh',
2585 $this->ctrl->setParameterByClass(
'ilobjectactivationgui',
'parent_id',
2587 $cmd_lnk = $this->ctrl->getLinkTargetByClass(array($this->gui_class_name,
'ilcommonactiondispatchergui',
'ilobjectactivationgui'),
2590 $this->
insertCommand($cmd_lnk, $this->lng->txt(
'obj_activation_list_gui'));
2602 $a_asynch_url =
"", $a_header_actions =
false)
2611 include_once(
"Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2613 $this->current_selection_list->setAsynch($a_use_asynch && !$a_get_asynch_commands);
2614 $this->current_selection_list->setAsynchUrl($a_asynch_url);
2615 $this->current_selection_list->setListTitle($lng->txt(
"actions"));
2616 $this->current_selection_list->setId(
"act_".$this->
getUniqueItemId(
false));
2617 $this->current_selection_list->setSelectionHeaderClass(
"small");
2618 $this->current_selection_list->setItemLinkClass(
"xsmall");
2619 $this->current_selection_list->setLinksMode(
"il_ContainerItemCommand2");
2621 $this->current_selection_list->setUseImages(
false);
2622 $this->current_selection_list->setAdditionalToggleElement($this->
getUniqueItemId(
true),
"ilContainerListItemOuterHighlight");
2624 include_once
'Services/Payment/classes/class.ilPaymentObject.php';
2626 $this->ctrl->setParameterByClass($this->gui_class_name,
"ref_id", $this->ref_id);
2629 $only_default =
false;
2630 if ($a_use_asynch && !$a_get_asynch_commands)
2632 $only_default =
true;
2635 $this->default_command =
false;
2636 $this->prevent_duplicate_commands = array();
2639 $valid_header_commands = array(
"mount_webfolder");
2641 $commands = $this->
getCommands($this->ref_id, $this->obj_id);
2642 foreach($commands as $command)
2644 if($a_header_actions && !in_array($command[
"cmd"], $valid_header_commands))
2649 if ($command[
"granted"] ==
true )
2651 if (!$command[
"default"] ===
true)
2653 if (!$this->std_cmd_only && !$only_default)
2660 if ($command[
"lang_var"] ==
"edit" && $command[
"img"] ==
"")
2665 $cmd_link = $command[
"link"];
2666 $txt = ($command[
"lang_var"] ==
"")
2668 : $this->lng->txt($command[
"lang_var"]);
2670 $command[
"frame"], $command[
"img"], $command[
"cmd"]);
2679 elseif($command[
"default"] ===
true)
2681 $items =& $command[
"access_info"];
2682 foreach ($items as $item)
2697 if (is_array($this->cust_commands))
2699 foreach ($this->cust_commands as $command)
2701 $this->
insertCommand($command[
"link"], $this->lng->txt($command[
"lang_var"]),
2702 $command[
"frame"],
"", $command[
"cmd"], $command[
"onclick"]);
2715 if($this->timings_enabled)
2721 if ($this->delete_enabled)
2727 if ($this->link_enabled)
2733 if ($this->cut_enabled)
2739 if ($this->copy_enabled)
2745 if ($this->repository_transfer_enabled)
2752 if ($this->subscribe_enabled)
2758 if ($this->multi_download_enabled && $a_header_actions)
2764 if($this->cut_enabled or $this->link_enabled)
2770 if(IS_PAYMENT_ENABLED)
2783 if(!$a_header_actions)
2785 $this->ctrl->clearParametersByClass($this->gui_class_name);
2792 if ($a_use_asynch && !$a_get_asynch_commands && !$a_header_actions)
2794 if ($ilUser->getId() == ANONYMOUS_USER_ID && $this->type ==
"cat")
2796 include_once(
"./Services/Container/classes/class.ilContainer.php");
2797 include_once(
"./Services/Object/classes/class.ilObjectServiceSettingsGUI.php");
2808 if ($a_use_asynch && $a_get_asynch_commands)
2810 return $this->current_selection_list->getHTML(
true);
2813 return $this->current_selection_list->getHTML();
2826 if($ilSetting->get(
"disable_comments"))
2831 $this->comments_enabled = (bool)$a_value;
2832 $this->comments_settings_enabled = (bool)$a_enable_comments_settings;
2845 if($ilSetting->get(
"disable_notes"))
2850 $this->notes_enabled = (bool)$a_value;
2861 if (!$tags_set->get(
"enable"))
2865 $this->tags_enabled = (bool)$a_value;
2876 function enableRating($a_value, $a_text = null, $a_categories =
false, array $a_ctrl_path = null)
2878 $this->rating_enabled = (bool)$a_value;
2880 if($this->rating_enabled)
2882 $this->rating_categories_enabled = (bool)$a_categories;
2883 $this->rating_text = $a_text;
2884 $this->rating_ctrl_path = $a_ctrl_path;
2896 if (!$folder_set->get(
"enable_multi_download"))
2900 $this->multi_download_enabled = (bool)$a_value;
2905 global $ilAccess, $objDefinition;
2907 if ($this->std_cmd_only)
2919 $cmd =
$_GET[
"cmd"] ==
"enableMultiDownload" ?
"render" :
"enableMultiDownload";
2921 $this->
insertCommand($cmd_link, $this->lng->txt(
"download_multiple_objects"));
2935 if (in_array($this->type, array(
"file",
"fold")) &&
2936 $ilAccess->checkAccess(
"read",
"", $a_ref_id, $this->type))
2938 $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_ENABLED;
2942 $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_DISABLED;
2947 $this->download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE;
2959 static function prepareJsLinks($a_redraw_url, $a_notes_url, $a_tags_url, $a_tpl = null)
2963 if (is_null($a_tpl))
2970 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
2976 include_once(
"./Services/Tagging/classes/class.ilTaggingGUI.php");
2982 $a_tpl->addOnLoadCode(
"il.Object.setRedrawAHUrl('".
2983 $a_redraw_url.
"');");
2995 $this->sub_obj_type = $a_type;
2996 $this->sub_obj_id = (int)$a_id;
3008 function addHeaderIcon($a_id, $a_img, $a_tooltip = null, $a_onclick = null, $a_status_text = null, $a_href = null)
3010 $this->header_icons[$a_id] = array(
"img" => $a_img,
3011 "tooltip" => $a_tooltip,
3012 "onclick" => $a_onclick,
3013 "status_text" => $a_status_text,
3024 $this->header_icons[$a_id] = $a_html;
3029 $this->ajax_hash = $a_hash;
3041 $htpl =
new ilTemplate(
"tpl.header_action.html",
true,
true,
"Services/Repository");
3043 $redraw_js =
"il.Object.redrawActionHeader();";
3046 if($this->tags_enabled)
3048 include_once(
"./Services/Tagging/classes/class.ilTagging.php");
3051 if (count($tags) > 0)
3053 include_once(
"./Services/Tagging/classes/class.ilTaggingGUI.php");
3054 $lng->loadLanguageModule(
"tagging");
3057 $lng->txt(
"tagging_tags").
": ".count($tags),
3065 if($this->notes_enabled || $comments_enabled)
3067 include_once(
"./Services/Notes/classes/class.ilNote.php");
3068 include_once(
"./Services/Notes/classes/class.ilNoteGUI.php");
3083 $lng->loadLanguageModule(
"notes");
3094 if($this->rating_enabled)
3096 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
3098 $rating_gui->enableCategories($this->rating_categories_enabled);
3100 $rating_gui->setObject($this->obj_id, $this->type);
3101 if($this->rating_text)
3103 $rating_gui->setYourRatingText($this->rating_text);
3106 $this->ctrl->setParameterByClass(
"ilRatingGUI",
"cadh", $this->ajax_hash);
3107 $this->ctrl->setParameterByClass(
"ilRatingGUI",
"rnsb",
true);
3108 if($this->rating_ctrl_path)
3110 $rating_gui->setCtrlPath($this->rating_ctrl_path);
3111 $ajax_url = $this->ctrl->getLinkTargetByClass($this->rating_ctrl_path,
"saveRating",
"",
true,
false);
3116 $ajax_url = $this->ctrl->getLinkTargetByClass(
"ilRatingGUI",
"saveRating",
"",
true,
false);
3118 $tpl->addOnLoadCode(
"il.Object.setRatingUrl('".$ajax_url.
"');");
3121 $rating_gui->getHtml(
true,
3122 $this->checkCommandAccess(
"read",
"", $this->ref_id, $this->type),
3123 "il.Object.saveRating(%rating%);"));
3126 if($this->header_icons)
3128 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
3131 foreach($this->header_icons as $id => $attr)
3137 if($attr[
"onclick"])
3139 $htpl->setCurrentBlock(
"onclick");
3140 $htpl->setVariable(
"PROP_ONCLICK", $attr[
"onclick"]);
3141 $htpl->parseCurrentBlock();
3144 if($attr[
"status_text"])
3146 $htpl->setCurrentBlock(
"status");
3147 $htpl->setVariable(
"PROP_TXT", $attr[
"status_text"]);
3148 $htpl->parseCurrentBlock();
3153 $attr[
"href"] =
"#";
3156 $htpl->setCurrentBlock(
"prop");
3157 $htpl->setVariable(
"PROP_ID", $id);
3158 $htpl->setVariable(
"IMG",
ilUtil::img($attr[
"img"]));
3159 $htpl->setVariable(
"PROP_HREF", $attr[
"href"]);
3160 $htpl->parseCurrentBlock();
3162 if($attr[
"tooltip"])
3175 $htpl->setVariable(
"PROP_CHUNKS",
3176 implode(
" ", $chunks).
" ");
3180 $htpl->setVariable(
"ACTION_DROP_DOWN",
3183 return $htpl->get();
3193 $script = substr(strrchr($_SERVER[
"PHP_SELF"],
"/"),1);
3196 if ((strtolower(
$_GET[
"baseClass"]) !=
"ilrepositorygui") &&
3197 is_int(strpos($a_link,
"baseClass=ilRepositoryGUI")))
3199 if ($this->type !=
"frm")
3214 if (strstr($a_link,
'ilSAHSPresentationGUI') && !$this->offline_mode)
3216 include_once
'Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php';
3218 $om = $sahs_obj->getOpenMode();
3219 $width = $sahs_obj->getWidth();
3220 $height = $sahs_obj->getHeight();
3223 $this->default_command[
"frame"]=
"";
3224 $a_link =
"javascript:void(0); onclick=startSAHS('".$a_link.
"','".$wtarget.
"',".$om.
",".$width.
",".$height.
");";
3239 include_once
'Services/Tree/classes/class.ilPathGUI.php';
3241 $path_gui->enableTextOnly(!$this->path_linked);
3242 $path_gui->setUseImages(
false);
3244 $this->tpl->setCurrentBlock(
"path_item");
3245 $this->tpl->setVariable(
'PATH_ITEM',$path_gui->getPath(ROOT_FOLDER_ID,$this->ref_id));
3246 $this->tpl->parseCurrentBlock();
3248 $this->tpl->setCurrentBlock(
"path");
3249 $this->tpl->setVariable(
"TXT_LOCATION", $lng->txt(
"locator"));
3250 $this->tpl->parseCurrentBlock();
3272 global
$lng, $objDefinition;
3277 $this->tpl->setCurrentBlock(
"check");
3278 $this->tpl->setVariable(
"VAL_ID", $this->
getCommandId());
3279 $this->tpl->parseCurrentBlock();
3284 $this->tpl->setCurrentBlock(
"check_download");
3286 $this->tpl->setVariable(
"VAL_ID", $this->
getCommandId());
3288 $this->tpl->setVariable(
"VAL_VISIBILITY",
"visibility: hidden;\" disabled=\"disabled");
3289 $this->tpl->parseCurrentBlock();
3294 $this->tpl->setCurrentBlock(
'expand');
3298 $this->ctrl->setParameter($this->container_obj,
'expand',-1 * $this->obj_id);
3299 $this->tpl->setVariable(
'EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj,
'',$this->getUniqueItemId(
true)));
3300 $this->ctrl->clearParameters($this->container_obj);
3301 #$this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('browser/minus.png')); 3303 $this->tpl->setVariable(
'EXP_ALT',$this->lng->txt(
'collapse'));
3307 $this->ctrl->setParameter($this->container_obj,
'expand',$this->obj_id);
3308 $this->tpl->setVariable(
'EXP_HREF',$this->ctrl->getLinkTarget($this->container_obj,
'',$this->getUniqueItemId(
true)));
3309 $this->ctrl->clearParameters($this->container_obj);
3310 #$this->tpl->setVariable('EXP_IMG',ilUtil::getImagePath('browser/plus.png')); 3312 $this->tpl->setVariable(
'EXP_ALT',$this->lng->txt(
'expand'));
3315 $this->tpl->parseCurrentBlock();
3323 $this->tpl->touchBlock(
"i_1");
3327 if (!$this->default_command || (!$this->
getCommandsStatus() && !$this->restrict_to_goto))
3332 $this->tpl->setCurrentBlock(
"icon_link_s");
3334 if ($this->default_command[
"frame"] !=
"")
3336 $this->tpl->setVariable(
"ICON_TAR",
"target='".$this->default_command[
"frame"].
"'");
3339 $this->tpl->setVariable(
"ICON_HREF",
3340 $this->default_command[
"link"]);
3341 $this->tpl->parseCurrentBlock();
3342 $this->tpl->touchBlock(
"icon_link_e");
3345 $this->tpl->setCurrentBlock(
"icon");
3346 if (!$objDefinition->isPlugin($this->getIconImageType()))
3348 $this->tpl->setVariable(
"ALT_ICON", $lng->txt(
"icon").
" ".$lng->txt(
"obj_".$this->
getIconImageType()));
3352 include_once(
"Services/Component/classes/class.ilPlugin.php");
3353 $this->tpl->setVariable(
"ALT_ICON", $lng->txt(
"icon").
" ".
3357 $this->tpl->setVariable(
"SRC_ICON",
3359 $this->tpl->parseCurrentBlock();
3363 $this->tpl->touchBlock(
"d_".$cnt);
3371 foreach ($this->sub_item_html as $sub_html)
3373 $this->tpl->setCurrentBlock(
"subitem");
3374 $this->tpl->setVariable(
"SUBITEM", $sub_html);
3375 $this->tpl->parseCurrentBlock();
3384 if ($this->position_enabled)
3386 $this->tpl->setCurrentBlock(
"position");
3387 $this->tpl->setVariable(
"POS_ID", $this->position_field_index);
3388 $this->tpl->setVariable(
"POS_VAL", $this->position_value);
3389 $this->tpl->parseCurrentBlock();
3399 return $this->adm_commands_included;
3408 if($this->acache->getLastAccessStatus() ==
"miss" &&
3409 !$this->prevent_access_caching)
3411 $this->acache->storeEntry($ilUser->getId().
":".
$this->ref_id,
3431 $a_use_asynch =
false, $a_get_asynch_commands =
false, $a_asynch_url =
"", $a_context = self::CONTEXT_REPOSITORY)
3437 $this->adm_commands_included =
false;
3443 $ilBench->start(
"ilObjectListGUI",
"1000_getListHTML_init$type");
3444 $this->
initItem($a_ref_id, $a_obj_id, $a_title, $a_description, $a_context);
3445 $ilBench->stop(
"ilObjectListGUI",
"1000_getListHTML_init$type");
3448 include_once
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php";
3449 if($a_context == self::CONTEXT_REPOSITORY)
3459 if ($a_use_asynch && $a_get_asynch_commands)
3464 if($this->rating_enabled)
3471 $rating->setObject($this->obj_id, $this->type);
3473 $this->lng->txt(
"rating_average_rating"),
3474 $rating->getListGUIProperty($this->ref_id, $may_rate, $this->ajax_hash, $this->parent_ref_id),
3482 include_once(
"Services/Object/classes/class.ilListItemAccessCache.php");
3484 $cres = $this->acache->getEntry($ilUser->getId().
":".$a_ref_id);
3485 if($this->acache->getLastAccessStatus() ==
"hit")
3487 $this->access_cache = unserialize($cres);
3498 $ilBench->stop(
"ilObjectListGUI",
"2000_getListHTML_check_visible");
3510 $this->tpl =
new ilTemplate(
"tpl.container_list_item.html",
true,
true,
3511 "Services/Container",
"DEFAULT",
false,
true);
3514 ($this->payment_enabled && IS_PAYMENT_ENABLED))
3518 $this->tpl->setVariable(
"COMMAND_SELECTION_LIST",
3519 $this->
insertCommands($a_use_asynch, $a_get_asynch_commands, $a_asynch_url));
3548 $ilBench->start(
"ilObjectListGUI",
"6000_insert_properties$type");
3553 $ilBench->stop(
"ilObjectListGUI",
"6000_insert_properties$type");
3556 $ilBench->start(
"ilObjectListGUI",
"6500_insert_notice_properties$type");
3561 $ilBench->stop(
"ilObjectListGUI",
"6500_insert_notice_properties$type");
3564 $ilBench->start(
"ilObjectListGUI",
"7000_insert_preconditions");
3569 $ilBench->stop(
"ilObjectListGUI",
"7000_insert_preconditions");
3572 $ilBench->start(
"ilObjectListGUI",
"8000_insert_path");
3574 $ilBench->stop(
"ilObjectListGUI",
"8000_insert_path");
3576 $ilBench->start(
"ilObjectListGUI",
"8500_item_detail_links");
3581 $ilBench->stop(
"ilObjectListGUI",
"8500_item_detail_links");
3599 $this->cust_prop = array();
3600 $this->cust_commands = array();
3601 $this->sub_item_html = array();
3602 $this->position_enabled =
false;
3604 $this->tpl->setVariable(
"DIV_CLASS",
'ilContainerListItemOuter');
3605 $this->tpl->setVariable(
"DIV_ID",
'id = "'.$this->
getUniqueItemId(
true).
'"');
3611 return $this->tpl->get();
3621 $this->parent_ref_id = $a_ref_id;
3633 $id_ref = ($this->reference_ref_id > 0)
3634 ? $this->reference_ref_id
3638 if($this->condition_depth)
3640 $id_ref .=
"_pc".$this->condition_depth;
3644 $id_ref .=
"_pref_".$this->parent_ref_id;
3653 return "lg_div_".$id_ref;
3680 $this->bold_title = $a_bold_title;
3704 if($a_context == self::CONTEXT_REPOSITORY)
3706 $lng->loadLanguageModule(
"notes");
3707 $lng->loadLanguageModule(
"tagging");
3708 $lng->loadLanguageModule(
"rating");
3710 include_once(
"./Services/Tagging/classes/class.ilTagging.php");
3713 include_once(
"./Services/Notes/classes/class.ilNote.php");
3718 self::$preload_done =
true;
3731 protected function isCommentsActivated($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access =
true)
3733 if($this->comments_enabled)
3735 if(!$this->comments_settings_enabled)
3739 if($a_check_write_access && $this->
checkCommandAccess(
'write',
'', $a_ref_id, $a_type))
3745 if(!$a_header_actions && self::$preload_done)
3747 if(self::$comments_activation[$a_obj_id][$a_type])
3754 include_once(
"./Services/Notes/classes/class.ilNote.php");
3773 $this->timings_enabled = (bool)$a_status;
3784 include_once(
"./Services/FileUpload/classes/class.ilFileUploadUtil.php");
3793 include_once(
"./Services/FileUpload/classes/class.ilFileUploadGUI.php");
3798 $this->tpl->setCurrentBlock(
"fileupload");
3799 $this->tpl->setVariable(
"FILE_UPLOAD", $upload->getHTML());
3800 $this->tpl->parseCurrentBlock();
parseConditions($toggle_id, $conditions, $obligatory=true)
getCommands()
get all current commands for a specific ref id (in the permission context of the current user) ...
getProgressInfoStatus()
get progress info status
static initFileUpload()
Initializes the file upload and loads the needed javascripts and styles.
insertTitle()
insert item title
insertPaymentCommand($has_extension_prices=false)
Creates a path for a start and endnode.
insertIconsAndCheckboxes()
Insert icons and checkboxes.
const CONTEXT_WORKSPACE_SHARING
enableInfoScreen($a_info_screen)
En/disable path.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
$repository_transfer_enabled
insertSearchFragment()
Insert highlighted search fragment.
getDescription()
getDescription overwritten in class.ilObjLinkResourceList.php
getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
isMode($a_mode)
check current output mode
getContainerObject()
get container object
insertLinkCommand()
insert link command
insertMultiDownloadCommand()
storeAccessCache()
Store access cache.
static _lookupInsideChangeState($parent_obj_id, $usr_id)
Returns the changed state of objects which are children of the specified parent object.
getIconStatus()
Are icons enabled?
getCommandLink($a_cmd)
Get command link url.
enablePath($a_path)
En/disable path.
static _getConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_target_type="")
get all conditions of target object
enableNotes($a_value)
Toogle notes action status.
static _lookupPobjectId($a_ref_id)
ilObjectListGUI()
constructor
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="")
Build img tag.
enablePayment($a_status)
En/disable payment.
enableDelete($a_status)
En/disable delete.
insertCopyCommand($a_to_repository=false)
Insert copy command.
getCheckboxStatus()
Are checkboxes enabled?
addHeaderIcon($a_id, $a_img, $a_tooltip=null, $a_onclick=null, $a_status_text=null, $a_href=null)
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
const DOWNLOAD_CHECKBOX_NONE
insertPreconditions()
insert all missing preconditions
enableProperties($a_status)
En/disable properties.
static _countNotesAndComments($a_rep_obj_id, $a_sub_obj_id=null)
Get all notes related to a specific object.
static _isFileHidden($a_file_name)
Returns true, if a file with the specified name, is usually hidden from the user. ...
addCustomCommand($a_link, $a_lang_var, $a_frame="", $onclick="")
add a custom command
enableCut($a_status)
En/disable cut.
getAdditionalInformation()
Get additional information.
const DOWNLOAD_CHECKBOX_ENABLED
insertPasteCommand()
Insert paste command.
Access handler for personal workspace.
getItemDetailLinkStatus()
get item detail link status
getCommandsHTML()
Get commands HTML (must be called after get list item html)
static getListGUIStatus($a_obj_id)
static _lookupTitle($a_id)
lookup object title
createDefaultCommand($command)
Get default command link Overwritten for e.g categories,courses => they return a goto link If search ...
setBoldTitle($a_bold_title)
public boolean $a_bold_title set the item title bold
insertCommand($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
insert command button
getSubstitutionStatus()
Get substitution status.
static _isActive()
Static getter.
enableSubstitutions($a_status)
Enable substitutions.
enableSearchFragments($a_status)
En/disable description.
enableMultiDownload($a_value)
Toggles whether multiple objects can be downloaded at once or not.
static getTagsForUserAndObject($a_obj_id, $a_obj_type, $a_sub_obj_id, $a_sub_obj_type, $a_user_id)
Get tags for a user and an object.
static _lookupUserIsOfflineMode($a_obj_id)
Checks offlineMode and returns false if.
static _countTags($a_obj_ids)
Count all tags for repository objects.
insertSubscribeCommand()
insert subscribe command
setContainerObject($container_obj)
set the container object (e.g categorygui) Used for link, delete ...
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
static preloadCommonProperties($a_obj_ids, $a_context)
Preload common properties.
$rating_categories_enabled
static calculateRequiredTriggers($a_target_ref_id, $a_target_obj_id, $a_target_obj_type='', $a_force_update=false)
calculate number of obligatory items
static hasRatingInListGUI($a_obj_id, $a_obj_type)
static $comments_activation
insertDeleteCommand()
insert cut command
static lookupRenderStatus($a_obj_id)
Gets the render status for the object with the specified id.
isVisibleOnlyForced()
Force unreadable.
checkCommandAccess($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
setDescription($a_description)
restrictToGoto($a_value)
Restrict all actions/links to goto.
enableLinkedPath($a_status)
Enable linked path.
getCommandFrame($a_cmd)
Get command target frame.
static _getInstance()
Get singleton instance of this class.
enableRepositoryTransfer($a_value)
Enable copy/move to repository (from personal workspace)
insertPositionField()
Insert field for positioning.
setPositionInputField($a_field_index, $a_position_value)
Set position input field.
enableRating($a_value, $a_text=null, $a_categories=false, array $a_ctrl_path=null)
Toogle rating action status.
static lookupTxt($a_mod_prefix, $a_pl_id, $a_lang_var)
Lookup language text.
modifySAHSlaunch($a_link, $wtarget)
workaround: SAHS in new javavasript-created window or iframe
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
isFileUploadAllowed()
Gets a value indicating whether file uploads to this object are allowed or not.
getListTagsJSCall($a_hash, $a_update_code=null)
Get tagging js call.
getNoticeProperties()
get notice properties
enableSubscribe($a_status)
En/disable subscribe.
static hasPreview($a_obj_id, $a_type="")
Determines whether the object with the specified reference id has a preview.
getCommandId()
get command id Normally the ref id.
static getGotoLink($a_node_id, $a_obj_id, $a_additional=null)
const CONTEXT_PERSONAL_DESKTOP
static buildAjaxHash($a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type=null, $a_sub_id=null)
Build ajax hash.
getDownloadCheckboxState()
insertProgressInfo()
insert progress info
enablePreconditions($a_status)
En/disable preconditions.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
enableDownloadCheckbox($a_ref_id, $a_value)
static prepareJsLinks($a_redraw_url, $a_notes_url, $a_tags_url, $a_tpl=null)
Insert js/ajax links into template.
enableDescription($a_status)
En/disable description.
insertSubItems()
Insert subitems.
static _lookupObjId($a_id)
enabledRelevance()
enabled relevance
getProperties($a_item='')
Get item properties.
setAdditionalInformation($a_val)
Set additional information.
special template class to simplify handling of ITX/PEAR
setSearchFragment($a_text)
set search fragment
static getOptionalConditionsOfTarget($a_target_ref_id, $a_target_obj_id, $a_obj_type='')
Get optional conditions.
static getRepObjActivation($a_rep_obj_ids)
Get activation for repository objects.
insertInfoScreenCommand()
insert info screen command
initJavascript($a_ajax_url)
Init javascript.
static formatDate(ilDateTime $date)
Format a date public.
getSearchFragment()
get search fragment
getListItemHTML($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_context=self::CONTEXT_REPOSITORY)
Get all item information (title, commands, description) in HTML.
redirection script todo: (a better solution should control the processing via a xml file) ...
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
enableProgressInfo($a_status)
enable progress info
getDetailsLevel()
Get current details level.
enableNoticeProperties($a_status)
En/disable notices.
static _lookupOrder($a_pobject_id)
getSearchFragmentStatus()
Show hide search result fragments.
getCommandImage($a_cmd)
Get command icon image.
getIconImageType()
Returns the icon image type.
insertPayment()
insert payment information
static getInstance()
Get singelton iunstance.
insertItemDetailLinks()
insert item detail links
initJavascript($a_ajax_url)
Init javascript.
forceVisibleOnly($a_stat)
Force visible access only.
enableCommands($a_status, $a_std_only=false)
En/disable commands.
static _hasAccess($a_pobject_id, $a_user_id=0, $a_transaction=0)
_getCommands()
get commands
static _lookupType($a_id, $a_reference=false)
lookup object type
enableCopy($a_status)
En/disable copy.
setDetailsLevel($a_level)
Details level Currently used in Search which shows only limited properties of forums Currently used f...
Caches (check) access information on list items.
enableComments($a_value, $a_enable_comments_settings=true)
Toogle comments action status.
appendRepositoryFrameParameter($a_link)
workaround: all links into the repository (from outside) must tell repository to setup the frameset ...
getTitle()
getTitle overwritten in class.ilObjLinkResourceList.php
addCustomProperty($a_property="", $a_value="", $a_alert=false, $a_newline=false)
add custom property
enableExpand($a_status)
En/Dis-able expand/collapse link.
User interface class for advanced drop-down selection lists.
enableIcon($a_status)
En/Dis-able icons.
insertProperties($a_item='')
insert properties
$prevent_duplicate_commands
setRelevance($a_rel)
set relevance
setItemDetailLinks($a_detail_links, $a_intro_txt='')
set items detail links
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
enableItemDetailLinks($a_status)
enable item detail links E.g Direct links to chapters or pages
static commentsActivated($a_rep_obj_id, $a_obj_id, $a_obj_type)
Are comments activated for object?
enableCheckbox($a_status)
En/Dis-able checkboxes.
_checkCondition($a_id, $a_usr_id=0)
checks wether a single condition is fulfilled every trigger object type must implement a static metho...
setParentRefId($a_ref_id)
Set current parent ref id to enable unique js-ids (sessions, etc.)
addHeaderIconHTML($a_id, $a_html)
setConditionDepth($a_depth)
set depth for precondition output (stops at level 5)
getNoticePropertiesStatus()
getRelevance()
get relevance
Interface for gui classes (e.g ilLuceneSearchGUI) that offer add/remove to/from desktop.
enableTags($a_value)
Toogle tags action status.
static isUploadAllowed($a_ref_id, $a_type="")
Determines whether files can be uploaded to the object with the specified reference id...
isCommentsActivated($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access=true)
Check comments status against comments settings and context.
insertTimingsCommand()
insert edit timings command
isSideBlock()
Returns whether current item is a block in a side column or not.
static getInstance()
Get instance.
static _isActive()
Returns true, if change event tracking is active.
getUniqueItemId($a_as_div=false)
Get unique item identifier (for js-actions)
setSeparateCommands($a_val)
Set separate commands.
enableLink($a_status)
En/disable link.
setMode($a_mode)
set output mode
getSeparateCommands()
Get separate commands.
_lookupContainerSetting($a_id, $a_keyword, $a_default_value=NULL)
Lookup a container setting.
const INFO_TAB_VISIBILITY
$item_detail_links_enabled
$notice_properties_enabled
insertCommands($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
insert all commands into html code
getAlertProperties()
get all alert properties
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
insertCommonSocialCommands($a_header_actions=false)
Insert common social commands (comments, notes, tagging)
Interface for GUI classes (PDGUI, LuceneSearchGUI...) that have to handle administration commands (cu...
getExpandStatus()
Is expand/collapse enabled.
setHeaderSubObject($a_type, $a_id)
Set sub object identifier.
$comments_settings_enabled
$search_fragments_enabled
insertDescription()
insert item description
insertFileUpload()
Inserts a file upload component.
insertRelevance()
insert relevance
initItem($a_ref_id, $a_obj_id, $a_title="", $a_description="", $a_context=self::CONTEXT_REPOSITORY)
inititialize new item (is called by getItemHTML())
getCustomProperties($a_prop)
get custom properties
getListNotesJSCall($a_hash, $a_update_code=null)
Get list notes js call.
Class ilObjSCORMLearningModule.
static _hasExtensions($a_ref_id)
const DOWNLOAD_CHECKBOX_DISABLED
static _countNotesAndCommentsMultiple($a_rep_obj_ids, $a_no_sub_objs=false)
Get all notes related to multiple objcts.
enableRelevance($a_status)
enable relevance
static _lookupChangeState($obj_id, $usr_id)
Returns the change state of the object for the specified user.
adminCommandsIncluded()
returns whether any admin commands (link, delete, cut) are included in the output ...
addSubItemHTML($a_html)
Add HTML for subitem (used for sessions)
getHeaderAction()
Get header action.
enableTimings($a_status)
enable timings link
insertCutCommand($a_to_repository=false)
insert cut command
insertSubstitutions()
Insert substitutions.