ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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 ()
 
 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 ()
 Current process: 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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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="", string $lang="-")
 
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)
 
 afterSave (ilObject $new_object)
 
 getTabs ()
 
 addLocatorItems ()
 
 isNewTranslatedPage ()
 
 getRenderedTranslationInfo ()
 
 getNewTranslatedPageForm ()
 
 createNewTranslatedPageObject ()
 
 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 ()
 
 createActionDispatcherGUI ()
 
 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...
 
 addAdoptContentLinkToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 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 ()
 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...
 
 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...
 

Protected Attributes

ILIAS Wiki InternalDomainService $domain
 
ILIAS Wiki InternalGUIService $gui
 
ILIAS Wiki Content GUIService $content_gui
 
ILIAS Wiki Navigation ImportantPageManager $imp_pages
 
ILIAS Wiki Page PageManager $pm
 
ilObjectTranslation $ot
 
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
 
WikiGUIRequest $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
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
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 (   $a_data,
int  $a_id,
bool  $a_call_by_reference,
bool  $a_prepare_output = true 
)

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

References $DIC, $domain, $gui, ILIAS\MetaData\Repository\Validation\Data\__construct(), ILIAS\Repository\ctrl(), ilLoggerFactory\getLogger(), ILIAS\Repository\help(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\locator(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), ILIAS\Repository\tabs(), and ILIAS\Repository\ui().

62  {
63  global $DIC;
64 
65  $gui = $DIC->wiki()->internal()->gui();
66  $domain = $DIC->wiki()->internal()->domain();
67  $this->gui = $gui;
68  $this->domain = $domain;
69 
70  $this->ctrl = $gui->ctrl();
71  $this->lng = $domain->lng();
72  $this->tabs = $gui->tabs();
73  $this->help = $gui->help();
74  $this->locator = $gui->locator();
75  $this->http = $gui->http();
76  $this->ot = $gui->wiki()->translation();
77 
78  $this->type = "wiki";
79 
80  $this->log = ilLoggerFactory::getLogger('wiki');
81 
82  $this->tool_context = $gui->globalScreen()->tool()->context();
83  $this->ui = $gui->ui();
84 
85  $this->edit_request = $gui->request();
86  $this->content_gui = $gui->content();
87 
88  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
89  $this->lng->loadLanguageModule("obj");
90  $this->lng->loadLanguageModule("wiki");
91 
92  $this->requested_page = $this->edit_request->getPage();
93  if ($this->requested_page !== "") {
94  $this->ctrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
95  }
96  $this->ctrl->saveParameterByClass(self::class, "transl");
97  $this->ctrl->saveParameterByClass(self::class, "wpg_id");
98  $this->req_with_comments = $this->edit_request->getWithComments();
99  $cs = $DIC->contentStyle();
100  $this->content_style_gui = $cs->gui();
101  if (is_object($this->object)) {
102  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
103  $this->pm = $this->domain->page()->page($this->object->getRefId());
104  $this->imp_pages = $this->domain->importantPage($this->object->getRefId());
105  }
106  }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
__construct(VocabulariesInterface $vocabularies)
ILIAS Wiki InternalGUIService $gui
static makeUrlTitle(string $a_par)
ILIAS Wiki InternalDomainService $domain
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjWikiGUI::_goto ( string  $a_target)
static

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

References ilObjectGUI\$ctrl, $DIC, $lang, ilObjectGUI\$lng, $r, 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().

1083  : void
1084  {
1085  global $DIC;
1086  $main_tpl = $DIC->ui()->mainTemplate();
1087 
1088  $wpg_id = 0;
1089  $lang = "";
1090  $ilAccess = $DIC->access();
1091  $lng = $DIC->language();
1092  $ctrl = $DIC->ctrl();
1093  $transl = $DIC->wiki()->internal()->gui()->request()->getTranslation();
1094  $DIC->ctrl()->setParameterByClass(self::class, "transl", $transl);
1095 
1096 
1097  $i = strpos($a_target, "_");
1098  $a_page = "";
1099  if ($i > 0) {
1100  $a_page = substr($a_target, $i + 1);
1101  $a_target = substr($a_target, 0, $i);
1102  }
1103 
1104  if ($a_target === "wpage") {
1105  $a_page_arr = explode("_", $a_page);
1106  $wpg_id = (int) $a_page_arr[0];
1107  $ref_id = (int) ($a_page_arr[1] ?? 0);
1108  $lang = ($a_page_arr[2] ?? "");
1109  $w_id = ilWikiPage::lookupWikiId($wpg_id);
1110  if ($ref_id > 0) {
1111  $refs = array($ref_id);
1112  } else {
1113  $refs = ilObject::_getAllReferences($w_id);
1114  }
1115  foreach ($refs as $r) {
1116  if ($ilAccess->checkAccess("read", "", $r)) {
1117  $a_target = $r;
1118  $a_page = ilWikiPage::lookupTitle($wpg_id);
1119  }
1120  }
1121  }
1122 
1123  if ($ilAccess->checkAccess("read", "", $a_target)) {
1124  if ($wpg_id > 0) {
1126  "ilobjwikigui",
1127  "wpg_id",
1128  $wpg_id
1129  );
1130  } else {
1132  "ilobjwikigui",
1133  "page",
1134  ilWikiUtil::makeUrlTitle($a_page)
1135  );
1136  }
1137  if ($lang != "") {
1139  "ilobjwikigui",
1140  "transl",
1141  $lang
1142  );
1143  }
1145  "ilwikihandlergui",
1146  "ref_id",
1147  $a_target
1148  );
1149  if ($a_page != "") {
1151  ["ilwikihandlergui", "ilobjwikigui"],
1152  "viewPage"
1153  );
1154  } else {
1156  ["ilwikihandlergui"],
1157  "view"
1158  );
1159  }
1160  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1161  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
1162  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1163  $main_tpl->setOnScreenMessage('failure', sprintf(
1164  $lng->txt("msg_no_perm_read_item"),
1166  ), true);
1168  }
1169 
1170  throw new ilPermissionException($lng->txt("permission_denied"));
1171  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
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...
const ROOT_FOLDER_ID
Definition: constants.php:32
static _getAllReferences(int $id)
get all reference ids for object ID
static lookupTitle(int $a_page_id, string $lang="-")
static _gotoRepositoryNode(int $ref_id, string $cmd="")
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static lookupWikiId(int $a_page_id)
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
$lang
Definition: xapiexit.php:26
static makeUrlTitle(string $a_par)
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
$r
+ Here is the call graph for this function:

◆ addImportantPageObject()

ilObjWikiGUI::addImportantPageObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), and ilLanguage\txt().

1717  : void
1718  {
1719  $ilCtrl = $this->ctrl;
1720  $lng = $this->lng;
1721 
1722  $this->checkPermission("edit_wiki_navigation");
1723 
1724  $imp_page_id = $this->edit_request->getImportantPageId();
1725  if ($imp_page_id > 0) {
1726  $this->imp_pages->add($imp_page_id);
1727  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_imp_page_added"), true);
1728  }
1729  $ilCtrl->redirect($this, "editImportantPages");
1730  }
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...
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjWikiGUI::addLocatorItems ( )
protected

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

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

1069  : void
1070  {
1071  $ilLocator = $this->locator;
1072 
1073  if (is_object($this->object)) {
1074  $ilLocator->addItem(
1075  $this->object->getTitle(),
1076  self::getGotoLink($this->object->getRefId()),
1077  "",
1078  $this->requested_ref_id
1079  );
1080  }
1081  }
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

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

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

Referenced by allPagesObject(), newPagesObject(), orphanedPagesObject(), popularPagesObject(), and recentChangesObject().

517  : void
518  {
519  $ilTabs = $this->tabs;
520  $ilCtrl = $this->ctrl;
521 
522  $ilTabs->activateTab("wiki_pages");
523 
524  $ilCtrl->setParameter(
525  $this,
526  "wpg_id",
528  $this->object->getId(),
529  ilWikiUtil::makeDbTitle($this->requested_page)
530  )
531  );
532  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
533  $ilTabs->addSubTabTarget(
534  "wiki_all_pages",
535  $this->ctrl->getLinkTarget($this, "allPages"),
536  "allPages"
537  );
538  $ilTabs->addSubTabTarget(
539  "wiki_recent_changes",
540  $this->ctrl->getLinkTarget($this, "recentChanges"),
541  "recentChanges"
542  );
543  $ilTabs->addSubTabTarget(
544  "wiki_new_pages",
545  $this->ctrl->getLinkTarget($this, "newPages"),
546  "newPages"
547  );
548  $ilTabs->addSubTabTarget(
549  "wiki_popular_pages",
550  $this->ctrl->getLinkTarget($this, "popularPages"),
551  "popularPages"
552  );
553  $ilTabs->addSubTabTarget(
554  "wiki_orphaned_pages",
555  $this->ctrl->getLinkTarget($this, "orphanedPages"),
556  "orphanedPages"
557  );
558  }
static makeUrlTitle(string $a_par)
static makeDbTitle(string $a_par)
static getPageIdForTitle(int $a_wiki_id, string $a_title, string $lang="-")
Get wiki page object for id and title.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addPageTabs()

