ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 ()
 
 infoScreenObject ()
 this one is called from the info button in the repository More...
 
 infoScreen ()
 
 gotoStartPageObject ()
 
 addPageTabs ()
 
 addPagesSubTabs ()
 
 setSettingsSubTabs (string $a_active)
 
 editSettingsObject ()
 
 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
 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)
 
 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

 initCreateForm (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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

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 60 of file class.ilObjWikiGUI.php.

References $DIC, $domain, $gui, ILIAS\GlobalScreen\Provider\__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().

65  {
66  global $DIC;
67 
68  $gui = $DIC->wiki()->internal()->gui();
69  $domain = $DIC->wiki()->internal()->domain();
70  $this->gui = $gui;
71  $this->domain = $domain;
72 
73  $this->ctrl = $gui->ctrl();
74  $this->lng = $domain->lng();
75  $this->tabs = $gui->tabs();
76  $this->help = $gui->help();
77  $this->locator = $gui->locator();
78  $this->http = $gui->http();
79  $this->ot = $gui->wiki()->translation();
80 
81  $this->type = "wiki";
82 
83  $this->log = ilLoggerFactory::getLogger('wiki');
84 
85  $this->tool_context = $gui->globalScreen()->tool()->context();
86  $this->ui = $gui->ui();
87 
88  $this->edit_request = $gui->request();
89  $this->content_gui = $gui->content();
90 
91  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
92  $this->lng->loadLanguageModule("obj");
93  $this->lng->loadLanguageModule("wiki");
94 
95  $this->requested_page = $this->edit_request->getPage();
96  if ($this->requested_page !== "") {
97  $this->ctrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
98  }
99  $this->ctrl->saveParameterByClass(self::class, "transl");
100  $this->ctrl->saveParameterByClass(self::class, "wpg_id");
101  $this->req_with_comments = $this->edit_request->getWithComments();
102  $cs = $DIC->contentStyle();
103  $this->content_style_gui = $cs->gui();
104  if (is_object($this->object)) {
105  $this->content_style_domain = $cs->domain()->styleForRefId($this->object->getRefId());
106  $this->pm = $this->domain->page()->page($this->object->getRefId());
107  $this->imp_pages = $this->domain->importantPage($this->object->getRefId());
108  }
109  }
static getLogger(string $a_component_id)
Get component logger.
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:25
ILIAS Wiki InternalGUIService $gui
static makeUrlTitle(string $a_par)
__construct(Container $dic, ilPlugin $plugin)
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 824 of file class.ilObjWikiGUI.php.

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

824  : void
825  {
826  global $DIC;
827  $main_tpl = $DIC->ui()->mainTemplate();
828 
829  $wpg_id = 0;
830  $lang = "";
831  $ilAccess = $DIC->access();
832  $lng = $DIC->language();
833  $ctrl = $DIC->ctrl();
834  $transl = $DIC->wiki()->internal()->gui()->request()->getTranslation();
835  $DIC->ctrl()->setParameterByClass(self::class, "transl", $transl);
836 
837 
838  $i = strpos($a_target, "_");
839  $a_page = "";
840  if ($i > 0) {
841  $a_page = substr($a_target, $i + 1);
842  $a_target = substr($a_target, 0, $i);
843  }
844 
845  if ($a_target === "wpage") {
846  $a_page_arr = explode("_", $a_page);
847  $wpg_id = (int) $a_page_arr[0];
848  $ref_id = (int) ($a_page_arr[1] ?? 0);
849  $lang = ($a_page_arr[2] ?? "");
850  $w_id = ilWikiPage::lookupWikiId($wpg_id);
851  if ($ref_id > 0) {
852  $refs = array($ref_id);
853  } else {
854  $refs = ilObject::_getAllReferences($w_id);
855  }
856  foreach ($refs as $r) {
857  if ($ilAccess->checkAccess("read", "", $r)) {
858  $a_target = $r;
859  $a_page = ilWikiPage::lookupTitle($wpg_id);
860  }
861  }
862  }
863 
864  if ($ilAccess->checkAccess("read", "", $a_target)) {
865  if ($wpg_id > 0) {
867  "ilobjwikigui",
868  "wpg_id",
869  $wpg_id
870  );
871  } else {
873  "ilobjwikigui",
874  "page",
875  ilWikiUtil::makeUrlTitle($a_page)
876  );
877  }
878  if ($lang != "") {
880  "ilobjwikigui",
881  "transl",
882  $lang
883  );
884  }
886  "ilwikihandlergui",
887  "ref_id",
888  $a_target
889  );
890  if ($a_page != "") {
892  ["ilwikihandlergui", "ilobjwikigui"],
893  "viewPage"
894  );
895  } else {
897  ["ilwikihandlergui"],
898  "view"
899  );
900  }
901  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
902  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
903  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
904  $main_tpl->setOnScreenMessage('failure', sprintf(
905  $lng->txt("msg_no_perm_read_item"),
907  ), true);
909  }
910 
911  throw new ilPermissionException($lng->txt("permission_denied"));
912  }
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)
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)
global $DIC
Definition: shib_login.php:25
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 1446 of file class.ilObjWikiGUI.php.

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

1446  : void
1447  {
1448  $ilCtrl = $this->ctrl;
1449  $lng = $this->lng;
1450 
1451  $this->checkPermission("edit_wiki_navigation");
1452 
1453  $imp_page_id = $this->edit_request->getImportantPageId();
1454  if ($imp_page_id > 0) {
1455  $this->imp_pages->add($imp_page_id);
1456  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_imp_page_added"), true);
1457  }
1458  $ilCtrl->redirect($this, "editImportantPages");
1459  }
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 810 of file class.ilObjWikiGUI.php.

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

810  : void
811  {
812  $ilLocator = $this->locator;
813 
814  if (is_object($this->object)) {
815  $ilLocator->addItem(
816  $this->object->getTitle(),
817  self::getGotoLink($this->object->getRefId()),
818  "",
819  $this->requested_ref_id
820  );
821  }
822  }
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

Definition at line 499 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().

