4 require_once
"./Services/Object/classes/class.ilObjectGUI.php";
5 require_once
"./Modules/Wiki/classes/class.ilObjWiki.php";
50 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
54 $this->ctrl = $DIC->ctrl();
55 $this->lng = $DIC->language();
56 $this->
user = $DIC->user();
57 $this->tpl = $DIC[
"tpl"];
58 $this->tabs = $DIC->tabs();
59 $this->access = $DIC->access();
60 $this->error = $DIC[
"ilErr"];
62 $this->help = $DIC[
"ilHelp"];
63 $this->locator = $DIC[
"ilLocator"];
64 $this->toolbar = $DIC->toolbar();
66 $lng = $DIC->language();
72 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
73 $lng->loadLanguageModule(
"obj");
74 $lng->loadLanguageModule(
"wiki");
76 if (
$_GET[
"page"] !=
"") {
89 $next_class = $this->ctrl->getNextClass($this);
90 $cmd = $this->ctrl->getCmd();
96 if ($cmd ==
"printView" || $cmd ==
"pdfExport") {
100 switch ($next_class) {
101 case "ilinfoscreengui":
107 case 'ilpermissiongui':
109 $ilTabs->activateTab(
"perm_settings");
110 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
112 $ret = $this->ctrl->forwardCommand($perm_gui);
115 case 'ilsettingspermissiongui':
118 $ilTabs->activateTab(
"settings");
120 include_once(
"Services/AccessControl/classes/class.ilSettingsPermissionGUI.php");
122 $perm_gui->setPermissions(array(
"edit_wiki_navigation",
"delete_wiki_pages",
"activate_wiki_protection",
123 "wiki_html_export"));
124 $perm_gui->setRoleRequiredPermissions(array(
"edit_content"));
125 $perm_gui->setRoleProhibitedPermissions(array(
"write"));
126 $ret = $this->ctrl->forwardCommand($perm_gui);
129 case 'ilwikipagegui':
131 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
133 $this->object->getId(),
136 $this->
object->getRefId()
138 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
140 $this->object->getStyleSheetId(),
144 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
146 !$ilAccess->checkAccess(
"edit_content",
"", $this->object->getRefId()) ||
147 $wpage_gui->getPageObject()->getBlocked()
149 $wpage_gui->setEnableEditing(
false);
155 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
156 $wpage_gui->activateMetaDataEditor($this->
object,
"wpg", $wpage_gui->getId());
159 $ret = $this->ctrl->forwardCommand($wpage_gui);
165 case 'ilobjectcopygui':
166 include_once
'./Services/Object/classes/class.ilObjectCopyGUI.php';
168 $cp->setType(
'wiki');
169 $this->ctrl->forwardCommand($cp);
172 case 'ilpublicuserprofilegui':
173 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
175 $ret = $this->ctrl->forwardCommand($profile_gui);
179 case "ilobjstylesheetgui":
180 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
181 $this->ctrl->setReturn($this,
"editStyleProperties");
182 $style_gui =
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(),
false,
false);
184 if ($cmd ==
"create" ||
$_GET[
"new_type"] ==
"sty") {
185 $style_gui->setCreationMode(
true);
188 if ($cmd ==
"confirmedDelete") {
189 $this->
object->setStyleSheetId(0);
190 $this->
object->update();
193 $ret = $this->ctrl->forwardCommand($style_gui);
195 if ($cmd ==
"save" || $cmd ==
"copyStyle" || $cmd ==
"importStyle") {
197 $this->
object->setStyleSheetId($style_id);
198 $this->
object->update();
199 $this->ctrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
206 $ilTabs->activateTab(
"export");
207 include_once(
"./Services/Export/classes/class.ilExportGUI.php");
209 $exp_gui->addFormat(
"xml");
210 $exp_gui->addFormat(
"html",
"", $this,
"exportHTML");
211 $ret = $this->ctrl->forwardCommand($exp_gui);
215 case "ilcommonactiondispatchergui":
216 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
218 $this->ctrl->forwardCommand($gui);
225 $ilTabs->activateTab(
"settings");
227 include_once(
"Services/Rating/classes/class.ilRatingGUI.php");
229 $gui->setObject($this->object->getId(), $this->
object->getType());
230 $gui->setExportCallback(array($this,
"getSubObjectTitle"), $this->lng->txt(
"page"));
231 $this->ctrl->forwardCommand($gui);
234 case "ilwikistatgui":
238 $ilTabs->activateTab(
"statistics");
240 include_once
"Modules/Wiki/classes/class.ilWikiStatGUI.php";
242 $this->ctrl->forwardCommand($gui);
245 case "ilwikipagetemplategui":
248 $ilTabs->activateTab(
"settings");
250 include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplateGUI.php");
252 $this->ctrl->forwardCommand($wptgui);
255 case 'ilobjectmetadatagui':
258 $ilTabs->activateTab(
"advmd");
259 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
261 $this->ctrl->forwardCommand($md_gui);
264 case 'ilrepositoryobjectsearchgui':
267 $ilTabs->setTabActive(
"wiki_search_results");
268 $ilCtrl->setReturn($this,
'view');
269 include_once
'./Services/Search/classes/class.ilRepositoryObjectSearchGUI.php';
271 $this->object->getRefId(),
275 $ilCtrl->forwardCommand($search_gui);
278 case 'ilobjnotificationsettingsgui':
280 $ilTabs->activateTab(
"settings");
282 include_once(
"./Services/Notification/classes/class.ilObjNotificationSettingsGUI.php");
284 $this->ctrl->forwardCommand($gui);
293 if ($cmd !=
"cancelObject") {
294 if ($cmd !=
"infoScreenObject") {
295 if (!in_array($cmd, array(
"createObject",
"saveObject",
"importFileObject"))) {
316 if (is_object($this->
object)) {
336 $forms = array(self::CFORM_NEW => $this->form_gui,
354 $ilErr->raiseError($this->lng->txt(
"permission_denied"),
$ilErr->MESSAGE);
358 if ($this->form_gui->checkInput()) {
360 $short_item = $this->form_gui->getItemByPostVar(
"shorttitle");
361 $short_item->setAlert(
$lng->txt(
"wiki_short_title_already_in_use"));
364 $_POST[
"title"] = $this->form_gui->getInput(
"title");
365 $_POST[
"desc"] = $this->form_gui->getInput(
"description");
366 return parent::saveObject();
370 $this->form_gui->setValuesByPost();
371 $tpl->setContent($this->form_gui->getHtml());
382 $newObj->
setTitle($this->form_gui->getInput(
"title"));
383 $newObj->
setDescription($this->form_gui->getInput(
"description"));
384 $newObj->setIntroduction($this->form_gui->getInput(
"intro"));
385 $newObj->setStartPage($this->form_gui->getInput(
"startpage"));
386 $newObj->setShortTitle($this->form_gui->getInput(
"shorttitle"));
387 $newObj->setRating($this->form_gui->getInput(
"rating"));
389 $newObj->setRatingForNewPages($this->form_gui->getInput(
"rating_new"));
390 $newObj->setRatingCategories($this->form_gui->getInput(
"rating_ext"));
392 $newObj->setRatingOverall($this->form_gui->getInput(
"rating_overall"));
393 $newObj->setPageToc($this->form_gui->getInput(
"page_toc"));
398 $newObj->setPublicNotes($this->form_gui->getInput(
"public_notes"));
400 $newObj->setOnline($this->form_gui->getInput(
"online"));
404 ilUtil::sendSuccess($this->lng->txt(
"object_added"),
true);
416 $this->ctrl->setCmd(
"showSummary");
417 $this->ctrl->setCmdClass(
"ilinfoscreengui");
432 $ilTabs->activateTab(
"info_short");
434 if (!$ilAccess->checkAccess(
"visible",
"", $this->object->getRefId())) {
435 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"),
$ilErr->MESSAGE);
438 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
440 $info->enablePrivateNotes();
441 if (trim($this->object->getIntroduction()) !=
"") {
442 $info->addSection(
$lng->txt(
"wiki_introduction"));
443 $info->addProperty(
"", nl2br($this->object->getIntroduction()));
447 include_once(
"./Modules/Wiki/classes/class.ilWikiContributor.php");
448 include_once(
"./Services/Tracking/classes/class.ilLPMarks.php");
453 $info->addSection($this->lng->txt(
"wiki_feedback_from_tutor"));
454 if ($lpcomment !=
"") {
456 $this->lng->txt(
"wiki_comment"),
462 $this->lng->txt(
"wiki_mark"),
469 $this->lng->txt(
"status"),
470 $this->lng->txt(
"wiki_passed")
475 $this->lng->txt(
"status"),
476 $this->lng->txt(
"wiki_failed")
489 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId())) {
494 $this->lng->loadLanguageModule(
"meta");
495 $this->lng->loadLanguageModule(
"wiki");
502 $this->ctrl->forwardCommand(
$info);
504 if ($ilAccess->checkAccess(
"read",
"", $this->object->getRefId())) {
527 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
535 "wiki_what_links_here",
536 $this->ctrl->getLinkTargetByClass(
544 $this->ctrl->getLinkTargetByClass(
560 $ilTabs->activateTab(
"wiki_pages");
562 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
567 $this->object->getId(),
572 $ilTabs->addSubTabTarget(
574 $this->ctrl->getLinkTarget($this,
"allPages"),
577 $ilTabs->addSubTabTarget(
578 "wiki_recent_changes",
579 $this->ctrl->getLinkTarget($this,
"recentChanges"),
582 $ilTabs->addSubTabTarget(
584 $this->ctrl->getLinkTarget($this,
"newPages"),
587 $ilTabs->addSubTabTarget(
588 "wiki_popular_pages",
589 $this->ctrl->getLinkTarget($this,
"popularPages"),
592 $ilTabs->addSubTabTarget(
593 "wiki_orphaned_pages",
594 $this->ctrl->getLinkTarget($this,
"orphanedPages"),
611 $ilHelp->setScreenIdComponent(
"wiki");
614 if (in_array(
$ilCtrl->getCmdClass(), array(
"",
"ilobjwikigui",
615 "ilinfoscreengui",
"ilpermissiongui",
"ilexportgui",
"ilratingcategorygui",
"ilobjnotificationsettingsgui",
"iltaxmdgui",
616 "ilwikistatgui",
"ilwikipagetemplategui",
"iladvancedmdsettingsgui",
"ilsettingspermissiongui",
'ilrepositoryobjectsearchgui' 617 )) || (in_array(
$ilCtrl->getNextClass(), array(
"ilpermissiongui")))) {
618 if (
$_GET[
"page"] !=
"") {
619 $this->tabs_gui->setBackTarget(
620 $lng->txt(
"wiki_last_visited_page"),
629 if ($ilAccess->checkAccess(
'read',
"", $this->object->getRefId())) {
630 $this->tabs_gui->addTab(
632 $lng->txt(
"wiki_pages"),
633 $this->ctrl->getLinkTarget($this,
"allPages")
638 if ($ilAccess->checkAccess(
'visible',
"", $this->object->getRefId())) {
639 $this->tabs_gui->addTab(
641 $lng->txt(
"info_short"),
642 $this->ctrl->getLinkTargetByClass(
"ilinfoscreengui",
"showSummary")
647 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
648 $this->tabs_gui->addTab(
650 $lng->txt(
"settings"),
651 $this->ctrl->getLinkTarget($this,
"editSettings")
655 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
657 $mdtab = $mdgui->getTab();
659 $this->tabs_gui->addTab(
661 $this->lng->txt(
"meta_data"),
668 if ($ilAccess->checkAccess(
'write',
"", $this->object->getRefId())) {
669 $this->tabs_gui->addTab(
671 $lng->txt(
"wiki_contributors"),
672 $this->ctrl->getLinkTarget($this,
"listContributors")
677 if ($ilAccess->checkAccess(
'statistics_read',
"", $this->object->getRefId())) {
678 $this->tabs_gui->addTab(
680 $lng->txt(
"statistics"),
681 $this->ctrl->getLinkTargetByClass(
"ilWikiStatGUI",
"initial")
685 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
686 $this->tabs_gui->addTab(
689 $this->ctrl->getLinkTargetByClass(
"ilexportgui",
"")
694 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId())) {
695 $this->tabs_gui->addTab(
697 $lng->txt(
"perm_settings"),
698 $this->ctrl->getLinkTargetByClass(
"ilpermissiongui",
"perm")
716 array(
"general_settings",
"style",
"imp_pages",
"rating_categories",
717 "page_templates",
"advmd",
"permission_settings",
"notifications")
719 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
723 $lng->txt(
"wiki_general_settings"),
724 $ilCtrl->getLinkTarget($this,
'editSettings')
729 "permission_settings",
730 $lng->txt(
"obj_permission_settings"),
731 $this->ctrl->getLinkTargetByClass(
"ilsettingspermissiongui",
"")
737 $lng->txt(
"wiki_style"),
738 $ilCtrl->getLinkTarget($this,
'editStyleProperties')
742 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
746 $lng->txt(
"wiki_navigation"),
747 $ilCtrl->getLinkTarget($this,
'editImportantPages')
751 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
755 $lng->txt(
"wiki_page_templates"),
756 $ilCtrl->getLinkTargetByClass(
"ilwikipagetemplategui",
"")
760 if ($this->object->getRating() && $this->
object->getRatingCategories()) {
761 $lng->loadLanguageModule(
"rating");
764 $lng->txt(
"rating_categories"),
765 $ilCtrl->getLinkTargetByClass(array(
'ilratinggui',
'ilratingcategorygui'),
'')
771 $lng->txt(
"notifications"),
772 $ilCtrl->getLinkTargetByClass(
"ilobjnotificationsettingsgui",
'')
776 $ilTabs->activateSubTab($a_active);
795 include_once
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
797 $ecs->addSettingsToForm($this->form_gui,
'wiki');
799 $tpl->setContent($this->form_gui->getHtml());
814 $lng->loadLanguageModule(
"wiki");
815 $ilTabs->activateTab(
"settings");
817 require_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
823 $this->form_gui->addItem($tit);
841 $this->form_gui->addItem($des);
847 $this->form_gui->addItem($intro);
850 if ($a_mode ==
"edit") {
852 foreach ($pages as $p) {
857 $this->form_gui->addItem(
$si);
860 if ($a_mode ==
"edit") {
863 $sp->setMaxLength(200);
864 $sp->setRequired(
true);
865 $this->form_gui->addItem($sp);
870 $this->form_gui->addItem($online);
875 $lng->loadLanguageModule(
'rating');
877 $rate->
setInfo(
$lng->txt(
'rating_activate_rating_info'));
878 $this->form_gui->addItem($rate);
881 $this->form_gui->addItem($rating);
898 $this->form_gui->addItem($comments);
907 $page_toc->
setInfo(
$lng->txt(
"wiki_page_toc_info"));
908 $this->form_gui->addItem($page_toc);
910 if ($a_mode ==
"edit") {
912 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
915 $link_md->
setInfo(
$lng->txt(
"wiki_link_md_values_info"));
916 $this->form_gui->addItem($link_md);
921 $section->setTitle($this->lng->txt(
'obj_presentation'));
925 $obj_service->commonSettings()->legacyForm($this->form_gui, $this->
object)->addTileImage();
930 $feat->setTitle($this->lng->txt(
'obj_features'));
931 $this->form_gui->addItem($feat);
933 include_once
'./Services/Container/classes/class.ilContainer.php';
934 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
936 $this->object->getId(),
948 if ($a_mode !=
"create") {
949 $this->form_gui->setTitle(
$lng->txt(
"wiki_settings"));
950 $this->form_gui->addCommandButton(
"saveSettings",
$lng->txt(
"save"));
952 $this->form_gui->setTitle(
$lng->txt(
"wiki_new"));
953 $this->form_gui->addCommandButton(
"save",
$lng->txt(
"wiki_add"));
954 $this->form_gui->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
958 if ($a_mode ==
"create") {
959 $ilCtrl->setParameter($this,
"new_type",
"wiki");
962 $this->form_gui->setFormAction(
$ilCtrl->getFormAction($this,
"saveSettings"));
971 if ($a_mode ==
"create") {
977 $this->form_gui->setValuesByArray(
$values);
979 $values[
"online"] = $this->
object->getOnline();
980 $values[
"title"] = $this->
object->getTitle();
983 $values[
"shorttitle"] = $this->
object->getShortTitle();
984 $values[
"description"] = $this->
object->getLongDescription();
985 $values[
"rating_overall"] = $this->
object->getRatingOverall();
986 $values[
"rating"] = $this->
object->getRating();
988 $values[
"rating_new"] = $this->
object->getRatingForNewPages();
989 $values[
"rating_ext"] = $this->
object->getRatingCategories();
990 $values[
"public_notes"] = $this->
object->getPublicNotes();
991 $values[
"intro"] = $this->
object->getIntroduction();
993 $values[
"page_toc"] = $this->
object->getPageToc();
994 $values[
"link_md_values"] = $this->
object->getLinkMetadataValues();
997 $this->form_gui->setValuesByArray($values,
true);
1017 if ($this->form_gui->checkInput()) {
1019 $this->form_gui->getInput(
"shorttitle") != $this->
object->getShortTitle()) {
1020 $short_item = $this->form_gui->getItemByPostVar(
"shorttitle");
1021 $short_item->setAlert(
$lng->txt(
"wiki_short_title_already_in_use"));
1023 $this->
object->setTitle($this->form_gui->getInput(
"title"));
1024 $this->
object->setDescription($this->form_gui->getInput(
"description"));
1025 $this->
object->setOnline($this->form_gui->getInput(
"online"));
1027 $this->
object->setShortTitle($this->form_gui->getInput(
"shorttitle"));
1028 $this->
object->setRatingOverall($this->form_gui->getInput(
"rating_overall"));
1029 $this->
object->setRating($this->form_gui->getInput(
"rating"));
1031 $this->
object->setRatingForNewPages($this->form_gui->getInput(
"rating_new"));
1032 $this->
object->setRatingCategories($this->form_gui->getInput(
"rating_ext"));
1035 $this->
object->setPublicNotes($this->form_gui->getInput(
"public_notes"));
1037 $this->
object->setIntroduction($this->form_gui->getInput(
"intro"));
1039 $this->
object->setPageToc($this->form_gui->getInput(
"page_toc"));
1040 $this->
object->setLinkMetadataValues($this->form_gui->getInput(
"link_md_values"));
1041 $this->
object->update();
1044 $obj_service->commonSettings()->legacyForm($this->form_gui, $this->
object)->saveTileImage();
1047 include_once
'./Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1049 $this->object->getId(),
1057 include_once
'Modules/Wiki/classes/class.ilECSWikiSettings.php';
1059 if ($ecs->handleSettingsUpdate()) {
1060 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1061 $ilCtrl->redirect($this,
"editSettings");
1066 $this->form_gui->setValuesByPost();
1067 $this->tpl->setContent($this->form_gui->getHTML());
1079 $ilTabs->activateTab(
"wiki_contributors");
1081 include_once(
"./Modules/Wiki/classes/class.ilWikiContributorsTableGUI.php");
1086 $this->object->getId()
1089 $tpl->setContent($table_gui->getHTML());
1108 include_once(
"./Modules/Wiki/classes/class.ilWikiContributor.php");
1109 include_once(
"./Services/Tracking/classes/class.ilLPMarks.php");
1111 foreach (
$users as $user_id) {
1112 if ($user_id !=
"") {
1113 $marks_obj =
new ilLPMarks($this->object->getId(), $user_id);
1118 if ($marks_obj->getMark() != $new_mark ||
1122 $marks_obj->setMark($new_mark);
1123 $marks_obj->setComment($new_comment);
1124 $marks_obj->update();
1130 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
1133 $ilCtrl->redirect($this,
"listContributors");
1141 if (is_object($this->
object)) {
1142 $ilLocator->addItem(
1143 $this->object->getTitle(),
1155 $ilAccess = $DIC->access();
1157 $lng = $DIC->language();
1158 $ilNavigationHistory = $DIC[
"ilNavigationHistory"];
1160 $i = strpos($a_target,
"_");
1162 $a_page = substr($a_target,
$i + 1);
1163 $a_target = substr($a_target, 0,
$i);
1166 if ($a_target ==
"wpage") {
1167 $a_page_arr = explode(
"_", $a_page);
1168 $wpg_id = (int) $a_page_arr[0];
1169 $ref_id = (int) $a_page_arr[1];
1170 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1177 foreach ($refs as
$r) {
1178 if ($ilAccess->checkAccess(
"read",
"", $r)) {
1185 if ($ilAccess->checkAccess(
"read",
"", $a_target)) {
1186 $_GET[
"cmd"] =
"viewPage";
1187 $_GET[
"ref_id"] = $a_target;
1188 $_GET[
"page"] = $a_page;
1189 $_GET[
"baseClass"] =
"ilwikihandlergui";
1190 $_GET[
"cmdClass"] =
"ilobjwikigui";
1197 include(
"ilias.php");
1199 } elseif ($ilAccess->checkAccess(
"visible",
"", $a_target)) {
1201 } elseif ($ilAccess->checkAccess(
"read",
"", ROOT_FOLDER_ID)) {
1203 $lng->txt(
"msg_no_perm_read_item"),
1217 if ($a_page ==
"") {
1221 $goto =
"goto.php?target=wiki_" . $a_ref_id .
"_" .
1240 $ilTabs->clearTargets();
1241 $tpl->setHeaderActionMenu(null);
1243 $page = (
$_GET[
"page"] !=
"")
1245 : $this->object->getStartPage();
1246 $_GET[
"page"] = $page;
1248 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1250 $page = $this->
object->getStartPage();
1255 $ilCtrl->redirect($this,
"infoScreen");
1262 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1264 $this->object->getId(),
1267 $this->
object->getRefId()
1269 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1271 $this->object->getStyleSheetId(),
1279 $ilCtrl->setCmdClass(
"ilwikipagegui");
1281 if (!$ilAccess->checkAccess(
"write",
"", $this->object->getRefId()) &&
1283 !$ilAccess->checkAccess(
"edit_content",
"", $this->object->getRefId()) ||
1284 $wpage_gui->getPageObject()->getBlocked()
1286 $wpage_gui->setEnableEditing(
false);
1292 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId())) {
1293 $wpage_gui->activateMetaDataEditor($this->
object,
"wpg", $wpage_gui->getId());
1312 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1319 $this->object->getId(),
1324 $tpl->setContent($table_gui->getHTML());
1336 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1343 $this->object->getId(),
1348 $tpl->setContent($table_gui->getHTML());
1360 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1367 $this->object->getId(),
1372 $tpl->setContent($table_gui->getHTML());
1384 if ($a_page ==
"") {
1385 $a_page =
$_GET[
"page"];
1388 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1390 $this->object->getId(),
1396 if (!$this->object->getTemplateSelectionOnCreation()) {
1398 include_once(
"./Services/Utilities/classes/class.ilStr.php");
1400 ilUtil::sendFailure($this->lng->txt(
"wiki_page_title_too_long") .
" (" . $a_page .
")",
true);
1402 $ilCtrl->redirectByClass(
"ilwikipagegui",
"preview");
1404 $this->
object->createWikiPage($a_page);
1408 $ilCtrl->redirectByClass(
"ilwikipagegui",
"edit");
1412 $ilCtrl->redirect($this,
"showTemplateSelection");
1426 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1440 include_once(
"./Modules/Wiki/classes/class.ilWikiRecentChangesTableGUI.php");
1447 $this->object->getId()
1451 $tpl->setContent($table_gui->getHTML());
1471 $lng = $DIC->language();
1472 $ilAccess = $DIC->access();
1475 $tpl->addJavaScript(
"./Modules/Wiki/js/WikiPres.js");
1479 $tpl->addOnLoadCode(
"il.Wiki.Pres.init('" .
$ilCtrl->getLinkTargetByClass(
"ilobjwikigui",
"",
"",
false,
false) .
"');");
1481 if ($a_wpg_id > 0 && !$a_wp) {
1482 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1487 include_once
'./Services/Search/classes/class.ilRepositoryObjectSearchGUI.php';
1490 #include_once("./Modules/Wiki/classes/class.ilWikiSearchBlockGUI.php"); 1491 #$wiki_search_block = new ilWikiSearchBlockGUI(); 1492 #$rcontent = $wiki_search_block->getHTML(); 1495 if ($a_wpg_id > 0) {
1505 $a_wp->getRating()) {
1506 include_once(
"./Services/Rating/classes/class.ilRatingGUI.php");
1508 $rgui->setObject($wiki_id,
"wiki", $a_wpg_id,
"wpg");
1510 $rgui->setYourRatingText(
"#");
1511 $rcontent .= $rgui->getBlockHTML(
$lng->txt(
"wiki_rate_page"));
1517 if ($ilAccess->checkAccess(
"write",
"", $a_wiki_ref_id) ||
1518 $ilAccess->checkAccess(
"edit_page_meta",
"", $a_wiki_ref_id)) {
1520 "edit" =>
$ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"editAdvancedMetaData"),
1521 "hide" =>
$ilCtrl->getLinkTargetByClass(
"ilwikipagegui",
"hideAdvancedMetaData")
1524 include_once(
"./Services/Object/classes/class.ilObjectMetaDataGUI.php");
1526 $callback = $wiki->getLinkMetadataValues()
1527 ? array($wiki,
"decorateAdvMDValue")
1530 $rcontent .= $mdgui->getBlockHTML($cmd, $callback);
1537 include_once(
"./Modules/Wiki/classes/class.ilWikiImportantPagesBlockGUI.php");
1539 $rcontent .= $imp_pages_block->getHTML();
1543 if ($a_wpg_id > 0) {
1544 include_once(
"./Modules/Wiki/classes/class.ilWikiFunctionsBlockGUI.php");
1546 $wiki_functions_block->setPageObject($a_wp);
1547 $rcontent .= $wiki_functions_block->getHTML();
1550 $tpl->setRightContent($rcontent);
1562 include_once(
"./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1569 $this->object->getId(),
1574 $tpl->setContent($table_gui->getHTML());
1580 if (is_array(
$_POST[
"wordr"])) {
1582 $page_ids = array_keys(
$_POST[
"wordr"]);
1585 elseif ((
int)
$_GET[
"wpg_id"]) {
1586 $page_ids = array((
int) $_GET[
"wpg_id"]);
1599 $this->ctrl->redirect($this,
"");
1602 $tpl =
new ilTemplate(
"tpl.main.html",
true,
true);
1607 $tpl->setCurrentBlock(
"SyntaxStyle");
1609 "LOCATION_SYNTAX_STYLESHEET",
1612 $tpl->parseCurrentBlock();
1617 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1621 foreach ($page_ids as $p_id) {
1623 $page_gui->setWiki($this->
object);
1624 $page_gui->setOutputMode(
"print");
1625 $page_content .= $page_gui->showPage();
1627 if ($a_pdf_export) {
1628 $page_content .=
'<p style="page-break-after:always;"></p>';
1632 $page_content =
'<div class="ilInvisibleBorder">' . $page_content .
'</div>';
1634 if (!$a_pdf_export) {
1635 $page_content .=
'<script type="text/javascript" language="javascript1.2"> 1637 il.Util.addOnLoad(function () { 1644 $tpl->setVariable(
"CONTENT", $page_content);
1646 if (!$a_pdf_export) {
1650 return $tpl->get(
"DEFAULT",
false,
false,
false,
true,
false,
false);
1663 $html = preg_replace(
"/\?dummy\=[0-9]+/",
"",
$html);
1664 $html = preg_replace(
"/\?vers\=[0-9A-Za-z\-]+/",
"",
$html);
1667 include_once
"Services/PDFGeneration/classes/class.ilPDFGeneration.php";
1668 include_once
"Services/PDFGeneration/classes/class.ilPDFGenerationJob.php";
1671 $job->setAutoPageBreak(
true)
1672 ->setMarginLeft(
"10")
1673 ->setMarginRight(
"10")
1674 ->setMarginTop(
"10")
1675 ->setMarginBottom(
"10")
1676 ->setOutputMode(
"D")
1677 ->setFilename(
"wiki.pdf")
1678 ->setCreator(
"ILIAS Wiki")
1679 ->setImageScale(1.25)
1684 $html = preg_replace(
"/src=\"\\.\\//ims",
"src=\"" . ILIAS_HTTP_PATH .
"/",
$html);
1685 $html = preg_replace(
"/href=\"\\.\\//ims",
"href=\"" . ILIAS_HTTP_PATH .
"/",
$html);
1703 include_once(
"./Modules/Wiki/classes/class.ilWikiSearchResultsTableGUI.php");
1705 $ilTabs->setTabActive(
"wiki_search_results");
1707 if (trim(
$_POST[
"search_term"]) ==
"") {
1709 $ilCtrl->redirectByClass(
"ilwikipagegui",
"preview");
1713 $this->object->getId(),
1719 $this->object->getId(),
1725 $tpl->setContent($table_gui->getHTML());
1735 if ($a_tpl != null) {
1741 $ctpl->setCurrentBlock(
"ContentStyle");
1743 "LOCATION_CONTENT_STYLESHEET",
1746 $ctpl->parseCurrentBlock();
1761 $tpl->setContent($this->form->getHTML());
1763 $ilTabs->activateTab(
"settings");
1779 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1780 $lng->loadLanguageModule(
"style");
1782 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1785 $fixed_style =
$ilSetting->get(
"fixed_content_style_id");
1786 $style_id = $this->
object->getStyleSheetId();
1788 if ($fixed_style > 0) {
1791 $this->lng->txt(
"global_fixed") .
")");
1792 $this->form->addItem($st);
1800 $st_styles[0] = $this->lng->txt(
"default");
1803 if ($style_id > 0) {
1808 $this->form->addItem($st);
1813 $this->form->addCommandButton(
1815 $lng->txt(
"style_edit_style")
1817 $this->form->addCommandButton(
1819 $lng->txt(
"style_delete_style")
1835 $style_sel->setValue($style_id);
1836 $this->form->addItem($style_sel);
1838 $this->form->addCommandButton(
1839 "saveStyleSettings",
1842 $this->form->addCommandButton(
1844 $lng->txt(
"sty_create_ind_style")
1848 $this->form->setTitle(
$lng->txt(
"wiki_style"));
1849 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
1859 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"create");
1869 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"edit");
1879 $ilCtrl->redirectByClass(
"ilobjstylesheetgui",
"delete");
1889 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1890 if (
$ilSetting->get(
"fixed_content_style_id") <= 0 &&
1892 || $this->object->getStyleSheetId() == 0)) {
1894 $this->
object->update();
1895 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
1897 $this->ctrl->redirect($this,
"editStyleProperties");
1920 $ipages_ids = array();
1921 foreach ($ipages as
$i) {
1922 $ipages_ids[] = $i[
"page_id"];
1926 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
1929 foreach ($pages as $p) {
1930 if (!in_array($p[
"id"], $ipages_ids)) {
1934 if (count($options) > 0) {
1935 include_once(
"./Services/Form/classes/class.ilSelectInputGUI.php");
1937 $si->setOptions($options);
1939 $ilToolbar->addInputItem(
$si);
1940 $ilToolbar->setFormAction(
$ilCtrl->getFormAction($this));
1941 $ilToolbar->addFormButton(
$lng->txt(
"add"),
"addImportantPage");
1945 $ilTabs->activateTab(
"settings");
1948 include_once(
"./Modules/Wiki/classes/class.ilImportantPagesTableGUI.php");
1951 $tpl->setContent($imp_table->getHTML());
1967 if (
$_POST[
"imp_page_id"] > 0) {
1968 $this->
object->addImportantPage((
int)
$_POST[
"imp_page_id"]);
1969 ilUtil::sendSuccess(
$lng->txt(
"wiki_imp_page_added"),
true);
1971 $ilCtrl->redirect($this,
"editImportantPages");
1983 if (!is_array(
$_POST[
"imp_page_id"]) || count(
$_POST[
"imp_page_id"]) == 0) {
1985 $ilCtrl->redirect($this,
"editImportantPages");
1987 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
1989 $cgui->setFormAction(
$ilCtrl->getFormAction($this));
1990 $cgui->setHeaderText(
$lng->txt(
"wiki_sure_remove_imp_pages"));
1991 $cgui->setCancel(
$lng->txt(
"cancel"),
"editImportantPages");
1992 $cgui->setConfirm(
$lng->txt(
"remove"),
"removeImportantPages");
1994 foreach (
$_POST[
"imp_page_id"] as
$i) {
1998 $tpl->setContent($cgui->getHTML());
2015 if (is_array(
$_POST[
"imp_page_id"])) {
2016 foreach (
$_POST[
"imp_page_id"] as
$i) {
2017 $this->
object->removeImportantPage((
int) $i);
2020 ilUtil::sendSuccess(
$lng->txt(
"wiki_removed_imp_pages"),
true);
2021 $ilCtrl->redirect($this,
"editImportantPages");
2034 $this->
object->saveOrderingAndIndentation(
$_POST[
"ord"],
$_POST[
"indent"]);
2035 ilUtil::sendSuccess(
$lng->txt(
"wiki_ordering_and_indent_saved"),
true);
2036 $ilCtrl->redirect($this,
"editImportantPages");
2049 if (!is_array(
$_POST[
"imp_page_id"]) || count(
$_POST[
"imp_page_id"]) != 1) {
2052 $this->
object->removeImportantPage((
int)
$_POST[
"imp_page_id"][0]);
2054 $this->
object->update();
2055 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
2057 $ilCtrl->redirect($this,
"editImportantPages");
2066 require_once(
"./Modules/Wiki/classes/class.ilWikiHTMLExport.php");
2068 $cont_exp->buildExportFile();
2080 include_once
"Modules/Wiki/classes/class.ilWikiPage.php";
2082 if ($page->getWikiId() == $a_wiki_id) {
2083 return $page->getTitle();
2096 include_once
"Modules/Wiki/classes/class.ilWikiPage.php";
2112 $ilTabs->clearTargets();
2116 $tpl->setContent($form->getHTML());
2127 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
2132 $hi->setValue(
$_GET[
"page"]);
2133 $form->addItem($hi);
2139 if ($this->object->getEmptyPageTemplate()) {
2141 $radg->addOption($op1);
2144 include_once(
"./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
2147 foreach ($ts as
$t) {
2149 $radg->addOption($op);
2152 $form->addItem($radg);
2155 $form->addCommandButton(
"createPageUsingTemplate",
$lng->txt(
"wiki_create_page"));
2156 $form->addCommandButton(
"cancelCreationPageUsingTemplate",
$lng->txt(
"cancel"));
2158 $form->setTitle(
$lng->txt(
"wiki_new_page") .
": " .
$_GET[
"page"]);
2174 if (
$form->checkInput()) {
2175 $a_page =
$_POST[
"page"];
2176 $this->
object->createWikiPage($a_page, (
int)
$_POST[
"page_templ"]);
2180 $ilCtrl->redirectByClass(
"ilwikipagegui",
"edit");
2182 ilUtil::sendSuccess(
$lng->txt(
"msg_obj_modified"),
true);
2185 $form->setValuesByPost();
2199 $ilCtrl->redirectByClass(
"ilwikipagegui",
"preview");
2213 if ($a_perm ==
"create") {
2214 return parent::checkPermissionBool($a_perm, $a_cmd,
$a_type, $a_ref_id);
2217 $a_ref_id = $this->
object->getRefId();
2219 include_once(
"./Modules/Wiki/classes/class.ilWikiPerm.php");
2234 $this->log->debug(
"init");
2236 $this->
object->initUserHTMLExport();
2244 $this->log->debug(
"start");
2246 $this->
object->startUserHTMLExport();
2254 $this->log->debug(
"get progress");
2256 $p = $this->
object->getUserHTMLExportProgress();
2258 include_once(
"./Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php");
2260 $pb->setCurrent($p[
"progress"]);
2263 $r->progressBar = $pb->render();
2264 $r->status = $p[
"status"];
2265 include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
2266 $this->log->debug(
"status: " .
$r->status);
2276 $this->log->debug(
"download");
2278 $this->
object->deliverUserHTMLExport();
static renderSideBlock($a_wpg_id, $a_wiki_ref_id, $a_wp=null)
Side column.
UI class for handling permissions that can be configured having the write permission for an object...
isOnlineHelpWiki()
Is wiki an online help wiki?
setSideBlock($a_wpg_id=0)
Side column.
infoScreen()
show information screen
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
exportHTML()
Create html package.
This class represents an option in a radio group.
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
static getContentPrintStyle()
get content print style
initStylePropertiesForm()
Init style properties form.
getAllInfo($a_type=self::TYPE_ALL)
Get all info.
editStylePropertiesObject()
Edit style properties.
allPagesObject()
All pages of wiki.
TableGUI class for listing users that contributed to the wiki.
getUserHTMLExportProgressObject()
Get user html export progress.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
setValue($a_value)
Set Value.
saveStyleSettingsObject()
Save style settings.
static _lookupImportantPagesList($a_wiki_id)
Get important pages list.
const IL_WIKI_POPULAR_PAGES
Wiki page template gui class.
GUI class for the workflow of copying objects.
TableGUI class for recent changes in wiki.
addImportantPageObject()
Add important pages.
orphanedPagesObject()
Orphaned pages.
static checkShortTitleAvailability($a_short_title)
Check availability of short title.
static lookupSubObjectTitle($a_wiki_id, $a_page_id)
Get title for wiki page (used in ilNotesGUI)
Wiki statistics GUI class.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
saveGradingObject()
Save grading.
static _writeStatus($a_obj_id, $a_user_id, $a_status)
Write success status.
static _lookupStartPage($a_wiki_id)
Lookup start page.
gotoStartPageObject()
Go to start page.
static getGUIForTitle($a_wiki_id, $a_title, $a_old_nr=0, $a_wiki_ref_id=0)
Get wiki page gui for id and title.
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually...
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
TableGUI class for wiki pages table.
addPageTabs()
Add Page Tabs.
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
downloadUserHTMLExportObject()
Download user html export file.
initCreationForms($a_new_type)
static _lookupRatingCategories($a_wiki_id)
Lookup whether rating categories are activated.
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...
static lookupAdvancedMetadataHidden($a_page_id)
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
confirmRemoveImportantPagesObject()
Confirm important pages deletion.
static _getAllReferences($a_id)
get all reference ids of object
setTitle($a_title)
set object title
saveObject()
save object public
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
popularPagesObject()
Popular pages.
createStyleObject()
Create Style.
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
static getRandomPage($a_wiki_id)
Get a random page.
static _lookupStandard($a_id)
Lookup standard flag.
BlockGUI class for wiki functions block.
static _lookupRating($a_wiki_id)
Lookup whether rating is activated.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
startUserHTMLExportObject()
Export html (as user)
static hasAutoRating($a_type, $a_ref_id)
Check if auto rating is active for parent group/course.
printViewObject($a_pdf_export=false)
Export User Interface Class.
static lookupWikiId($a_page_id)
Lookup wiki id.
initImportForm($a_new_type)
Init object import form.
setSettingsSubTabs($a_active)
Set sub tabs.
prepareOutput($a_show_subobjects=true)
prepare output
static _performSearch($a_wiki_id, $a_searchterm)
Search in Wiki.
GUI class for public user profile presentation.
static _getPageIdForWikiTitle($a_wiki_id, $a_title)
Checks whether a page with given title exists.
static encode($mixed, $suppress_native=false)
editImportantPagesObject()
List important pages.
static getInstance()
Factory.
if(isset($_POST['submit'])) $form
saveSettingsObject()
Save Settings.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
addPagesSubTabs()
Add Pages SubTabs.
initTemplateSelectionForm()
Init template selection form.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
getSubObjectTitle($a_id, $a_type)
Used for rating export.
listContributorsObject()
List all contributors.
Important pages wiki block.
Class ilObjectGUI Basic methods of all Output classes.
static _lookupObjId($a_id)
special template class to simplify handling of ITX/PEAR
omitLocator($a_omit=true)
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
cancelCreationPageUsingTemplateObject()
Cancel page creation using a template.
setAsStartPageObject()
Confirm important pages deletion.
initUserHTMLExportObject()
Export html (as user)
This class represents a text property in a property form.
setCols($a_cols)
Set Cols.
createPageUsingTemplateObject()
Save creation with template form.
Class ilWikiPage GUI class.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true)
get content style path
showTemplateSelectionObject()
Show template selection.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
static getAllWikiPages($a_wiki_id)
Get all pages of wiki.
static makeDbTitle($a_par)
Handle page GET parameter.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
getSettingsFormValues($a_mode="edit")
static _wikiPageExists($a_wiki_id, $a_title)
Check whether page exists for wiki or not.
static getSearchBlockHTML($a_title)
Get standar search block html.
randomPageObject()
Go to random page.
deleteStyleObject()
Delete Style.
initSettingsForm($a_mode="edit")
Init Settings Form.
static exists($a_wiki_id, $a_title)
Checks whether a page with given title exists.
Class ilPDFGenerationJob.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
editSettingsObject()
Edit settings.
This class represents a non editable value in a property form.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
Class ilObjStyleSheetGUI.
Handles general notification settings, see e.g.
This class represents a text area property in a property form.
const IL_WIKI_ORPHANED_PAGES
gotoPageObject($a_page="")
Go to specific page.
performSearchObject()
Search.
static isOnlineHelpWiki($a_ref_id)
Is wiki an online help wiki?
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
getRefId()
get reference id public
Wiki HTML exporter class.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
setDescription($a_desc)
set object description
static getLogger($a_component_id)
Get component logger.
static _lookupMark($a_usr_id, $a_obj_id)
update()
update object in db
static _lookupComment($a_usr_id, $a_obj_id)
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor public.
newPagesObject()
Latest pages.
TableGUI class for recent changes in wiki.
removeImportantPagesObject()
Remove important pages.
static redirect($a_script)
saveOrderingAndIndentObject()
Save important pages ordering and indentation.
addHeaderAction()
Add header action menu.
static doJob(ilPDFGenerationJob $job)
editStyleObject()
Edit Style.
recentChangesObject()
Recent Changes.
static prepareGenerationRequest($service, $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
viewPageObject()
view wiki page
Confirmation screen class.
afterSave(ilObject $newObj)
save object public