ILIAS  release_7 Revision v7.30-3-g800a261c036
ilObjWikiGUI Class Reference

Class ilObjWikiGUI. More...

+ Inheritance diagram for ilObjWikiGUI:
+ Collaboration diagram for ilObjWikiGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 isOnlineHelpWiki ()
 Is wiki an online help wiki? More...
 
 viewObject ()
 Start page. More...
 
 saveObject ()
 save object @access public More...
 
 afterSave (ilObject $newObj)
 save object @access public More...
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 infoScreen ()
 show information screen More...
 
 gotoStartPageObject ()
 Go to start page. More...
 
 addPageTabs ()
 Add Page Tabs. More...
 
 addPagesSubTabs ()
 Add Pages SubTabs. More...
 
 getTabs ()
 get tabs @access public More...
 
 setSettingsSubTabs ($a_active)
 Set sub tabs. More...
 
 editSettingsObject ()
 Edit settings. More...
 
 initSettingsForm ($a_mode="edit")
 Init Settings Form. More...
 
 getSettingsFormValues ($a_mode="edit")
 
 saveSettingsObject ()
 Save Settings. More...
 
 listContributorsObject ()
 List all contributors. More...
 
 saveGradingObject ()
 Save grading. More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 viewPageObject ()
 view wiki page More...
 
 allPagesObject ()
 All pages of wiki. More...
 
 popularPagesObject ()
 Popular pages. More...
 
 orphanedPagesObject ()
 Orphaned pages. More...
 
 gotoPageObject ($a_page="")
 Go to specific page. More...
 
 randomPageObject ()
 Go to random page. More...
 
 recentChangesObject ()
 Recent Changes. More...
 
 setSideBlock ($a_wpg_id=0)
 Side column. More...
 
 newPagesObject ()
 Latest pages. More...
 
 printViewObject ($a_pdf_export=false)
 
 pdfExportObject ()
 
 performSearchObject ()
 Search. More...
 
 setContentStyleSheet ($tpl=null)
 Set content style sheet. More...
 
 editStylePropertiesObject ()
 Edit style properties. More...
 
 initStylePropertiesForm ()
 Init style properties form. More...
 
 createStyleObject ()
 Create Style. More...
 
 editStyleObject ()
 Edit Style. More...
 
 deleteStyleObject ()
 Delete Style. More...
 
 saveStyleSettingsObject ()
 Save style settings. More...
 
 editImportantPagesObject ()
 List important pages. More...
 
 addImportantPageObject ()
 Add important pages. More...
 
 confirmRemoveImportantPagesObject ()
 Confirm important pages deletion. More...
 
 removeImportantPagesObject ()
 Remove important pages. More...
 
 saveOrderingAndIndentObject ()
 Save important pages ordering and indentation. More...
 
 setAsStartPageObject ()
 Confirm important pages deletion. More...
 
 exportHTML ()
 Create html package. More...
 
 getSubObjectTitle ($a_id, $a_type)
 Used for rating export. More...
 
 showTemplateSelectionObject ()
 Show template selection. More...
 
 initTemplateSelectionForm ()
 Init template selection form. More...
 
 createPageUsingTemplateObject ()
 Save creation with template form. More...
 
 cancelCreationPageUsingTemplateObject ()
 Cancel page creation using a template. More...
 
 initUserHTMLExportObject ()
 Export html (as user) More...
 
 startUserHTMLExportObject ()
 Export html (as user) More...
 
 getUserHTMLExportProgressObject ()
 Get user html export progress. More...
 
 downloadUserHTMLExportObject ()
 Download user html export file. More...
 
 downloadUserHTMLExportWithCommentsObject ()
 Download user html export file. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto ($a_target)
 
static getGotoLink ($a_ref_id, $a_page="")
 Get goto link. More...
 
static renderSideBlock ($a_wpg_id, $a_wiki_ref_id, $a_wp=null)
 Side column. More...
 
static lookupSubObjectTitle ($a_wiki_id, $a_page_id)
 Get title for wiki page (used in ilNotesGUI) More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getPrintPageIds ()
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 triggerAssignmentTool ()
 Trigger assignment tool. More...
 
 getAssignmentButtons ()
 Get assignment buttons. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $tabs
 
 $error
 
 $help
 
 $log
 
 $tool_context
 
 $ui
 
 $req_with_comments = false
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjWikiGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor @access public.

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

64 {
65 global $DIC;
66
67 $this->ctrl = $DIC->ctrl();
68 $this->lng = $DIC->language();
69 $this->user = $DIC->user();
70 $this->tpl = $DIC["tpl"];
71 $this->tabs = $DIC->tabs();
72 $this->access = $DIC->access();
73 $this->error = $DIC["ilErr"];
74 $this->settings = $DIC->settings();
75 $this->help = $DIC["ilHelp"];
76 $this->locator = $DIC["ilLocator"];
77 $this->toolbar = $DIC->toolbar();
78 $ilCtrl = $DIC->ctrl();
79 $lng = $DIC->language();
80
81 $this->type = "wiki";
82
83 $this->log = ilLoggerFactory::getLogger('wiki');
84
85 $this->tool_context = $DIC->globalScreen()->tool()->context();
86 $this->ui = $DIC->ui();
87
88 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
89 $lng->loadLanguageModule("obj");
90 $lng->loadLanguageModule("wiki");
91
92 if ($_GET["page"] != "") {
93 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
94 }
95
96 $this->req_with_comments = (bool) $_GET["with_comments"];
97 }
user()
Definition: user.php:4
$_GET["client_id"]
error($a_errmsg)
set error message @access public
static getLogger($a_component_id)
Get component logger.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
global $DIC
Definition: goto.php:24
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
settings()
Definition: settings.php:2
ui()
Definition: ui.php:5

References $_GET, $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), error(), ilLoggerFactory\getLogger(), help(), ilWikiUtil\makeUrlTitle(), settings(), ui(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjWikiGUI::_goto (   $a_target)
static

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

1175 {
1176 global $DIC;
1177
1178 $ilAccess = $DIC->access();
1179 $ilErr = $DIC["ilErr"];
1180 $lng = $DIC->language();
1181 $ilNavigationHistory = $DIC["ilNavigationHistory"];
1182
1183 $i = strpos($a_target, "_");
1184 if ($i > 0) {
1185 $a_page = substr($a_target, $i + 1);
1186 $a_target = substr($a_target, 0, $i);
1187 }
1188
1189 if ($a_target == "wpage") {
1190 $a_page_arr = explode("_", $a_page);
1191 $wpg_id = (int) $a_page_arr[0];
1192 $ref_id = (int) $a_page_arr[1];
1193 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1194 $w_id = ilWikiPage::lookupWikiId($wpg_id);
1195 if ($ref_id > 0) {
1196 $refs = array($ref_id);
1197 } else {
1198 $refs = ilObject::_getAllReferences($w_id);
1199 }
1200 foreach ($refs as $r) {
1201 if ($ilAccess->checkAccess("read", "", $r)) {
1202 $a_target = $r;
1203 $a_page = ilWikiPage::lookupTitle($wpg_id);
1204 }
1205 }
1206 }
1207
1208 if ($ilAccess->checkAccess("read", "", $a_target)) {
1209 $_GET["cmd"] = "viewPage";
1210 $_GET["ref_id"] = $a_target;
1211 $_GET["page"] = $a_page;
1212 $_GET["baseClass"] = "ilwikihandlergui";
1213 $_GET["cmdClass"] = "ilobjwikigui";
1214 /* if ($a_page != "")
1215 {
1216 $add = "&page=".rawurlencode($_GET["page"]);
1217 $ilNavigationHistory->addItem($_GET["ref_id"],
1218 "./goto.php?target=wiki_".$_GET["ref_id"].$add, "wiki");
1219 }*/
1220 include("ilias.php");
1221 exit;
1222 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1223 ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
1224 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1225 ilUtil::sendFailure(sprintf(
1226 $lng->txt("msg_no_perm_read_item"),
1228 ), true);
1230 }
1231
1232 $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1233 }
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
static lookupWikiId($a_page_id)
Lookup wiki id.
const ROOT_FOLDER_ID
Definition: constants.php:30
exit
Definition: login.php:29
$i
Definition: metadata.php:24

References $_GET, $DIC, $i, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryNode(), ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, ilWikiPage\lookupTitle(), ilWikiPage\lookupWikiId(), ROOT_FOLDER_ID, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ addImportantPageObject()

ilObjWikiGUI::addImportantPageObject ( )

Add important pages.

Parameters

return

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

1962 {
1963 $ilCtrl = $this->ctrl;
1964 $lng = $this->lng;
1965
1966 $this->checkPermission("edit_wiki_navigation");
1967
1968 if ($_POST["imp_page_id"] > 0) {
1969 $this->object->addImportantPage((int) $_POST["imp_page_id"]);
1970 ilUtil::sendSuccess($lng->txt("wiki_imp_page_added"), true);
1971 }
1972 $ilCtrl->redirect($this, "editImportantPages");
1973 }
$_POST["username"]
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.

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

+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjWikiGUI::addLocatorItems ( )

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

Reimplemented from ilObjectGUI.

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

1161 {
1162 $ilLocator = $this->locator;
1163
1164 if (is_object($this->object)) {
1165 $ilLocator->addItem(
1166 $this->object->getTitle(),
1167 $this->getGotoLink($this->object->getRefId()),
1168 "",
1169 $_GET["ref_id"]
1170 );
1171 }
1172 }

References $_GET, and ilObjectGUI\$locator.

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

Add Pages SubTabs.

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

579 {
580 $ilTabs = $this->tabs;
581 $ilCtrl = $this->ctrl;
582
583 $ilTabs->activateTab("wiki_pages");
584
585 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
586 $ilCtrl->setParameter(
587 $this,
588 "wpg_id",
590 $this->object->getId(),
592 )
593 );
594 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
595 $ilTabs->addSubTabTarget(
596 "wiki_all_pages",
597 $this->ctrl->getLinkTarget($this, "allPages"),
598 "allPages"
599 );
600 $ilTabs->addSubTabTarget(
601 "wiki_recent_changes",
602 $this->ctrl->getLinkTarget($this, "recentChanges"),
603 "recentChanges"
604 );
605 $ilTabs->addSubTabTarget(
606 "wiki_new_pages",
607 $this->ctrl->getLinkTarget($this, "newPages"),
608 "newPages"
609 );
610 $ilTabs->addSubTabTarget(
611 "wiki_popular_pages",
612 $this->ctrl->getLinkTarget($this, "popularPages"),
613 "popularPages"
614 );
615 $ilTabs->addSubTabTarget(
616 "wiki_orphaned_pages",
617 $this->ctrl->getLinkTarget($this, "orphanedPages"),
618 "orphanedPages"
619 );
620 }
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
static makeDbTitle($a_par)
Handle page GET parameter.

References $_GET, ilObjectGUI\$ctrl, $tabs, ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), and ilWikiUtil\makeUrlTitle().

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

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

◆ addPageTabs()

ilObjWikiGUI::addPageTabs ( )

Add Page Tabs.

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