ilObjWikiGUI::addPageTabs ( )

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

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

488  : void
489  {
490  $ilTabs = $this->tabs;
491  $ilCtrl = $this->ctrl;
492 
493  $ilCtrl->setParameter(
494  $this,
495  "wpg_id",
496  ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($this->requested_page))
497  );
498  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
499  $ilTabs->addTarget(
500  "wiki_what_links_here",
501  $this->ctrl->getLinkTargetByClass(
502  "ilwikipagegui",
503  "whatLinksHere"
504  ),
505  "whatLinksHere"
506  );
507  $ilTabs->addTarget(
508  "wiki_print_view",
509  $this->ctrl->getLinkTargetByClass(
510  "ilwikipagegui",
511  "printViewSelection"
512  ),
513  "printViewSelection"
514  );
515  }
static makeUrlTitle(string $a_par)
static makeDbTitle(string $a_par)
static getPageIdForTitle(int $a_wiki_id, string $a_title, string $lang="-")
Get wiki page object for id and title.
setParameter(object $a_gui_obj, string $a_parameter, $a_value)
+ Here is the call graph for this function:

◆ afterSave()

ilObjWikiGUI::afterSave ( ilObject  $new_object)
protected

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

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

375  : void
376  {
378 
379  $new_object->setTitle($this->form_gui->getInput("title"));
380  $new_object->setDescription($this->form_gui->getInput("description"));
381  $new_object->setIntroduction($this->form_gui->getInput("intro"));
382  $new_object->setStartPage($this->form_gui->getInput("startpage"));
383  $new_object->setShortTitle((string) $this->form_gui->getInput("shorttitle"));
384  $new_object->setRating($this->form_gui->getInput("rating"));
385  // $new_object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
386  $new_object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
387  $new_object->setRatingCategories($this->form_gui->getInput("rating_ext"));
388 
389  $new_object->setRatingOverall($this->form_gui->getInput("rating_overall"));
390  $new_object->setPageToc($this->form_gui->getInput("page_toc"));
391 
392 
393 
394  if (!$ilSetting->get("disable_comments")) {
395  $new_object->setPublicNotes($this->form_gui->getInput("public_notes"));
396  }
397  $new_object->setOnline($this->form_gui->getInput("online"));
398  $new_object->update();
399 
400  // always send a message
401  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
402  ilUtil::redirect(self::getGotoLink($new_object->getRefId()));
403  }
setTitle(string $title)
static redirect(string $a_script)
global $ilSetting
Definition: privfeed.php:18
ilSetting $settings
setDescription(string $description)
+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

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

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

1237  : void
1238  {
1239  $tpl = $this->tpl;
1240 
1241  $this->checkPermission("read");
1242 
1243  $this->addPagesSubTabs();
1244 
1245  $table_gui = new ilWikiPagesTableGUI(
1246  $this,
1247  "allPages",
1248  $this->object->getId(),
1250  );
1251 
1252  //$this->setSideBlock();
1253  $tpl->setContent($table_gui->getHTML());
1254  }
TableGUI class for wiki pages table.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
const IL_WIKI_ALL_PAGES
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ cancelCreationPageUsingTemplateObject()

ilObjWikiGUI::cancelCreationPageUsingTemplateObject ( )

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

References ilObjectGUI\$ctrl, ilWikiUtil\makeUrlTitle(), and ilCtrl\setParameterByClass().

1936  : void
1937  {
1938  $ilCtrl = $this->ctrl;
1939 
1940  // redirect to newly created page
1941  $ilCtrl->setParameterByClass(
1942  "ilwikipagegui",
1943  "page",
1944  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1945  );
1946  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1947  }
setParameterByClass(string $a_class, string $a_parameter, $a_value)
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:

◆ checkPermissionBool()

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

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

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

Referenced by saveObject().

