ILIAS  release_8 Revision v8.25-1-g13de6a5eca6
ilObjWikiGUI Class Reference
+ Inheritance diagram for ilObjWikiGUI:
+ Collaboration diagram for ilObjWikiGUI:

Public Member Functions

 __construct ( $a_data, int $a_id, bool $a_call_by_reference, bool $a_prepare_output=true)
 
 executeCommand ()
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 saveObject ()
 
 infoScreenObject ()
 this one is called from the info button in the repository More...
 
 infoScreen ()
 
 gotoStartPageObject ()
 
 addPageTabs ()
 
 addPagesSubTabs ()
 
 setSettingsSubTabs (string $a_active)
 
 editSettingsObject ()
 
 initSettingsForm (string $a_mode="edit")
 
 getSettingsFormValues (string $a_mode="edit")
 
 saveSettingsObject ()
 
 listContributorsObject ()
 
 saveGradingObject ()
 
 viewPageObject ()
 
 allPagesObject ()
 
 popularPagesObject ()
 
 orphanedPagesObject ()
 
 gotoPageObject (string $a_page="")
 
 randomPageObject ()
 
 recentChangesObject ()
 
 setSideBlock (int $a_wpg_id=0)
 
 newPagesObject ()
 
 getPrintView (bool $export=false)
 
 printViewObject ()
 
 performSearchObject ()
 
 setContentStyleSheet ()
 
 editImportantPagesObject ()
 
 addImportantPageObject ()
 
 confirmRemoveImportantPagesObject ()
 
 removeImportantPagesObject ()
 
 saveOrderingAndIndentObject ()
 
 setAsStartPageObject ()
 
 getSubObjectTitle (int $a_id, string $a_type)
 Used for rating export. More...
 
 showTemplateSelectionObject ()
 
 initTemplateSelectionForm ()
 
 createPageUsingTemplateObject ()
 
 cancelCreationPageUsingTemplateObject ()
 
 initUserHTMLExportObject ()
 Export html (as user) More...
 
 startUserHTMLExportObject ()
 Export html (as user) More...
 
 getUserHTMLExportProgressObject ()
 Get user html export progress. More...
 
 downloadUserHTMLExportObject ()
 
 downloadUserHTMLExportWithCommentsObject ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target)
 
static getGotoLink (int $a_ref_id, string $a_page="")
 
static renderSideBlock (int $a_wpg_id, int $a_wiki_ref_id, ?ilWikiPage $a_wp=null)
 
static lookupSubObjectTitle (int $a_wiki_id, string $a_page_id)
 Get title for wiki page (used in ilNotesGUI) More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

 initCreationForms (string $new_type)
 Init creation forms. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getPrintPageIds ()
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 triggerAssignmentTool ()
 
 getAssignmentButtons ()
 Get assignment buttons. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ILIAS HTTP Services $http
 
string $requested_page
 
ilPropertyFormGUI $form_gui
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
ilLogger $log
 
ContextServices $tool_context
 
ILIAS DI UIServices $ui
 
bool $req_with_comments = false
 
EditingGUIRequest $edit_request
 
ILIAS Style Content GUIService $content_style_gui
 
ILIAS Style Content Object ObjectFacade $content_style_domain
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjWikiGUI::__construct (   $data,
int  $id,
bool  $call_by_reference,
bool  $prepare_output = true 
)
Parameters
mixed$data
int$id
bool$call_by_reference
bool$prepare_output
Exceptions
ilCtrlException

Reimplemented from ilObjectGUI.

Definition at line 51 of file class.ilObjWikiGUI.php.

56 {
57 global $DIC;
58
59 $this->ctrl = $DIC->ctrl();
60 $this->lng = $DIC->language();
61 $this->tabs = $DIC->tabs();
62 $this->help = $DIC->help();
63 $this->locator = $DIC["ilLocator"];
64 $ilCtrl = $DIC->ctrl();
65 $lng = $DIC->language();
66 $this->http = $DIC->http();
67
68 $this->type = "wiki";
69
70 $this->log = ilLoggerFactory::getLogger('wiki');
71
72 $this->tool_context = $DIC->globalScreen()->tool()->context();
73 $this->ui = $DIC->ui();
74
75 $this->edit_request = $DIC
76 ->wiki()
77 ->internal()
78 ->gui()
79 ->editing()
80 ->request();
81
82 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
84 $lng->loadLanguageModule("wiki");
85
86 $this->requested_page = $this->edit_request->getPage();
87 if ($this->requested_page !== "") {
88 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
89 }
90
91 $this->req_with_comments = $this->edit_request->getWithComments();
92 $cs = $DIC->contentStyle();
93 $this->content_style_gui = $cs->gui();
94 if (is_object($this->object)) {
95 $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
96 }
97 }
loadLanguageModule(string $a_module)
Load language module.
static getLogger(string $a_component_id)
Get component logger.
ilLanguage $lng
static makeUrlTitle(string $a_par)
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\locator(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjWikiGUI::_goto ( string  $a_target)
static

Definition at line 1043 of file class.ilObjWikiGUI.php.

1043 : void
1044 {
1045 global $DIC;
1046 $main_tpl = $DIC->ui()->mainTemplate();
1047
1048 $ilAccess = $DIC->access();
1049 $lng = $DIC->language();
1050 $ctrl = $DIC->ctrl();
1051
1052 $i = strpos($a_target, "_");
1053 $a_page = "";
1054 if ($i > 0) {
1055 $a_page = substr($a_target, $i + 1);
1056 $a_target = substr($a_target, 0, $i);
1057 }
1058
1059 if ($a_target === "wpage") {
1060 $a_page_arr = explode("_", $a_page);
1061 $wpg_id = (int) $a_page_arr[0];
1062 $ref_id = (int) ($a_page_arr[1] ?? 0);
1063 $w_id = ilWikiPage::lookupWikiId($wpg_id);
1064 if ($ref_id > 0) {
1065 $refs = array($ref_id);
1066 } else {
1067 $refs = ilObject::_getAllReferences($w_id);
1068 }
1069 foreach ($refs as $r) {
1070 if ($ilAccess->checkAccess("read", "", $r)) {
1071 $a_target = $r;
1072 $a_page = ilWikiPage::lookupTitle($wpg_id);
1073 }
1074 }
1075 }
1076
1077 if ($ilAccess->checkAccess("read", "", $a_target)) {
1079 "ilobjwikigui",
1080 "page",
1082 );
1084 "ilwikihandlergui",
1085 "ref_id",
1086 $a_target
1087 );
1088 if ($a_page != "") {
1090 ["ilwikihandlergui", "ilobjwikigui"],
1091 "viewPage"
1092 );
1093 } else {
1095 ["ilwikihandlergui"],
1096 "view"
1097 );
1098 }
1099 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1100 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
1101 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1102 $main_tpl->setOnScreenMessage('failure', sprintf(
1103 $lng->txt("msg_no_perm_read_item"),
1105 ), true);
1107 }
1108
1109 throw new ilPermissionException($lng->txt("permission_denied"));
1110 }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
static _gotoRepositoryNode(int $ref_id, string $cmd="")
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupWikiId(int $a_page_id)
static lookupTitle(int $a_page_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
$i
Definition: metadata.php:41

References ilObjectGUI\$ctrl, $DIC, $i, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\int(), ilWikiPage\lookupTitle(), ilWikiPage\lookupWikiId(), ilWikiUtil\makeUrlTitle(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ addImportantPageObject()

ilObjWikiGUI::addImportantPageObject ( )

Definition at line 1564 of file class.ilObjWikiGUI.php.

1564 : void
1565 {
1566 $ilCtrl = $this->ctrl;
1567 $lng = $this->lng;
1568
1569 $this->checkPermission("edit_wiki_navigation");
1570
1571 $imp_page_id = $this->edit_request->getImportantPageId();
1572 if ($imp_page_id > 0) {
1573 $this->object->addImportantPage($imp_page_id);
1574 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_imp_page_added"), true);
1575 }
1576 $ilCtrl->redirect($this, "editImportantPages");
1577 }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References $lng.

◆ addLocatorItems()

ilObjWikiGUI::addLocatorItems ( )
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 1029 of file class.ilObjWikiGUI.php.

1029 : void
1030 {
1031 $ilLocator = $this->locator;
1032
1033 if (is_object($this->object)) {
1034 $ilLocator->addItem(
1035 $this->object->getTitle(),
1036 self::getGotoLink($this->object->getRefId()),
1037 "",
1038 $this->requested_ref_id
1039 );
1040 }
1041 }
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilLocatorGUI $locator

References ilObjectGUI\$locator, ilLocatorGUI\addItem(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

Definition at line 496 of file class.ilObjWikiGUI.php.

496 : void
497 {
498 $ilTabs = $this->tabs;
499 $ilCtrl = $this->ctrl;
500
501 $ilTabs->activateTab("wiki_pages");
502
503 $ilCtrl->setParameter(
504 $this,
505 "wpg_id",
507 $this->object->getId(),
508 ilWikiUtil::makeDbTitle($this->requested_page)
509 )
510 );
511 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
512 $ilTabs->addSubTabTarget(
513 "wiki_all_pages",
514 $this->ctrl->getLinkTarget($this, "allPages"),
515 "allPages"
516 );
517 $ilTabs->addSubTabTarget(
518 "wiki_recent_changes",
519 $this->ctrl->getLinkTarget($this, "recentChanges"),
520 "recentChanges"
521 );
522 $ilTabs->addSubTabTarget(
523 "wiki_new_pages",
524 $this->ctrl->getLinkTarget($this, "newPages"),
525 "newPages"
526 );
527 $ilTabs->addSubTabTarget(
528 "wiki_popular_pages",
529 $this->ctrl->getLinkTarget($this, "popularPages"),
530 "popularPages"
531 );
532 $ilTabs->addSubTabTarget(
533 "wiki_orphaned_pages",
534 $this->ctrl->getLinkTarget($this, "orphanedPages"),
535 "orphanedPages"
536 );
537 }
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
@inheritDoc
static getPageIdForTitle(int $a_wiki_id, string $a_title)
Get wiki page object for id and title.
static makeDbTitle(string $a_par)

References ilObjectGUI\$ctrl, $tabs, ILIAS\Repository\ctrl(), ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ addPageTabs()

ilObjWikiGUI::addPageTabs ( )

Definition at line 467 of file class.ilObjWikiGUI.php.

467 : void
468 {
469 $ilTabs = $this->tabs;
470 $ilCtrl = $this->ctrl;
471
472 $ilCtrl->setParameter(
473 $this,
474 "wpg_id",
475 ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($this->requested_page))
476 );
477 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
478 $ilTabs->addTarget(
479 "wiki_what_links_here",
480 $this->ctrl->getLinkTargetByClass(
481 "ilwikipagegui",
482 "whatLinksHere"
483 ),
484 "whatLinksHere"
485 );
486 $ilTabs->addTarget(
487 "wiki_print_view",
488 $this->ctrl->getLinkTargetByClass(
489 "ilwikipagegui",
490 "printViewSelection"
491 ),
492 "printViewSelection"
493 );
494 }

References ilObjectGUI\$ctrl, $tabs, ILIAS\Repository\ctrl(), ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), and ilCtrl\setParameter().