546 {
547 $ilTabs = $this->tabs;
548 $ilCtrl = $this->ctrl;
549
550 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
551 $ilCtrl->setParameter(
552 $this,
553 "wpg_id",
554 ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($_GET["page"]))
555 );
556 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
557 $ilTabs->addTarget(
558 "wiki_what_links_here",
559 $this->ctrl->getLinkTargetByClass(
560 "ilwikipagegui",
561 "whatLinksHere"
562 ),
563 "whatLinksHere"
564 );
565 $ilTabs->addTarget(
566 "wiki_print_view",
567 $this->ctrl->getLinkTargetByClass(
568 "ilwikipagegui",
569 "printViewSelection"
570 ),
571 "printViewSelection"
572 );
573 }

References $_GET, ilObjectGUI\$ctrl, $tabs, ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), and ilWikiUtil\makeUrlTitle().

+ Here is the call graph for this function:

◆ afterSave()

ilObjWikiGUI::afterSave ( ilObject  $newObj)

save object @access public

Reimplemented from ilObjectGUI.

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

402 {
404
405 $newObj->setTitle($this->form_gui->getInput("title"));
406 $newObj->setDescription($this->form_gui->getInput("description"));
407 $newObj->setIntroduction($this->form_gui->getInput("intro"));
408 $newObj->setStartPage($this->form_gui->getInput("startpage"));
409 $newObj->setShortTitle($this->form_gui->getInput("shorttitle"));
410 $newObj->setRating($this->form_gui->getInput("rating"));
411 // $newObj->setRatingAsBlock($this->form_gui->getInput("rating_side"));
412 $newObj->setRatingForNewPages($this->form_gui->getInput("rating_new"));
413 $newObj->setRatingCategories($this->form_gui->getInput("rating_ext"));
414
415 $newObj->setRatingOverall($this->form_gui->getInput("rating_overall"));
416 $newObj->setPageToc($this->form_gui->getInput("page_toc"));
417
418
419
420 if (!$ilSetting->get("disable_comments")) {
421 $newObj->setPublicNotes($this->form_gui->getInput("public_notes"));
422 }
423 $newObj->setOnline($this->form_gui->getInput("online"));
424 $newObj->update();
425
426 // always send a message
427 ilUtil::sendSuccess($this->lng->txt("object_added"), true);
429 }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
update()
update object in db
setTitle($a_title)
set object title
setDescription($a_desc)
set object description
getRefId()
get reference id @access public
static redirect($a_script)
global $ilSetting
Definition: privfeed.php:17

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

+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

All pages of wiki.

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

1329 {
1330 $tpl = $this->tpl;
1331
1332 $this->checkPermission("read");
1333
1334 include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1335
1336 $this->addPagesSubTabs();
1337
1338 $table_gui = new ilWikiPagesTableGUI(
1339 $this,
1340 "allPages",
1341 $this->object->getId(),
1343 );
1344
1345 $this->setSideBlock();
1346 $tpl->setContent($table_gui->getHTML());
1347 }
const IL_WIKI_ALL_PAGES
addPagesSubTabs()
Add Pages SubTabs.
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for wiki pages table.

References ilObjectGUI\$tpl, addPagesSubTabs(), ilObjectGUI\checkPermission(), IL_WIKI_ALL_PAGES, and setSideBlock().

+ Here is the call graph for this function:

◆ cancelCreationPageUsingTemplateObject()

ilObjWikiGUI::cancelCreationPageUsingTemplateObject ( )

Cancel page creation using a template.

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

2200 {
2201 $ilCtrl = $this->ctrl;
2202
2203 // redirect to newly created page
2204 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($_GET["from_page"])));
2205 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
2206 }

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

+ Here is the call graph for this function:

◆ checkPermissionBool()

ilObjWikiGUI::checkPermissionBool (   $a_perm,
  $a_cmd = "",
  $a_type = "",
  $a_ref_id = null 
)
protected

Check permission.

Parameters
string$a_perm
string$a_cmd
string$a_type
int$a_ref_id
Returns
bool

Reimplemented from ilObjectGUI.

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

2218 {
2219 if ($a_perm == "create") {
2220 return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_ref_id);
2221 } else {
2222 if (!$a_ref_id) {
2223 $a_ref_id = $this->object->getRefId();
2224 }
2225 include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
2226 return ilWikiPerm::check($a_perm, $a_ref_id, $a_cmd);
2227 }
2228 }
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.

References ilWikiPerm\check().

Referenced by saveObject().

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

◆ confirmRemoveImportantPagesObject()

ilObjWikiGUI::confirmRemoveImportantPagesObject ( )

Confirm important pages deletion.

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

1979 {
1980 $ilCtrl = $this->ctrl;
1981 $tpl = $this->tpl;
1982 $lng = $this->lng;
1983
1984 if (!is_array($_POST["imp_page_id"]) || count($_POST["imp_page_id"]) == 0) {
1985 ilUtil::sendInfo($lng->txt("no_checkbox"), true);
1986 $ilCtrl->redirect($this, "editImportantPages");
1987 } else {
1988 include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1989 $cgui = new ilConfirmationGUI();
1990 $cgui->setFormAction($ilCtrl->getFormAction($this));
1991 $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1992 $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1993 $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1994
1995 foreach ($_POST["imp_page_id"] as $i) {
1996 $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1997 }
1998
1999 $tpl->setContent($cgui->getHTML());
2000 }
2001 }
Confirmation screen class.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.