499  : void
500  {
501  $ilTabs = $this->tabs;
502  $ilCtrl = $this->ctrl;
503 
504  $ilTabs->activateTab("wiki_pages");
505 
506  $ilCtrl->setParameter(
507  $this,
508  "wpg_id",
510  $this->object->getId(),
511  ilWikiUtil::makeDbTitle($this->requested_page)
512  )
513  );
514  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
515  $ilTabs->addSubTabTarget(
516  "wiki_all_pages",
517  $this->ctrl->getLinkTarget($this, "allPages"),
518  "allPages"
519  );
520  $ilTabs->addSubTabTarget(
521  "wiki_recent_changes",
522  $this->ctrl->getLinkTarget($this, "recentChanges"),
523  "recentChanges"
524  );
525  $ilTabs->addSubTabTarget(
526  "wiki_new_pages",
527  $this->ctrl->getLinkTarget($this, "newPages"),
528  "newPages"
529  );
530  $ilTabs->addSubTabTarget(
531  "wiki_popular_pages",
532  $this->ctrl->getLinkTarget($this, "popularPages"),
533  "popularPages"
534  );
535  $ilTabs->addSubTabTarget(
536  "wiki_orphaned_pages",
537  $this->ctrl->getLinkTarget($this, "orphanedPages"),
538  "orphanedPages"
539  );
540  }
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 470 of file class.ilObjWikiGUI.php.

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

470  : void
471  {
472  $ilTabs = $this->tabs;
473  $ilCtrl = $this->ctrl;
474 
475  $ilCtrl->setParameter(
476  $this,
477  "wpg_id",
478  ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($this->requested_page))
479  );
480  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
481  $ilTabs->addTarget(
482  "wiki_what_links_here",
483  $this->ctrl->getLinkTargetByClass(
484  "ilwikipagegui",
485  "whatLinksHere"
486  ),
487  "whatLinksHere"
488  );
489  $ilTabs->addTarget(
490  "wiki_print_view",
491  $this->ctrl->getLinkTargetByClass(
492  "ilwikipagegui",
493  "printViewSelection"
494  ),
495  "printViewSelection"
496  );
497  }
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 366 of file class.ilObjWikiGUI.php.

References ilObjectGUI\$data, ILIAS\Repository\ctrl(), ilObject\getRefId(), ILIAS\Repository\lng(), and ilObject\update().

366  : void
367  {
368  $form = $this
369  ->initCreateForm($this->requested_new_type)
370  ->withRequest($this->request);
371  $data = $form->getData();
372  $new_object->setStartPage($data["start_page"]);
373  $new_object->update();
374 
375  // always send a message
376  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
377  $this->ctrl->setParameterByClass(
378  static::class,
379  "ref_id",
380  $new_object->getRefId()
381  );
382  $this->ctrl->redirectByClass([
383  ilWikiHandlerGUI::class,
384  ilObjWikiGUI::class,
385  SettingsGUI::class
386  ]);
387  }
+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

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

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

961  : void
962  {
963  $tpl = $this->tpl;
964 
965  $this->checkPermission("read");
966 
967  $this->addPagesSubTabs();
968 
969  $table_gui = new ilWikiPagesTableGUI(
970  $this,
971  "allPages",
972  $this->object->getId(),
974  );
975 
976  //$this->setSideBlock();
977  $tpl->setContent($table_gui->getHTML());
978  }
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 1665 of file class.ilObjWikiGUI.php.

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

1665  : void
1666  {
1667  $ilCtrl = $this->ctrl;
1668 
1669  // redirect to newly created page
1670  $ilCtrl->setParameterByClass(
1671  "ilwikipagegui",
1672  "page",
1673  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1674  );
1675  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1676  }
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 1678 of file class.ilObjWikiGUI.php.

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

1678  : bool
1679  {
1680  if ($perm === "create") {
1681  return parent::checkPermissionBool($perm, $cmd, $type, $ref_id);
1682  } else {
1683  if (!$ref_id) {
1684  $ref_id = $this->object->getRefId();
1685  }
1686  return ilWikiPerm::check($perm, $ref_id, $cmd);
1687  }
1688  }
static check(string $a_perm, int $a_ref_id, string $a_cmd="")
+ Here is the call graph for this function:

◆ confirmRemoveImportantPagesObject()

ilObjWikiGUI::confirmRemoveImportantPagesObject ( )

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

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

1461  : void
1462  {
1463  $ilCtrl = $this->ctrl;
1464  $tpl = $this->tpl;
1465  $lng = $this->lng;
1466 
1467  $imp_page_ids = $this->edit_request->getImportantPageIds();
1468  if (count($imp_page_ids) === 0) {
1469  $this->tpl->setOnScreenMessage('info', $lng->txt("no_checkbox"), true);
1470  $ilCtrl->redirect($this, "editImportantPages");
1471  } else {
1472  $cgui = new ilConfirmationGUI();
1473  $cgui->setFormAction($ilCtrl->getFormAction($this));
1474  $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1475  $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1476  $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1477 
1478  foreach ($imp_page_ids as $i) {
1479  $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1480  }
1481 
1482  $tpl->setContent($cgui->getHTML());
1483  }
1484  }
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 1160 of file class.ilObjWikiGUI.php.

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

1160  : void
1161  {
1162  $form = $this->getNewTranslatedPageForm();
1163  if ($form->isValid()) {
1164  $page_template_id = 0;
1165  if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1166  $page_template_id = (int) $form->getData("page_templ");
1167  }
1168  if ($form->getData("type") === "new") {
1169  $wpg_id = $this->pm->createWikiPage(
1170  $form->getData("master_title")
1171  );
1172  } else {
1173  $wpg_id = $form->getData("master_id");
1174  }
1175  $wpg_id = $this->pm->createWikiPage(
1176  $this->edit_request->getPage(),
1177  $wpg_id,
1178  $this->edit_request->getTranslation(),
1179  $page_template_id
1180  );
1181  }
1182  $this->ctrl->setParameterByClass(ilWikiPageGUI::class, "wpg_id", $wpg_id);
1183  $this->ctrl->redirectByClass(ilWikiPageGUI::class, "preview");
1184  }
+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

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

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