+ Here is the call graph for this function:

◆ afterSave()

ilObjWikiGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

Definition at line 354 of file class.ilObjWikiGUI.php.

354 : void
355 {
357
358 $new_object->setTitle($this->form_gui->getInput("title"));
359 $new_object->setDescription($this->form_gui->getInput("description"));
360 $new_object->setIntroduction($this->form_gui->getInput("intro"));
361 $new_object->setStartPage($this->form_gui->getInput("startpage"));
362 $new_object->setShortTitle((string) $this->form_gui->getInput("shorttitle"));
363 $new_object->setRating($this->form_gui->getInput("rating"));
364 // $new_object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
365 $new_object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
366 $new_object->setRatingCategories($this->form_gui->getInput("rating_ext"));
367
368 $new_object->setRatingOverall($this->form_gui->getInput("rating_overall"));
369 $new_object->setPageToc($this->form_gui->getInput("page_toc"));
370
371
372
373 if (!$ilSetting->get("disable_comments")) {
374 $new_object->setPublicNotes($this->form_gui->getInput("public_notes"));
375 }
376 $new_object->setOnline($this->form_gui->getInput("online"));
377 $new_object->update();
378
379 // always send a message
380 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
381 ilUtil::redirect(self::getGotoLink($new_object->getRefId()));
382 }
ilSetting $settings
setTitle(string $title)
setDescription(string $desc)
static redirect(string $a_script)
global $ilSetting
Definition: privfeed.php:17

References $ilSetting, ilObjectGUI\$settings, ilObject\getRefId(), ILIAS\Repository\lng(), ilUtil\redirect(), ilObject\setDescription(), ilObject\setTitle(), and ilObject\update().

+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

Definition at line 1187 of file class.ilObjWikiGUI.php.

1187 : void
1188 {
1189 $tpl = $this->tpl;
1190
1191 $this->checkPermission("read");
1192
1193 $this->addPagesSubTabs();
1194
1195 $table_gui = new ilWikiPagesTableGUI(
1196 $this,
1197 "allPages",
1198 $this->object->getId(),
1200 );
1201
1202 $this->setSideBlock();
1203 $tpl->setContent($table_gui->getHTML());
1204 }
const IL_WIKI_ALL_PAGES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSideBlock(int $a_wpg_id=0)
ilGlobalTemplateInterface $tpl
TableGUI class for wiki pages table.
setContent(string $a_html)
Sets content for standard template.

References $tpl, IL_WIKI_ALL_PAGES, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ cancelCreationPageUsingTemplateObject()

ilObjWikiGUI::cancelCreationPageUsingTemplateObject ( )

Definition at line 1781 of file class.ilObjWikiGUI.php.

1781 : void
1782 {
1783 $ilCtrl = $this->ctrl;
1784
1785 // redirect to newly created page
1786 $ilCtrl->setParameterByClass(
1787 "ilwikipagegui",
1788 "page",
1789 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1790 );
1791 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1792 }

References ilWikiUtil\makeUrlTitle().

+ Here is the call graph for this function:

◆ checkPermissionBool()

ilObjWikiGUI::checkPermissionBool ( string  $perm,
string  $cmd = "",
string  $type = "",
?int  $ref_id = null 
)
protected

Reimplemented from ilObjectGUI.

Definition at line 1794 of file class.ilObjWikiGUI.php.

1794 : bool
1795 {
1796 if ($perm === "create") {
1797 return parent::checkPermissionBool($perm, $cmd, $type, $ref_id);
1798 } else {
1799 if (!$ref_id) {
1800 $ref_id = $this->object->getRefId();
1801 }
1802 return ilWikiPerm::check($perm, $ref_id, $cmd);
1803 }
1804 }
static check(string $a_perm, int $a_ref_id, string $a_cmd="")

References $ref_id, $type, and ilWikiPerm\check().

Referenced by saveObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmRemoveImportantPagesObject()

ilObjWikiGUI::confirmRemoveImportantPagesObject ( )

Definition at line 1579 of file class.ilObjWikiGUI.php.