References $_POST, ilObjectGUI\$ctrl, $i, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilWikiPage\lookupTitle(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

Save creation with template form.

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

2174 {
2175 $tpl = $this->tpl;
2176 $lng = $this->lng;
2177 $ilCtrl = $this->ctrl;
2178
2179 $form = $this->initTemplateSelectionForm();
2180 if ($form->checkInput()) {
2181 $a_page = $_POST["page"];
2182 $this->object->createWikiPage($a_page, (int) $_POST["page_templ"]);
2183
2184 // redirect to newly created page
2185 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
2186 $ilCtrl->redirectByClass("ilwikipagegui", "edit");
2187
2188 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2189 $ilCtrl->redirect($this, "");
2190 } else {
2191 $form->setValuesByPost();
2192 $tpl->setContent($form->getHtml());
2193 }
2194 }
initTemplateSelectionForm()
Init template selection form.

References $_POST, ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, initTemplateSelectionForm(), and ilWikiUtil\makeUrlTitle().

+ Here is the call graph for this function:

◆ createStyleObject()

ilObjWikiGUI::createStyleObject ( )

Create Style.

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

1857 {
1858 $ilCtrl = $this->ctrl;
1859
1860 $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1861 }

References ilObjectGUI\$ctrl.

◆ deleteStyleObject()

ilObjWikiGUI::deleteStyleObject ( )

Delete Style.

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

1877 {
1878 $ilCtrl = $this->ctrl;
1879
1880 $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1881 }

References ilObjectGUI\$ctrl.

◆ downloadUserHTMLExportObject()

ilObjWikiGUI::downloadUserHTMLExportObject ( )

Download user html export file.

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

2281 {
2282 $this->log->debug("download");
2283 $this->checkPermission("wiki_html_export");
2284 $this->object->deliverUserHTMLExport();
2285 }

References ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ downloadUserHTMLExportWithCommentsObject()

ilObjWikiGUI::downloadUserHTMLExportWithCommentsObject ( )

Download user html export file.

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

2291 {
2292 $this->log->debug("download");
2293 $this->checkPermission("wiki_html_export");
2294 $this->object->deliverUserHTMLExport(true);
2295 }

References ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ editImportantPagesObject()

ilObjWikiGUI::editImportantPagesObject ( )

List important pages.

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

1909 {
1910 $tpl = $this->tpl;
1911 $ilToolbar = $this->toolbar;
1912 $ilTabs = $this->tabs;
1913 $lng = $this->lng;
1914 $ilCtrl = $this->ctrl;
1915
1916 $this->checkPermission("edit_wiki_navigation");
1917
1918 ilUtil::sendInfo($lng->txt("wiki_navigation_info"));
1919
1920 $ipages = ilObjWiki::_lookupImportantPagesList($this->object->getId());
1921 $ipages_ids = array();
1922 foreach ($ipages as $i) {
1923 $ipages_ids[] = $i["page_id"];
1924 }
1925
1926 // list pages
1927 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1928 $pages = ilWikiPage::getAllWikiPages($this->object->getId());
1929 $options = array("" => $lng->txt("please_select"));
1930 foreach ($pages as $p) {
1931 if (!in_array($p["id"], $ipages_ids)) {
1932 $options[$p["id"]] = ilUtil::shortenText($p["title"], 60, true);
1933 }
1934 }
1935 if (count($options) > 0) {
1936 include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1937 $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1938 $si->setOptions($options);
1939 $si->setInfo($lng->txt(""));
1940 $ilToolbar->addInputItem($si);
1941 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1942 $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1943 }
1944
1945
1946 $ilTabs->activateTab("settings");
1947 $this->setSettingsSubTabs("imp_pages");
1948
1949 include_once("./Modules/Wiki/classes/class.ilImportantPagesTableGUI.php");
1950 $imp_table = new ilImportantPagesTableGUI($this, "editImportantPages");
1951
1952 $tpl->setContent($imp_table->getHTML());
1953 }
setSettingsSubTabs($a_active)
Set sub tabs.
static _lookupImportantPagesList($a_wiki_id)
Get important pages list.
This class represents a selection list property in a property form.
static shortenText( $a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
static getAllWikiPages($a_wiki_id)
Get all pages of wiki.

References ilObjectGUI\$ctrl, $i, ilObjectGUI\$lng, $si, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjWiki\_lookupImportantPagesList(), ilObjectGUI\checkPermission(), ilWikiPage\getAllWikiPages(), ilUtil\sendInfo(), setSettingsSubTabs(), and ilUtil\shortenText().

+ Here is the call graph for this function:

◆ editSettingsObject()

ilObjWikiGUI::editSettingsObject ( )

Edit settings.

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

807 {
809
810 $this->checkPermission("write");
811
812 $this->setSettingsSubTabs("general_settings");
813
814 $this->initSettingsForm();
815 $this->getSettingsFormValues();
816
817 // Edit ecs export settings
818 include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
819 $ecs = new ilECSWikiSettings($this->object);
820 $ecs->addSettingsToForm($this->form_gui, 'wiki');
821
822 $tpl->setContent($this->form_gui->getHtml());
823 $this->setSideBlock();
824 }
Class ilECSWikiSettings.
initSettingsForm($a_mode="edit")
Init Settings Form.
getSettingsFormValues($a_mode="edit")

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

+ Here is the call graph for this function:

◆ editStyleObject()

ilObjWikiGUI::editStyleObject ( )

Edit Style.

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

1867 {
1868 $ilCtrl = $this->ctrl;
1869
1870 $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1871 }

References ilObjectGUI\$ctrl.

◆ editStylePropertiesObject()

ilObjWikiGUI::editStylePropertiesObject ( )

Edit style properties.

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

1755 {
1756 $ilTabs = $this->tabs;
1757 $tpl = $this->tpl;
1758
1759 $this->checkPermission("write");
1760
1761 $this->initStylePropertiesForm();
1762 $tpl->setContent($this->form->getHTML());
1763
1764 $ilTabs->activateTab("settings");
1765 $this->setSettingsSubTabs("style");
1766
1767 $this->setSideBlock();
1768 }
initStylePropertiesForm()
Init style properties form.

References $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), initStylePropertiesForm(), setSettingsSubTabs(), and setSideBlock().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

100 {
102 $ilCtrl = $this->ctrl;
104 $ilTabs = $this->tabs;
105 $ilAccess = $this->access;
106
107 $next_class = $this->ctrl->getNextClass($this);
108 $cmd = $this->ctrl->getCmd();
109
110 $this->triggerAssignmentTool();
111
112 $this->prepareOutput();
113
114 // see ilWikiPageGUI::printViewOrderList()
115 // printView() and pdfExport() cannot be in ilWikiPageGUI because of stylesheet confusion
116 if ($cmd == "printView" || $cmd == "pdfExport") {
117 $next_class = null;
118 }
119
120 switch ($next_class) {
121 case "ilinfoscreengui":
122 $this->checkPermission("visible");
123 $this->addHeaderAction();
124 $this->infoScreen(); // forwards command
125 break;
126
127 case 'ilpermissiongui':
128 $this->addHeaderAction();
129 $ilTabs->activateTab("perm_settings");
130 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
131 $perm_gui = new ilPermissionGUI($this);
132 $ret = $this->ctrl->forwardCommand($perm_gui);
133 break;
134
135 case 'ilsettingspermissiongui':
136 $this->checkPermission("write");
137 $this->addHeaderAction();
138 $ilTabs->activateTab("settings");
139 $this->setSettingsSubTabs("permission_settings");
140 include_once("Services/AccessControl/classes/class.ilSettingsPermissionGUI.php");
141 $perm_gui = new ilSettingsPermissionGUI($this);
142 $perm_gui->setPermissions(array("edit_wiki_navigation", "delete_wiki_pages", "activate_wiki_protection",
143 "wiki_html_export"));
144 $perm_gui->setRoleRequiredPermissions(array("edit_content"));
145 $perm_gui->setRoleProhibitedPermissions(array("write"));
146 $ret = $this->ctrl->forwardCommand($perm_gui);
147 break;
148
149 case 'ilwikipagegui':
150 $this->checkPermission("read");
151 include_once("./Modules/Wiki/classes/class.ilWikiPageGUI.php");
153 $this->object->getId(),
155 $_GET["old_nr"],
156 $this->object->getRefId()
157 );
158 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
159 $wpage_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
160 $this->object->getStyleSheetId(),
161 "wiki"
162 ));
163 $this->setContentStyleSheet();
164 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
165 (
166 !$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
167 $wpage_gui->getPageObject()->getBlocked()
168 )) {
169 $wpage_gui->setEnableEditing(false);
170 }
171
172 // alter title and description
173// $tpl->setTitle($wpage_gui->getPageObject()->getTitle());
174// $tpl->setDescription($this->object->getTitle());
175 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
176 $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
177 }
178
179 $ret = $this->ctrl->forwardCommand($wpage_gui);
180 if ($ret != "") {
181 $tpl->setContent($ret);
182 }
183 break;
184
185 case 'ilobjectcopygui':
186 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
187 $cp = new ilObjectCopyGUI($this);
188 $cp->setType('wiki');
189 $this->ctrl->forwardCommand($cp);
190 break;
191
192 case 'ilpublicuserprofilegui':
193 require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
194 $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
195 $ret = $this->ctrl->forwardCommand($profile_gui);
196 $tpl->setContent($ret);
197 break;
198
199 case "ilobjstylesheetgui":
200 include_once("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
201 $this->ctrl->setReturn($this, "editStyleProperties");
202 $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
203 $style_gui->omitLocator();
204 if ($cmd == "create" || $_GET["new_type"] == "sty") {
205 $style_gui->setCreationMode(true);
206 }
207
208 if ($cmd == "confirmedDelete") {
209 $this->object->setStyleSheetId(0);
210 $this->object->update();
211 }
212
213 $ret = $this->ctrl->forwardCommand($style_gui);
214
215 if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle") {
216 $style_id = $ret;
217 $this->object->setStyleSheetId($style_id);
218 $this->object->update();
219 $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
220 }
221 break;
222
223 case "ilexportgui":
224// $this->prepareOutput();
225 $this->addHeaderAction();
226 $ilTabs->activateTab("export");
227 include_once("./Services/Export/classes/class.ilExportGUI.php");
228 $exp_gui = new ilExportGUI($this);
229 $exp_gui->addFormat("xml");
230 $exp_gui->addFormat("html", "", $this, "exportHTML");
231 if ($this->object->isCommentsExportPossible()) {
232 $exp_gui->addFormat("html_comments", "HTML (" . $this->lng->txt("wiki_incl_comments") . ")", $this, "exportHTML");
233 }
234 $ret = $this->ctrl->forwardCommand($exp_gui);
235// $this->tpl->show();
236 break;
237
238 case "ilcommonactiondispatchergui":
239 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
241 $this->ctrl->forwardCommand($gui);
242 break;
243
244 case "ilratinggui":
245 // for rating category editing
246 $this->checkPermission("write");
247 $this->addHeaderAction();
248 $ilTabs->activateTab("settings");
249 $this->setSettingsSubTabs("rating_categories");
250 include_once("Services/Rating/classes/class.ilRatingGUI.php");
251 $gui = new ilRatingGUI();
252 $gui->setObject($this->object->getId(), $this->object->getType());
253 $gui->setExportCallback(array($this, "getSubObjectTitle"), $this->lng->txt("page"));
254 $this->ctrl->forwardCommand($gui);
255 break;
256
257 case "ilwikistatgui":
258 $this->checkPermission("statistics_read");
259
260 $this->addHeaderAction();
261 $ilTabs->activateTab("statistics");
262
263 include_once "Modules/Wiki/classes/class.ilWikiStatGUI.php";
264 $gui = new ilWikiStatGUI($this->object->getId());
265 $this->ctrl->forwardCommand($gui);
266 break;
267
268 case "ilwikipagetemplategui":
269 $this->checkPermission("write");
270 $this->addHeaderAction();
271 $ilTabs->activateTab("settings");
272 $this->setSettingsSubTabs("page_templates");
273 include_once("./Modules/Wiki/classes/class.ilWikiPageTemplateGUI.php");
274 $wptgui = new ilWikiPageTemplateGUI($this);
275 $this->ctrl->forwardCommand($wptgui);
276 break;
277
278 case 'ilobjectmetadatagui':
279 $this->checkPermission("write");
280 $this->addHeaderAction();
281 $ilTabs->activateTab("advmd");
282 include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
283 $md_gui = new ilObjectMetaDataGUI($this->object, "wpg");
284 $this->ctrl->forwardCommand($md_gui);
285 break;
286
287 case 'ilrepositoryobjectsearchgui':
288 $this->addHeaderAction();
289 $this->setSideBlock();
290 $ilTabs->setTabActive("wiki_search_results");
291 $ilCtrl->setReturn($this, 'view');
292 include_once './Services/Search/classes/class.ilRepositoryObjectSearchGUI.php';
293 $search_gui = new ilRepositoryObjectSearchGUI(
294 $this->object->getRefId(),
295 $this,
296 'view'
297 );
298 $ilCtrl->forwardCommand($search_gui);
299 break;
300
301 case 'ilobjnotificationsettingsgui':
302 $this->addHeaderAction();
303 $ilTabs->activateTab("settings");
304 $this->setSettingsSubTabs("notifications");
305 include_once("./Services/Notification/classes/class.ilObjNotificationSettingsGUI.php");
306 $gui = new ilObjNotificationSettingsGUI($this->object->getRefId());
307 $this->ctrl->forwardCommand($gui);
308 break;
309
310 default:
311 $this->addHeaderAction();
312 if (!$cmd) {
313 $cmd = "infoScreen";
314 }
315 $cmd .= "Object";
316 if ($cmd != "cancelObject") {
317 if ($cmd != "infoScreenObject") {
318 if (!in_array($cmd, array("createObject", "saveObject", "importFileObject"))) {
319 $this->checkPermission("read");
320 }
321 } else {
322 $this->checkPermission("visible");
323 }
324 }
325 $this->$cmd();
326 break;
327 }
328
329 return $ret;
330 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
Handles general notification settings, see e.g.
Class ilObjStyleSheetGUI.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
setContentStyleSheet($tpl=null)
Set content style sheet.
infoScreen()
show information screen
triggerAssignmentTool()
Trigger assignment tool.
GUI class for the workflow of copying objects.
prepareOutput($a_show_subobjects=true)
prepare output
addHeaderAction()
Add header action menu.
Class ilObjectMetaDataGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
GUI class for public user profile presentation.
Class ilRatingGUI.
UI class for handling permissions that can be configured having the write permission for an object.
static getGUIForTitle($a_wiki_id, $a_title, $a_old_nr=0, $a_wiki_ref_id=0)
Get wiki page gui for id and title.
Wiki page template gui class.
Wiki statistics GUI class.
$ilUser
Definition: imgupload.php:18
$ret
Definition: parser.php:6

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, $ilUser, $ret, $tabs, ilObjectGUI\$tpl, ilObjectGUI\$user, ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjStyleSheet\getEffectiveContentStyleId(), ilWikiPageGUI\getGUIForTitle(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), ilWikiUtil\makeDbTitle(), ilObjectGUI\prepareOutput(), setContentStyleSheet(), setSettingsSubTabs(), setSideBlock(), and triggerAssignmentTool().

+ Here is the call graph for this function:

◆ exportHTML()

ilObjWikiGUI::exportHTML ( )

Create html package.

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

2066 {
2067 $cont_exp = new Export\WikiHtmlExport($this->object);
2068
2069 $format = explode("_", $_POST["format"]);
2070 if ($format[1] == "comments") {
2071 $cont_exp->setMode(Export\WikiHtmlExport::MODE_COMMENTS);
2072 }
2073
2074 $cont_exp->buildExportFile();
2075 }
$format
Definition: metadata.php:218

References $_POST, and $format.

◆ getAssignmentButtons()

ilObjWikiGUI::getAssignmentButtons ( )
protected

Get assignment buttons.

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

2328 {
2329 $ilCtrl = $this->ctrl;
2330 $ui = $this->ui;
2331 $lng = $this->lng;
2332
2333 $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
2334 $this->object->getRefId(),
2335 $this->user->getId()
2336 );
2337 $buttons = [];
2338 foreach ($ass_info as $i) { // should be only one
2339 $ass = new ilExAssignment($i->getId());
2340 $times_up = $ass->afterDeadlineStrict();
2341
2342 // submit button
2343 if (!$times_up) {
2344 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
2345 $submit_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "finalizeAssignment");
2346 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
2347
2348 $buttons[$i->getId()][] = $ui->factory()->button()->primary($lng->txt("wiki_finalize_wiki"), $submit_link);
2349 }
2350
2351 // submitted files
2352 include_once "Modules/Exercise/classes/class.ilExSubmission.php";
2353 $submission = new ilExSubmission($ass, $this->user->getId());
2354 if ($submission->hasSubmitted()) {
2355 $submitted = $submission->getSelectedObject();
2356 if ($submitted["ts"] != "") {
2357 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", $ass->getId());
2358 }
2359 $dl_link = $ilCtrl->getLinkTargetByClass("ilwikipagegui", "downloadExcSubFile");
2360 $ilCtrl->setParameterByClass("ilwikipagegui", "ass", "");
2361 $buttons[$i->getId()][] = $ui->factory()->button()->standard($lng->txt("wiki_download_submission"), $dl_link);
2362 }
2363 }
2364 return $buttons;
2365 }
Exercise assignment.
Exercise submission //TODO: This class has to much static methods related to delivered "files".