1637  : void
1638  {
1639  $tpl = $this->tpl;
1640  $lng = $this->lng;
1641  $ilCtrl = $this->ctrl;
1642 
1643  $form = $this->initTemplateSelectionForm();
1644  if ($form->checkInput()) {
1645  $a_page = $this->edit_request->getPage();
1646  $this->pm->createWikiPage(
1647  $a_page,
1648  0,
1649  $this->edit_request->getTranslation(),
1650  $this->edit_request->getPageTemplateId()
1651  );
1652 
1653  // redirect to newly created page
1654  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1655  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1656 
1657  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
1658  $ilCtrl->redirect($this, "");
1659  } else {
1660  $form->setValuesByPost();
1661  $tpl->setContent($form->getHTML());
1662  }
1663  }
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 1747 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1747  : void
1748  {
1749  $this->log->debug("download");
1750  $this->checkPermission("wiki_html_export");
1751  $this->object->deliverUserHTMLExport();
1752  }
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 1754 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1754  : void
1755  {
1756  $this->log->debug("download");
1757  $this->checkPermission("wiki_html_export");
1758  $this->object->deliverUserHTMLExport(true);
1759  }
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 1406 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().

1406  : void
1407  {
1408  $tpl = $this->tpl;
1409  $ilToolbar = $this->toolbar;
1410  $ilTabs = $this->tabs;
1411  $lng = $this->lng;
1412  $ilCtrl = $this->ctrl;
1413 
1414  $this->checkPermission("edit_wiki_navigation");
1415 
1416  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_navigation_info"));
1417 
1418  $ipages_ids = $this->imp_pages->getImportantPageIds();
1419 
1420  // list pages
1421  $pages = $this->pm->getAllPagesInfo();
1422  $options = array("" => $lng->txt("please_select"));
1423  foreach ($pages as $p) {
1424  if (!in_array($p->getId(), $ipages_ids)) {
1425  $options[$p->getId()] = ilStr::shortenTextExtended($p->getTitle(), 60, true);
1426  }
1427  }
1428  if (count($options) > 0) {
1429  $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1430  $si->setOptions($options);
1431  $si->setInfo($lng->txt(""));
1432  $ilToolbar->addInputItem($si);
1433  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1434  $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1435  }
1436 
1437 
1438  $ilTabs->activateTab("settings");
1439  $this->setSettingsSubTabs("imp_pages");
1440 
1441  $imp_table = new ilImportantPagesTableGUI($this, "editImportantPages");
1442 
1443  $tpl->setContent($imp_table->getHTML());
1444  }
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 747 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\ctrl().

747  : void
748  {
749  $this->ctrl->redirectByClass(SettingsGUI::class);
750  }
+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

Definition at line 111 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(), getTabs(), infoScreen(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), ILIAS\Repository\rbac(), ilGlobalTemplateInterface\setContent(), setContentStyleSheet(), ilLTIProviderObjectSettingGUI\setCustomRolesForSelection(), setSettingsSubTabs(), setSideBlock(), and triggerAssignmentTool().

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

1786  : array
1787  {
1788  $ilCtrl = $this->ctrl;
1789  $ui = $this->ui;
1790  $lng = $this->lng;
1791 
1792  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1793  $this->object->getRefId(),
1794  $this->user->getId()
1795  );
1796  $buttons = [];
1797  foreach ($ass_info as $i) { // should be only one
1798  $ass = new ilExAssignment($i->getId());
1799  $times_up = $ass->afterDeadlineStrict();
1800 
1801  // submit button
1802  if (!$times_up) {
1803  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1804  $submit_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "finalizeAssignment");
1805  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1806 
1807  $buttons[$i->getId()][] = $ui->factory()->button()->primary($lng->txt("wiki_finalize_wiki"), $submit_link);
1808  }
1809 
1810  // submitted files
1811  $submission = new ilExSubmission($ass, $this->user->getId());
1812  if ($submission->hasSubmitted()) {
1813  $submitted = $submission->getSelectedObject();
1814  if ($submitted?->getTimestamp() != "") {
1815  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
1816  }
1817  $dl_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "downloadExcSubFile");
1818  $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
1819  $buttons[$i->getId()][] = $ui->factory()->button()->standard($lng->txt("wiki_download_submission"), $dl_link);
1820  }
1821  }
1822  return $buttons;
1823  }
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
Exercise submission //TODO: This class has many static methods related to delivered "files"...
+ 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 914 of file class.ilObjWikiGUI.php.

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

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

918  : string {
919  if ($a_page === "") {
921  }
922 
923  $append = (!in_array($lang, ["", "-"]))
924  ? "&transl=" . $lang
925  : "";
926  $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
927  ilWikiUtil::makeUrlTitle($a_page) . $append;
928  return $goto;
929  }
static _lookupObjId(int $ref_id)
static _lookupStartPage(int $a_wiki_id)
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 1125 of file class.ilObjWikiGUI.php.

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

Referenced by createNewTranslatedPageObject(), and isNewTranslatedPage().

1125  : \ILIAS\Repository\Form\FormAdapterGUI
1126  {
1127  $pm = $this->domain->page()->page($this->object->getRefId());
1128  $options = [];
1129  foreach ($pm->getMasterPagesWithoutTranslation($this->edit_request->getTranslation()) as $page) {
1130  $options[$page->getId()] = $page->getTitle();
1131  }
1132  $append = " '" . $this->edit_request->getPage() . "'";
1133  $append .= " (" . $this->lng->txt("meta_l_" . $this->edit_request->getTranslation()) . ")";
1134  $append2 = " (" . $this->lng->txt("meta_l_" . $this->ot->getMasterLanguage()) . ")";
1135  $form = $this->gui->form([self::class], "createNewTranslatedPage")
1136  ->section("sec", $this->lng->txt("wiki_translation_page") . $append)
1137  ->switch("type", $this->lng->txt("wiki_page_in_master_language") . $append2, "", "existing")
1138  ->group("existing", $this->lng->txt("wiki_master_existing"))
1139  ->select("master_id", $this->lng->txt("wiki_master_title"), $options)
1140  ->required()
1141  ->group("new", $this->lng->txt("wiki_no_master"))
1142  ->text("master_title", $this->lng->txt("wiki_master_title"))
1143  ->end();
1144 
1145  if ($this->object->getTemplateSelectionOnCreation($this->edit_request->getTranslation())) {
1146  $form = $form->radio("page_templ", $this->lng->txt("wiki_page_template"), "", "0")->required();
1147  if ($this->object->getEmptyPageTemplate()) {
1148  $form = $form->radioOption("0", $this->lng->txt("wiki_empty_page"));
1149  }
1150  $wt = new ilWikiPageTemplate($this->object->getId());
1151  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1152  foreach ($ts as $t) {
1153  $form = $form->radioOption($t["wpage_id"], $t["title"]);
1154  }
1155  }
1156 
1157  return $form;
1158  }
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 1314 of file class.ilObjWikiGUI.php.