1579 : void
1580 {
1581 $ilCtrl = $this->ctrl;
1582 $tpl = $this->tpl;
1583 $lng = $this->lng;
1584
1585 $imp_page_ids = $this->edit_request->getImportantPageIds();
1586 if (count($imp_page_ids) === 0) {
1587 $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
1588 $ilCtrl->redirect($this, "editImportantPages");
1589 } else {
1590 $cgui = new ilConfirmationGUI();
1591 $cgui->setFormAction($ilCtrl->getFormAction($this));
1592 $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1593 $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1594 $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1595
1596 foreach ($imp_page_ids as $i) {
1597 $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1598 }
1599
1600 $tpl->setContent($cgui->getHTML());
1601 }
1602 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $i, $lng, $tpl, and ilWikiPage\lookupTitle().

+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

Definition at line 1755 of file class.ilObjWikiGUI.php.

1755 : void
1756 {
1757 $tpl = $this->tpl;
1758 $lng = $this->lng;
1759 $ilCtrl = $this->ctrl;
1760
1761 $form = $this->initTemplateSelectionForm();
1762 if ($form->checkInput()) {
1763 $a_page = $this->edit_request->getPage();
1764 $this->object->createWikiPage(
1765 $a_page,
1766 $this->edit_request->getPageTemplateId()
1767 );
1768
1769 // redirect to newly created page
1770 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1771 $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1772
1773 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1774 $ilCtrl->redirect($this, "");
1775 } else {
1776 $form->setValuesByPost();
1777 $tpl->setContent($form->getHTML());
1778 }
1779 }

References $lng, $tpl, and ilWikiUtil\makeUrlTitle().

+ Here is the call graph for this function:

◆ downloadUserHTMLExportObject()

ilObjWikiGUI::downloadUserHTMLExportObject ( )

Definition at line 1851 of file class.ilObjWikiGUI.php.

1851 : void
1852 {
1853 $this->log->debug("download");
1854 $this->checkPermission("wiki_html_export");
1855 $this->object->deliverUserHTMLExport();
1856 }

◆ downloadUserHTMLExportWithCommentsObject()

ilObjWikiGUI::downloadUserHTMLExportWithCommentsObject ( )

Definition at line 1858 of file class.ilObjWikiGUI.php.

1858 : void
1859 {
1860 $this->log->debug("download");
1861 $this->checkPermission("wiki_html_export");
1862 $this->object->deliverUserHTMLExport(true);
1863 }

◆ editImportantPagesObject()

ilObjWikiGUI::editImportantPagesObject ( )

Definition at line 1520 of file class.ilObjWikiGUI.php.

1520 : void
1521 {
1522 $tpl = $this->tpl;
1523 $ilToolbar = $this->toolbar;
1524 $ilTabs = $this->tabs;
1525 $lng = $this->lng;
1526 $ilCtrl = $this->ctrl;
1527
1528 $this->checkPermission("edit_wiki_navigation");
1529
1530 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_navigation_info"));
1531
1532 $ipages = ilObjWiki::_lookupImportantPagesList($this->object->getId());
1533 $ipages_ids = array();
1534 foreach ($ipages as $i) {
1535 $ipages_ids[] = $i["page_id"];
1536 }
1537
1538 // list pages
1539 $pages = ilWikiPage::getAllWikiPages($this->object->getId());
1540 $options = array("" => $lng->txt("please_select"));
1541 foreach ($pages as $p) {
1542 if (!in_array($p["id"], $ipages_ids)) {
1543 $options[$p["id"]] = ilStr::shortenTextExtended($p["title"], 60, true);
1544 }
1545 }
1546 if (count($options) > 0) {
1547 $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1548 $si->setOptions($options);
1549 $si->setInfo($lng->txt(""));
1550 $ilToolbar->addInputItem($si);
1551 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1552 $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1553 }
1554
1555
1556 $ilTabs->activateTab("settings");
1557 $this->setSettingsSubTabs("imp_pages");
1558
1559 $imp_table = new ilImportantPagesTableGUI($this, "editImportantPages");
1560
1561 $tpl->setContent($imp_table->getHTML());
1562 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSettingsSubTabs(string $a_active)
static _lookupImportantPagesList(int $a_wiki_id)
ilToolbarGUI $toolbar
This class represents a selection list property in a property form.
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
static getAllWikiPages(int $a_wiki_id)

References $i, $lng, $tpl, ilObjWiki\_lookupImportantPagesList(), ilWikiPage\getAllWikiPages(), ILIAS\Repository\object(), and ilStr\shortenTextExtended().

+ Here is the call graph for this function:

◆ editSettingsObject()

ilObjWikiGUI::editSettingsObject ( )

Definition at line 720 of file class.ilObjWikiGUI.php.

720 : void
721 {
723
724 $this->checkPermission("write");
725
726 $this->setSettingsSubTabs("general_settings");
727
728 $this->initSettingsForm();
729 $this->getSettingsFormValues();
730
731 // Edit ecs export settings
732 $ecs = new ilECSWikiSettings($this->object);
733 $ecs->addSettingsToForm($this->form_gui, 'wiki');
734
735 $tpl->setContent($this->form_gui->getHTML());
736 $this->setSideBlock();
737 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initSettingsForm(string $a_mode="edit")
getSettingsFormValues(string $a_mode="edit")

References ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), getSettingsFormValues(), initSettingsForm(), ilGlobalTemplateInterface\setContent(), setSettingsSubTabs(), and setSideBlock().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 99 of file class.ilObjWikiGUI.php.

99 : void
100 {
101 $ilCtrl = $this->ctrl;
103 $ilTabs = $this->tabs;
104 $ilAccess = $this->access;
105
106 $next_class = $this->ctrl->getNextClass($this);
107 $cmd = $this->ctrl->getCmd();
108
109 $this->triggerAssignmentTool();
110
111 $this->prepareOutput();
112
113 // see ilWikiPageGUI::printViewOrderList()
114 // printView() cannot be in ilWikiPageGUI because of stylesheet confusion
115 if ($cmd === "printView") {
116 $next_class = null;
117 }
118
119 switch ($next_class) {
120 case "ilinfoscreengui":
121 $this->checkPermission("visible");
122 $this->addHeaderAction();
123 $this->infoScreen(); // forwards command
124 break;
125
126 case 'ilpermissiongui':
127 $this->addHeaderAction();
128 $ilTabs->activateTab("perm_settings");
129 $perm_gui = new ilPermissionGUI($this);
130 $this->ctrl->forwardCommand($perm_gui);
131 break;
132
133 case 'ilsettingspermissiongui':
134 $this->checkPermission("write");
135 $this->addHeaderAction();
136 $ilTabs->activateTab("settings");
137 $this->setSettingsSubTabs("permission_settings");
138 $perm_gui = new ilSettingsPermissionGUI($this);
139 $perm_gui->setPermissions(array("edit_wiki_navigation", "delete_wiki_pages", "activate_wiki_protection",
140 "wiki_html_export"));
141 $perm_gui->setRoleRequiredPermissions(array("edit_content"));
142 $perm_gui->setRoleProhibitedPermissions(array("write"));
143 $this->ctrl->forwardCommand($perm_gui);
144 break;
145
146 case 'ilwikipagegui':
147 $this->checkPermission("read");
149 $this->object->getId(),
150 ilWikiUtil::makeDbTitle($this->requested_page),
151 $this->edit_request->getOldNr(),
152 $this->object->getRefId()
153 );
154 $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
155 $this->setContentStyleSheet();
156 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
157 (
158 !$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
159 $wpage_gui->getPageObject()->getBlocked()
160 )) {
161 $wpage_gui->setEnableEditing(false);
162 }
163
164 // alter title and description
165 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
166 $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
167 }
168
169 $ret = $this->ctrl->forwardCommand($wpage_gui);
170 if ($ret != "") {
171 $tpl->setContent($ret);
172 }
173 break;
174
175 case 'ilobjectcopygui':
176 $cp = new ilObjectCopyGUI($this);
177 $cp->setType('wiki');
178 $this->ctrl->forwardCommand($cp);
179 break;
180
181 case 'ilpublicuserprofilegui':
182 $profile_gui = new ilPublicUserProfileGUI(
183 $this->edit_request->getUserId()
184 );
185 $ret = $this->ctrl->forwardCommand($profile_gui);
186 $tpl->setContent($ret);
187 break;
188
189 case "ilobjectcontentstylesettingsgui":
190 $this->checkPermission("write");
191 $this->addHeaderAction();
192 $ilTabs->activateTab("settings");
193 $this->setSettingsSubTabs("style");
194
195 $settings_gui = $this->content_style_gui
196 ->objectSettingsGUIForRefId(
197 null,
198 $this->object->getRefId()
199 );
200 $this->ctrl->forwardCommand($settings_gui);
201 break;
202
203 case "ilexportgui":
204 $this->addHeaderAction();
205 $ilTabs->activateTab("export");
206 $exp_gui = new ilExportGUI($this);
207 $exp_gui->addFormat("xml");
208 $exp_gui->addFormat("html", "", $this, "exportHTML");
209 if ($this->object->isCommentsExportPossible()) {
210 $exp_gui->addFormat("html_comments", "HTML (" . $this->lng->txt("wiki_incl_comments") . ")", $this, "exportHTML");
211 }
212 $this->ctrl->forwardCommand($exp_gui);
213 break;
214
215 case "ilcommonactiondispatchergui":
217 $this->ctrl->forwardCommand($gui);
218 break;
219
220 case "ilratinggui":
221 // for rating category editing
222 $this->checkPermission("write");
223 $this->addHeaderAction();
224 $ilTabs->activateTab("settings");
225 $this->setSettingsSubTabs("rating_categories");
226 $gui = new ilRatingGUI();
227 $gui->setObject($this->object->getId(), $this->object->getType());
228 $gui->setExportCallback(array($this, "getSubObjectTitle"), $this->lng->txt("page"));
229 $this->ctrl->forwardCommand($gui);
230 break;
231
232 case "ilwikistatgui":
233 $this->checkPermission("statistics_read");
234
235 $this->addHeaderAction();
236 $ilTabs->activateTab("statistics");
237 $gui = new ilWikiStatGUI($this->object->getId());
238 $this->ctrl->forwardCommand($gui);
239 break;
240
241 case "ilwikipagetemplategui":
242 $this->checkPermission("write");
243 $this->addHeaderAction();
244 $ilTabs->activateTab("settings");
245 $this->setSettingsSubTabs("page_templates");
246 $wptgui = new ilWikiPageTemplateGUI($this);
247 $this->ctrl->forwardCommand($wptgui);
248 break;
249
250 case 'ilobjectmetadatagui':
251 $this->checkPermission("write");
252 $this->addHeaderAction();
253 $ilTabs->activateTab("advmd");
254 $md_gui = new ilObjectMetaDataGUI($this->object, "wpg");
255 $this->ctrl->forwardCommand($md_gui);
256 break;
257
258 case 'ilrepositoryobjectsearchgui':
259 $this->checkPermission("read");
260 $this->addHeaderAction();
261 $this->setSideBlock();
262 $ilTabs->setTabActive("wiki_search_results");
263 $ilCtrl->setReturn($this, 'view');
264 $search_gui = new ilRepositoryObjectSearchGUI(
265 $this->object->getRefId(),
266 $this,
267 'view'
268 );
269 $ilCtrl->forwardCommand($search_gui);
270 break;
271
272 case 'ilobjnotificationsettingsgui':
273 $this->checkPermission("write");
274 $this->addHeaderAction();
275 $ilTabs->activateTab("settings");
276 $this->setSettingsSubTabs("notifications");
277 $gui = new ilObjNotificationSettingsGUI($this->object->getRefId());
278 $this->ctrl->forwardCommand($gui);
279 break;
280
281 case 'illtiproviderobjectsettinggui':
282 $this->checkPermission("write");
283 $this->addHeaderAction();
284 $ilTabs->activateTab("settings");
285 $this->setSettingsSubTabs("lti_provider");
286 $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
287 $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
288 $lti_gui->offerLTIRolesForSelection(false);
289 $this->ctrl->forwardCommand($lti_gui);
290 break;
291
292 default:
293 $this->addHeaderAction();
294 if (!$cmd) {
295 $cmd = "infoScreen";
296 }
297 $cmd .= "Object";
298 if ($cmd !== "cancelObject") {
299 if ($cmd !== "infoScreenObject") {
300 if (!in_array($cmd, array("createObject", "saveObject", "importFileObject"))) {
301 $this->checkPermission("read");
302 }
303 } else {
304 $this->checkPermission("visible");
305 }
306 }
307 $this->$cmd();
308 break;
309 }
310 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
GUI class for the workflow of copying objects.
ilAccessHandler $access
addHeaderAction()
Add header action menu.
prepareOutput(bool $show_sub_objects=true)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getGUIForTitle(int $a_wiki_id, string $a_title, int $a_old_nr=0, int $a_wiki_ref_id=0)
Get wiki page gui for id and title.
Wiki page template gui class.
Wiki statistics GUI class.

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $GLOBALS, $tabs, ilObjectGUI\$tpl, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilWikiPageGUI\getGUIForTitle(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), ILIAS\Repository\lng(), ilWikiUtil\makeDbTitle(), ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), ILIAS\Repository\rbac(), ilGlobalTemplateInterface\setContent(), setContentStyleSheet(), setSettingsSubTabs(), setSideBlock(), and triggerAssignmentTool().

+ Here is the call graph for this function:

◆ getAssignmentButtons()

ilObjWikiGUI::getAssignmentButtons ( )
protected

Get assignment buttons.

Definition at line 1890 of file class.ilObjWikiGUI.php.