References ilObjectGUI\$ctrl, $i, ilObjectGUI\$lng, $ui, ilExcRepoObjAssignment\getInstance(), and user().

Referenced by triggerAssignmentTool().

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

◆ getGotoLink()

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

Get goto link.

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

1239 {
1240 if ($a_page == "") {
1242 }
1243
1244 $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
1245 ilWikiUtil::makeUrlTitle($a_page);
1246
1247 return $goto;
1248 }
static _lookupStartPage($a_wiki_id)
Lookup start page.

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

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

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

◆ getPrintPageIds()

ilObjWikiGUI::getPrintPageIds ( )
protected

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

1594 {
1595 // multiple ordered page ids
1596 if (is_array($_POST["wordr"])) {
1597 asort($_POST["wordr"]);
1598 $page_ids = array_keys($_POST["wordr"]);
1599 }
1600 // single page
1601 elseif ((int) $_GET["wpg_id"]) {
1602 $page_ids = array((int) $_GET["wpg_id"]);
1603 }
1604
1605 return $page_ids;
1606 }

References $_GET, and $_POST.

Referenced by printViewObject().

+ Here is the caller graph for this function:

◆ getSettingsFormValues()

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

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

989 {
992
993 // set values
994 if ($a_mode == "create") {
995 //$values["startpage"] = $lng->txt("wiki_main_page");
996 $values["rating_new"] = true;
997
998 $values["rating_overall"] = ilObject::hasAutoRating("wiki", $_GET["ref_id"]);
999
1000 $this->form_gui->setValuesByArray($values);
1001 } else {
1002 $values["online"] = $this->object->getOnline();
1003 $values["title"] = $this->object->getTitle();
1004 //$values["startpage"] = $this->object->getStartPage();
1005 $values["startpage_id"] = ilWikiPage::_getPageIdForWikiTitle($this->object->getId(), $this->object->getStartPage());
1006 $values["shorttitle"] = $this->object->getShortTitle();
1007 $values["description"] = $this->object->getLongDescription();
1008 $values["rating_overall"] = $this->object->getRatingOverall();
1009 $values["rating"] = $this->object->getRating();
1010 // $values["rating_side"] = $this->object->getRatingAsBlock();
1011 $values["rating_new"] = $this->object->getRatingForNewPages();
1012 $values["rating_ext"] = $this->object->getRatingCategories();
1013 $values["public_notes"] = $this->object->getPublicNotes();
1014 $values["intro"] = $this->object->getIntroduction();
1015 // $values["imp_pages"] = $this->object->getImportantPages();
1016 $values["page_toc"] = $this->object->getPageToc();
1017 $values["link_md_values"] = $this->object->getLinkMetadataValues();
1018
1019 // only set given values (because of adv. metadata)
1020 $this->form_gui->setValuesByArray($values, true);
1021 }
1022 }
static hasAutoRating($a_type, $a_ref_id)
Check if auto rating is active for parent group/course.
static _getPageIdForWikiTitle($a_wiki_id, $a_title)
Checks whether a page with given title exists.

References $_GET, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$user, ilWikiPage\_getPageIdForWikiTitle(), and ilObject\hasAutoRating().

Referenced by editSettingsObject(), and initCreationForms().

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

◆ getSubObjectTitle()

ilObjWikiGUI::getSubObjectTitle (   $a_id,
  $a_type 
)

Used for rating export.

Parameters
int$a_id
string$a_type
Returns
string

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

2101 {
2102 include_once "Modules/Wiki/classes/class.ilWikiPage.php";
2103 return ilWikiPage::lookupTitle($a_id);
2104 }

References ilWikiPage\lookupTitle().

+ Here is the call graph for this function:

◆ getTabs()

ilObjWikiGUI::getTabs ( )

get tabs @access public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

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

628 {
629 $ilCtrl = $this->ctrl;
630 $ilAccess = $this->access;
632 $ilHelp = $this->help;
633
634 $ilHelp->setScreenIdComponent("wiki");
635
636 // wiki tabs
637 if (in_array($ilCtrl->getCmdClass(), array("", "ilobjwikigui",
638 "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui", "ilobjnotificationsettingsgui", "iltaxmdgui",
639 "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui'
640 )) || (in_array($ilCtrl->getNextClass(), array("ilpermissiongui")))) {
641 if ($_GET["page"] != "") {
642 $this->tabs_gui->setBackTarget(
643 $lng->txt("wiki_last_visited_page"),
644 $this->getGotoLink(
645 $_GET["ref_id"],
647 )
648 );
649 }
650
651 // pages
652 if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
653 $this->tabs_gui->addTab(
654 "wiki_pages",
655 $lng->txt("wiki_pages"),
656 $this->ctrl->getLinkTarget($this, "allPages")
657 );
658 }
659
660 // info screen
661 if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
662 $this->tabs_gui->addTab(
663 "info_short",
664 $lng->txt("info_short"),
665 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
666 );
667 }
668
669 // settings
670 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
671 $this->tabs_gui->addTab(
672 "settings",
673 $lng->txt("settings"),
674 $this->ctrl->getLinkTarget($this, "editSettings")
675 );
676
677 // metadata
678 include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
679 $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
680 $mdtab = $mdgui->getTab();
681 if ($mdtab) {
682 $this->tabs_gui->addTab(
683 "advmd",
684 $this->lng->txt("meta_data"),
685 $mdtab
686 );
687 }
688 }
689
690 // contributors
691 if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
692 $this->tabs_gui->addTab(
693 "wiki_contributors",
694 $lng->txt("wiki_contributors"),
695 $this->ctrl->getLinkTarget($this, "listContributors")
696 );
697 }
698
699 // statistics
700 if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId())) {
701 $this->tabs_gui->addTab(
702 "statistics",
703 $lng->txt("statistics"),
704 $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial")
705 );
706 }
707
708 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
709 $this->tabs_gui->addTab(
710 "export",
711 $lng->txt("export"),
712 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
713 );
714 }
715
716 // edit permissions
717 if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
718 $this->tabs_gui->addTab(
719 "perm_settings",
720 $lng->txt("perm_settings"),
721 $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
722 );
723 }
724 }
725 }

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, $help, ilObjectGUI\$lng, and ilWikiUtil\makeDbTitle().

+ Here is the call graph for this function:

◆ getUserHTMLExportProgressObject()

ilObjWikiGUI::getUserHTMLExportProgressObject ( )

Get user html export progress.

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

2259 {
2260 $this->log->debug("get progress: " . $this->req_with_comments);
2261 $this->checkPermission("wiki_html_export");
2262 $p = $this->object->getUserHTMLExportProgress($this->req_with_comments);
2263
2264 include_once("./Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php");
2266 $pb->setCurrent($p["progress"]);
2267
2268 $r = new stdClass();
2269 $r->progressBar = $pb->render();
2270 $r->status = $p["status"];
2271 include_once("./Services/JSON/classes/class.ilJsonUtil.php");
2272 $this->log->debug("status: " . $r->status);
2273 echo(ilJsonUtil::encode($r));
2274 exit;
2275 }
static encode($mixed, $suppress_native=false)
static getInstance()
Factory.

References ilObjectGUI\checkPermission(), ilJsonUtil\encode(), exit, and ilProgressBar\getInstance().

+ Here is the call graph for this function:

◆ gotoPageObject()

ilObjWikiGUI::gotoPageObject (   $a_page = "")

Go to specific page.

Parameters
string$a_pagepage title

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

1403 {
1404 $ilCtrl = $this->ctrl;
1405
1406 if ($a_page == "") {
1407 $a_page = $_GET["page"];
1408 }
1409
1410 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1412 $this->object->getId(),
1414 )) {
1415 // to do: get rid of this redirect
1416 ilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId(), $a_page));
1417 } else {
1418 if (!$this->access->checkAccess("edit_content", "", $this->object->getRefId())) {
1419 ilUtil::sendFailure($this->lng->txt("no_permission"), true);
1420 ilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId(), $_GET["from_page"]));
1421 }
1422 if (!$this->object->getTemplateSelectionOnCreation()) {
1423
1424 // check length
1425 include_once("./Services/Utilities/classes/class.ilStr.php");
1426 if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1427 ilUtil::sendFailure($this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")", true);
1428 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
1429 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1430 }
1431 $this->object->createWikiPage($a_page);
1432
1433 // redirect to newly created page
1434 $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1435 $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1436 } else {
1437 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
1438 $ilCtrl->setParameter($this, "from_page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
1439 $ilCtrl->redirect($this, "showTemplateSelection");
1440 }
1441 }
1442 }
static strLen($a_string)
Definition: class.ilStr.php:78
static _wikiPageExists($a_wiki_id, $a_title)
Check whether page exists for wiki or not.

References $_GET, ilObjectGUI\$ctrl, ilWikiPage\_wikiPageExists(), getGotoLink(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ilUtil\redirect(), ilUtil\sendFailure(), and ilStr\strLen().

Referenced by randomPageObject().

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

◆ gotoStartPageObject()

ilObjWikiGUI::gotoStartPageObject ( )

Go to start page.

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

536 {
537 $ilCtrl = $this->ctrl;
538
539 ilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId()));
540 }

References ilObjectGUI\$ctrl, getGotoLink(), and ilUtil\redirect().

Referenced by viewObject().

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

◆ infoScreen()

ilObjWikiGUI::infoScreen ( )

show information screen

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

448 {
449 $ilAccess = $this->access;
451 $ilTabs = $this->tabs;
454
455 $ilTabs->activateTab("info_short");
456
457 if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
458 $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
459 }
460
461 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
462 $info = new ilInfoScreenGUI($this);
463 $info->enablePrivateNotes();
464 if (trim($this->object->getIntroduction()) != "") {
465 $info->addSection($lng->txt("wiki_introduction"));
466 $info->addProperty("", nl2br($this->object->getIntroduction()));
467 }
468
469 // feedback from tutor; mark, status, comment
470 include_once("./Modules/Wiki/classes/class.ilWikiContributor.php");
471 include_once("./Services/Tracking/classes/class.ilLPMarks.php");
472 $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
473 $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
474 $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
475 if ($lpcomment != "" || $mark != "" || $status != ilWikiContributor::STATUS_NOT_GRADED) {
476 $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
477 if ($lpcomment != "") {
478 $info->addProperty(
479 $this->lng->txt("wiki_comment"),
480 $lpcomment
481 );
482 }
483 if ($mark != "") {
484 $info->addProperty(
485 $this->lng->txt("wiki_mark"),
486 $mark
487 );
488 }
489
490 if ($status == ilWikiContributor::STATUS_PASSED) {
491 $info->addProperty(
492 $this->lng->txt("status"),
493 $this->lng->txt("wiki_passed")
494 );
495 }
496 if ($status == ilWikiContributor::STATUS_FAILED) {
497 $info->addProperty(
498 $this->lng->txt("status"),
499 $this->lng->txt("wiki_failed")
500 );
501 }
502 }
503
504 /*
505 $info->enableNews();
506 if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
507 {
508 //$info->enableNewsEditing();
509 $info->setBlockProperty("news", "settings", true);
510 }*/
511
512 if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
513 $info->addButton($lng->txt("wiki_start_page"), ilObjWikiGUI::getGotoLink($this->object->getRefId()));
514 }
515
516 // general information
517 $this->lng->loadLanguageModule("meta");
518 $this->lng->loadLanguageModule("wiki");
519
520 //$info->addSection($this->lng->txt("meta_general"));
521 //$info->addProperty($this->lng->txt("mcst_nr_items"),
522 // (int) count($med_items));
523
524 // forward the command
525 $this->ctrl->forwardCommand($info);
526
527 if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
528 // $this->setSideBlock();
529 }
530 }
Class ilInfoScreenGUI.
static _lookupMark($a_usr_id, $a_obj_id)
static _lookupComment($a_usr_id, $a_obj_id)
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)