Referenced by getPrintView().

1314  : array
1315  {
1316  $page_ids = [];
1317  $ordering = $this->edit_request->getPrintOrdering();
1318 
1319  // multiple ordered page ids
1320  if (count($ordering) > 0) {
1321  asort($ordering);
1322  $page_ids = array_keys($ordering);
1323  }
1324  // single page
1325  elseif ($this->edit_request->getWikiPageId()) {
1326  $page_ids = array($this->edit_request->getWikiPageId());
1327  }
1328  return $page_ids;
1329  }
+ Here is the caller graph for this function:

◆ getPrintView()

ilObjWikiGUI::getPrintView ( bool  $export = false)

Definition at line 1331 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().

1332  {
1333  $page_ids = $export
1334  ? null
1335  : $this->getPrintPageIds();
1336  $provider = new \ILIAS\Wiki\WikiPrintViewProviderGUI(
1337  $this->lng,
1338  $this->ctrl,
1339  $this->object->getRefId(),
1340  $page_ids
1341  );
1342 
1343  return new \ILIAS\Export\PrintProcessGUI(
1344  $provider,
1345  $this->http,
1346  $this->ui,
1347  $this->lng
1348  );
1349  }
$provider
Definition: ltitoken.php:80
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 1117 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\lng().

Referenced by isNewTranslatedPage().

1118  {
1119  $mess = $this->gui->ui()->factory()->messageBox()->info(
1120  $this->lng->txt("wiki_translate_page_master_info")
1121  );
1122  return $this->gui->ui()->renderer()->render($mess);
1123  }
+ 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 1571 of file class.ilObjWikiGUI.php.

References ilWikiPage\lookupTitle().

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

◆ getTabs()

ilObjWikiGUI::getTabs ( )
protected

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

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

Referenced by executeCommand().

542  : void
543  {
544  $ilCtrl = $this->ctrl;
545  $ilAccess = $this->access;
546  $lng = $this->lng;
547  $ilHelp = $this->help;
548 
549  $ilHelp->setScreenIdComponent("wiki");
550 
551 
552  // wiki tabs
553  if (in_array(strtolower($ilCtrl->getNextClass($this)), [strtolower(SettingsGUI::class)]) ||
554  in_array(
555  strtolower($ilCtrl->getCmdClass()),
556  array("", "ilobjectcontentstylesettingsgui", "ilobjwikigui",
557  "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui", "ilobjnotificationsettingsgui", "iltaxmdgui",
558  "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui',
559  'ilobjecttranslationgui')
560  ) || $ilCtrl->getNextClass() === "ilpermissiongui") {
561  if ($this->requested_page !== "") {
562  $page_id = ($this->edit_request->getWikiPageId() > 0)
563  ? $this->edit_request->getWikiPageId()
564  : $this->pm->getPageIdForTitle(
565  $this->requested_page,
566  $this->edit_request->getTranslation()
567  );
568  if (is_null($page_id) && $this->edit_request->getFromPage() !== "") {
569  $page_id = $this->pm->getPageIdForTitle(
570  $this->edit_request->getFromPage(),
571  $this->edit_request->getTranslation()
572  );
573  }
574  if (!is_null($page_id)) {
575  $this->tabs_gui->setBackTarget(
576  $lng->txt("wiki_last_visited_page"),
577  $this->pm->getPermaLink(
578  $page_id,
579  $this->edit_request->getTranslation()
580  )
581  );
582  }
583  }
584 
585  // pages
586  if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
587  $this->tabs_gui->addTab(
588  "wiki_pages",
589  $lng->txt("wiki_pages"),
590  $this->ctrl->getLinkTarget($this, "allPages")
591  );
592  }
593 
594  // info screen
595  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
596  $this->tabs_gui->addTab(
597  "info_short",
598  $lng->txt("info_short"),
599  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
600  );
601  }
602 
603  // settings
604  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
605  $this->tabs_gui->addTab(
606  "settings",
607  $lng->txt("settings"),
608  $this->ctrl->getLinkTargetByClass(SettingsGUI::class)
609  );
610 
611  // metadata
612  $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
613  $mdtab = $mdgui->getTab();
614  if ($mdtab) {
615  $this->tabs_gui->addTab(
616  "advmd",
617  $this->lng->txt("meta_data"),
618  $mdtab
619  );
620  }
621  }
622 
623  // contributors
624  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
625  $this->tabs_gui->addTab(
626  "wiki_contributors",
627  $lng->txt("wiki_contributors"),
628  $this->ctrl->getLinkTarget($this, "listContributors")
629  );
630  }
631 
632  // statistics
633  if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId())) {
634  $this->tabs_gui->addTab(
635  "statistics",
636  $lng->txt("statistics"),
637  $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial")
638  );
639  }
640 
641  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
642  $this->tabs_gui->addTab(
643  "export",
644  $lng->txt("export"),
645  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
646  );
647  }
648 
649  // edit permissions
650  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
651  $this->tabs_gui->addTab(
652  "perm_settings",
653  $lng->txt("perm_settings"),
654  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
655  );
656  }
657  }
658  }
Class ilObjectMetaDataGUI.
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:
+ Here is the caller graph for this function:

◆ getUserHTMLExportProgressObject()

ilObjWikiGUI::getUserHTMLExportProgressObject ( )

Get user html export progress.

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

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

1730  : void
1731  {
1732  $this->log->debug("get progress: " . $this->req_with_comments);
1733  $this->checkPermission("wiki_html_export");
1734  $p = $this->object->getUserHTMLExportProgress($this->req_with_comments);
1735 
1737  $pb->setCurrent($p["progress"]);
1738 
1739  $r = new stdClass();
1740  $r->progressBar = $pb->render();
1741  $r->status = $p["status"];
1742  $this->log->debug("status: " . $r->status);
1743  echo(json_encode($r, JSON_THROW_ON_ERROR));
1744  exit;
1745  }
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 1027 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().

1029  : void {
1030  $ilCtrl = $this->ctrl;
1031 
1032  if ($a_page === "") {
1033  $a_page = $this->requested_page;
1034  }
1035 
1036  if ($this->pm->existsByTitle(
1037  ilWikiUtil::makeDbTitle($a_page),
1038  $this->edit_request->getTranslation()
1039  )) {
1040  // to do: get rid of this redirect
1041  ilUtil::redirect(self::getGotoLink($this->object->getRefId(), $a_page, $this->edit_request->getTranslation()));
1042  } else {
1043  if (!$this->access->checkAccess("add_pages", "", $this->object->getRefId())) {
1044  $this->tpl->setOnScreenMessage("failure", $this->lng->txt("no_permission"), true);
1045  $from_page_id = $this->pm->getPageIdForTitle($this->edit_request->getFromPage(), $this->edit_request->getTranslation());
1046  ilUtil::redirect($this->pm->getPermaLink($from_page_id, $this->edit_request->getTranslation()));
1047  }
1048  if ($this->isNewTranslatedPage()) {
1049  return;
1050  }
1051  if (!$this->object->getTemplateSelectionOnCreation()) {
1052  // check length
1053  if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1054  $this->tpl->setOnScreenMessage(
1055  'failure',
1056  $this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")",
1057  true
1058  );
1059  $ilCtrl->setParameterByClass(
1060  "ilwikipagegui",
1061  "page",
1062  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1063  );
1064  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1065  }
1066 
1067  $this->pm->createWikiPage(
1068  $a_page,
1069  0,
1070  $this->edit_request->getTranslation()
1071  );
1072 
1073  // redirect to newly created page
1074  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1075  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1076  } else {
1077  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($this->requested_page));
1078  $ilCtrl->setParameter(
1079  $this,
1080  "from_page",
1081  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1082  );
1083  $ilCtrl->redirect($this, "showTemplateSelection");
1084  }
1085  }
1086  }
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 465 of file class.ilObjWikiGUI.php.

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

Referenced by viewObject().

465  : void
466  {
467  ilUtil::redirect(self::getGotoLink($this->object->getRefId()));
468  }
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 400 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().

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

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

394  : void
395  {
396  $this->checkPermission("visible");
397  $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
398  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ initCreateForm()

ilObjWikiGUI::initCreateForm ( string  $new_type)
protected

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

References Vendor\Package\$f, ILIAS\UI\Implementation\Component\Input\$inputs, ilObjectGUI\$lng, ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilLanguage\txt().

351  : StandardForm
352  {
353  $f = $this->gui->ui()->factory();
354  $lng = $this->lng;
355  $form = parent::initCreateForm($new_type);
356  $inputs = $form->getInputs();
357  $inputs["start_page"] = $f->input()->field()->text(
358  $lng->txt("wiki_start_page")
359  )->withRequired(true);
360  return $this->ui_factory->input()->container()->form()->standard(
361  $this->ctrl->getFormAction($this, 'save'),
362  $inputs
363  )->withSubmitLabel($this->lng->txt($new_type . '_add'));
364  }
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
+ Here is the call graph for this function:

◆ initTemplateSelectionForm()

ilObjWikiGUI::initTemplateSelectionForm ( )

Definition at line 1597 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().

1598  {
1599  $lng = $this->lng;
1600  $ilCtrl = $this->ctrl;
1601 
1602  $form = new ilPropertyFormGUI();
1603 
1604  // page name
1605  $hi = new ilHiddenInputGUI("page");
1606  $hi->setValue($this->requested_page);
1607  $form->addItem($hi);
1608 
1609  // page template
1610  $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
1611  $radg->setRequired(true);
1612 
1613  if ($this->object->getEmptyPageTemplate()) {
1614  $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
1615  $radg->addOption($op1);
1616  }
1617 
1618  $wt = new ilWikiPageTemplate($this->object->getId());
1619  $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES, $this->edit_request->getTranslation());
1620  foreach ($ts as $t) {
1621  $op = new ilRadioOption($t["title"], $t["wpage_id"]);
1622  $radg->addOption($op);
1623  }
1624 
1625  $form->addItem($radg);
1626 
1627  // save and cancel commands
1628  $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
1629  $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
1630 
1631  $form->setTitle($lng->txt("wiki_new_page") . ": " . $this->requested_page);
1632  $form->setFormAction($ilCtrl->getFormAction($this));
1633 
1634  return $form;
1635  }
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 1710 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1710  : void
1711  {
1712  $this->log->debug("init: " . $this->req_with_comments);
1713  $this->checkPermission("wiki_html_export");
1714  $this->object->initUserHTMLExport($this->req_with_comments);
1715  }
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 1088 of file class.ilObjWikiGUI.php.

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

Referenced by gotoPageObject().