1890 : array
1891 {
1892 $ilCtrl = $this->ctrl;
1893 $ui = $this->ui;
1894 $lng = $this->lng;
1895
1896 $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1897 $this->object->getRefId(),
1898 $this->user->getId()
1899 );
1900 $buttons = [];
1901 foreach ($ass_info as $i) { // should be only one
1902 $ass = new ilExAssignment($i->getId());
1903 $times_up = $ass->afterDeadlineStrict();
1904
1905 // submit button
1906 if (!$times_up) {
1907 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1908 $submit_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "finalizeAssignment");
1909 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1910
1911 $buttons[$i->getId()][] = $ui->factory()->button()->primary($lng->txt("wiki_finalize_wiki"), $submit_link);
1912 }
1913
1914 // submitted files
1915 $submission = new ilExSubmission($ass, $this->user->getId());
1916 if ($submission->hasSubmitted()) {
1917 $submitted = $submission->getSelectedObject();
1918 if ($submitted["ts"] != "") {
1919 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1920 }
1921 $dl_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "downloadExcSubFile");
1922 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1923 $buttons[$i->getId()][] = $ui->factory()->button()->standard($lng->txt("wiki_download_submission"), $dl_link);
1924 }
1925 }
1926 return $buttons;
1927 }
Exercise assignment.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS DI UIServices $ui

References $i, $lng, ilExcRepoObjAssignment\getInstance(), ILIAS\Repository\object(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ getGotoLink()

static ilObjWikiGUI::getGotoLink ( int  $a_ref_id,
string  $a_page = "" 
)
static

Definition at line 1112 of file class.ilObjWikiGUI.php.

1115 : string {
1116 if ($a_page === "") {
1118 }
1119
1120 $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
1121 ilWikiUtil::makeUrlTitle($a_page);
1122
1123 return $goto;
1124 }
static _lookupStartPage(int $a_wiki_id)

References ilObject\_lookupObjId(), and ilObjWiki\_lookupStartPage().

Referenced by ilObjWiki\decorateAdvMDValue(), ilWikiPagesTableGUI\fillRow(), ilObjWikiSubItemListGUI\getHTML(), and ilWikiImportantPagesBlockGUI\getLegacyContent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrintPageIds()

ilObjWikiGUI::getPrintPageIds ( )
protected

Definition at line 1428 of file class.ilObjWikiGUI.php.

1428 : array
1429 {
1430 $page_ids = [];
1431 $ordering = $this->edit_request->getPrintOrdering();
1432
1433 // multiple ordered page ids
1434 if (count($ordering) > 0) {
1435 asort($ordering);
1436 $page_ids = array_keys($ordering);
1437 }
1438 // single page
1439 elseif ($this->edit_request->getWikiPageId()) {
1440 $page_ids = array($this->edit_request->getWikiPageId());
1441 }
1442 return $page_ids;
1443 }

◆ getPrintView()

ilObjWikiGUI::getPrintView ( bool  $export = false)

Definition at line 1445 of file class.ilObjWikiGUI.php.

1446 {
1447 $page_ids = $export
1448 ? null
1449 : $this->getPrintPageIds();
1450 $provider = new \ILIAS\Wiki\WikiPrintViewProviderGUI(
1451 $this->lng,
1452 $this->ctrl,
1453 $this->object->getRefId(),
1454 $page_ids
1455 );
1456
1457 return new \ILIAS\Export\PrintProcessGUI(
1458 $provider,
1459 $this->http,
1460 $this->ui,
1461 $this->lng
1462 );
1463 }
$provider
Definition: ltitoken.php:83

References $provider, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

◆ getSettingsFormValues()

ilObjWikiGUI::getSettingsFormValues ( string  $a_mode = "edit")

Definition at line 881 of file class.ilObjWikiGUI.php.

881 : void
882 {
883 // set values
884 if ($a_mode === "create") {
885 $values["rating_new"] = true;
886
887 $parent = ilObjectFactory::getInstanceByRefId($this->requested_ref_id);
888 $values["rating_overall"] = $parent->selfOrParentWithRatingEnabled();
889 } else {
890 $values["online"] = $this->object->getOnline();
891 $values["title"] = $this->object->getTitle();
892 //$values["startpage"] = $this->object->getStartPage();
893 $values["startpage_id"] = ilWikiPage::_getPageIdForWikiTitle($this->object->getId(), $this->object->getStartPage());
894 $values["shorttitle"] = $this->object->getShortTitle();
895 $values["description"] = $this->object->getLongDescription();
896 $values["rating_overall"] = $this->object->getRatingOverall();
897 $values["rating"] = $this->object->getRating();
898 $values["rating_new"] = $this->object->getRatingForNewPages();
899 $values["rating_ext"] = $this->object->getRatingCategories();
900 $values["public_notes"] = $this->object->getPublicNotes();
901 $values["intro"] = $this->object->getIntroduction();
902 $values["page_toc"] = $this->object->getPageToc();
903 $values["link_md_values"] = $this->object->getLinkMetadataValues();
904
905 // only set given values (because of adv. metadata)
906 }
907 $this->form_gui->setValuesByArray($values, true);
908 }
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static _getPageIdForWikiTitle(int $a_wiki_id, string $a_title)

References ilWikiPage\_getPageIdForWikiTitle(), ilObjectFactory\getInstanceByRefId(), and ILIAS\Repository\object().

Referenced by editSettingsObject(), and initCreationForms().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSubObjectTitle()

ilObjWikiGUI::getSubObjectTitle ( int  $a_id,
string  $a_type 
)

Used for rating export.

Definition at line 1689 of file class.ilObjWikiGUI.php.

1692 : string {
1693 return ilWikiPage::lookupTitle($a_id);
1694 }

◆ getTabs()

ilObjWikiGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 539 of file class.ilObjWikiGUI.php.

539 : void
540 {
541 $ilCtrl = $this->ctrl;
542 $ilAccess = $this->access;
544 $ilHelp = $this->help;
545
546 $ilHelp->setScreenIdComponent("wiki");
547
548 // wiki tabs
549 if (in_array(strtolower($ilCtrl->getCmdClass()), array("", "ilobjectcontentstylesettingsgui", "ilobjwikigui",
550 "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui", "ilobjnotificationsettingsgui", "iltaxmdgui",
551 "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui'
552 ), true) || $ilCtrl->getNextClass() === "ilpermissiongui") {
553 if ($this->requested_page !== "") {
554 $this->tabs_gui->setBackTarget(
555 $lng->txt("wiki_last_visited_page"),
556 self::getGotoLink(
557 $this->requested_ref_id,
558 ilWikiUtil::makeDbTitle($this->requested_page)
559 )
560 );
561 }
562
563 // pages
564 if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
565 $this->tabs_gui->addTab(
566 "wiki_pages",
567 $lng->txt("wiki_pages"),
568 $this->ctrl->getLinkTarget($this, "allPages")
569 );
570 }
571
572 // info screen
573 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
574 $this->tabs_gui->addTab(
575 "info_short",
576 $lng->txt("info_short"),
577 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
578 );
579 }
580
581 // settings
582 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
583 $this->tabs_gui->addTab(
584 "settings",
585 $lng->txt("settings"),
586 $this->ctrl->getLinkTarget($this, "editSettings")
587 );
588
589 // metadata
590 $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
591 $mdtab = $mdgui->getTab();
592 if ($mdtab) {
593 $this->tabs_gui->addTab(
594 "advmd",
595 $this->lng->txt("meta_data"),
596 $mdtab
597 );
598 }
599 }
600
601 // contributors
602 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
603 $this->tabs_gui->addTab(
604 "wiki_contributors",
605 $lng->txt("wiki_contributors"),
606 $this->ctrl->getLinkTarget($this, "listContributors")
607 );
608 }
609
610 // statistics
611 if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId())) {
612 $this->tabs_gui->addTab(
613 "statistics",
614 $lng->txt("statistics"),
615 $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial")
616 );
617 }
618
619 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
620 $this->tabs_gui->addTab(
621 "export",
622 $lng->txt("export"),
623 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
624 );
625 }
626
627 // edit permissions
628 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
629 $this->tabs_gui->addTab(
630 "perm_settings",
631 $lng->txt("perm_settings"),
632 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
633 );
634 }
635 }
636 }
setScreenIdComponent(string $a_comp)

References ilObjectGUI\$access, ilObjectGUI\$ctrl, $help, ilObjectGUI\$lng, ILIAS\Repository\lng(), ilWikiUtil\makeDbTitle(), ilHelpGUI\setScreenIdComponent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ getUserHTMLExportProgressObject()

ilObjWikiGUI::getUserHTMLExportProgressObject ( )

Get user html export progress.

Definition at line 1834 of file class.ilObjWikiGUI.php.

1834 : void
1835 {
1836 $this->log->debug("get progress: " . $this->req_with_comments);
1837 $this->checkPermission("wiki_html_export");
1838 $p = $this->object->getUserHTMLExportProgress($this->req_with_comments);
1839
1841 $pb->setCurrent($p["progress"]);
1842
1843 $r = new stdClass();
1844 $r->progressBar = $pb->render();
1845 $r->status = $p["status"];
1846 $this->log->debug("status: " . $r->status);
1847 echo(json_encode($r, JSON_THROW_ON_ERROR));
1848 exit;
1849 }
exit
Definition: login.php:28

References exit, and ilProgressBar\getInstance().

+ Here is the call graph for this function:

◆ gotoPageObject()

ilObjWikiGUI::gotoPageObject ( string  $a_page = "")
Parameters
string$a_pagepage title

Definition at line 1253 of file class.ilObjWikiGUI.php.