References ilObjectGUI\$access, $error, ilObjectGUI\$ilErr, $ilUser, ilObjectGUI\$lng, $tabs, ilObjectGUI\$user, ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilWikiContributor\_lookupStatus(), getGotoLink(), ilWikiContributor\STATUS_FAILED, ilWikiContributor\STATUS_NOT_GRADED, and ilWikiContributor\STATUS_PASSED.

Referenced by executeCommand(), and infoScreenObject().

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

◆ infoScreenObject()

ilObjWikiGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

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

437 {
438 $this->checkPermission("visible");
439 $this->ctrl->setCmd("showSummary");
440 $this->ctrl->setCmdClass("ilinfoscreengui");
441 $this->infoScreen();
442 }

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

+ Here is the call graph for this function:

◆ initCreationForms()

ilObjWikiGUI::initCreationForms (   $a_new_type)
protected

Init creation froms.

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

Parameters
string$a_new_type
Returns
array

Reimplemented from ilObjectGUI.

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

355 {
356 $this->initSettingsForm("create");
357 $this->getSettingsFormValues("create");
358
359 $forms = array(self::CFORM_NEW => $this->form_gui,
360 self::CFORM_IMPORT => $this->initImportForm($a_new_type),
361 self::CFORM_CLONE => $this->fillCloneTemplate(null, $a_new_type));
362
363 return $forms;
364 }
initImportForm($a_new_type)
Init object import form.
fillCloneTemplate($a_tpl_varname, $a_type)
Fill object clone template This method can be called from any object GUI class that wants to offer ob...

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

+ Here is the call graph for this function:

◆ initSettingsForm()

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

Init Settings Form.

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

830 {
832 $ilCtrl = $this->ctrl;
833 $ilTabs = $this->tabs;
835 $obj_service = $this->object_service;
836
837 $lng->loadLanguageModule("wiki");
838 $ilTabs->activateTab("settings");
839
840 require_once("Services/Form/classes/class.ilPropertyFormGUI.php");
841 $this->form_gui = new ilPropertyFormGUI();
842
843 // Title
844 $tit = new ilTextInputGUI($lng->txt("title"), "title");
845 $tit->setRequired(true);
846 $this->form_gui->addItem($tit);
847
848 // Short Title
849 // The problem with the short title is, that it is per object
850 // and can't be a substitute for a ref id in the permanent link
851 /*
852 $stit = new ilRegExpInputGUI($lng->txt("wiki_short_title"), "shorttitle");
853 $stit->setPattern("/^[^0-9][^ _\&]+$/");
854 $stit->setRequired(false);
855 $stit->setNoMatchMessage($lng->txt("wiki_msg_short_name_regexp")." & _");
856 $stit->setSize(20);
857 $stit->setMaxLength(20);
858 $stit->setInfo($lng->txt("wiki_short_title_desc2"));
859 $this->form_gui->addItem($stit);
860 */
861
862 // Description
863 $des = new ilTextAreaInputGUI($lng->txt("description"), "description");
864 $this->form_gui->addItem($des);
865
866 // Introduction
867 $intro = new ilTextAreaInputGUI($lng->txt("wiki_introduction"), "intro");
868 $intro->setCols(40);
869 $intro->setRows(4);
870 $this->form_gui->addItem($intro);
871
872 // Start Page
873 if ($a_mode == "edit") {
874 $pages = ilWikiPage::getAllWikiPages($this->object->getId());
875 foreach ($pages as $p) {
876 $options[$p["id"]] = ilUtil::shortenText($p["title"], 60, true);
877 }
878 $si = new ilSelectInputGUI($lng->txt("wiki_start_page"), "startpage_id");
879 $si->setOptions($options);
880 $this->form_gui->addItem($si);
881 } else {
882 $sp = new ilTextInputGUI($lng->txt("wiki_start_page"), "startpage");
883 if ($a_mode == "edit") {
884 $sp->setInfo($lng->txt("wiki_start_page_info"));
885 }
886 $sp->setMaxLength(200);
887 $sp->setRequired(true);
888 $this->form_gui->addItem($sp);
889 }
890
891 // Online
892 $online = new ilCheckboxInputGUI($lng->txt("online"), "online");
893 $this->form_gui->addItem($online);
894
895
896 // rating
897
898 $lng->loadLanguageModule('rating');
899 $rate = new ilCheckboxInputGUI($lng->txt('rating_activate_rating'), 'rating_overall');
900 $rate->setInfo($lng->txt('rating_activate_rating_info'));
901 $this->form_gui->addItem($rate);
902
903 $rating = new ilCheckboxInputGUI($lng->txt("wiki_activate_rating"), "rating");
904 $this->form_gui->addItem($rating);
905
906 /* always active
907 $side = new ilCheckboxInputGUI($lng->txt("wiki_activate_sideblock_rating"), "rating_side");
908 $rating->addSubItem($side);
909 */
910
911 $new = new ilCheckboxInputGUI($lng->txt("wiki_activate_new_page_rating"), "rating_new");
912 $rating->addSubItem($new);
913
914 $extended = new ilCheckboxInputGUI($lng->txt("wiki_activate_extended_rating"), "rating_ext");
915 $rating->addSubItem($extended);
916
917
918 // public comments
919 if (!$ilSetting->get("disable_comments")) {
920 $comments = new ilCheckboxInputGUI($lng->txt("wiki_public_comments"), "public_notes");
921 $this->form_gui->addItem($comments);
922 }
923
924 // important pages
925 // $imp_pages = new ilCheckboxInputGUI($lng->txt("wiki_important_pages"), "imp_pages");
926 // $this->form_gui->addItem($imp_pages);
927
928 // page toc
929 $page_toc = new ilCheckboxInputGUI($lng->txt("wiki_page_toc"), "page_toc");
930 $page_toc->setInfo($lng->txt("wiki_page_toc_info"));
931 $this->form_gui->addItem($page_toc);
932
933 if ($a_mode == "edit") {
934 // advanced metadata auto-linking
935 include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
936 if (count(ilAdvancedMDRecord::_getSelectedRecordsByObject("wiki", $this->object->getRefId(), "wpg")) > 0) {
937 $link_md = new ilCheckboxInputGUI($lng->txt("wiki_link_md_values"), "link_md_values");
938 $link_md->setInfo($lng->txt("wiki_link_md_values_info"));
939 $this->form_gui->addItem($link_md);
940 }
941
942
944 $section->setTitle($this->lng->txt('obj_presentation'));
945 $this->form_gui->addItem($section);
946
947 // tile image
948 $obj_service->commonSettings()->legacyForm($this->form_gui, $this->object)->addTileImage();
949
950
951 // additional features
952 $feat = new ilFormSectionHeaderGUI();
953 $feat->setTitle($this->lng->txt('obj_features'));
954 $this->form_gui->addItem($feat);
955
956 include_once './Services/Container/classes/class.ilContainer.php';
957 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
959 $this->object->getId(),
960 $this->form_gui,
961 array(
963 )
964 );
965 }
966
967 // :TODO: sorting
968
969 // Form action and save button
970 $this->form_gui->setTitleIcon(ilUtil::getImagePath("icon_wiki.svg"));
971 if ($a_mode != "create") {
972 $this->form_gui->setTitle($lng->txt("wiki_settings"));
973 $this->form_gui->addCommandButton("saveSettings", $lng->txt("save"));
974 } else {
975 $this->form_gui->setTitle($lng->txt("wiki_new"));
976 $this->form_gui->addCommandButton("save", $lng->txt("wiki_add"));
977 $this->form_gui->addCommandButton("cancel", $lng->txt("cancel"));
978 }
979
980 // set values
981 if ($a_mode == "create") {
982 $ilCtrl->setParameter($this, "new_type", "wiki");
983 }
984
985 $this->form_gui->setFormAction($ilCtrl->getFormAction($this, "saveSettings"));
986 }
$section
Definition: Utf8Test.php:83
static _getSelectedRecordsByObject($a_obj_type, $a_ref_id, $a_sub_type="")
Get selected records by object.
This class represents a checkbox property in a property form.
This class represents a section header in a property form.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
This class represents a property form user interface.
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)

References ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$object_service, $section, ilObjectGUI\$settings, $si, $tabs, ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilWikiPage\getAllWikiPages(), ilUtil\getImagePath(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), and ilUtil\shortenText().

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

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

◆ initStylePropertiesForm()

ilObjWikiGUI::initStylePropertiesForm ( )

Init style properties form.

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

1774 {
1775 $ilCtrl = $this->ctrl;
1776 $lng = $this->lng;
1777 $ilTabs = $this->tabs;
1779
1780 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1781 $lng->loadLanguageModule("style");
1782
1783 include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1784 $this->form = new ilPropertyFormGUI();
1785
1786 $fixed_style = $ilSetting->get("fixed_content_style_id");
1787 $style_id = $this->object->getStyleSheetId();
1788
1789 if ($fixed_style > 0) {
1790 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1791 $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1792 $this->lng->txt("global_fixed") . ")");
1793 $this->form->addItem($st);
1794 } else {
1796 true,
1797 false,
1798 $_GET["ref_id"]
1799 );
1800
1801 $st_styles[0] = $this->lng->txt("default");
1802 ksort($st_styles);
1803
1804 if ($style_id > 0) {
1805 // individual style
1806 if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1807 $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1808 $st->setValue(ilObject::_lookupTitle($style_id));
1809 $this->form->addItem($st);
1810
1811 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1812
1813 // delete command
1814 $this->form->addCommandButton(
1815 "editStyle",
1816 $lng->txt("style_edit_style")
1817 );
1818 $this->form->addCommandButton(
1819 "deleteStyle",
1820 $lng->txt("style_delete_style")
1821 );
1822 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1823 }
1824 }
1825
1826 if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1827 $style_sel = ilUtil::formSelect(
1828 $style_id,
1829 "style_id",
1830 $st_styles,
1831 false,
1832 true
1833 );
1834 $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
1835 $style_sel->setOptions($st_styles);
1836 $style_sel->setValue($style_id);
1837 $this->form->addItem($style_sel);
1838 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1839 $this->form->addCommandButton(
1840 "saveStyleSettings",
1841 $lng->txt("save")
1842 );
1843 $this->form->addCommandButton(
1844 "createStyle",
1845 $lng->txt("sty_create_ind_style")
1846 );
1847 }
1848 }
1849 $this->form->setTitle($lng->txt("wiki_style"));
1850 $this->form->setFormAction($ilCtrl->getFormAction($this));
1851 }
This class represents a non editable value in a property form.
static _lookupStandard($a_id)
Lookup standard flag.
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.

References $_GET, ilObjectGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$settings, $tabs, ilObjStyleSheet\_getStandardStyles(), ilObjStyleSheet\_lookupStandard(), ilObject\_lookupTitle(), and ilUtil\formSelect().