1949  : bool
1950  {
1951  if ($perm === "create") {
1952  return parent::checkPermissionBool($perm, $cmd, $type, $ref_id);
1953  } else {
1954  if (!$ref_id) {
1955  $ref_id = $this->object->getRefId();
1956  }
1957  return ilWikiPerm::check($perm, $ref_id, $cmd);
1958  }
1959  }
static check(string $a_perm, int $a_ref_id, string $a_cmd="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ confirmRemoveImportantPagesObject()

ilObjWikiGUI::confirmRemoveImportantPagesObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilWikiPage\lookupTitle(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

1732  : void
1733  {
1734  $ilCtrl = $this->ctrl;
1735  $tpl = $this->tpl;
1736  $lng = $this->lng;
1737 
1738  $imp_page_ids = $this->edit_request->getImportantPageIds();
1739  if (count($imp_page_ids) === 0) {
1740  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
1741  $ilCtrl->redirect($this, "editImportantPages");
1742  } else {
1743  $cgui = new ilConfirmationGUI();
1744  $cgui->setFormAction($ilCtrl->getFormAction($this));
1745  $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1746  $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1747  $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1748 
1749  foreach ($imp_page_ids as $i) {
1750  $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1751  }
1752 
1753  $tpl->setContent($cgui->getHTML());
1754  }
1755  }
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 lookupTitle(int $a_page_id, string $lang="-")
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
+ Here is the call graph for this function:

◆ createNewTranslatedPageObject()

ilObjWikiGUI::createNewTranslatedPageObject ( )
protected

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

References ILIAS\Repository\ctrl(), getNewTranslatedPageForm(), ILIAS\Repository\int(), and ILIAS\Repository\object().

1436  : void
1437  {
1438  $form = $this->getNewTranslatedPageForm();
1439  if ($form->isValid()) {
1440  $page_template_id = 0;
1441  if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1442  $page_template_id = (int) $form->getData("page_templ");
1443  }
1444  if ($form->getData("type") === "new") {
1445  $wpg_id = $this->pm->createWikiPage(
1446  $form->getData("master_title")
1447  );
1448  } else {
1449  $wpg_id = $form->getData("master_id");
1450  }
1451  $wpg_id = $this->pm->createWikiPage(
1452  $this->edit_request->getPage(),
1453  $wpg_id,
1454  $this->edit_request->getTranslation(),
1455  $page_template_id
1456  );
1457  }
1458  $this->ctrl->setParameterByClass(ilWikiPageGUI::class, "wpg_id", $wpg_id);
1459  $this->ctrl->redirectByClass(ilWikiPageGUI::class, "preview");
1460  }
+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, initTemplateSelectionForm(), ilWikiUtil\makeUrlTitle(), ilGlobalTemplateInterface\setContent(), and ilLanguage\txt().

1908  : void
1909  {
1910  $tpl = $this->tpl;
1911  $lng = $this->lng;
1912  $ilCtrl = $this->ctrl;
1913 
1914  $form = $this->initTemplateSelectionForm();
1915  if ($form->checkInput()) {
1916  $a_page = $this->edit_request->getPage();
1917  $this->pm->createWikiPage(
1918  $a_page,
1919  0,
1920  $this->edit_request->getTranslation(),
1921  $this->edit_request->getPageTemplateId()
1922  );
1923 
1924  // redirect to newly created page
1925  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1926  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1927 
1928  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1929  $ilCtrl->redirect($this, "");
1930  } else {
1931  $form->setValuesByPost();
1932  $tpl->setContent($form->getHTML());
1933  }
1934  }
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...
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:

◆ downloadUserHTMLExportObject()

ilObjWikiGUI::downloadUserHTMLExportObject ( )

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

References ilObjectGUI\checkPermission().

2018  : void
2019  {
2020  $this->log->debug("download");
2021  $this->checkPermission("wiki_html_export");
2022  $this->object->deliverUserHTMLExport();
2023  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ downloadUserHTMLExportWithCommentsObject()

ilObjWikiGUI::downloadUserHTMLExportWithCommentsObject ( )

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

References ilObjectGUI\checkPermission().

2025  : void
2026  {
2027  $this->log->debug("download");
2028  $this->checkPermission("wiki_html_export");
2029  $this->object->deliverUserHTMLExport(true);
2030  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editImportantPagesObject()

ilObjWikiGUI::editImportantPagesObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilGlobalTemplateInterface\setContent(), ilSelectInputGUI\setOptions(), setSettingsSubTabs(), ilStr\shortenTextExtended(), and ilLanguage\txt().

1677  : void
1678  {
1679  $tpl = $this->tpl;
1680  $ilToolbar = $this->toolbar;
1681  $ilTabs = $this->tabs;
1682  $lng = $this->lng;
1683  $ilCtrl = $this->ctrl;
1684 
1685  $this->checkPermission("edit_wiki_navigation");
1686 
1687  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_navigation_info"));
1688 
1689  $ipages_ids = $this->imp_pages->getImportantPageIds();
1690 
1691  // list pages
1692  $pages = $this->pm->getAllPagesInfo();
1693  $options = array("" => $lng->txt("please_select"));
1694  foreach ($pages as $p) {
1695  if (!in_array($p->getId(), $ipages_ids)) {
1696  $options[$p->getId()] = ilStr::shortenTextExtended($p->getTitle(), 60, true);
1697  }
1698  }
1699  if (count($options) > 0) {
1700  $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1701  $si->setOptions($options);
1702  $si->setInfo($lng->txt(""));
1703  $ilToolbar->addInputItem($si);
1704  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1705  $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1706  }
1707 
1708 
1709  $ilTabs->activateTab("settings");
1710  $this->setSettingsSubTabs("imp_pages");
1711 
1712  $imp_table = new ilImportantPagesTableGUI($this, "editImportantPages");
1713 
1714  $tpl->setContent($imp_table->getHTML());
1715  }
This class represents a selection list property in a property form.
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setOptions(array $a_options)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
ilToolbarGUI $toolbar
setSettingsSubTabs(string $a_active)
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editSettingsObject()

ilObjWikiGUI::editSettingsObject ( )

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

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

761  : void
762  {
763  $tpl = $this->tpl;
764 
765  $this->checkPermission("write");
766 
767  $this->setSettingsSubTabs("general_settings");
768 
769  $this->initSettingsForm();
770  $this->getSettingsFormValues();
771 
772  // Edit ecs export settings
773  $ecs = new ilECSWikiSettings($this->object);
774  $ecs->addSettingsToForm($this->form_gui, 'wiki');
775 
776  $tpl->setContent($this->form_gui->getHTML());
777  $this->setSideBlock();
778  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
setSettingsSubTabs(string $a_active)
setSideBlock(int $a_wpg_id=0)
getSettingsFormValues(string $a_mode="edit")
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
initSettingsForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

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

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

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

◆ getAssignmentButtons()

ilObjWikiGUI::getAssignmentButtons ( )
protected

Get assignment buttons.

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $ui, ilExAssignment\afterDeadlineStrict(), ilExcRepoObjAssignment\getInstance(), ilExSubmission\getSelectedObject(), ILIAS\Repository\object(), ilLanguage\txt(), and ILIAS\Repository\user().

Referenced by triggerAssignmentTool().

2057  : array
2058  {
2059  $ilCtrl = $this->ctrl;
2060  $ui = $this->ui;
2061  $lng = $this->lng;
2062 
2063  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
2064  $this->object->getRefId(),
2065  $this->user->getId()
2066  );
2067  $buttons = [];
2068  foreach ($ass_info as $i) { // should be only one
2069  $ass = new ilExAssignment($i->getId());
2070  $times_up = $ass->afterDeadlineStrict();
2071 
2072  // submit button
2073  if (!$times_up) {
2074  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
2075  $submit_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "finalizeAssignment");
2076  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
2077 
2078  $buttons[$i->getId()][] = $ui->factory()->button()->primary($lng->txt("wiki_finalize_wiki"), $submit_link);
2079  }
2080 
2081  // submitted files
2082  $submission = new ilExSubmission($ass, $this->user->getId());
2083  if ($submission->hasSubmitted()) {
2084  $submitted = $submission->getSelectedObject();
2085  if ($submitted["ts"] != "") {
2086  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
2087  }
2088  $dl_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "downloadExcSubFile");
2089  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
2090  $buttons[$i->getId()][] = $ui->factory()->button()->standard($lng->txt("wiki_download_submission"), $dl_link);
2091  }
2092  }
2093  return $buttons;
2094  }
Exercise assignment.
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...
ILIAS DI UIServices $ui
afterDeadlineStrict(bool $a_include_personal=true)
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getGotoLink()

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

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

References $lang, ilObject\_lookupObjId(), ilObjWiki\_lookupStartPage(), and ilWikiUtil\makeUrlTitle().

Referenced by ilObjWiki\decorateAdvMDValue(), and ilObjWikiSubItemListGUI\getHTML().

1177  : string {
1178  if ($a_page === "") {
1180  }
1181 
1182  $append = (!in_array($lang, ["", "-"]))
1183  ? "&transl=" . $lang
1184  : "";
1185  $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
1186  ilWikiUtil::makeUrlTitle($a_page) . $append;
1187  return $goto;
1188  }
static _lookupObjId(int $ref_id)
static _lookupStartPage(int $a_wiki_id)
$lang
Definition: xapiexit.php:26
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getNewTranslatedPageForm()

ilObjWikiGUI::getNewTranslatedPageForm ( )
protected

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

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

Referenced by createNewTranslatedPageObject(), and isNewTranslatedPage().

1402  {
1403  $pm = $this->domain->page()->page($this->object->getRefId());
1404  $options = [];
1405  foreach ($pm->getMasterPagesWithoutTranslation($this->edit_request->getTranslation()) as $page) {
1406  $options[$page->getId()] = $page->getTitle();
1407  }
1408  $append = " '" . $this->edit_request->getPage() . "'";
1409  $append .= " (" . $this->lng->txt("meta_l_" . $this->edit_request->getTranslation()) . ")";
1410  $append2 = " (" . $this->lng->txt("meta_l_" . $this->ot->getMasterLanguage()) . ")";
1411  $form = $this->gui->form([self::class], "createNewTranslatedPage")
1412  ->section("sec", $this->lng->txt("wiki_translation_page") . $append)
1413  ->switch("type", $this->lng->txt("wiki_page_in_master_language") . $append2, "", "existing")
1414  ->group("existing", $this->lng->txt("wiki_master_existing"))
1415  ->select("master_id", $this->lng->txt("wiki_master_title"), $options)
1416  ->required()
1417  ->group("new", $this->lng->txt("wiki_no_master"))
1418  ->text("master_title", $this->lng->txt("wiki_master_title"))
1419  ->end();
1420 
1421  if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1422  $form = $form->radio("page_templ", $this->lng->txt("wiki_page_template"), "", "0")->required();
1423  if ($this->object->getEmptyPageTemplate()) {
1424  $form = $form->radioOption("0", $this->lng->txt("wiki_empty_page"));
1425  }
1426  $wt = new ilWikiPageTemplate($this->object->getId());
1427  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1428  foreach ($ts as $t) {
1429  $form = $form->radioOption($t["wpage_id"], $t["title"]);
1430  }
1431  }
1432 
1433  return $form;
1434  }
ILIAS Wiki Page PageManager $pm
getAllInfo(int $a_type=self::TYPE_ALL, string $lang="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrintPageIds()

ilObjWikiGUI::getPrintPageIds ( )
protected

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

Referenced by getPrintView().

1585  : array
1586  {
1587  $page_ids = [];
1588  $ordering = $this->edit_request->getPrintOrdering();
1589 
1590  // multiple ordered page ids
1591  if (count($ordering) > 0) {
1592  asort($ordering);
1593  $page_ids = array_keys($ordering);
1594  }
1595  // single page
1596  elseif ($this->edit_request->getWikiPageId()) {
1597  $page_ids = array($this->edit_request->getWikiPageId());
1598  }
1599  return $page_ids;
1600  }
+ Here is the caller graph for this function:

◆ getPrintView()

ilObjWikiGUI::getPrintView ( bool  $export = false)

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

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

Referenced by printViewObject().

1603  {
1604  $page_ids = $export
1605  ? null
1606  : $this->getPrintPageIds();
1607  $provider = new \ILIAS\Wiki\WikiPrintViewProviderGUI(
1608  $this->lng,
1609  $this->ctrl,
1610  $this->object->getRefId(),
1611  $page_ids
1612  );
1613 
1614  return new \ILIAS\Export\PrintProcessGUI(
1615  $provider,
1616  $this->http,
1617  $this->ui,
1618  $this->lng
1619  );
1620  }
$provider
Definition: ltitoken.php:83
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRenderedTranslationInfo()

ilObjWikiGUI::getRenderedTranslationInfo ( )
protected

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

References ILIAS\Repository\lng().

Referenced by isNewTranslatedPage().

1394  {
1395  $mess = $this->gui->ui()->factory()->messageBox()->info(
1396  $this->lng->txt("wiki_translate_page_master_info")
1397  );
1398  return $this->gui->ui()->renderer()->render($mess);
1399  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSettingsFormValues()

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

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

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

Referenced by editSettingsObject(), and initCreationForms().

921  : void
922  {
923  // set values
924  if ($a_mode === "create") {
925  $values["rating_new"] = true;
926 
927  $parent = ilObjectFactory::getInstanceByRefId($this->requested_ref_id);
928  $values["rating_overall"] = $parent->selfOrParentWithRatingEnabled();
929  } else {
930  $values["online"] = $this->object->getOnline();
931  $values["title"] = $this->object->getTitle();
932  //$values["startpage"] = $this->object->getStartPage();
933  $values["startpage_id"] = ilWikiPage::_getPageIdForWikiTitle($this->object->getId(), $this->object->getStartPage());
934  $values["shorttitle"] = $this->object->getShortTitle();
935  $values["description"] = $this->object->getLongDescription();
936  $values["rating_overall"] = $this->object->getRatingOverall();
937  $values["rating"] = $this->object->getRating();
938  $values["rating_new"] = $this->object->getRatingForNewPages();
939  $values["rating_ext"] = $this->object->getRatingCategories();
940  $values["public_notes"] = $this->object->getPublicNotes();
941  $values["intro"] = $this->object->getIntroduction();
942  $values["page_toc"] = $this->object->getPageToc();
943  $values["link_md_values"] = $this->object->getLinkMetadataValues();
944 
945  // only set given values (because of adv. metadata)
946  }
947  $this->form_gui->setValuesByArray($values, true);
948  }
static _getPageIdForWikiTitle(int $a_wiki_id, string $a_title)
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
+ 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 1842 of file class.ilObjWikiGUI.php.

References ilWikiPage\lookupTitle().

1845  : string {
1846  return ilWikiPage::lookupTitle($a_id);
1847  }
static lookupTitle(int $a_page_id, string $lang="-")
+ Here is the call graph for this function:

◆ getTabs()

ilObjWikiGUI::getTabs ( )
protected

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

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

560  : void
561  {
562  $ilCtrl = $this->ctrl;
563  $ilAccess = $this->access;
564  $lng = $this->lng;
565  $ilHelp = $this->help;
566 
567  $ilHelp->setScreenIdComponent("wiki");
568 
569  // wiki tabs
570  if (in_array(strtolower($ilCtrl->getCmdClass()), array("", "ilobjectcontentstylesettingsgui", "ilobjwikigui",
571  "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui", "ilobjnotificationsettingsgui", "iltaxmdgui",
572  "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui',
573  'ilobjecttranslationgui'
574  ), true) || $ilCtrl->getNextClass() === "ilpermissiongui") {
575  if ($this->requested_page !== "") {
576  $page_id = ($this->edit_request->getWikiPageId() > 0)
577  ? $this->edit_request->getWikiPageId()
578  : $this->pm->getPageIdForTitle(
579  $this->requested_page,
580  $this->edit_request->getTranslation()
581  );
582  if (is_null($page_id) && $this->edit_request->getFromPage() !== "") {
583  $page_id = $this->pm->getPageIdForTitle(
584  $this->edit_request->getFromPage(),
585  $this->edit_request->getTranslation()
586  );
587  }
588  if (!is_null($page_id)) {
589  $this->tabs_gui->setBackTarget(
590  $lng->txt("wiki_last_visited_page"),
591  $this->pm->getPermaLink(
592  $page_id,
593  $this->edit_request->getTranslation()
594  )
595  );
596  }
597  }
598 
599  // pages
600  if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
601  $this->tabs_gui->addTab(
602  "wiki_pages",
603  $lng->txt("wiki_pages"),
604  $this->ctrl->getLinkTarget($this, "allPages")
605  );
606  }
607 
608  // info screen
609  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
610  $this->tabs_gui->addTab(
611  "info_short",
612  $lng->txt("info_short"),
613  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
614  );
615  }
616 
617  // settings
618  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
619  $this->tabs_gui->addTab(
620  "settings",
621  $lng->txt("settings"),
622  $this->ctrl->getLinkTarget($this, "editSettings")
623  );
624 
625  // metadata
626  $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
627  $mdtab = $mdgui->getTab();
628  if ($mdtab) {
629  $this->tabs_gui->addTab(
630  "advmd",
631  $this->lng->txt("meta_data"),
632  $mdtab
633  );
634  }
635  }
636 
637  // contributors
638  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
639  $this->tabs_gui->addTab(
640  "wiki_contributors",
641  $lng->txt("wiki_contributors"),
642  $this->ctrl->getLinkTarget($this, "listContributors")
643  );
644  }
645 
646  // statistics
647  if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId())) {
648  $this->tabs_gui->addTab(
649  "statistics",
650  $lng->txt("statistics"),
651  $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial")
652  );
653  }
654 
655  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
656  $this->tabs_gui->addTab(
657  "export",
658  $lng->txt("export"),
659  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
660  );
661  }
662 
663  // edit permissions
664  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
665  $this->tabs_gui->addTab(
666  "perm_settings",
667  $lng->txt("perm_settings"),
668  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
669  );
670  }
671  }
672  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
ilLanguage $lng
setScreenIdComponent(string $a_comp)
ilAccessHandler $access
+ Here is the call graph for this function:

◆ getUserHTMLExportProgressObject()

ilObjWikiGUI::getUserHTMLExportProgressObject ( )

Get user html export progress.

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

References $r, ilObjectGUI\checkPermission(), exit, and ilProgressBar\getInstance().

2001  : void
2002  {
2003  $this->log->debug("get progress: " . $this->req_with_comments);
2004  $this->checkPermission("wiki_html_export");
2005  $p = $this->object->getUserHTMLExportProgress($this->req_with_comments);
2006 
2008  $pb->setCurrent($p["progress"]);
2009 
2010  $r = new stdClass();
2011  $r->progressBar = $pb->render();
2012  $r->status = $p["status"];
2013  $this->log->debug("status: " . $r->status);
2014  echo(json_encode($r, JSON_THROW_ON_ERROR));
2015  exit;
2016  }
exit
Definition: login.php:29
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
$r
+ Here is the call graph for this function:

◆ gotoPageObject()

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

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

References ilObjectGUI\$ctrl, $requested_page, ILIAS\Repository\access(), isNewTranslatedPage(), ILIAS\Repository\lng(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ILIAS\Repository\object(), ilUtil\redirect(), and ilStr\strLen().

Referenced by randomPageObject().

1305  : void {
1306  $ilCtrl = $this->ctrl;
1307 
1308  if ($a_page === "") {
1309  $a_page = $this->requested_page;
1310  }
1311 
1312  if ($this->pm->existsByTitle(
1313  ilWikiUtil::makeDbTitle($a_page),
1314  $this->edit_request->getTranslation()
1315  )) {
1316  // to do: get rid of this redirect
1317  ilUtil::redirect(self::getGotoLink($this->object->getRefId(), $a_page, $this->edit_request->getTranslation()));
1318  } else {
1319  if (!$this->access->checkAccess("add_pages", "", $this->object->getRefId())) {
1320  $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_permission"), true);
1321  $from_page_id = $this->pm->getPageIdForTitle($this->edit_request->getFromPage(), $this->edit_request->getTranslation());
1322  ilUtil::redirect($this->pm->getPermaLink($from_page_id, $this->edit_request->getTranslation()));
1323  }
1324  if ($this->isNewTranslatedPage()) {
1325  return;
1326  }
1327  if (!$this->object->getTemplateSelectionOnCreation()) {
1328  // check length
1329  if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1330  $this->tpl->setOnScreenMessage(
1331  'failure',
1332  $this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")",
1333  true
1334  );
1335  $ilCtrl->setParameterByClass(
1336  "ilwikipagegui",
1337  "page",
1338  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1339  );
1340  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1341  }
1342 
1343  $this->pm->createWikiPage(
1344  $a_page,
1345  0,
1346  $this->edit_request->getTranslation()
1347  );
1348 
1349  // redirect to newly created page
1350  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1351  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1352  } else {
1353  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
1354  $ilCtrl->setParameter(
1355  $this,
1356  "from_page",
1357  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1358  );
1359  $ilCtrl->redirect($this, "showTemplateSelection");
1360  }
1361  }
1362  }
static strLen(string $a_string)
Definition: class.ilStr.php:63
static redirect(string $a_script)
static makeUrlTitle(string $a_par)
static makeDbTitle(string $a_par)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ gotoStartPageObject()

ilObjWikiGUI::gotoStartPageObject ( )

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

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

Referenced by viewObject().

483  : void
484  {
485  ilUtil::redirect(self::getGotoLink($this->object->getRefId()));
486  }
static redirect(string $a_script)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ infoScreen()

ilObjWikiGUI::infoScreen ( )

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

References ilObjectGUI\$access, 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().