1255 : void {
1256 $ilCtrl = $this->ctrl;
1257
1258 if ($a_page === "") {
1259 $a_page = $this->requested_page;
1260 }
1261
1263 $this->object->getId(),
1265 )) {
1266 // to do: get rid of this redirect
1267 ilUtil::redirect(self::getGotoLink($this->object->getRefId(), $a_page));
1268 } else {
1269 if (!$this->access->checkAccess("edit_content", "", $this->object->getRefId())) {
1270 $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_permission"), true);
1271 ilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId(), $this->edit_request->getFromPage()));
1272 }
1273 if (!$this->object->getTemplateSelectionOnCreation()) {
1274 // check length
1275 if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1276 $this->tpl->setOnScreenMessage(
1277 'failure',
1278 $this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")",
1279 true
1280 );
1281 $ilCtrl->setParameterByClass(
1282 "ilwikipagegui",
1283 "page",
1284 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1285 );
1286 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1287 }
1288 $this->object->createWikiPage($a_page);
1289
1290 // redirect to newly created page
1291 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1292 $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1293 } else {
1294 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
1295 $ilCtrl->setParameter(
1296 $this,
1297 "from_page",
1298 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1299 );
1300 $ilCtrl->redirect($this, "showTemplateSelection");
1301 }
1302 }
1303 }
static getGotoLink(int $a_ref_id, string $a_page="")
static strLen(string $a_string)
Definition: class.ilStr.php:63
static _wikiPageExists(int $a_wiki_id, string $a_title)

◆ gotoStartPageObject()

ilObjWikiGUI::gotoStartPageObject ( )

Definition at line 462 of file class.ilObjWikiGUI.php.

462 : void
463 {
464 ilUtil::redirect(self::getGotoLink($this->object->getRefId()));
465 }

References ILIAS\Repository\object(), and ilUtil\redirect().

Referenced by viewObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjWikiGUI::infoScreen ( )

Definition at line 397 of file class.ilObjWikiGUI.php.