1088  : bool
1089  {
1090  if (in_array($this->edit_request->getTranslation(), ["-", ""])) {
1091  return false;
1092  }
1093  $page = $this->requested_page;
1095  $this->object->getId(),
1096  ilWikiUtil::makeDbTitle($page),
1097  $this->edit_request->getTranslation()
1098  )) {
1099  $this->tabs_gui->clearTargets();
1100  $this->tabs_gui->setBackTarget(
1101  $this->lng->txt("back"),
1102  $this->pm->getPermaLink(
1103  $this->pm->getPageIdForTitle(
1104  $this->edit_request->getFromPage(),
1105  $this->edit_request->getTranslation()
1106  ),
1107  $this->edit_request->getTranslation()
1108  )
1109  );
1110  $form = $this->getNewTranslatedPageForm();
1111  $this->tpl->setContent($this->getRenderedTranslationInfo() . $form->render());
1112  return true;
1113  }
1114  return false;
1115  }
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 752 of file class.ilObjWikiGUI.php.

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

752  : void
753  {
754  $tpl = $this->tpl;
755  $ilTabs = $this->tabs;
756 
757  $this->checkPermission("write");
758  $ilTabs->activateTab("wiki_contributors");
759 
760  $table_gui = new ilWikiContributorsTableGUI(
761  $this,
762  "listContributors",
763  $this->object->getId()
764  );
765 
766  $tpl->setContent($table_gui->getHTML());
767 
768  $this->setSideBlock();
769  }
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 1557 of file class.ilObjWikiGUI.php.

1560  : string {
1561  $page = new ilWikiPage($a_page_id);
1562  if ($page->getWikiId() === $a_wiki_id) {
1563  return $page->getTitle();
1564  }
1565  return "";
1566  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

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

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

1295  : void
1296  {
1297  $tpl = $this->tpl;
1298 
1299  $this->checkPermission("read");
1300 
1301  $this->addPagesSubTabs();
1302 
1303  $table_gui = new ilWikiPagesTableGUI(
1304  $this,
1305  "newPages",
1306  $this->object->getId(),
1308  );
1309 
1310  //$this->setSideBlock();
1311  $tpl->setContent($table_gui->getHTML());
1312  }
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 1005 of file class.ilObjWikiGUI.php.

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

1005  : void
1006  {
1007  $tpl = $this->tpl;
1008 
1009  $this->checkPermission("read");
1010 
1011  $this->addPagesSubTabs();
1012 
1013  $table_gui = new ilWikiPagesTableGUI(
1014  $this,
1015  "orphanedPages",
1016  $this->object->getId(),
1018  );
1019 
1020  //$this->setSideBlock();
1021  $tpl->setContent($table_gui->getHTML());
1022  }
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 1357 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().

1357  : void
1358  {
1359  $tpl = $this->tpl;
1360  $ilTabs = $this->tabs;
1361  $ilCtrl = $this->ctrl;
1362  $lng = $this->lng;
1363 
1364  $this->checkPermission("read");
1365 
1366  $ilTabs->setTabActive("wiki_search_results");
1367 
1368  if ($this->edit_request->getSearchTerm() === "") {
1369  $this->tpl->setOnScreenMessage('failure', $lng->txt("wiki_please_enter_search_term"), true);
1370  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1371  }
1372 
1373  $search_results = ilObjWiki::_performSearch(
1374  $this->object->getId(),
1375  $this->edit_request->getSearchTerm()
1376  );
1377  $table_gui = new ilWikiSearchResultsTableGUI(
1378  $this,
1379  "performSearch",
1380  $this->object->getId(),
1381  $search_results,
1382  $this->edit_request->getSearchTerm()
1383  );
1384 
1385  $this->setSideBlock();
1386  $tpl->setContent($table_gui->getHTML());
1387  }
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 983 of file class.ilObjWikiGUI.php.

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

983  : void
984  {
985  $tpl = $this->tpl;
986 
987  $this->checkPermission("read");
988 
989  $this->addPagesSubTabs();
990 
991  $table_gui = new ilWikiPagesTableGUI(
992  $this,
993  "popularPages",
994  $this->object->getId(),
996  );
997 
998  //$this->setSideBlock();
999  $tpl->setContent($table_gui->getHTML());
1000  }
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 1351 of file class.ilObjWikiGUI.php.

References getPrintView().

1351  : void
1352  {
1353  $print_view = $this->getPrintView();
1354  $print_view->sendPrintView();
1355  }
getPrintView(bool $export=false)
+ Here is the call graph for this function:

◆ randomPageObject()

ilObjWikiGUI::randomPageObject ( )

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

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

1186  : void
1187  {
1188  $this->checkPermission("read");
1189 
1190  $page = ilWikiPage::getRandomPage($this->object->getId());
1191  $this->gotoPageObject($page);
1192  }
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 1194 of file class.ilObjWikiGUI.php.

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

1194  : void
1195  {
1196  $tpl = $this->tpl;
1197 
1198  $this->checkPermission("read");
1199 
1200  $this->addPagesSubTabs();
1201 
1202  $table_gui = new ilWikiRecentChangesTableGUI(
1203  $this,
1204  "recentChanges",
1205  $this->object->getId()
1206  );
1207 
1208  //$this->setSideBlock();
1209  $tpl->setContent($table_gui->getHTML());
1210  }
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 1486 of file class.ilObjWikiGUI.php.

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

1486  : void
1487  {
1488  $ilCtrl = $this->ctrl;
1489  $lng = $this->lng;
1490 
1491  $this->checkPermission("edit_wiki_navigation");
1492 
1493  $imp_page_ids = $this->edit_request->getImportantPageIds();
1494  foreach ($imp_page_ids as $i) {
1495  $this->imp_pages->removeImportantPage($i);
1496  }
1497  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_removed_imp_pages"), true);
1498  $ilCtrl->redirect($this, "editImportantPages");
1499  }
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 1217 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().

1221  : void {
1222  global $DIC;
1223 
1224  $tpl = $DIC["tpl"];
1225  $lng = $DIC->language();
1226  $ilAccess = $DIC->access();
1227  $ilCtrl = $DIC->ctrl();
1228 
1229  $debug = false;
1230  if ($debug) {
1231  $tpl->addJavaScript("../components/ILIAS/Wiki/resources/WikiPres.js");
1232  } else {
1233  $tpl->addJavaScript("assets/js/WikiPres.js");
1234  }
1235 
1236  // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1237  // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1238  $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1239 
1240  if ($a_wpg_id > 0 && !$a_wp) {
1241  $a_wp = new ilWikiPage($a_wpg_id);
1242  }
1243 
1244  // search block
1245  $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1246 
1247 
1248  // quick navigation
1249  if ($a_wpg_id > 0) {
1250  // rating
1251  $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1252  if (ilObjWiki::_lookupRating($wiki_id) &&
1253  // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1254  $a_wp->getRating()) {
1255  $rgui = new ilRatingGUI();
1256  $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1257  $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1258  $rgui->setYourRatingText("#");
1259  $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1260  }
1261 
1262  // advanced metadata
1263  if (!ilWikiPage::lookupAdvancedMetadataHidden($a_wpg_id)) {
1264  $cmd = null;
1265  if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1266  $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1267  $cmd = array(
1268  "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1269  "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1270  );
1271  }
1272  $wiki = new ilObjWiki($a_wiki_ref_id);
1273  $callback = $wiki->getLinkMetadataValues()
1274  ? array($wiki, "decorateAdvMDValue")
1275  : null;
1276  $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1277  $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1278  }
1279  }
1280 
1281  // important pages
1282  $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1283  $rcontent .= $imp_pages_block->getHTML();
1284 
1285  // wiki functions block
1286  if ($a_wpg_id > 0) {
1287  $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1288  $wiki_functions_block->setPageObject($a_wp);
1289  $rcontent .= $wiki_functions_block->getHTML();
1290  }
1291 
1292  $tpl->setRightContent($rcontent);
1293  }
Class ilObjectMetaDataGUI.
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...
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)
global $DIC
Definition: shib_login.php:25
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 771 of file class.ilObjWikiGUI.php.

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