418  : void
419  {
420  $ilAccess = $this->access;
421  $ilUser = $this->user;
422  $ilTabs = $this->tabs;
423  $lng = $this->lng;
424 
425  $ilTabs->activateTab("info_short");
426 
427  if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
428  throw new ilPermissionException($this->lng->txt("permission_denied"));
429  }
430 
431  $info = new ilInfoScreenGUI($this);
432  $info->enablePrivateNotes();
433  if (trim($this->object->getIntroduction()) !== "") {
434  $info->addSection($lng->txt("wiki_introduction"));
435  $info->addProperty("", nl2br($this->object->getIntroduction()));
436  }
437 
438  // feedback from tutor; mark, status, comment
439  $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
440  $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
441  $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
442  if ($lpcomment !== "" || $mark !== "" || (int) $status !== ilWikiContributor::STATUS_NOT_GRADED) {
443  $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
444  if ($lpcomment !== "") {
445  $info->addProperty(
446  $this->lng->txt("wiki_comment"),
447  $lpcomment
448  );
449  }
450  if ($mark !== "") {
451  $info->addProperty(
452  $this->lng->txt("wiki_mark"),
453  $mark
454  );
455  }
456 
457  if ((int) $status === ilWikiContributor::STATUS_PASSED) {
458  $info->addProperty(
459  $this->lng->txt("status"),
460  $this->lng->txt("wiki_passed")
461  );
462  }
463  if ((int) $status === ilWikiContributor::STATUS_FAILED) {
464  $info->addProperty(
465  $this->lng->txt("status"),
466  $this->lng->txt("wiki_failed")
467  );
468  }
469  }
470 
471  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
472  $info->addButton($lng->txt("wiki_start_page"), self::getGotoLink($this->object->getRefId()));
473  }
474 
475  // general information
476  $this->lng->loadLanguageModule("meta");
477  $this->lng->loadLanguageModule("wiki");
478 
479  // forward the command
480  $this->ctrl->forwardCommand($info);
481  }
static _lookupComment(int $a_usr_id, int $a_obj_id)
Class ilInfoScreenGUI.
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 _lookupStatus(int $a_obj_id, int $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupMark(int $a_usr_id, int $a_obj_id)
ilAccessHandler $access
+ 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 410 of file class.ilObjWikiGUI.php.

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

410  : void
411  {
412  $this->checkPermission("visible");
413  $this->ctrl->setCmd("showSummary");
414  $this->ctrl->setCmdClass("ilinfoscreengui");
415  $this->infoScreen();
416  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjWikiGUI::initCreationForms ( string  $new_type)
protected

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

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

340  : array
341  {
342  $this->initSettingsForm("create");
343  $this->getSettingsFormValues("create");
344 
345  $forms = array(self::CFORM_NEW => $this->form_gui,
346  self::CFORM_IMPORT => $this->initImportForm($new_type));
347 
348  return $forms;
349  }
initImportForm(string $new_type)
getSettingsFormValues(string $a_mode="edit")
initSettingsForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ initSettingsForm()

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

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

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

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

780  : void
781  {
782  $lng = $this->lng;
783  $ilCtrl = $this->ctrl;
784  $ilTabs = $this->tabs;
786  $obj_service = $this->object_service;
787 
788  $lng->loadLanguageModule("wiki");
789  $ilTabs->activateTab("settings");
790 
791  $this->form_gui = new ilPropertyFormGUI();
792 
793  // Title
794  $tit = new ilTextInputGUI($lng->txt("title"), "title");
795  $tit->setRequired(true);
796  $this->form_gui->addItem($tit);
797 
798  // Description
799  $des = new ilTextAreaInputGUI($lng->txt("description"), "description");
800  $this->form_gui->addItem($des);
801 
802  // Introduction
803  $intro = new ilTextAreaInputGUI($lng->txt("wiki_introduction"), "intro");
804  $intro->setCols(40);
805  $intro->setRows(4);
806  $this->form_gui->addItem($intro);
807 
808  // Start Page
809  $options = [];
810  if ($a_mode === "edit") {
811  foreach ($this->pm->getWikiPages() as $page) {
812  $options[$page->getId()] = ilStr::shortenTextExtended($page->getTitle(), 60, true);
813  }
814  $si = new ilSelectInputGUI($lng->txt("wiki_start_page"), "startpage_id");
815  $si->setOptions($options);
816  $this->form_gui->addItem($si);
817  } else {
818  $sp = new ilTextInputGUI($lng->txt("wiki_start_page"), "startpage");
819  if ($a_mode === "edit") {
820  $sp->setInfo($lng->txt("wiki_start_page_info"));
821  }
822  $sp->setMaxLength(200);
823  $sp->setRequired(true);
824  $this->form_gui->addItem($sp);
825  }
826 
827  // Online
828  $online = new ilCheckboxInputGUI($lng->txt("online"), "online");
829  $this->form_gui->addItem($online);
830 
831 
832  // rating
833 
834  $lng->loadLanguageModule('rating');
835  $rate = new ilCheckboxInputGUI($lng->txt('rating_activate_rating'), 'rating_overall');
836  $rate->setInfo($lng->txt('rating_activate_rating_info'));
837  $this->form_gui->addItem($rate);
838 
839  $rating = new ilCheckboxInputGUI($lng->txt("wiki_activate_rating"), "rating");
840  $this->form_gui->addItem($rating);
841 
842  /* always active
843  $side = new ilCheckboxInputGUI($lng->txt("wiki_activate_sideblock_rating"), "rating_side");
844  $rating->addSubItem($side);
845  */
846 
847  $new = new ilCheckboxInputGUI($lng->txt("wiki_activate_new_page_rating"), "rating_new");
848  $rating->addSubItem($new);
849 
850  $extended = new ilCheckboxInputGUI($lng->txt("wiki_activate_extended_rating"), "rating_ext");
851  $rating->addSubItem($extended);
852 
853 
854  // public comments
855  if (!$ilSetting->get("disable_comments")) {
856  $comments = new ilCheckboxInputGUI($lng->txt("wiki_public_comments"), "public_notes");
857  $this->form_gui->addItem($comments);
858  }
859 
860  // important pages
861  // $imp_pages = new ilCheckboxInputGUI($lng->txt("wiki_important_pages"), "imp_pages");
862  // $this->form_gui->addItem($imp_pages);
863 
864  // page toc
865  $page_toc = new ilCheckboxInputGUI($lng->txt("wiki_page_toc"), "page_toc");
866  $page_toc->setInfo($lng->txt("wiki_page_toc_info"));
867  $this->form_gui->addItem($page_toc);
868 
869  if ($a_mode === "edit") {
870  // advanced metadata auto-linking
871  if (count(ilAdvancedMDRecord::_getSelectedRecordsByObject("wiki", $this->object->getRefId(), "wpg")) > 0) {
872  $link_md = new ilCheckboxInputGUI($lng->txt("wiki_link_md_values"), "link_md_values");
873  $link_md->setInfo($lng->txt("wiki_link_md_values_info"));
874  $this->form_gui->addItem($link_md);
875  }
876 
877 
878  $section = new ilFormSectionHeaderGUI();
879  $section->setTitle($this->lng->txt('obj_presentation'));
880  $this->form_gui->addItem($section);
881 
882  // tile image
883  $obj_service->commonSettings()->legacyForm($this->form_gui, $this->object)->addTileImage();
884 
885 
886  // additional features
887  $feat = new ilFormSectionHeaderGUI();
888  $feat->setTitle($this->lng->txt('obj_features'));
889  $this->form_gui->addItem($feat);
890 
892  $this->object->getId(),
894  array(
896  )
897  );
898  }
899 
900  // :TODO: sorting
901 
902  // Form action and save button
903  $this->form_gui->setTitleIcon(ilUtil::getImagePath("standard/icon_wiki.svg"));
904  if ($a_mode !== "create") {
905  $this->form_gui->setTitle($lng->txt("wiki_settings"));
906  $this->form_gui->addCommandButton("saveSettings", $lng->txt("save"));
907  } else {
908  $this->form_gui->setTitle($lng->txt("wiki_new"));
909  $this->form_gui->addCommandButton("save", $lng->txt("wiki_add"));
910  $this->form_gui->addCommandButton("cancel", $lng->txt("cancel"));
911  }
912 
913  // set values
914  if ($a_mode === "create") {
915  $ilCtrl->setParameter($this, "new_type", "wiki");
916  }
917 
918  $this->form_gui->setFormAction($ilCtrl->getFormAction($this, "saveSettings"));
919  }
This class represents a selection list property in a property form.
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 getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static _getSelectedRecordsByObject(string $a_obj_type, int $a_id, string $a_sub_type="", bool $is_ref_id=true)
loadLanguageModule(string $a_module)
Load language module.
setOptions(array $a_options)
ilLanguage $lng
$comments
ilObjectService $object_service
static initServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
ilPropertyFormGUI $form_gui
global $ilSetting
Definition: privfeed.php:18
static shortenTextExtended(string $a_str, int $a_len, bool $a_dots=false, bool $a_next_blank=false, bool $a_keep_extension=false)
This class represents a text area property in a property form.
ilSetting $settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initTemplateSelectionForm()

ilObjWikiGUI::initTemplateSelectionForm ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $requested_page, ilWikiPageTemplate\getAllInfo(), ILIAS\Repository\object(), ilFormPropertyGUI\setRequired(), ilLanguage\txt(), and ilWikiPageTemplate\TYPE_NEW_PAGES.

Referenced by createPageUsingTemplateObject(), and showTemplateSelectionObject().

1869  {
1870  $lng = $this->lng;
1871  $ilCtrl = $this->ctrl;
1872 
1873  $form = new ilPropertyFormGUI();
1874 
1875  // page name
1876  $hi = new ilHiddenInputGUI("page");
1877  $hi->setValue($this->requested_page);
1878  $form->addItem($hi);
1879 
1880  // page template
1881  $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
1882  $radg->setRequired(true);
1883 
1884  if ($this->object->getEmptyPageTemplate()) {
1885  $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
1886  $radg->addOption($op1);
1887  }
1888 
1889  $wt = new ilWikiPageTemplate($this->object->getId());
1890  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1891  foreach ($ts as $t) {
1892  $op = new ilRadioOption($t["title"], $t["wpage_id"]);
1893  $radg->addOption($op);
1894  }
1895 
1896  $form->addItem($radg);
1897 
1898  // save and cancel commands
1899  $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
1900  $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
1901 
1902  $form->setTitle($lng->txt("wiki_new_page") . ": " . $this->requested_page);
1903  $form->setFormAction($ilCtrl->getFormAction($this));
1904 
1905  return $form;
1906  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
getAllInfo(int $a_type=self::TYPE_ALL, string $lang="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilLanguage $lng
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.
setRequired(bool $a_required)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserHTMLExportObject()

ilObjWikiGUI::initUserHTMLExportObject ( )

Current process:

  • On Button Click (Javascript): il.Wiki.Pres.startHTMLExport()
    • Ajax call to (PHP): ilObjWikiGUI->initUserHTMLExport()
      • On Ajax Success (Javascript):
        • Ajax call to (PHP): ilObjWikiGUI->startUserHTMLExport()
        • Call to il.Wiki.Pres.updateProgress
          • Ajax call to (PHP): ilObjWikiGUI->getUserHTMLExportProgress()
            • On Ajax Success:
              • If finished window.location.href to ilObjWikiGUI->downloadUserHTMLExport()
              • If not finished: Wait for a second and call to il.Wiki.Pres.updateProgress Export html (as user)

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

References ilObjectGUI\checkPermission().

1981  : void
1982  {
1983  $this->log->debug("init: " . $this->req_with_comments);
1984  $this->checkPermission("wiki_html_export");
1985  $this->object->initUserHTMLExport($this->req_with_comments);
1986  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ isNewTranslatedPage()

ilObjWikiGUI::isNewTranslatedPage ( )
protected

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

References $requested_page, ilWikiPage\_wikiPageExists(), getNewTranslatedPageForm(), getRenderedTranslationInfo(), ILIAS\Repository\lng(), ilWikiUtil\makeDbTitle(), and ILIAS\Repository\object().

Referenced by gotoPageObject().

1364  : bool
1365  {
1366  if (in_array($this->edit_request->getTranslation(), ["-", ""])) {
1367  return false;
1368  }
1369  $page = $this->requested_page;
1371  $this->object->getId(),
1372  ilWikiUtil::makeDbTitle($page),
1373  $this->edit_request->getTranslation()
1374  )) {
1375  $this->tabs_gui->clearTargets();
1376  $this->tabs_gui->setBackTarget(
1377  $this->lng->txt("back"),
1378  $this->pm->getPermaLink(
1379  $this->pm->getPageIdForTitle(
1380  $this->edit_request->getFromPage(),
1381  $this->edit_request->getTranslation()
1382  ),
1383  $this->edit_request->getTranslation()
1384  )
1385  );
1386  $form = $this->getNewTranslatedPageForm();
1387  $this->tpl->setContent($this->getRenderedTranslationInfo() . $form->render());
1388  return true;
1389  }
1390  return false;
1391  }
static makeDbTitle(string $a_par)
static _wikiPageExists(int $a_wiki_id, string $a_title, string $lang="-")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listContributorsObject()

ilObjWikiGUI::listContributorsObject ( )

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

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

1011  : void
1012  {
1013  $tpl = $this->tpl;
1014  $ilTabs = $this->tabs;
1015 
1016  $this->checkPermission("write");
1017  $ilTabs->activateTab("wiki_contributors");
1018 
1019  $table_gui = new ilWikiContributorsTableGUI(
1020  $this,
1021  "listContributors",
1022  $this->object->getId()
1023  );
1024 
1025  $tpl->setContent($table_gui->getHTML());
1026 
1027  $this->setSideBlock();
1028  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
setSideBlock(int $a_wpg_id=0)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ 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 1828 of file class.ilObjWikiGUI.php.

1831  : string {
1832  $page = new ilWikiPage($a_page_id);
1833  if ($page->getWikiId() === $a_wiki_id) {
1834  return $page->getTitle();
1835  }
1836  return "";
1837  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

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

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

1566  : void
1567  {
1568  $tpl = $this->tpl;
1569 
1570  $this->checkPermission("read");
1571 
1572  $this->addPagesSubTabs();
1573 
1574  $table_gui = new ilWikiPagesTableGUI(
1575  $this,
1576  "newPages",
1577  $this->object->getId(),
1579  );
1580 
1581  //$this->setSideBlock();
1582  $tpl->setContent($table_gui->getHTML());
1583  }
TableGUI class for wiki pages table.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
const IL_WIKI_NEW_PAGES
+ Here is the call graph for this function:

◆ orphanedPagesObject()

ilObjWikiGUI::orphanedPagesObject ( )
Exceptions
ilObjectException

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

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

1281  : void
1282  {
1283  $tpl = $this->tpl;
1284 
1285  $this->checkPermission("read");
1286 
1287  $this->addPagesSubTabs();
1288 
1289  $table_gui = new ilWikiPagesTableGUI(
1290  $this,
1291  "orphanedPages",
1292  $this->object->getId(),
1294  );
1295 
1296  //$this->setSideBlock();
1297  $tpl->setContent($table_gui->getHTML());
1298  }
TableGUI class for wiki pages table.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
const IL_WIKI_ORPHANED_PAGES
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ performSearchObject()

ilObjWikiGUI::performSearchObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObjWiki\_performSearch(), ilObjectGUI\checkPermission(), ILIAS\Repository\object(), ilGlobalTemplateInterface\setContent(), setSideBlock(), and ilLanguage\txt().

1628  : void
1629  {
1630  $tpl = $this->tpl;
1631  $ilTabs = $this->tabs;
1632  $ilCtrl = $this->ctrl;
1633  $lng = $this->lng;
1634 
1635  $this->checkPermission("read");
1636 
1637  $ilTabs->setTabActive("wiki_search_results");
1638 
1639  if ($this->edit_request->getSearchTerm() === "") {
1640  $this->tpl->setOnScreenMessage('failure', $lng->txt("wiki_please_enter_search_term"), true);
1641  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1642  }
1643 
1644  $search_results = ilObjWiki::_performSearch(
1645  $this->object->getId(),
1646  $this->edit_request->getSearchTerm()
1647  );
1648  $table_gui = new ilWikiSearchResultsTableGUI(
1649  $this,
1650  "performSearch",
1651  $this->object->getId(),
1652  $search_results,
1653  $this->edit_request->getSearchTerm()
1654  );
1655 
1656  $this->setSideBlock();
1657  $tpl->setContent($table_gui->getHTML());
1658  }
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _performSearch(int $a_wiki_id, string $a_searchterm)
Search in Wiki.
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
setSideBlock(int $a_wpg_id=0)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ popularPagesObject()

ilObjWikiGUI::popularPagesObject ( )
Exceptions
ilObjectException

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

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

1259  : void
1260  {
1261  $tpl = $this->tpl;
1262 
1263  $this->checkPermission("read");
1264 
1265  $this->addPagesSubTabs();
1266 
1267  $table_gui = new ilWikiPagesTableGUI(
1268  $this,
1269  "popularPages",
1270  $this->object->getId(),
1272  );
1273 
1274  //$this->setSideBlock();
1275  $tpl->setContent($table_gui->getHTML());
1276  }
const IL_WIKI_POPULAR_PAGES
TableGUI class for wiki pages table.
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ printViewObject()

ilObjWikiGUI::printViewObject ( )

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

References getPrintView().

1622  : void
1623  {
1624  $print_view = $this->getPrintView();
1625  $print_view->sendPrintView();
1626  }
getPrintView(bool $export=false)
+ Here is the call graph for this function:

◆ randomPageObject()

ilObjWikiGUI::randomPageObject ( )

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

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

1462  : void
1463  {
1464  $this->checkPermission("read");
1465 
1466  $page = ilWikiPage::getRandomPage($this->object->getId());
1467  $this->gotoPageObject($page);
1468  }
static getRandomPage(int $a_wiki_id)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
gotoPageObject(string $a_page="")
+ Here is the call graph for this function:

◆ recentChangesObject()

ilObjWikiGUI::recentChangesObject ( )

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

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

1470  : void
1471  {
1472  $tpl = $this->tpl;
1473 
1474  $this->checkPermission("read");
1475 
1476  $this->addPagesSubTabs();
1477 
1478  $table_gui = new ilWikiRecentChangesTableGUI(
1479  $this,
1480  "recentChanges",
1481  $this->object->getId()
1482  );
1483 
1484  //$this->setSideBlock();
1485  $tpl->setContent($table_gui->getHTML());
1486  }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ removeImportantPagesObject()

ilObjWikiGUI::removeImportantPagesObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), and ilLanguage\txt().

1757  : void
1758  {
1759  $ilCtrl = $this->ctrl;
1760  $lng = $this->lng;
1761 
1762  $this->checkPermission("edit_wiki_navigation");
1763 
1764  $imp_page_ids = $this->edit_request->getImportantPageIds();
1765  foreach ($imp_page_ids as $i) {
1766  $this->imp_pages->removeImportantPage($i);
1767  }
1768  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_removed_imp_pages"), true);
1769  $ilCtrl->redirect($this, "editImportantPages");
1770  }
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...
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ renderSideBlock()

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

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

References $DIC, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject\_lookupObjId(), ilObjWiki\_lookupRating(), ilObjWiki\_lookupRatingCategories(), ilGlobalTemplateInterface\addJavaScript(), ilGlobalTemplateInterface\addOnLoadCode(), ilRepositoryObjectSearchGUI\getSearchBlockHTML(), ilWikiPage\lookupAdvancedMetadataHidden(), ilGlobalTemplateInterface\setRightContent(), and ilLanguage\txt().

Referenced by ilWikiPageGUI\setSideBlock().

1497  : void {
1498  global $DIC;
1499 
1500  $tpl = $DIC["tpl"];
1501  $lng = $DIC->language();
1502  $ilAccess = $DIC->access();
1503  $ilCtrl = $DIC->ctrl();
1504 
1505  $tpl->addJavaScript("./Modules/Wiki/js/WikiPres.js");
1506 
1507  // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1508  // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1509  $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1510 
1511  if ($a_wpg_id > 0 && !$a_wp) {
1512  $a_wp = new ilWikiPage($a_wpg_id);
1513  }
1514 
1515  // search block
1516  $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1517 
1518 
1519  // quick navigation
1520  if ($a_wpg_id > 0) {
1521  // rating
1522  $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1523  if (ilObjWiki::_lookupRating($wiki_id) &&
1524  // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1525  $a_wp->getRating()) {
1526  $rgui = new ilRatingGUI();
1527  $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1528  $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1529  $rgui->setYourRatingText("#");
1530  $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1531  }
1532 
1533  // advanced metadata
1534  if (!ilWikiPage::lookupAdvancedMetadataHidden($a_wpg_id)) {
1535  $cmd = null;
1536  if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1537  $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1538  $cmd = array(
1539  "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1540  "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1541  );
1542  }
1543  $wiki = new ilObjWiki($a_wiki_ref_id);
1544  $callback = $wiki->getLinkMetadataValues()
1545  ? array($wiki, "decorateAdvMDValue")
1546  : null;
1547  $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1548  $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1549  }
1550  }
1551 
1552  // important pages
1553  $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1554  $rcontent .= $imp_pages_block->getHTML();
1555 
1556  // wiki functions block
1557  if ($a_wpg_id > 0) {
1558  $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1559  $wiki_functions_block->setPageObject($a_wp);
1560  $rcontent .= $wiki_functions_block->getHTML();
1561  }
1562 
1563  $tpl->setRightContent($rcontent);
1564  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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 _lookupRatingCategories(int $a_wiki_id)
Lookup whether rating categories are activated.
static _lookupObjId(int $ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28
static _lookupRating(int $a_wiki_id)
Lookup whether rating is activated.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilGlobalTemplateInterface $tpl
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)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveGradingObject()

ilObjWikiGUI::saveGradingObject ( )

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

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

1030  : void
1031  {
1032  $ilCtrl = $this->ctrl;
1033  $lng = $this->lng;
1034 
1035  $this->checkPermission("write");
1036 
1037  $users = $this->edit_request->getUserIds();
1038  $marks = $this->edit_request->getMarks();
1039  $comments = $this->edit_request->getComments();
1040  $status = $this->edit_request->getStatus();
1041 
1042  $saved = false;
1043  foreach ($users as $user_id) {
1044  if ($user_id != "") {
1045  $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
1046  $new_mark = ilUtil::stripSlashes($marks[$user_id]);
1047  $new_comment = ilUtil::stripSlashes($comments[$user_id] ?? "");
1048  $new_status = ilUtil::stripSlashes($status[$user_id]);
1049 
1050  if ($marks_obj->getMark() !== $new_mark ||
1051  $marks_obj->getComment() !== $new_comment ||
1052  (int) ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) !== (int) $new_status) {
1053  ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
1054  $marks_obj->setMark($new_mark);
1055  $marks_obj->setComment($new_comment);
1056  $marks_obj->update();
1057  $saved = true;
1058  }
1059  }
1060  }
1061  if ($saved) {
1062  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1063  }
1064 
1065  $ilCtrl->redirect($this, "listContributors");
1066  }
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 _writeStatus(int $a_obj_id, int $a_user_id, int $a_status)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static _lookupStatus(int $a_obj_id, int $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
ilLanguage $lng
$comments
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveObject()

ilObjWikiGUI::saveObject ( )

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

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

351  : void
352  {
353  $tpl = $this->tpl;
354  $lng = $this->lng;
355 
356  if (!$this->checkPermissionBool("create", "", "wiki", $this->requested_ref_id)) {
357  throw new ilPermissionException($this->lng->txt("permission_denied"));
358  }
359 
360  $this->initSettingsForm("create");
361  if ($this->form_gui->checkInput()) {
362  if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle"))) {
363  $short_item = $this->form_gui->getItemByPostVar("shorttitle");
364  $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
365  } else {
366  parent::saveObject();
367  return;
368  }
369  }
370 
371  $this->form_gui->setValuesByPost();
372  $tpl->setContent($this->form_gui->getHTML());
373  }
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...
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static checkShortTitleAvailability(string $a_short_title)
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
initSettingsForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ saveOrderingAndIndentObject()

ilObjWikiGUI::saveOrderingAndIndentObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), and ilLanguage\txt().

1772  : void
1773  {
1774  $ilCtrl = $this->ctrl;
1775  $lng = $this->lng;
1776 
1777  $this->checkPermission("edit_wiki_navigation");
1778 
1779  $ordering = $this->edit_request->getImportantPageOrdering();
1780  $indentation = $this->edit_request->getImportantPageIndentation();
1781  $this->imp_pages->saveOrderingAndIndentation($ordering, $indentation);
1782  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_ordering_and_indent_saved"), true);
1783  $ilCtrl->redirect($this, "editImportantPages");
1784  }
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...
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjWikiGUI::saveSettingsObject ( )

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

References ilObjectGUI\$ctrl, $form_gui, $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().

951  : void
952  {
953  $ilCtrl = $this->ctrl;
954  $lng = $this->lng;
956  $obj_service = $this->object_service;
957 
958  $this->checkPermission("write");
959 
960  $this->initSettingsForm();
961 
962  if ($this->form_gui->checkInput()) {
963  if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")) &&
964  $this->form_gui->getInput("shorttitle") !== $this->object->getShortTitle()) {
965  $short_item = $this->form_gui->getItemByPostVar("shorttitle");
966  $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
967  } else {
968  $this->object->setTitle($this->form_gui->getInput("title"));
969  $this->object->setDescription($this->form_gui->getInput("description"));
970  $this->object->setOnline($this->form_gui->getInput("online"));
971  $this->object->setStartPage(ilWikiPage::lookupTitle($this->form_gui->getInput("startpage_id")));
972  $this->object->setShortTitle((string) $this->form_gui->getInput("shorttitle"));
973  $this->object->setRatingOverall($this->form_gui->getInput("rating_overall"));
974  $this->object->setRating($this->form_gui->getInput("rating"));
975  // $this->object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
976  $this->object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
977  $this->object->setRatingCategories($this->form_gui->getInput("rating_ext"));
978 
979  if (!$ilSetting->get("disable_comments")) {
980  $this->object->setPublicNotes($this->form_gui->getInput("public_notes"));
981  }
982  $this->object->setIntroduction($this->form_gui->getInput("intro"));
983  $this->object->setPageToc($this->form_gui->getInput("page_toc"));
984  $this->object->setLinkMetadataValues($this->form_gui->getInput("link_md_values"));
985  $this->object->update();
986 
987  // tile image
988  $obj_service->commonSettings()->legacyForm($this->form_gui, $this->object)->saveTileImage();
989 
991  $this->object->getId(),
993  array(
995  )
996  );
997 
998  // Update ecs export settings
999  $ecs = new ilECSWikiSettings($this->object);
1000  if ($ecs->handleSettingsUpdate($this->form_gui)) {
1001  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1002  $ilCtrl->redirect($this, "editSettings");
1003  }
1004  }
1005  }
1006 
1007  $this->form_gui->setValuesByPost();
1008  $this->tpl->setContent($this->form_gui->getHTML());
1009  }
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 lookupTitle(int $a_page_id, string $lang="-")
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static checkShortTitleAvailability(string $a_short_title)
ilObjectService $object_service
ilPropertyFormGUI $form_gui
global $ilSetting
Definition: privfeed.php:18
ilSetting $settings
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
initSettingsForm(string $a_mode="edit")
+ Here is the call graph for this function:

◆ setAsStartPageObject()

ilObjWikiGUI::setAsStartPageObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$object, ilObjectGUI\checkPermission(), ILIAS\Repository\lng(), ilWikiPage\lookupTitle(), and ilLanguage\txt().

1786  : void
1787  {
1788  $ilCtrl = $this->ctrl;
1789  $lng = $this->lng;
1790 
1791  $this->checkPermission("edit_wiki_navigation");
1792 
1793  $imp_page_ids = $this->edit_request->getImportantPageIds();
1794  if (count($imp_page_ids) !== 1) {
1795  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_select_one_item"), true);
1796  } else {
1797  $this->imp_pages->removeImportantPage($imp_page_ids[0]);
1798  $this->object->setStartPage(ilWikiPage::lookupTitle($imp_page_ids[0]));
1799  $this->object->update();
1800  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1801  }
1802  $ilCtrl->redirect($this, "editImportantPages");
1803  }
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 lookupTitle(int $a_page_id, string $lang="-")
ilLanguage $lng
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjWikiGUI::setContentStyleSheet ( )

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

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

Referenced by executeCommand(), and viewPageObject().

1660  : void
1661  {
1662  $tpl = $this->tpl;
1663 
1664  if ($tpl == null) {
1665  $tpl = $this->tpl;
1666  }
1667 
1668  $this->content_style_gui->addCss($tpl, $this->object->getRefId());
1670  }
ilGlobalTemplateInterface $tpl
addCss(string $a_css_file, string $media="screen")
Add a css file that should be included in the header.
+ 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 674 of file class.ilObjWikiGUI.php.

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

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