397 : void
398 {
399 $ilAccess = $this->access;
401 $ilTabs = $this->tabs;
403
404 $ilTabs->activateTab("info_short");
405
406 if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
407 throw new ilPermissionException($this->lng->txt("permission_denied"));
408 }
409
410 $info = new ilInfoScreenGUI($this);
411 $info->enablePrivateNotes();
412 if (trim($this->object->getIntroduction()) !== "") {
413 $info->addSection($lng->txt("wiki_introduction"));
414 $info->addProperty("", nl2br($this->object->getIntroduction()));
415 }
416
417 // feedback from tutor; mark, status, comment
418 $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
419 $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
420 $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
421 if ($lpcomment !== "" || $mark !== "" || (int) $status !== ilWikiContributor::STATUS_NOT_GRADED) {
422 $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
423 if ($lpcomment !== "") {
424 $info->addProperty(
425 $this->lng->txt("wiki_comment"),
426 $lpcomment
427 );
428 }
429 if ($mark !== "") {
430 $info->addProperty(
431 $this->lng->txt("wiki_mark"),
432 $mark
433 );
434 }
435
436 if ((int) $status === ilWikiContributor::STATUS_PASSED) {
437 $info->addProperty(
438 $this->lng->txt("status"),
439 $this->lng->txt("wiki_passed")
440 );
441 }
442 if ((int) $status === ilWikiContributor::STATUS_FAILED) {
443 $info->addProperty(
444 $this->lng->txt("status"),
445 $this->lng->txt("wiki_failed")
446 );
447 }
448 }
449
450 if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
451 $info->addButton($lng->txt("wiki_start_page"), self::getGotoLink($this->object->getRefId()));
452 }
453
454 // general information
455 $this->lng->loadLanguageModule("meta");
456 $this->lng->loadLanguageModule("wiki");
457
458 // forward the command
459 $this->ctrl->forwardCommand($info);
460 }
Class ilInfoScreenGUI.
static _lookupComment(int $a_usr_id, int $a_obj_id)
static _lookupMark(int $a_usr_id, int $a_obj_id)
static _lookupStatus(int $a_obj_id, int $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
$ilUser
Definition: imgupload.php:34

References ilObjectGUI\$access, $ilUser, ilObjectGUI\$lng, $tabs, ilObjectGUI\$user, ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilWikiContributor\_lookupStatus(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilWikiContributor\STATUS_FAILED, ilWikiContributor\STATUS_NOT_GRADED, ilWikiContributor\STATUS_PASSED, and ilLanguage\txt().

Referenced by executeCommand(), and infoScreenObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreenObject()

ilObjWikiGUI::infoScreenObject ( )

this one is called from the info button in the repository

Exceptions
ilObjectException
ilPermissionException

Definition at line 389 of file class.ilObjWikiGUI.php.

389 : void
390 {
391 $this->checkPermission("visible");
392 $this->ctrl->setCmd("showSummary");
393 $this->ctrl->setCmdClass("ilinfoscreengui");
394 $this->infoScreen();
395 }

References ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), and infoScreen().

+ Here is the call graph for this function:

◆ initCreationForms()

ilObjWikiGUI::initCreationForms ( string  $new_type)
protected

Init creation forms.

This will create the default creation forms: new, import, clone

Returns
array<int, ilPropertyFormGUI>

Reimplemented from ilObjectGUI.

Definition at line 318 of file class.ilObjWikiGUI.php.

318 : array
319 {
320 $this->initSettingsForm("create");
321 $this->getSettingsFormValues("create");
322
323 $forms = array(self::CFORM_NEW => $this->form_gui,
324 self::CFORM_IMPORT => $this->initImportForm($new_type),
325 self::CFORM_CLONE => $this->fillCloneTemplate(null, $new_type));
326
327 return $forms;
328 }
initImportForm(string $new_type)
fillCloneTemplate(?string $tpl_name, string $type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...

References ilObjectGUI\fillCloneTemplate(), getSettingsFormValues(), ilObjectGUI\initImportForm(), and initSettingsForm().

+ Here is the call graph for this function:

◆ initSettingsForm()

ilObjWikiGUI::initSettingsForm ( string  $a_mode = "edit")

Definition at line 739 of file class.ilObjWikiGUI.php.

739 : void
740 {
742 $ilCtrl = $this->ctrl;
743 $ilTabs = $this->tabs;
745 $obj_service = $this->object_service;
746
747 $lng->loadLanguageModule("wiki");
748 $ilTabs->activateTab("settings");
749
750 $this->form_gui = new ilPropertyFormGUI();
751
752 // Title
753 $tit = new ilTextInputGUI($lng->txt("title"), "title");
754 $tit->setRequired(true);
755 $this->form_gui->addItem($tit);
756
757 // Description
758 $des = new ilTextAreaInputGUI($lng->txt("description"), "description");
759 $this->form_gui->addItem($des);
760
761 // Introduction
762 $intro = new ilTextAreaInputGUI($lng->txt("wiki_introduction"), "intro");
763 $intro->setCols(40);
764 $intro->setRows(4);
765 $this->form_gui->addItem($intro);
766
767 // Start Page
768 $options = [];
769 if ($a_mode === "edit") {
770 $pages = ilWikiPage::getAllWikiPages($this->object->getId());
771 foreach ($pages as $p) {
772 $options[$p["id"]] = ilStr::shortenTextExtended($p["title"], 60, true);
773 }
774 $si = new ilSelectInputGUI($lng->txt("wiki_start_page"), "startpage_id");
775 $si->setOptions($options);
776 $this->form_gui->addItem($si);
777 } else {
778 $sp = new ilTextInputGUI($lng->txt("wiki_start_page"), "startpage");
779 if ($a_mode === "edit") {
780 $sp->setInfo($lng->txt("wiki_start_page_info"));
781 }
782 $sp->setMaxLength(200);
783 $sp->setRequired(true);
784 $this->form_gui->addItem($sp);
785 }
786
787 // Online
788 $online = new ilCheckboxInputGUI($lng->txt("online"), "online");
789 $this->form_gui->addItem($online);
790
791
792 // rating
793
794 $lng->loadLanguageModule('rating');
795 $rate = new ilCheckboxInputGUI($lng->txt('rating_activate_rating'), 'rating_overall');
796 $rate->setInfo($lng->txt('rating_activate_rating_info'));
797 $this->form_gui->addItem($rate);
798
799 $rating = new ilCheckboxInputGUI($lng->txt("wiki_activate_rating"), "rating");
800 $this->form_gui->addItem($rating);
801
802 /* always active
803 $side = new ilCheckboxInputGUI($lng->txt("wiki_activate_sideblock_rating"), "rating_side");
804 $rating->addSubItem($side);
805 */
806
807 $new = new ilCheckboxInputGUI($lng->txt("wiki_activate_new_page_rating"), "rating_new");
808 $rating->addSubItem($new);
809
810 $extended = new ilCheckboxInputGUI($lng->txt("wiki_activate_extended_rating"), "rating_ext");
811 $rating->addSubItem($extended);
812
813
814 // public comments
815 if (!$ilSetting->get("disable_comments")) {
816 $comments = new ilCheckboxInputGUI($lng->txt("wiki_public_comments"), "public_notes");
817 $this->form_gui->addItem($comments);
818 }
819
820 // important pages
821 // $imp_pages = new ilCheckboxInputGUI($lng->txt("wiki_important_pages"), "imp_pages");
822 // $this->form_gui->addItem($imp_pages);
823
824 // page toc
825 $page_toc = new ilCheckboxInputGUI($lng->txt("wiki_page_toc"), "page_toc");
826 $page_toc->setInfo($lng->txt("wiki_page_toc_info"));
827 $this->form_gui->addItem($page_toc);
828
829 if ($a_mode === "edit") {
830 // advanced metadata auto-linking
831 if (count(ilAdvancedMDRecord::_getSelectedRecordsByObject("wiki", $this->object->getRefId(), "wpg")) > 0) {
832 $link_md = new ilCheckboxInputGUI($lng->txt("wiki_link_md_values"), "link_md_values");
833 $link_md->setInfo($lng->txt("wiki_link_md_values_info"));
834 $this->form_gui->addItem($link_md);
835 }
836
837
838 $section = new ilFormSectionHeaderGUI();
839 $section->setTitle($this->lng->txt('obj_presentation'));
840 $this->form_gui->addItem($section);
841
842 // tile image
843 $obj_service->commonSettings()->legacyForm($this->form_gui, $this->object)->addTileImage();
844
845
846 // additional features
847 $feat = new ilFormSectionHeaderGUI();
848 $feat->setTitle($this->lng->txt('obj_features'));
849 $this->form_gui->addItem($feat);
850
852 $this->object->getId(),
853 $this->form_gui,
854 array(
856 )
857 );
858 }
859
860 // :TODO: sorting
861
862 // Form action and save button
863 $this->form_gui->setTitleIcon(ilUtil::getImagePath("icon_wiki.svg"));
864 if ($a_mode !== "create") {
865 $this->form_gui->setTitle($lng->txt("wiki_settings"));
866 $this->form_gui->addCommandButton("saveSettings", $lng->txt("save"));
867 } else {
868 $this->form_gui->setTitle($lng->txt("wiki_new"));
869 $this->form_gui->addCommandButton("save", $lng->txt("wiki_add"));
870 $this->form_gui->addCommandButton("cancel", $lng->txt("cancel"));
871 }
872
873 // set values
874 if ($a_mode === "create") {
875 $ilCtrl->setParameter($this, "new_type", "wiki");
876 }
877
878 $this->form_gui->setFormAction($ilCtrl->getFormAction($this, "saveSettings"));
879 }
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjectService $object_service
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
$comments

References $comments, ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$object_service, ilObjectGUI\$settings, $tabs, ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilWikiPage\getAllWikiPages(), ilUtil\getImagePath(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\object(), ilStr\shortenTextExtended(), and ilLanguage\txt().

Referenced by editSettingsObject(), initCreationForms(), saveObject(), and saveSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTemplateSelectionForm()

ilObjWikiGUI::initTemplateSelectionForm ( )

Definition at line 1715 of file class.ilObjWikiGUI.php.

1716 {
1717 $lng = $this->lng;
1718 $ilCtrl = $this->ctrl;
1719
1720 $form = new ilPropertyFormGUI();
1721
1722 // page name
1723 $hi = new ilHiddenInputGUI("page");
1724 $hi->setValue($this->requested_page);
1725 $form->addItem($hi);
1726
1727 // page template
1728 $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
1729 $radg->setRequired(true);
1730
1731 if ($this->object->getEmptyPageTemplate()) {
1732 $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
1733 $radg->addOption($op1);
1734 }
1735
1736 $wt = new ilWikiPageTemplate($this->object->getId());
1737 $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES);
1738 foreach ($ts as $t) {
1739 $op = new ilRadioOption($t["title"], $t["wpage_id"]);
1740 $radg->addOption($op);
1741 }
1742
1743 $form->addItem($radg);
1744
1745 // save and cancel commands
1746 $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
1747 $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
1748
1749 $form->setTitle($lng->txt("wiki_new_page") . ": " . $this->requested_page);
1750 $form->setFormAction($ilCtrl->getFormAction($this));
1751
1752 return $form;
1753 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $lng, ILIAS\Repository\object(), and ilWikiPageTemplate\TYPE_NEW_PAGES.

+ Here is the call graph for this function:

◆ initUserHTMLExportObject()

ilObjWikiGUI::initUserHTMLExportObject ( )

Export html (as user)

Definition at line 1814 of file class.ilObjWikiGUI.php.

1814 : void
1815 {
1816 $this->log->debug("init: " . $this->req_with_comments);
1817 $this->checkPermission("wiki_html_export");
1818 $this->object->initUserHTMLExport($this->req_with_comments);
1819 }

◆ listContributorsObject()

ilObjWikiGUI::listContributorsObject ( )

Definition at line 971 of file class.ilObjWikiGUI.php.

971 : void
972 {
974 $ilTabs = $this->tabs;
975
976 $this->checkPermission("write");
977 $ilTabs->activateTab("wiki_contributors");
978
979 $table_gui = new ilWikiContributorsTableGUI(
980 $this,
981 "listContributors",
982 $this->object->getId()
983 );
984
985 $tpl->setContent($table_gui->getHTML());
986
987 $this->setSideBlock();
988 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ILIAS\Repository\object(), ilGlobalTemplateInterface\setContent(), and setSideBlock().

+ Here is the call graph for this function:

◆ lookupSubObjectTitle()

static ilObjWikiGUI::lookupSubObjectTitle ( int  $a_wiki_id,
string  $a_page_id 
)
static

Get title for wiki page (used in ilNotesGUI)

Definition at line 1675 of file class.ilObjWikiGUI.php.

1678 : string {
1679 $page = new ilWikiPage($a_page_id);
1680 if ($page->getWikiId() === $a_wiki_id) {
1681 return $page->getTitle();
1682 }
1683 return "";
1684 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilWikiPage\getTitle().

+ Here is the call graph for this function:

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

Definition at line 1409 of file class.ilObjWikiGUI.php.

1409 : void
1410 {
1411 $tpl = $this->tpl;
1412
1413 $this->checkPermission("read");
1414
1415 $this->addPagesSubTabs();
1416
1417 $table_gui = new ilWikiPagesTableGUI(
1418 $this,
1419 "newPages",
1420 $this->object->getId(),
1422 );
1423
1424 $this->setSideBlock();
1425 $tpl->setContent($table_gui->getHTML());
1426 }
const IL_WIKI_NEW_PAGES

References $tpl, IL_WIKI_NEW_PAGES, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ orphanedPagesObject()

ilObjWikiGUI::orphanedPagesObject ( )
Exceptions
ilObjectException

Definition at line 1231 of file class.ilObjWikiGUI.php.

1231 : void
1232 {
1233 $tpl = $this->tpl;
1234
1235 $this->checkPermission("read");
1236
1237 $this->addPagesSubTabs();
1238
1239 $table_gui = new ilWikiPagesTableGUI(
1240 $this,
1241 "orphanedPages",
1242 $this->object->getId(),
1244 );
1245
1246 $this->setSideBlock();
1247 $tpl->setContent($table_gui->getHTML());
1248 }
const IL_WIKI_ORPHANED_PAGES

References $tpl, IL_WIKI_ORPHANED_PAGES, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ performSearchObject()

ilObjWikiGUI::performSearchObject ( )

Definition at line 1471 of file class.ilObjWikiGUI.php.

1471 : void
1472 {
1473 $tpl = $this->tpl;
1474 $ilTabs = $this->tabs;
1475 $ilCtrl = $this->ctrl;
1476 $lng = $this->lng;
1477
1478 $this->checkPermission("read");
1479
1480 $ilTabs->setTabActive("wiki_search_results");
1481
1482 if ($this->edit_request->getSearchTerm() === "") {
1483 $this->tpl->setOnScreenMessage('failure', $lng->txt("wiki_please_enter_search_term"), true);
1484 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1485 }
1486
1487 $search_results = ilObjWiki::_performSearch(
1488 $this->object->getId(),
1489 $this->edit_request->getSearchTerm()
1490 );
1491 $table_gui = new ilWikiSearchResultsTableGUI(
1492 $this,
1493 "performSearch",
1494 $this->object->getId(),
1495 $search_results,
1496 $this->edit_request->getSearchTerm()
1497 );
1498
1499 $this->setSideBlock();
1500 $tpl->setContent($table_gui->getHTML());
1501 }
static _performSearch(int $a_wiki_id, string $a_searchterm)
Search in Wiki.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $lng, $tpl, ilObjWiki\_performSearch(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ popularPagesObject()

ilObjWikiGUI::popularPagesObject ( )
Exceptions
ilObjectException

Definition at line 1209 of file class.ilObjWikiGUI.php.

1209 : void
1210 {
1211 $tpl = $this->tpl;
1212
1213 $this->checkPermission("read");
1214
1215 $this->addPagesSubTabs();
1216
1217 $table_gui = new ilWikiPagesTableGUI(
1218 $this,
1219 "popularPages",
1220 $this->object->getId(),
1222 );
1223
1224 $this->setSideBlock();
1225 $tpl->setContent($table_gui->getHTML());
1226 }
const IL_WIKI_POPULAR_PAGES

References $tpl, IL_WIKI_POPULAR_PAGES, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ printViewObject()

ilObjWikiGUI::printViewObject ( )

Definition at line 1465 of file class.ilObjWikiGUI.php.

1465 : void
1466 {
1467 $print_view = $this->getPrintView();
1468 $print_view->sendPrintView();
1469 }
getPrintView(bool $export=false)

◆ randomPageObject()

ilObjWikiGUI::randomPageObject ( )

Definition at line 1305 of file class.ilObjWikiGUI.php.

1305 : void
1306 {
1307 $this->checkPermission("read");
1308
1309 $page = ilWikiPage::getRandomPage($this->object->getId());
1310 $this->gotoPageObject($page);
1311 }
gotoPageObject(string $a_page="")
static getRandomPage(int $a_wiki_id)

References ilWikiPage\getRandomPage(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ recentChangesObject()

ilObjWikiGUI::recentChangesObject ( )

Definition at line 1313 of file class.ilObjWikiGUI.php.

1313 : void
1314 {
1315 $tpl = $this->tpl;
1316
1317 $this->checkPermission("read");
1318
1319 $this->addPagesSubTabs();
1320
1321 $table_gui = new ilWikiRecentChangesTableGUI(
1322 $this,
1323 "recentChanges",
1324 $this->object->getId()
1325 );
1326
1327 $this->setSideBlock();
1328 $tpl->setContent($table_gui->getHTML());
1329 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $tpl, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ removeImportantPagesObject()

ilObjWikiGUI::removeImportantPagesObject ( )

Definition at line 1604 of file class.ilObjWikiGUI.php.

1604 : void
1605 {
1606 $ilCtrl = $this->ctrl;
1607 $lng = $this->lng;
1608
1609 $this->checkPermission("edit_wiki_navigation");
1610
1611 $imp_page_ids = $this->edit_request->getImportantPageIds();
1612 foreach ($imp_page_ids as $i) {
1613 $this->object->removeImportantPage((int) $i);
1614 }
1615 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_removed_imp_pages"), true);
1616 $ilCtrl->redirect($this, "editImportantPages");
1617 }

References $i, and $lng.

◆ renderSideBlock()

static ilObjWikiGUI::renderSideBlock ( int  $a_wpg_id,
int  $a_wiki_ref_id,
?ilWikiPage  $a_wp = null 
)
static

Definition at line 1336 of file class.ilObjWikiGUI.php.

1340 : void {
1341 global $DIC;
1342
1343 $tpl = $DIC["tpl"];
1344 $lng = $DIC->language();
1345 $ilAccess = $DIC->access();
1346 $ilCtrl = $DIC->ctrl();
1347
1348 $tpl->addJavaScript("./Modules/Wiki/js/WikiPres.js");
1349
1350 // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1351 // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1352 $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1353
1354 if ($a_wpg_id > 0 && !$a_wp) {
1355 $a_wp = new ilWikiPage($a_wpg_id);
1356 }
1357
1358 // search block
1359 $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1360
1361
1362 // quick navigation
1363 if ($a_wpg_id > 0) {
1364 // rating
1365 $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1366 if (ilObjWiki::_lookupRating($wiki_id) &&
1367 // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1368 $a_wp->getRating()) {
1369 $rgui = new ilRatingGUI();
1370 $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1371 $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1372 $rgui->setYourRatingText("#");
1373 $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1374 }
1375
1376 // advanced metadata
1378 $cmd = null;
1379 if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1380 $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1381 $cmd = array(
1382 "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1383 "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1384 );
1385 }
1386 $wiki = new ilObjWiki($a_wiki_ref_id);
1387 $callback = $wiki->getLinkMetadataValues()
1388 ? array($wiki, "decorateAdvMDValue")
1389 : null;
1390 $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1391 $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1392 }
1393 }
1394
1395 // important pages
1396 $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1397 $rcontent .= $imp_pages_block->getHTML();
1398
1399 // wiki functions block
1400 if ($a_wpg_id > 0) {
1401 $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1402 $wiki_functions_block->setPageObject($a_wp);
1403 $rcontent .= $wiki_functions_block->getHTML();
1404 }
1405
1406 $tpl->setRightContent($rcontent);
1407 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupRating(int $a_wiki_id)
Lookup whether rating is activated.
static _lookupRatingCategories(int $a_wiki_id)
Lookup whether rating categories are activated.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static lookupAdvancedMetadataHidden(int $a_page_id)
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
addOnLoadCode(string $a_code, int $a_batch=2)
Add on load code.
setRightContent(string $a_html)
Sets content of right column.

Referenced by ilWikiPageGUI\setSideBlock().

+ Here is the caller graph for this function:

◆ saveGradingObject()

ilObjWikiGUI::saveGradingObject ( )

Definition at line 990 of file class.ilObjWikiGUI.php.

990 : void
991 {
992 $ilCtrl = $this->ctrl;
994
995 $this->checkPermission("write");
996
997 $users = $this->edit_request->getUserIds();
998 $marks = $this->edit_request->getMarks();
999 $comments = $this->edit_request->getComments();
1000 $status = $this->edit_request->getStatus();
1001
1002 $saved = false;
1003 foreach ($users as $user_id) {
1004 if ($user_id != "") {
1005 $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
1006 $new_mark = ilUtil::stripSlashes($marks[$user_id]);
1007 $new_comment = ilUtil::stripSlashes($comments[$user_id] ?? "");
1008 $new_status = ilUtil::stripSlashes($status[$user_id]);
1009
1010 if ($marks_obj->getMark() !== $new_mark ||
1011 $marks_obj->getComment() !== $new_comment ||
1012 (int) ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) !== (int) $new_status) {
1013 ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
1014 $marks_obj->setMark($new_mark);
1015 $marks_obj->setComment($new_comment);
1016 $marks_obj->update();
1017 $saved = true;
1018 }
1019 }
1020 }
1021 if ($saved) {
1022 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1023 }
1024
1025 $ilCtrl->redirect($this, "listContributors");
1026 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static _writeStatus(int $a_obj_id, int $a_user_id, int $a_status)

References $comments, ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilWikiContributor\_lookupStatus(), ilWikiContributor\_writeStatus(), ilObjectGUI\checkPermission(), ILIAS\Repository\object(), ilUtil\stripSlashes(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ saveObject()

ilObjWikiGUI::saveObject ( )

Reimplemented from ilObjectGUI.

Definition at line 330 of file class.ilObjWikiGUI.php.

330 : void
331 {
334
335 if (!$this->checkPermissionBool("create", "", "wiki", $this->requested_ref_id)) {
336 throw new ilPermissionException($this->lng->txt("permission_denied"));
337 }
338
339 $this->initSettingsForm("create");
340 if ($this->form_gui->checkInput()) {
341 if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle"))) {
342 $short_item = $this->form_gui->getItemByPostVar("shorttitle");
343 $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
344 } else {
345 parent::saveObject();
346 return;
347 }
348 }
349
350 $this->form_gui->setValuesByPost();
351 $tpl->setContent($this->form_gui->getHTML());
352 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
static checkShortTitleAvailability(string $a_short_title)

References ilObjectGUI\$lng, ilObjectGUI\$tpl, checkPermissionBool(), ilObjWiki\checkShortTitleAvailability(), initSettingsForm(), ILIAS\Repository\lng(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

+ Here is the call graph for this function:

◆ saveOrderingAndIndentObject()

ilObjWikiGUI::saveOrderingAndIndentObject ( )

Definition at line 1619 of file class.ilObjWikiGUI.php.

1619 : void
1620 {
1621 $ilCtrl = $this->ctrl;
1622 $lng = $this->lng;
1623
1624 $this->checkPermission("edit_wiki_navigation");
1625
1626 $ordering = $this->edit_request->getImportantPageOrdering();
1627 $indentation = $this->edit_request->getImportantPageIndentation();
1628 $this->object->saveOrderingAndIndentation($ordering, $indentation);
1629 $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_ordering_and_indent_saved"), true);
1630 $ilCtrl->redirect($this, "editImportantPages");
1631 }

References $lng.

◆ saveSettingsObject()

ilObjWikiGUI::saveSettingsObject ( )

Definition at line 911 of file class.ilObjWikiGUI.php.

911 : void
912 {
913 $ilCtrl = $this->ctrl;
916 $obj_service = $this->object_service;
917
918 $this->checkPermission("write");
919
920 $this->initSettingsForm();
921
922 if ($this->form_gui->checkInput()) {
923 if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")) &&
924 $this->form_gui->getInput("shorttitle") !== $this->object->getShortTitle()) {
925 $short_item = $this->form_gui->getItemByPostVar("shorttitle");
926 $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
927 } else {
928 $this->object->setTitle($this->form_gui->getInput("title"));
929 $this->object->setDescription($this->form_gui->getInput("description"));
930 $this->object->setOnline($this->form_gui->getInput("online"));
931 $this->object->setStartPage(ilWikiPage::lookupTitle($this->form_gui->getInput("startpage_id")));
932 $this->object->setShortTitle((string) $this->form_gui->getInput("shorttitle"));
933 $this->object->setRatingOverall($this->form_gui->getInput("rating_overall"));
934 $this->object->setRating($this->form_gui->getInput("rating"));
935 // $this->object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
936 $this->object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
937 $this->object->setRatingCategories($this->form_gui->getInput("rating_ext"));
938
939 if (!$ilSetting->get("disable_comments")) {
940 $this->object->setPublicNotes($this->form_gui->getInput("public_notes"));
941 }
942 $this->object->setIntroduction($this->form_gui->getInput("intro"));
943 $this->object->setPageToc($this->form_gui->getInput("page_toc"));
944 $this->object->setLinkMetadataValues($this->form_gui->getInput("link_md_values"));
945 $this->object->update();
946
947 // tile image
948 $obj_service->commonSettings()->legacyForm($this->form_gui, $this->object)->saveTileImage();
949
951 $this->object->getId(),
952 $this->form_gui,
953 array(
955 )
956 );
957
958 // Update ecs export settings
959 $ecs = new ilECSWikiSettings($this->object);
960 if ($ecs->handleSettingsUpdate()) {
961 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
962 $ilCtrl->redirect($this, "editSettings");
963 }
964 }
965 }
966
967 $this->form_gui->setValuesByPost();
968 $this->tpl->setContent($this->form_gui->getHTML());
969 }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)

References ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$object_service, ilObjectGUI\$settings, ilObjectGUI\checkPermission(), ilObjWiki\checkShortTitleAvailability(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, initSettingsForm(), ILIAS\Repository\lng(), ilWikiPage\lookupTitle(), ILIAS\Repository\object(), ilLanguage\txt(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ setAsStartPageObject()

ilObjWikiGUI::setAsStartPageObject ( )

Definition at line 1633 of file class.ilObjWikiGUI.php.

1633 : void
1634 {
1635 $ilCtrl = $this->ctrl;
1636 $lng = $this->lng;
1637
1638 $this->checkPermission("edit_wiki_navigation");
1639
1640 $imp_page_ids = $this->edit_request->getImportantPageIds();
1641 if (count($imp_page_ids) !== 1) {
1642 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_select_one_item"), true);
1643 } else {
1644 $this->object->removeImportantPage($imp_page_ids[0]);
1645 $this->object->setStartPage(ilWikiPage::lookupTitle($imp_page_ids[0]));
1646 $this->object->update();
1647 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1648 }
1649 $ilCtrl->redirect($this, "editImportantPages");
1650 }

References $lng, ILIAS\Repository\lng(), and ilWikiPage\lookupTitle().

+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjWikiGUI::setContentStyleSheet ( )

Definition at line 1503 of file class.ilObjWikiGUI.php.

1503 : void
1504 {
1505 $tpl = $this->tpl;
1506
1507 if ($tpl == null) {
1508 $tpl = $this->tpl;
1509 }
1510
1511 $this->content_style_gui->addCss($tpl, $this->object->getRefId());
1513 }
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.

References $tpl, ilObjStyleSheet\getSyntaxStylePath(), and ILIAS\Repository\object().

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSettingsSubTabs()

ilObjWikiGUI::setSettingsSubTabs ( string  $a_active)

Definition at line 638 of file class.ilObjWikiGUI.php.

638 : void
639 {
640 $ilTabs = $this->tabs;
641 $ilCtrl = $this->ctrl;
643 $ilAccess = $this->access;
644
645 if (in_array(
646 $a_active,
647 array("general_settings", "style", "imp_pages", "rating_categories",
648 "page_templates", "advmd", "permission_settings", "notifications", "lti_provider")
649 )) {
650 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
651 // general properties
652 $ilTabs->addSubTab(
653 "general_settings",
654 $lng->txt("wiki_general_settings"),
655 $ilCtrl->getLinkTarget($this, 'editSettings')
656 );
657
658 // permission settings
659 $ilTabs->addSubTab(
660 "permission_settings",
661 $lng->txt("obj_permission_settings"),
662 $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
663 );
664
665 // style properties
666 $ilTabs->addSubTab(
667 "style",
668 $lng->txt("wiki_style"),
669 $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", "")
670 );
671 }
672
673 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
674 // important pages
675 $ilTabs->addSubTab(
676 "imp_pages",
677 $lng->txt("wiki_navigation"),
678 $ilCtrl->getLinkTarget($this, 'editImportantPages')
679 );
680 }
681
682 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
683 // page templates
684 $ilTabs->addSubTab(
685 "page_templates",
686 $lng->txt("wiki_page_templates"),
687 $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
688 );
689
690 // rating categories
691 if ($this->object->getRating() && $this->object->getRatingCategories()) {
692 $lng->loadLanguageModule("rating");
693 $ilTabs->addSubTab(
694 "rating_categories",
695 $lng->txt("rating_categories"),
696 $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
697 );
698 }
699
700 $ilTabs->addSubTab(
701 'notifications',
702 $lng->txt("notifications"),
703 $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
704 );
705 }
706
707 // LTI Provider
708 $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
709 if ($lti_settings->hasSettingsAccess()) {
710 $ilTabs->addSubTabTarget(
711 'lti_provider',
712 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
713 );
714 }
715
716 $ilTabs->activateSubTab($a_active);
717 }
718 }

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ILIAS\Repository\ctrl(), ilLanguage\loadLanguageModule(), ILIAS\Repository\object(), and ilLanguage\txt().

Referenced by editSettingsObject(), and executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setSideBlock()

ilObjWikiGUI::setSideBlock ( int  $a_wpg_id = 0)

Definition at line 1331 of file class.ilObjWikiGUI.php.

1331 : void
1332 {
1333 self::renderSideBlock($a_wpg_id, $this->object->getRefId());
1334 }
static renderSideBlock(int $a_wpg_id, int $a_wiki_ref_id, ?ilWikiPage $a_wp=null)

References ILIAS\Repository\object().

Referenced by editSettingsObject(), executeCommand(), and listContributorsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTemplateSelectionObject()

ilObjWikiGUI::showTemplateSelectionObject ( )

Definition at line 1696 of file class.ilObjWikiGUI.php.

1696 : void
1697 {
1698 $lng = $this->lng;
1699 $tpl = $this->tpl;
1700 $ilTabs = $this->tabs;
1701 $ilCtrl = $this->ctrl;
1702
1703 $ilCtrl->setParameterByClass(
1704 "ilobjwikigui",
1705 "from_page",
1706 ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1707 );
1708 $ilTabs->clearTargets();
1709 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_page_not_exist_select_templ"));
1710
1711 $form = $this->initTemplateSelectionForm();
1712 $tpl->setContent($form->getHTML());
1713 }

References $lng, $tpl, and ilWikiUtil\makeUrlTitle().

+ Here is the call graph for this function:

◆ startUserHTMLExportObject()

ilObjWikiGUI::startUserHTMLExportObject ( )

Export html (as user)

Definition at line 1824 of file class.ilObjWikiGUI.php.

1824 : void
1825 {
1826 $this->log->debug("start: " . $this->req_with_comments);
1827 $this->checkPermission("wiki_html_export");
1828 $this->object->startUserHTMLExport($this->req_with_comments);
1829 }

◆ triggerAssignmentTool()

ilObjWikiGUI::triggerAssignmentTool ( )
protected

Definition at line 1865 of file class.ilObjWikiGUI.php.

1865 : void
1866 {
1867 if (!is_object($this->object)) {
1868 return;
1869 }
1870 $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1871 $this->object->getRefId(),
1872 $this->user->getId()
1873 );
1874 if (count($ass_info) > 0) {
1875 $ass_ids = array_map(static function ($i): int {
1876 return $i->getId();
1877 }, $ass_info);
1878 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
1879 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
1880 $this->tool_context->current()->addAdditionalData(
1882 $this->getAssignmentButtons()
1883 );
1884 }
1885 }
getAssignmentButtons()
Get assignment buttons.

References $i, ilExerciseGSToolProvider\EXC_ASS_BUTTONS, ilExerciseGSToolProvider\EXC_ASS_IDS, ilExcRepoObjAssignment\getInstance(), ILIAS\Repository\object(), and ilExerciseGSToolProvider\SHOW_EXC_ASSIGNMENT_INFO.

Referenced by executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ viewObject()

ilObjWikiGUI::viewObject ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Reimplemented from ilObjectGUI.

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

312 : void
313 {
314 $this->checkPermission("read");
315 $this->gotoStartPageObject();
316 }

References ilObjectGUI\checkPermission(), and gotoStartPageObject().

+ Here is the call graph for this function:

◆ viewPageObject()

ilObjWikiGUI::viewPageObject ( )

Definition at line 1126 of file class.ilObjWikiGUI.php.

1126 : void
1127 {
1128 $lng = $this->lng;
1129 $ilCtrl = $this->ctrl;
1130 $tpl = $this->tpl;
1131 $ilTabs = $this->tabs;
1132 $ilAccess = $this->access;
1133
1134 $this->checkPermission("read");
1135
1136 $ilTabs->clearTargets();
1138
1139 $page = ($this->requested_page !== "")
1140 ? $this->requested_page
1141 : $this->object->getStartPage();
1142
1143 if (!ilWikiPage::exists($this->object->getId(), $page)) {
1144 $page = $this->object->getStartPage();
1145 }
1146
1147 if (!ilWikiPage::exists($this->object->getId(), $page)) {
1148 $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_no_start_page"), true);
1149 $ilCtrl->redirect($this, "infoScreen");
1150 return;
1151 }
1152
1153 // page exists, show it !
1154 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($page));
1155
1156 $wpage_gui = ilWikiPageGUI::getGUIForTitle(
1157 $this->object->getId(),
1159 0,
1160 $this->object->getRefId()
1161 );
1162 $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
1163
1164 $this->setContentStyleSheet();
1165
1166 //$wpage_gui->setSideBlock();
1167 $ilCtrl->setCmdClass("ilwikipagegui");
1168 $ilCtrl->setCmd("preview");
1169 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
1170 (
1171 !$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
1172 $wpage_gui->getPageObject()->getBlocked()
1173 )) {
1174 $wpage_gui->setEnableEditing(false);
1175 }
1176
1177 // alter title and description
1178 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1179 $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
1180 }
1181
1182 $html = $ilCtrl->forwardCommand($wpage_gui);
1183
1185 }
static exists(int $a_wiki_id, string $a_title)
Checks whether a page with given title exists.
setHeaderActionMenu(string $a_header)
Set header action menu.