Referenced by editStylePropertiesObject().

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

◆ initTemplateSelectionForm()

ilObjWikiGUI::initTemplateSelectionForm ( )

Init template selection form.

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

2129 {
2130 $lng = $this->lng;
2131 $ilCtrl = $this->ctrl;
2132
2133 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2134 $form = new ilPropertyFormGUI();
2135
2136 // page name
2137 $hi = new ilHiddenInputGUI("page");
2138 $hi->setValue($_GET["page"]);
2139 $form->addItem($hi);
2140
2141 // page template
2142 $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
2143 $radg->setRequired(true);
2144
2145 if ($this->object->getEmptyPageTemplate()) {
2146 $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
2147 $radg->addOption($op1);
2148 }
2149
2150 include_once("./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
2151 $wt = new ilWikiPageTemplate($this->object->getId());
2152 $ts = $wt->getAllInfo(ilWikiPageTemplate::TYPE_NEW_PAGES);
2153 foreach ($ts as $t) {
2154 $op = new ilRadioOption($t["title"], $t["wpage_id"]);
2155 $radg->addOption($op);
2156 }
2157
2158 $form->addItem($radg);
2159
2160 // save and cancel commands
2161 $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
2162 $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
2163
2164 $form->setTitle($lng->txt("wiki_new_page") . ": " . $_GET["page"]);
2165 $form->setFormAction($ilCtrl->getFormAction($this));
2166
2167 return $form;
2168 }
This class represents a hidden form property in a property form.
This class represents a property in a property form.
This class represents an option in a radio group.

References $_GET, ilObjectGUI\$ctrl, ilObjectGUI\$lng, and ilWikiPageTemplate\TYPE_NEW_PAGES.

Referenced by createPageUsingTemplateObject(), and showTemplateSelectionObject().

+ Here is the caller graph for this function:

◆ initUserHTMLExportObject()

ilObjWikiGUI::initUserHTMLExportObject ( )

Export html (as user)

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

2239 {
2240 $this->log->debug("init: " . $this->req_with_comments);
2241 $this->checkPermission("wiki_html_export");
2242 $this->object->initUserHTMLExport($this->req_with_comments);
2243 }

References ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ isOnlineHelpWiki()

ilObjWikiGUI::isOnlineHelpWiki ( )

Is wiki an online help wiki?

Returns
boolean true, if current wiki is an online help wiki

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

338 {
339 if (is_object($this->object)) {
340 return ilObjWiki::isOnlineHelpWiki($this->object->getRefId());
341 }
342 return false;
343 }
static isOnlineHelpWiki($a_ref_id)
Is wiki an online help wiki?

References ilObjWiki\isOnlineHelpWiki().

+ Here is the call graph for this function:

◆ listContributorsObject()

ilObjWikiGUI::listContributorsObject ( )

List all contributors.

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

1097 {
1098 $tpl = $this->tpl;
1099 $ilTabs = $this->tabs;
1100
1101 $this->checkPermission("write");
1102 $ilTabs->activateTab("wiki_contributors");
1103
1104 include_once("./Modules/Wiki/classes/class.ilWikiContributorsTableGUI.php");
1105
1106 $table_gui = new ilWikiContributorsTableGUI(
1107 $this,
1108 "listContributors",
1109 $this->object->getId()
1110 );
1111
1112 $tpl->setContent($table_gui->getHTML());
1113
1114 $this->setSideBlock();
1115 }
TableGUI class for listing users that contributed to the wiki.

References $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), and setSideBlock().

+ Here is the call graph for this function:

◆ lookupSubObjectTitle()

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

Get title for wiki page (used in ilNotesGUI)

Parameters
int$a_wiki_id
int$a_page_id
Returns
string

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

2085 {
2086 include_once "Modules/Wiki/classes/class.ilWikiPage.php";
2087 $page = new ilWikiPage($a_page_id);
2088 if ($page->getWikiId() == $a_wiki_id) {
2089 return $page->getTitle();
2090 }
2091 }
Class ilWikiPage.

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

Latest pages.

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

1573 {
1574 $tpl = $this->tpl;
1575
1576 $this->checkPermission("read");
1577
1578 include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1579
1580 $this->addPagesSubTabs();
1581
1582 $table_gui = new ilWikiPagesTableGUI(
1583 $this,
1584 "newPages",
1585 $this->object->getId(),
1587 );
1588
1589 $this->setSideBlock();
1590 $tpl->setContent($table_gui->getHTML());
1591 }
const IL_WIKI_NEW_PAGES

References ilObjectGUI\$tpl, addPagesSubTabs(), ilObjectGUI\checkPermission(), IL_WIKI_NEW_PAGES, and setSideBlock().

+ Here is the call graph for this function:

◆ orphanedPagesObject()

ilObjWikiGUI::orphanedPagesObject ( )

Orphaned pages.

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

1377 {
1378 $tpl = $this->tpl;
1379
1380 $this->checkPermission("read");
1381
1382 include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1383
1384 $this->addPagesSubTabs();
1385
1386 $table_gui = new ilWikiPagesTableGUI(
1387 $this,
1388 "orphanedPages",
1389 $this->object->getId(),
1391 );
1392
1393 $this->setSideBlock();
1394 $tpl->setContent($table_gui->getHTML());
1395 }
const IL_WIKI_ORPHANED_PAGES

References ilObjectGUI\$tpl, addPagesSubTabs(), ilObjectGUI\checkPermission(), IL_WIKI_ORPHANED_PAGES, and setSideBlock().

+ Here is the call graph for this function:

◆ pdfExportObject()

ilObjWikiGUI::pdfExportObject ( )

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

1656 {
1657
1658 // prepare generation before contents are processed (for mathjax)
1659 ilPDFGeneratorUtils::prepareGenerationRequest("Wiki", "ContentExport");
1660
1661 $html = $this->printViewObject(true);
1662
1663 // :TODO: fixing css dummy parameters
1664 $html = preg_replace("/\?dummy\=[0-9]+/", "", $html);
1665 $html = preg_replace("/\?vers\=[0-9A-Za-z\-]+/", "", $html);
1666 $html = str_replace('.css$Id$', ".css", $html);
1667
1668 if (false) {
1669 include_once "Services/PDFGeneration/classes/class.ilPDFGeneration.php";
1670 include_once "Services/PDFGeneration/classes/class.ilPDFGenerationJob.php";
1671
1672 $job = new ilPDFGenerationJob();
1673 $job->setAutoPageBreak(true)
1674 ->setMarginLeft("10")
1675 ->setMarginRight("10")
1676 ->setMarginTop("10")
1677 ->setMarginBottom("10")
1678 ->setOutputMode("D")// download
1679 ->setFilename("wiki.pdf")// :TODO:
1680 ->setCreator("ILIAS Wiki")// :TODO:
1681 ->setImageScale(1.25)// complete content scaling ?!
1682 ->addPage($html);
1683
1685 } else {
1686 $html = preg_replace("/src=\"\\.\\//ims", "src=\"" . ILIAS_HTTP_PATH . "/", $html);
1687 $html = preg_replace("/href=\"\\.\\//ims", "href=\"" . ILIAS_HTTP_PATH . "/", $html);
1688 $pdf_factory = new ilHtmlToPdfTransformerFactory();
1689 $pdf_factory->deliverPDFFromHTMLString($html, "wiki.pdf", ilHtmlToPdfTransformerFactory::PDF_OUTPUT_DOWNLOAD, "Wiki", "ContentExport");
1690 }
1691 }
Class ilHtmlToPdfTransformerFactory.
printViewObject($a_pdf_export=false)
Class ilPDFGenerationJob.
static doJob(ilPDFGenerationJob $job)
static prepareGenerationRequest($service, $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...

References ilPDFGeneration\doJob(), ilHtmlToPdfTransformerFactory\PDF_OUTPUT_DOWNLOAD, ilPDFGeneratorUtils\prepareGenerationRequest(), and printViewObject().

+ Here is the call graph for this function:

◆ performSearchObject()

ilObjWikiGUI::performSearchObject ( )

Search.

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

1697 {
1698 $tpl = $this->tpl;
1699 $ilTabs = $this->tabs;
1700 $ilCtrl = $this->ctrl;
1701 $lng = $this->lng;
1702
1703 $this->checkPermission("read");
1704
1705 include_once("./Modules/Wiki/classes/class.ilWikiSearchResultsTableGUI.php");
1706
1707 $ilTabs->setTabActive("wiki_search_results");
1708
1709 if (trim($_POST["search_term"]) == "") {
1710 ilUtil::sendFailure($lng->txt("wiki_please_enter_search_term"), true);
1711 $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1712 }
1713
1714 $search_results = ilObjWiki::_performSearch(
1715 $this->object->getId(),
1716 ilUtil::stripSlashes($_POST["search_term"])
1717 );
1718 $table_gui = new ilWikiSearchResultsTableGUI(
1719 $this,
1720 "performSearch",
1721 $this->object->getId(),
1722 $search_results,
1723 $_POST["search_term"]
1724 );
1725
1726 $this->setSideBlock();
1727 $tpl->setContent($table_gui->getHTML());
1728 }
static _performSearch($a_wiki_id, $a_searchterm)
Search in Wiki.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
TableGUI class for recent changes in wiki.

References $_POST, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObjWiki\_performSearch(), ilObjectGUI\checkPermission(), ilUtil\sendFailure(), setSideBlock(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ popularPagesObject()

ilObjWikiGUI::popularPagesObject ( )

Popular pages.

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

1353 {
1354 $tpl = $this->tpl;
1355
1356 $this->checkPermission("read");
1357
1358 include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1359
1360 $this->addPagesSubTabs();
1361
1362 $table_gui = new ilWikiPagesTableGUI(
1363 $this,
1364 "popularPages",
1365 $this->object->getId(),
1367 );
1368
1369 $this->setSideBlock();
1370 $tpl->setContent($table_gui->getHTML());
1371 }
const IL_WIKI_POPULAR_PAGES

References ilObjectGUI\$tpl, addPagesSubTabs(), ilObjectGUI\checkPermission(), IL_WIKI_POPULAR_PAGES, and setSideBlock().

+ Here is the call graph for this function:

◆ printViewObject()

ilObjWikiGUI::printViewObject (   $a_pdf_export = false)

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

1609 {
1610 global $tpl;
1611 $tpl = $this->tpl;
1612
1614
1615 $tabs->clearTargets();
1616 $tabs->setBackTarget(
1617 $this->lng->txt("back"),
1618 $this->ctrl->getLinkTargetByClass("ilwikipagegui", "printViewSelection")
1619 );
1620
1621 $page_ids = $this->getPrintPageIds();
1622 if (!$page_ids) {
1623 $this->ctrl->redirect($this, "");
1624 }
1625
1626 $this->setContentStyleSheet($tpl);
1627
1628 $page_content = "";
1629 foreach ($page_ids as $p_id) {
1630 $page_gui = new ilWikiPageGUI($p_id);
1631 $page_gui->setWiki($this->object);
1632 $page_gui->setOutputMode("print");
1633 $page_content .= $page_gui->showPage();
1634
1635 if ($a_pdf_export) {
1636 $page_content .= '<p style="page-break-after:always;"></p>';
1637 }
1638 }
1639
1640 //$page_content = '<div class="ilInvisibleBorder">' . $page_content . '</div>';
1641
1642 if (!$a_pdf_export) {
1643 $tpl->addOnLoadCode("il.Util.print();");
1644 }
1645
1646 $tpl->setContent($page_content);
1647
1648 if (!$a_pdf_export) {
1649// $tpl->printToStdout(false);
1650 } else {
1651 return $tpl->printToString();
1652 }
1653 }
Class ilWikiPage GUI class.

References $tabs, ilObjectGUI\$tabs_gui, ilObjectGUI\$tpl, getPrintPageIds(), and setContentStyleSheet().

Referenced by pdfExportObject().

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

◆ randomPageObject()

ilObjWikiGUI::randomPageObject ( )

Go to random page.

Parameters
string$a_pagepage title

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

1450 {
1451 $this->checkPermission("read");
1452
1453 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1454 $page = ilWikiPage::getRandomPage($this->object->getId());
1455 $this->gotoPageObject($page);
1456 }
gotoPageObject($a_page="")
Go to specific page.
static getRandomPage($a_wiki_id)
Get a random page.

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

+ Here is the call graph for this function:

◆ recentChangesObject()

ilObjWikiGUI::recentChangesObject ( )

Recent Changes.

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

1462 {
1463 $tpl = $this->tpl;
1464
1465 $this->checkPermission("read");
1466
1467 include_once("./Modules/Wiki/classes/class.ilWikiRecentChangesTableGUI.php");
1468
1469 $this->addPagesSubTabs();
1470
1471 $table_gui = new ilWikiRecentChangesTableGUI(
1472 $this,
1473 "recentChanges",
1474 $this->object->getId()
1475 );
1476
1477 $this->setSideBlock();
1478 $tpl->setContent($table_gui->getHTML());
1479 }
TableGUI class for recent changes in wiki.

References ilObjectGUI\$tpl, addPagesSubTabs(), ilObjectGUI\checkPermission(), and setSideBlock().

+ Here is the call graph for this function:

◆ removeImportantPagesObject()

ilObjWikiGUI::removeImportantPagesObject ( )

Remove important pages.

Parameters

return

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

2010 {
2011 $ilCtrl = $this->ctrl;
2012 $lng = $this->lng;
2013
2014 $this->checkPermission("edit_wiki_navigation");
2015
2016 if (is_array($_POST["imp_page_id"])) {
2017 foreach ($_POST["imp_page_id"] as $i) {
2018 $this->object->removeImportantPage((int) $i);
2019 }
2020 }
2021 ilUtil::sendSuccess($lng->txt("wiki_removed_imp_pages"), true);
2022 $ilCtrl->redirect($this, "editImportantPages");
2023 }

References $_POST, ilObjectGUI\$ctrl, $i, ilObjectGUI\$lng, and ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ renderSideBlock()

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

Side column.

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

1494 {
1495 global $DIC;
1496
1497 $tpl = $DIC["tpl"];
1498 $lng = $DIC->language();
1499 $ilAccess = $DIC->access();
1500 $ilCtrl = $DIC->ctrl();
1501
1502 $tpl->addJavaScript("./Modules/Wiki/js/WikiPres.js");
1503
1504 // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1505 // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1506 $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1507
1508 if ($a_wpg_id > 0 && !$a_wp) {
1509 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1510 $a_wp = ilWikiPage($a_wpg_id);
1511 }
1512
1513 // search block
1514 include_once './Services/Search/classes/class.ilRepositoryObjectSearchGUI.php';
1515 $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1516
1517
1518 // quick navigation
1519 if ($a_wpg_id > 0) {
1520 // rating
1521 $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1522 if (ilObjWiki::_lookupRating($wiki_id) &&
1523 // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1524 $a_wp->getRating()) {
1525 include_once("./Services/Rating/classes/class.ilRatingGUI.php");
1526 $rgui = new ilRatingGUI();
1527 $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1528 $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1529 $rgui->setYourRatingText("#");
1530 $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1531 }
1532
1533 // advanced metadata
1535 $cmd = null;
1536 if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1537 $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1538 $cmd = array(
1539 "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1540 "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1541 );
1542 }
1543 include_once("./Services/Object/classes/class.ilObjectMetaDataGUI.php");
1544 $wiki = new ilObjWiki($a_wiki_ref_id);
1545 $callback = $wiki->getLinkMetadataValues()
1546 ? array($wiki, "decorateAdvMDValue")
1547 : null;
1548 $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1549 $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1550 }
1551 }
1552
1553 // important pages
1554 include_once("./Modules/Wiki/classes/class.ilWikiImportantPagesBlockGUI.php");
1555 $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1556 $rcontent .= $imp_pages_block->getHTML();
1557
1558 // wiki functions block
1559 if ($a_wpg_id > 0) {
1560 include_once("./Modules/Wiki/classes/class.ilWikiFunctionsBlockGUI.php");
1561 $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1562 $wiki_functions_block->setPageObject($a_wp);
1563 $rcontent .= $wiki_functions_block->getHTML();
1564 }
1565
1566 $tpl->setRightContent($rcontent);
1567 }
Class ilObjWiki.
static _lookupRatingCategories($a_wiki_id)
Lookup whether rating categories are activated.
static _lookupRating($a_wiki_id)
Lookup whether rating is activated.
static getSearchBlockHTML($a_title)
Get standar search block html.
BlockGUI class for wiki functions block.
static lookupAdvancedMetadataHidden($a_page_id)