674  : void
675  {
676  $ilTabs = $this->tabs;
677  $ilCtrl = $this->ctrl;
678  $lng = $this->lng;
679  $ilAccess = $this->access;
680  if (in_array(
681  $a_active,
682  array("general_settings", "style", "imp_pages", "rating_categories", "obj_multilinguality",
683  "page_templates", "advmd", "permission_settings", "notifications", "lti_provider")
684  )) {
685  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
686  // general properties
687  $ilTabs->addSubTab(
688  "general_settings",
689  $lng->txt("wiki_general_settings"),
690  $ilCtrl->getLinkTarget($this, 'editSettings')
691  );
692 
693  // permission settings
694  $ilTabs->addSubTab(
695  "permission_settings",
696  $lng->txt("obj_permission_settings"),
697  $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
698  );
699 
700  // style properties
701  $ilTabs->addSubTab(
702  "style",
703  $lng->txt("wiki_style"),
704  $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", "")
705  );
706  }
707 
708  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
709  // important pages
710  $ilTabs->addSubTab(
711  "imp_pages",
712  $lng->txt("wiki_navigation"),
713  $ilCtrl->getLinkTarget($this, 'editImportantPages')
714  );
715  }
716 
717  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
718  // page templates
719  $ilTabs->addSubTab(
720  "page_templates",
721  $lng->txt("wiki_page_templates"),
722  $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
723  );
724 
725  // rating categories
726  if ($this->object->getRating() && $this->object->getRatingCategories()) {
727  $lng->loadLanguageModule("rating");
728  $ilTabs->addSubTab(
729  "rating_categories",
730  $lng->txt("rating_categories"),
731  $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
732  );
733  }
734 
735  $ilTabs->addSubTab(
736  'notifications',
737  $lng->txt("notifications"),
738  $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
739  );
740 
741  $ilTabs->addSubTab(
742  'obj_multilinguality',
743  $lng->txt("obj_multilinguality"),
744  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
745  );
746  }
747 
748  // LTI Provider
749  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
750  if ($lti_settings->hasSettingsAccess()) {
751  $ilTabs->addSubTabTarget(
752  'lti_provider',
753  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
754  );
755  }
756 
757  $ilTabs->activateSubTab($a_active);
758  }
759  }
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...
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilAccessHandler $access
+ 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 1488 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\object().

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