References $lng, $tpl, ilWikiPage\exists(), ilWikiPageGUI\getGUIForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

Field Documentation

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjWikiGUI::$content_style_domain
protected

Definition at line 49 of file class.ilObjWikiGUI.php.

◆ $content_style_gui

ILIAS Style Content GUIService ilObjWikiGUI::$content_style_gui
protected

Definition at line 48 of file class.ilObjWikiGUI.php.

◆ $edit_request

EditingGUIRequest ilObjWikiGUI::$edit_request
protected

Definition at line 47 of file class.ilObjWikiGUI.php.

◆ $form_gui

ilPropertyFormGUI ilObjWikiGUI::$form_gui
protected

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

◆ $help

ilHelpGUI ilObjWikiGUI::$help
protected

Definition at line 42 of file class.ilObjWikiGUI.php.

Referenced by getTabs().

◆ $http

ILIAS HTTP Services ilObjWikiGUI::$http
protected

Definition at line 38 of file class.ilObjWikiGUI.php.

◆ $log

ilLogger ilObjWikiGUI::$log
protected

Definition at line 43 of file class.ilObjWikiGUI.php.

◆ $req_with_comments

bool ilObjWikiGUI::$req_with_comments = false
protected

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

◆ $requested_page

string ilObjWikiGUI::$requested_page
protected

Definition at line 39 of file class.ilObjWikiGUI.php.

◆ $tabs

◆ $tool_context

ContextServices ilObjWikiGUI::$tool_context
protected

Definition at line 44 of file class.ilObjWikiGUI.php.

◆ $ui

ILIAS DI UIServices ilObjWikiGUI::$ui
protected

Definition at line 45 of file class.ilObjWikiGUI.php.


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