References $DIC, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilObject\_lookupObjId(), ilObjWiki\_lookupRating(), ilObjWiki\_lookupRatingCategories(), ilRepositoryObjectSearchGUI\getSearchBlockHTML(), and ilWikiPage\lookupAdvancedMetadataHidden().

Referenced by setSideBlock(), and ilWikiPageGUI\setSideBlock().

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

◆ saveGradingObject()

ilObjWikiGUI::saveGradingObject ( )

Save grading.

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

1121 {
1122 $ilCtrl = $this->ctrl;
1123 $lng = $this->lng;
1124
1125 $this->checkPermission("write");
1126
1127 $users = (is_array($_POST["user_id"])
1128 ? $_POST["user_id"]
1129 : array());
1130
1131 include_once("./Modules/Wiki/classes/class.ilWikiContributor.php");
1132 include_once("./Services/Tracking/classes/class.ilLPMarks.php");
1133 $saved = false;
1134 foreach ($users as $user_id) {
1135 if ($user_id != "") {
1136 $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
1137 $new_mark = ilUtil::stripSlashes($_POST['mark'][$user_id]);
1138 $new_comment = ilUtil::stripSlashes($_POST['lcomment'][$user_id]);
1139 $new_status = ilUtil::stripSlashes($_POST["status"][$user_id]);
1140
1141 if ($marks_obj->getMark() != $new_mark ||
1142 $marks_obj->getComment() != $new_comment ||
1143 ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) != $new_status) {
1144 ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
1145 $marks_obj->setMark($new_mark);
1146 $marks_obj->setComment($new_comment);
1147 $marks_obj->update();
1148 $saved = true;
1149 }
1150 }
1151 }
1152 if ($saved) {
1153 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1154 }
1155
1156 $ilCtrl->redirect($this, "listContributors");
1157 }
static _writeStatus($a_obj_id, $a_user_id, $a_status)
Write success status.

References $_POST, ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilWikiContributor\_lookupStatus(), ilWikiContributor\_writeStatus(), ilObjectGUI\checkPermission(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveObject()

ilObjWikiGUI::saveObject ( )

save object @access public

Reimplemented from ilObjectGUI.

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

371 {
375
376 if (!$this->checkPermissionBool("create", "", "wiki", $_GET["ref_id"])) {
377 $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
378 }
379
380 $this->initSettingsForm("create");
381 if ($this->form_gui->checkInput()) {
382 if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle"))) {
383 $short_item = $this->form_gui->getItemByPostVar("shorttitle");
384 $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
385 } else {
386 // create and insert forum in objecttree
387 $_POST["title"] = $this->form_gui->getInput("title");
388 $_POST["desc"] = $this->form_gui->getInput("description");
389 return parent::saveObject();
390 }
391 }
392
393 $this->form_gui->setValuesByPost();
394 $tpl->setContent($this->form_gui->getHtml());
395 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
static checkShortTitleAvailability($a_short_title)
Check availability of short title.

References $_GET, $_POST, $error, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\$tpl, checkPermissionBool(), ilObjWiki\checkShortTitleAvailability(), and initSettingsForm().

+ Here is the call graph for this function:

◆ saveOrderingAndIndentObject()

ilObjWikiGUI::saveOrderingAndIndentObject ( )

Save important pages ordering and indentation.

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

2029 {
2030 $ilCtrl = $this->ctrl;
2031 $lng = $this->lng;
2032
2033 $this->checkPermission("edit_wiki_navigation");
2034
2035 $this->object->saveOrderingAndIndentation($_POST["ord"], $_POST["indent"]);
2036 ilUtil::sendSuccess($lng->txt("wiki_ordering_and_indent_saved"), true);
2037 $ilCtrl->redirect($this, "editImportantPages");
2038 }

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

+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjWikiGUI::saveSettingsObject ( )

Save Settings.

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

1029 {
1030 $ilCtrl = $this->ctrl;
1031 $lng = $this->lng;
1034 $obj_service = $this->object_service;
1035
1036 $this->checkPermission("write");
1037
1038 $this->initSettingsForm();
1039
1040 if ($this->form_gui->checkInput()) {
1041 if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")) &&
1042 $this->form_gui->getInput("shorttitle") != $this->object->getShortTitle()) {
1043 $short_item = $this->form_gui->getItemByPostVar("shorttitle");
1044 $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
1045 } else {
1046 $this->object->setTitle($this->form_gui->getInput("title"));
1047 $this->object->setDescription($this->form_gui->getInput("description"));
1048 $this->object->setOnline($this->form_gui->getInput("online"));
1049 $this->object->setStartPage(ilWikiPage::lookupTitle($this->form_gui->getInput("startpage_id")));
1050 $this->object->setShortTitle($this->form_gui->getInput("shorttitle"));
1051 $this->object->setRatingOverall($this->form_gui->getInput("rating_overall"));
1052 $this->object->setRating($this->form_gui->getInput("rating"));
1053 // $this->object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
1054 $this->object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
1055 $this->object->setRatingCategories($this->form_gui->getInput("rating_ext"));
1056
1057 if (!$ilSetting->get("disable_comments")) {
1058 $this->object->setPublicNotes($this->form_gui->getInput("public_notes"));
1059 }
1060 $this->object->setIntroduction($this->form_gui->getInput("intro"));
1061 // $this->object->setImportantPages($this->form_gui->getInput("imp_pages"));
1062 $this->object->setPageToc($this->form_gui->getInput("page_toc"));
1063 $this->object->setLinkMetadataValues($this->form_gui->getInput("link_md_values"));
1064 $this->object->update();
1065
1066 // tile image
1067 $obj_service->commonSettings()->legacyForm($this->form_gui, $this->object)->saveTileImage();
1068
1069
1070 include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1072 $this->object->getId(),
1073 $this->form_gui,
1074 array(
1076 )
1077 );
1078
1079 // Update ecs export settings
1080 include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
1081 $ecs = new ilECSWikiSettings($this->object);
1082 if ($ecs->handleSettingsUpdate()) {
1083 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1084 $ilCtrl->redirect($this, "editSettings");
1085 }
1086 }
1087 }
1088
1089 $this->form_gui->setValuesByPost();
1090 $this->tpl->setContent($this->form_gui->getHTML());
1091 }
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.