1488  : void
1489  {
1490  self::renderSideBlock($a_wpg_id, $this->object->getRefId());
1491  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTemplateSelectionObject()

ilObjWikiGUI::showTemplateSelectionObject ( )

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

References ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, initTemplateSelectionForm(), ilWikiUtil\makeUrlTitle(), ilGlobalTemplateInterface\setContent(), ilCtrl\setParameterByClass(), and ilLanguage\txt().

1849  : void
1850  {
1851  $lng = $this->lng;
1852  $tpl = $this->tpl;
1853  $ilTabs = $this->tabs;
1854  $ilCtrl = $this->ctrl;
1855 
1856  $ilCtrl->setParameterByClass(
1857  "ilobjwikigui",
1858  "from_page",
1859  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1860  );
1861  $ilTabs->clearTargets();
1862  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_page_not_exist_select_templ"));
1863 
1864  $form = $this->initTemplateSelectionForm();
1865  $tpl->setContent($form->getHTML());
1866  }
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...
setParameterByClass(string $a_class, string $a_parameter, $a_value)
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
static makeUrlTitle(string $a_par)
+ Here is the call graph for this function:

◆ startUserHTMLExportObject()

ilObjWikiGUI::startUserHTMLExportObject ( )

Export html (as user)

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

References ilObjectGUI\checkPermission().

1991  : void
1992  {
1993  $this->log->debug("start: " . $this->req_with_comments);
1994  $this->checkPermission("wiki_html_export");
1995  $this->object->startUserHTMLExport($this->req_with_comments);
1996  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ triggerAssignmentTool()

ilObjWikiGUI::triggerAssignmentTool ( )
protected

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

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

Referenced by executeCommand().

2032  : void
2033  {
2034  if (!is_object($this->object)) {
2035  return;
2036  }
2037  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
2038  $this->object->getRefId(),
2039  $this->user->getId()
2040  );
2041  if (count($ass_info) > 0) {
2042  $ass_ids = array_map(static function ($i): int {
2043  return $i->getId();
2044  }, $ass_info);
2045  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
2046  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
2047  $this->tool_context->current()->addAdditionalData(
2049  $this->getAssignmentButtons()
2050  );
2051  }
2052  }
getAssignmentButtons()
Get assignment buttons.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ viewObject()

ilObjWikiGUI::viewObject ( )

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

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

334  : void
335  {
336  $this->checkPermission("read");
337  $this->gotoStartPageObject();
338  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ viewPageObject()

ilObjWikiGUI::viewPageObject ( )

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

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$html, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilWikiUtil\makeUrlTitle(), ilGlobalTemplateInterface\setContent(), setContentStyleSheet(), and ilGlobalTemplateInterface\setHeaderActionMenu().

1190  : void
1191  {
1192  $lng = $this->lng;
1193  $ilCtrl = $this->ctrl;
1194  $tpl = $this->tpl;
1195  $ilTabs = $this->tabs;
1196  $ilAccess = $this->access;
1197 
1198  $this->checkPermission("read");
1199 
1200  $ilTabs->clearTargets();
1202 
1203  $wpage_gui = $this->gui->content()->getCurrentPageGUI();
1204 
1205  // page exists, show it !
1206  $ilCtrl->setParameter(
1207  $this,
1208  "page",
1209  ilWikiUtil::makeUrlTitle($wpage_gui->getPageObject()->getTitle())
1210  );
1211 
1212  $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
1213 
1214  $this->setContentStyleSheet();
1215 
1216  //$wpage_gui->setSideBlock();
1217  $ilCtrl->setCmdClass("ilwikipagegui");
1218  $ilCtrl->setCmd("preview");
1219  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
1220  (
1221  !$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
1222  $wpage_gui->getPageObject()->getBlocked()
1223  )) {
1224  $wpage_gui->setEnableEditing(false);
1225  }
1226 
1227  // alter title and description
1228  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1229  $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
1230  }
1231 
1232  $html = $ilCtrl->forwardCommand($wpage_gui);
1233 
1234  $tpl->setContent($html);
1235  }
setHeaderActionMenu(string $a_header)
Set header action menu.
ilLanguage $lng
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
static makeUrlTitle(string $a_par)
ilAccessHandler $access
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

Field Documentation

◆ $content_gui

ILIAS Wiki Content GUIService ilObjWikiGUI::$content_gui
protected

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

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjWikiGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjWikiGUI::$content_style_gui
protected

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

◆ $domain

ILIAS Wiki InternalDomainService ilObjWikiGUI::$domain
protected

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

Referenced by __construct().

◆ $edit_request

WikiGUIRequest ilObjWikiGUI::$edit_request
protected

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

◆ $form_gui

ilPropertyFormGUI ilObjWikiGUI::$form_gui
protected

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

Referenced by initSettingsForm(), and saveSettingsObject().

◆ $gui

ILIAS Wiki InternalGUIService ilObjWikiGUI::$gui
protected

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

Referenced by __construct().

◆ $help

ilHelpGUI ilObjWikiGUI::$help
protected

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

Referenced by getTabs().

◆ $http

ILIAS HTTP Services ilObjWikiGUI::$http
protected

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

◆ $imp_pages

ILIAS Wiki Navigation ImportantPageManager ilObjWikiGUI::$imp_pages
protected

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

◆ $log

ilLogger ilObjWikiGUI::$log
protected

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

◆ $ot

ilObjectTranslation ilObjWikiGUI::$ot
protected

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

◆ $pm

ILIAS Wiki Page PageManager ilObjWikiGUI::$pm
protected

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

◆ $req_with_comments

bool ilObjWikiGUI::$req_with_comments = false
protected

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

◆ $requested_page

string ilObjWikiGUI::$requested_page
protected

◆ $tabs

◆ $tool_context

ContextServices ilObjWikiGUI::$tool_context
protected

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

◆ $ui

ILIAS DI UIServices ilObjWikiGUI::$ui
protected

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

Referenced by getAssignmentButtons().


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