771  : void
772  {
773  $ilCtrl = $this->ctrl;
774  $lng = $this->lng;
775 
776  $this->checkPermission("write");
777 
778  $users = $this->edit_request->getUserIds();
779  $marks = $this->edit_request->getMarks();
780  $comments = $this->edit_request->getComments();
781  $status = $this->edit_request->getStatus();
782 
783  $saved = false;
784  foreach ($users as $user_id) {
785  if ($user_id != "") {
786  $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
787  $new_mark = ilUtil::stripSlashes($marks[$user_id]);
788  $new_comment = ilUtil::stripSlashes($comments[$user_id] ?? "");
789  $new_status = ilUtil::stripSlashes($status[$user_id]);
790 
791  if ($marks_obj->getMark() !== $new_mark ||
792  $marks_obj->getComment() !== $new_comment ||
793  (int) ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) !== (int) $new_status) {
794  ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
795  $marks_obj->setMark($new_mark);
796  $marks_obj->setComment($new_comment);
797  $marks_obj->update();
798  $saved = true;
799  }
800  }
801  }
802  if ($saved) {
803  $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
804  }
805 
806  $ilCtrl->redirect($this, "listContributors");
807  }
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:

◆ saveOrderingAndIndentObject()

ilObjWikiGUI::saveOrderingAndIndentObject ( )

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

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

1501  : void
1502  {
1503  $ilCtrl = $this->ctrl;
1504  $lng = $this->lng;
1505 
1506  $this->checkPermission("edit_wiki_navigation");
1507 
1508  $ordering = $this->edit_request->getImportantPageOrdering();
1509  $indentation = $this->edit_request->getImportantPageIndentation();
1510  $this->imp_pages->saveOrderingAndIndentation($ordering, $indentation);
1511  $this->tpl->setOnScreenMessage('success', $lng->txt("wiki_ordering_and_indent_saved"), true);
1512  $ilCtrl->redirect($this, "editImportantPages");
1513  }
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:

◆ setAsStartPageObject()

ilObjWikiGUI::setAsStartPageObject ( )

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

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

1515  : void
1516  {
1517  $ilCtrl = $this->ctrl;
1518  $lng = $this->lng;
1519 
1520  $this->checkPermission("edit_wiki_navigation");
1521 
1522  $imp_page_ids = $this->edit_request->getImportantPageIds();
1523  if (count($imp_page_ids) !== 1) {
1524  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_select_one_item"), true);
1525  } else {
1526  $this->imp_pages->removeImportantPage($imp_page_ids[0]);
1527  $this->object->setStartPage(ilWikiPage::lookupTitle($imp_page_ids[0]));
1528  $this->object->update();
1529  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
1530  }
1531  $ilCtrl->redirect($this, "editImportantPages");
1532  }
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 1389 of file class.ilObjWikiGUI.php.

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

Referenced by executeCommand(), and viewPageObject().

1389  : void
1390  {
1391  $tpl = $this->tpl;
1392 
1393  if ($tpl == null) {
1394  $tpl = $this->tpl;
1395  }
1396 
1397  $this->content_style_gui->addCss($tpl, $this->object->getRefId());
1399  }
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 660 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(), and executeCommand().

660  : void
661  {
662  $ilTabs = $this->tabs;
663  $ilCtrl = $this->ctrl;
664  $lng = $this->lng;
665  $ilAccess = $this->access;
666  if (in_array(
667  $a_active,
668  array("general_settings", "style", "imp_pages", "rating_categories", "obj_multilinguality",
669  "page_templates", "advmd", "permission_settings", "notifications", "lti_provider")
670  )) {
671  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
672  // general properties
673  $ilTabs->addSubTab(
674  "general_settings",
675  $lng->txt("wiki_general_settings"),
676  $ilCtrl->getLinkTarget($this, 'editSettings')
677  );
678 
679  // permission settings
680  $ilTabs->addSubTab(
681  "permission_settings",
682  $lng->txt("obj_permission_settings"),
683  $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
684  );
685 
686  // style properties
687  $ilTabs->addSubTab(
688  "style",
689  $lng->txt("wiki_style"),
690  $ilCtrl->getLinkTargetByClass("ilObjectContentStyleSettingsGUI", "")
691  );
692  }
693 
694  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
695  // important pages
696  $ilTabs->addSubTab(
697  "imp_pages",
698  $lng->txt("wiki_navigation"),
699  $ilCtrl->getLinkTarget($this, 'editImportantPages')
700  );
701  }
702 
703  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
704  // page templates
705  $ilTabs->addSubTab(
706  "page_templates",
707  $lng->txt("wiki_page_templates"),
708  $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
709  );
710 
711  // rating categories
712  if ($this->object->getRatingPages() && $this->object->getRatingCategories()) {
713  $lng->loadLanguageModule("rating");
714  $ilTabs->addSubTab(
715  "rating_categories",
716  $lng->txt("rating_categories"),
717  $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
718  );
719  }
720 
721  $ilTabs->addSubTab(
722  'notifications',
723  $lng->txt("notifications"),
724  $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
725  );
726 
727  $ilTabs->addSubTab(
728  'obj_multilinguality',
729  $lng->txt("obj_multilinguality"),
730  $this->ctrl->getLinkTargetByClass("ilobjecttranslationgui", "")
731  );
732  }
733 
734  // LTI Provider
735  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
736  if ($lti_settings->hasSettingsAccess()) {
737  $ilTabs->addSubTabTarget(
738  'lti_provider',
739  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
740  );
741  }
742 
743  $ilTabs->activateSubTab($a_active);
744  }
745  }
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
GUI class for LTI provider object settings.
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 1212 of file class.ilObjWikiGUI.php.