References ilObjectGUI\$ctrl, $ilSetting, $ilUser, ilObjectGUI\$lng, ilObjectGUI\$object_service, ilObjectGUI\$settings, ilObjectGUI\$user, ilObjectGUI\checkPermission(), ilObjWiki\checkShortTitleAvailability(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, initSettingsForm(), ilWikiPage\lookupTitle(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ saveStyleSettingsObject()

ilObjWikiGUI::saveStyleSettingsObject ( )

Save style settings.

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

1887 {
1889
1890 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1891 if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1892 (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1893 || $this->object->getStyleSheetId() == 0)) {
1894 $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1895 $this->object->update();
1896 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1897 }
1898 $this->ctrl->redirect($this, "editStyleProperties");
1899 }

References $_POST, $ilSetting, ilObjectGUI\$settings, ilObjStyleSheet\_lookupStandard(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ setAsStartPageObject()

ilObjWikiGUI::setAsStartPageObject ( )

Confirm important pages deletion.

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

2044 {
2045 $ilCtrl = $this->ctrl;
2046 $lng = $this->lng;
2047
2048 $this->checkPermission("edit_wiki_navigation");
2049
2050 if (!is_array($_POST["imp_page_id"]) || count($_POST["imp_page_id"]) != 1) {
2051 ilUtil::sendInfo($lng->txt("wiki_select_one_item"), true);
2052 } else {
2053 $this->object->removeImportantPage((int) $_POST["imp_page_id"][0]);
2054 $this->object->setStartPage(ilWikiPage::lookupTitle((int) $_POST["imp_page_id"][0]));
2055 $this->object->update();
2056 ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2057 }
2058 $ilCtrl->redirect($this, "editImportantPages");
2059 }

References $_POST, ilObjectGUI\$ctrl, ilObjectGUI\$lng, ilObjectGUI\checkPermission(), ilWikiPage\lookupTitle(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjWikiGUI::setContentStyleSheet (   $tpl = null)

Set content style sheet.

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

1734 {
1735 $tpl = $this->tpl;
1736
1737 if ($tpl == null) {
1738 $tpl = $this->tpl;
1739 }
1740
1743 $this->object->getStyleSheetId(),
1744 "wiki"
1745 )
1746 ));
1748 }
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path

References ilObjectGUI\$tpl, ilObjStyleSheet\getContentStylePath(), ilObjStyleSheet\getEffectiveContentStyleId(), and ilObjStyleSheet\getSyntaxStylePath().

Referenced by executeCommand(), printViewObject(), and viewPageObject().

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

◆ setSettingsSubTabs()

ilObjWikiGUI::setSettingsSubTabs (   $a_active)

Set sub tabs.

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

731 {
732 $ilTabs = $this->tabs;
733 $ilCtrl = $this->ctrl;
735 $ilAccess = $this->access;
736
737 if (in_array(
738 $a_active,
739 array("general_settings", "style", "imp_pages", "rating_categories",
740 "page_templates", "advmd", "permission_settings", "notifications")
741 )) {
742 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
743 // general properties
744 $ilTabs->addSubTab(
745 "general_settings",
746 $lng->txt("wiki_general_settings"),
747 $ilCtrl->getLinkTarget($this, 'editSettings')
748 );
749
750 // permission settings
751 $ilTabs->addSubTab(
752 "permission_settings",
753 $lng->txt("obj_permission_settings"),
754 $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
755 );
756
757 // style properties
758 $ilTabs->addSubTab(
759 "style",
760 $lng->txt("wiki_style"),
761 $ilCtrl->getLinkTarget($this, 'editStyleProperties')
762 );
763 }
764
765 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
766 // important pages
767 $ilTabs->addSubTab(
768 "imp_pages",
769 $lng->txt("wiki_navigation"),
770 $ilCtrl->getLinkTarget($this, 'editImportantPages')
771 );
772 }
773
774 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
775 // page templates
776 $ilTabs->addSubTab(
777 "page_templates",
778 $lng->txt("wiki_page_templates"),
779 $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
780 );
781
782 // rating categories
783 if ($this->object->getRating() && $this->object->getRatingCategories()) {
784 $lng->loadLanguageModule("rating");
785 $ilTabs->addSubTab(
786 "rating_categories",
787 $lng->txt("rating_categories"),
788 $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
789 );
790 }
791
792 $ilTabs->addSubTab(
793 'notifications',
794 $lng->txt("notifications"),
795 $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
796 );
797 }
798
799 $ilTabs->activateSubTab($a_active);
800 }
801 }

References ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, and $tabs.

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

+ Here is the caller graph for this function:

◆ setSideBlock()

ilObjWikiGUI::setSideBlock (   $a_wpg_id = 0)

Side column.

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

1485 {
1486 ilObjWikiGUI::renderSideBlock($a_wpg_id, $this->object->getRefId());
1487 }
static renderSideBlock($a_wpg_id, $a_wiki_ref_id, $a_wp=null)
Side column.

References renderSideBlock().

Referenced by allPagesObject(), editSettingsObject(), editStylePropertiesObject(), executeCommand(), listContributorsObject(), newPagesObject(), orphanedPagesObject(), performSearchObject(), popularPagesObject(), and recentChangesObject().

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

◆ showTemplateSelectionObject()

ilObjWikiGUI::showTemplateSelectionObject ( )

Show template selection.

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

2110 {
2111 $lng = $this->lng;
2112 $tpl = $this->tpl;
2113 $ilTabs = $this->tabs;
2114 $ilCtrl = $this->ctrl;
2115
2116
2117 $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
2118 $ilTabs->clearTargets();
2119 ilUtil::sendInfo($lng->txt("wiki_page_not_exist_select_templ"));
2120
2121 $form = $this->initTemplateSelectionForm();
2122 $tpl->setContent($form->getHTML());
2123 }

References $_GET, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, initTemplateSelectionForm(), ilWikiUtil\makeUrlTitle(), and ilUtil\sendInfo().

+ Here is the call graph for this function:

◆ startUserHTMLExportObject()

ilObjWikiGUI::startUserHTMLExportObject ( )

Export html (as user)

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

2249 {
2250 $this->log->debug("start: " . $this->req_with_comments);
2251 $this->checkPermission("wiki_html_export");
2252 $this->object->startUserHTMLExport($this->req_with_comments);
2253 }

References ilObjectGUI\checkPermission().

+ Here is the call graph for this function:

◆ triggerAssignmentTool()

ilObjWikiGUI::triggerAssignmentTool ( )
protected

Trigger assignment tool.

Parameters

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

2303 {
2304 if (!is_object($this->object)) {
2305 return;
2306 }
2307 $ass_info = ilExcRepoObjAssignment::getInstance()->getAssignmentInfoOfObj(
2308 $this->object->getRefId(),
2309 $this->user->getId()
2310 );
2311 if (count($ass_info) > 0) {
2312 $ass_ids = array_map(function ($i) {
2313 return $i->getId();
2314 }, $ass_info);
2315 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::SHOW_EXC_ASSIGNMENT_INFO, true);
2316 $this->tool_context->current()->addAdditionalData(ilExerciseGSToolProvider::EXC_ASS_IDS, $ass_ids);
2317 $this->tool_context->current()->addAdditionalData(
2319 $this->getAssignmentButtons()
2320 );
2321 }
2322 }
getAssignmentButtons()
Get assignment buttons.

References $i, ilExerciseGSToolProvider\EXC_ASS_BUTTONS, ilExerciseGSToolProvider\EXC_ASS_IDS, getAssignmentButtons(), ilExcRepoObjAssignment\getInstance(), and ilExerciseGSToolProvider\SHOW_EXC_ASSIGNMENT_INFO.

Referenced by executeCommand().

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

◆ viewObject()

ilObjWikiGUI::viewObject ( )

Start page.

Reimplemented from ilObjectGUI.

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

349 {
350 $this->checkPermission("read");
351 $this->gotoStartPageObject();
352 }
gotoStartPageObject()
Go to start page.

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

+ Here is the call graph for this function:

◆ viewPageObject()

ilObjWikiGUI::viewPageObject ( )

view wiki page

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

1254 {
1255 $lng = $this->lng;
1256 $ilCtrl = $this->ctrl;
1257 $tpl = $this->tpl;
1258 $ilTabs = $this->tabs;
1259 $ilAccess = $this->access;
1260
1261 $this->checkPermission("read");
1262
1263 $ilTabs->clearTargets();
1264 $tpl->setHeaderActionMenu(null);
1265
1266 $page = ($_GET["page"] != "")
1267 ? $_GET["page"]
1268 : $this->object->getStartPage();
1269 $_GET["page"] = $page;
1270
1271 include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1272 if (!ilWikiPage::exists($this->object->getId(), $page)) {
1273 $page = $this->object->getStartPage();
1274 }
1275
1276 if (!ilWikiPage::exists($this->object->getId(), $page)) {
1277 ilUtil::sendInfo($lng->txt("wiki_no_start_page"), true);
1278 $ilCtrl->redirect($this, "infoScreen");
1279 return;
1280 }
1281
1282 // page exists, show it !
1283 $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($page));
1284
1285 include_once("./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1286 $wpage_gui = ilWikiPageGUI::getGUIForTitle(
1287 $this->object->getId(),
1289 0,
1290 $this->object->getRefId()
1291 );
1292 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1293 $wpage_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
1294 $this->object->getStyleSheetId(),
1295 "wiki"
1296 ));
1297
1298 $this->setContentStyleSheet();
1299
1300 //$wpage_gui->setSideBlock();
1301 $ilCtrl->setCmdClass("ilwikipagegui");
1302 $ilCtrl->setCmd("preview");
1303 if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
1304 (
1305 !$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
1306 $wpage_gui->getPageObject()->getBlocked()
1307 )) {
1308 $wpage_gui->setEnableEditing(false);
1309 }
1310
1311 // alter title and description
1312 //$tpl->setTitle($wpage_gui->getPageObject()->getTitle());
1313 //$tpl->setDescription($this->object->getTitle());
1314 if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1315 $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
1316 }
1317
1318
1319 $html = $ilCtrl->forwardCommand($wpage_gui);
1320 //$this->addPageTabs();
1321
1322 $tpl->setContent($html);
1323 }
static exists($a_wiki_id, $a_title)
Checks whether a page with given title exists.

References $_GET, ilObjectGUI\$access, ilObjectGUI\$ctrl, ilObjectGUI\$lng, $tabs, ilObjectGUI\$tpl, ilObjectGUI\checkPermission(), ilWikiPage\exists(), ilObjStyleSheet\getEffectiveContentStyleId(), ilWikiPageGUI\getGUIForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), ilUtil\sendInfo(), and setContentStyleSheet().

+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjWikiGUI::$error
protected

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

Referenced by infoScreen(), and saveObject().

◆ $help

ilObjWikiGUI::$help
protected

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

Referenced by getTabs().

◆ $log

ilObjWikiGUI::$log
protected

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

◆ $req_with_comments

ilObjWikiGUI::$req_with_comments = false
protected

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

◆ $tabs

◆ $tool_context

ilObjWikiGUI::$tool_context
protected

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

◆ $ui

ilObjWikiGUI::$ui
protected

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

Referenced by getAssignmentButtons().


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