References ILIAS\Repository\object().

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

1212  : void
1213  {
1214  self::renderSideBlock($a_wpg_id, $this->object->getRefId());
1215  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showTemplateSelectionObject()

ilObjWikiGUI::showTemplateSelectionObject ( )

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

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

1578  : void
1579  {
1580  $lng = $this->lng;
1581  $tpl = $this->tpl;
1582  $ilTabs = $this->tabs;
1583  $ilCtrl = $this->ctrl;
1584 
1585  $ilCtrl->setParameterByClass(
1586  "ilobjwikigui",
1587  "from_page",
1588  ilWikiUtil::makeUrlTitle($this->edit_request->getFromPage())
1589  );
1590  $ilTabs->clearTargets();
1591  $this->tpl->setOnScreenMessage('info', $lng->txt("wiki_page_not_exist_select_templ"));
1592 
1593  $form = $this->initTemplateSelectionForm();
1594  $tpl->setContent($form->getHTML());
1595  }
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 1720 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

1720  : void
1721  {
1722  $this->log->debug("start: " . $this->req_with_comments);
1723  $this->checkPermission("wiki_html_export");
1724  $this->object->startUserHTMLExport($this->req_with_comments);
1725  }
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 1761 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().

1761  : void
1762  {
1763  if (!is_object($this->object)) {
1764  return;
1765  }
1766  $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
1767  $this->object->getRefId(),
1768  $this->user->getId()
1769  );
1770  if (count($ass_info) > 0) {
1771  $ass_ids = array_map(static function ($i): int {
1772  return $i->getId();
1773  }, $ass_info);
1774  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
1775  $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
1776  $this->tool_context->current()->addAdditionalData(
1778  $this->getAssignmentButtons()
1779  );
1780  }
1781  }
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 345 of file class.ilObjWikiGUI.php.

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

345  : void
346  {
347  $this->checkPermission("read");
348  $this->gotoStartPageObject();
349  }
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 931 of file class.ilObjWikiGUI.php.

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

931  : void
932  {
933  $lng = $this->lng;
934  $ilCtrl = $this->ctrl;
935  $tpl = $this->tpl;
936  $ilTabs = $this->tabs;
937  $ilAccess = $this->access;
938 
939  $this->checkPermission("read");
940 
941  $ilTabs->clearTargets();
943 
944  $wpage_gui = $this->gui->content()->getCurrentPageGUI();
945 
946  // page exists, show it !
947  $ilCtrl->setParameter(
948  $this,
949  "page",
950  ilWikiUtil::makeUrlTitle($wpage_gui->getPageObject()->getTitle())
951  );
952 
953  $wpage_gui->setStyleId($this->content_style_domain->getEffectiveStyleId());
954 
955  $this->setContentStyleSheet();
956 
957  //$wpage_gui->setSideBlock();
958  $ilCtrl->redirectByClass(ilWikiPageGUI::class, "preview");
959  }
setHeaderActionMenu(string $a_header)
Set header action menu.
ilLanguage $lng
ilGlobalTemplateInterface $tpl
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 43 of file class.ilObjWikiGUI.php.

◆ $content_style_domain

ILIAS Style Content Object ObjectFacade ilObjWikiGUI::$content_style_domain
protected

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

◆ $content_style_gui

ILIAS Style Content GUIService ilObjWikiGUI::$content_style_gui
protected

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

◆ $domain

ILIAS Wiki InternalDomainService ilObjWikiGUI::$domain
protected

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

Referenced by __construct().

◆ $edit_request

WikiGUIRequest ilObjWikiGUI::$edit_request
protected

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

◆ $form_gui

ilPropertyFormGUI ilObjWikiGUI::$form_gui
protected

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

◆ $gui

ILIAS Wiki InternalGUIService ilObjWikiGUI::$gui
protected

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

Referenced by __construct().

◆ $help

ilHelpGUI ilObjWikiGUI::$help
protected

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

Referenced by getTabs().

◆ $http

ILIAS HTTP Services ilObjWikiGUI::$http
protected

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

◆ $imp_pages

ILIAS Wiki Navigation ImportantPageManager ilObjWikiGUI::$imp_pages
protected

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

◆ $log

ilLogger ilObjWikiGUI::$log
protected

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

◆ $ot

ilObjectTranslation ilObjWikiGUI::$ot
protected

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

◆ $pm

ILIAS Wiki Page PageManager ilObjWikiGUI::$pm
protected

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

◆ $req_with_comments

bool ilObjWikiGUI::$req_with_comments = false
protected

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

◆ $requested_page

string ilObjWikiGUI::$requested_page
protected

◆ $tabs

◆ $tool_context

ContextServices ilObjWikiGUI::$tool_context
protected

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

◆ $ui

ILIAS DI UIServices ilObjWikiGUI::$ui
protected

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

Referenced by getAssignmentButtons().


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