ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 public. More...
 
 executeCommand ()
 
 isOnlineHelpWiki ()
 Is wiki an online help wiki? More...
 
 viewObject ()
 Start page. More...
 
 saveObject ()
 save object public More...
 
 afterSave (ilObject $newObj)
 save object 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 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 ()
 
 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 ($a_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...
 
- 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 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 ()
 list childs of current object 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...
 

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)
 
 getPrintPageIds ()
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. 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...
 
 showMountWebfolderIcon ()
 
 setTabs ()
 set admin tabs public More...
 
 setAdminTabs ()
 set admin tabs 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
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
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 public.

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

References $_GET, $DIC, $ilCtrl, ilObjectGUI\$lng, ilLoggerFactory\getLogger(), ilWikiUtil\makeUrlTitle(), settings(), and user().

51  {
52  global $DIC;
53 
54  $this->ctrl = $DIC->ctrl();
55  $this->lng = $DIC->language();
56  $this->user = $DIC->user();
57  $this->tpl = $DIC["tpl"];
58  $this->tabs = $DIC->tabs();
59  $this->access = $DIC->access();
60  $this->error = $DIC["ilErr"];
61  $this->settings = $DIC->settings();
62  $this->help = $DIC["ilHelp"];
63  $this->locator = $DIC["ilLocator"];
64  $this->toolbar = $DIC->toolbar();
65  $ilCtrl = $DIC->ctrl();
66  $lng = $DIC->language();
67 
68  $this->type = "wiki";
69 
70  $this->log = ilLoggerFactory::getLogger('wiki');
71 
72  parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
73  $lng->loadLanguageModule("obj");
74  $lng->loadLanguageModule("wiki");
75 
76  if ($_GET["page"] != "") {
77  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
78  }
79  }
settings()
Definition: settings.php:2
global $DIC
Definition: saml.php:7
$_GET["client_id"]
user()
Definition: user.php:4
global $ilCtrl
Definition: ilias.php:18
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjWikiGUI::_goto (   $a_target)
static

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

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

1152  {
1153  global $DIC;
1154 
1155  $ilAccess = $DIC->access();
1156  $ilErr = $DIC["ilErr"];
1157  $lng = $DIC->language();
1158  $ilNavigationHistory = $DIC["ilNavigationHistory"];
1159 
1160  $i = strpos($a_target, "_");
1161  if ($i > 0) {
1162  $a_page = substr($a_target, $i + 1);
1163  $a_target = substr($a_target, 0, $i);
1164  }
1165 
1166  if ($a_target == "wpage") {
1167  $a_page_arr = explode("_", $a_page);
1168  $wpg_id = (int) $a_page_arr[0];
1169  $ref_id = (int) $a_page_arr[1];
1170  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1171  $w_id = ilWikiPage::lookupWikiId($wpg_id);
1172  if ($ref_id > 0) {
1173  $refs = array($ref_id);
1174  } else {
1175  $refs = ilObject::_getAllReferences($w_id);
1176  }
1177  foreach ($refs as $r) {
1178  if ($ilAccess->checkAccess("read", "", $r)) {
1179  $a_target = $r;
1180  $a_page = ilWikiPage::lookupTitle($wpg_id);
1181  }
1182  }
1183  }
1184 
1185  if ($ilAccess->checkAccess("read", "", $a_target)) {
1186  $_GET["cmd"] = "viewPage";
1187  $_GET["ref_id"] = $a_target;
1188  $_GET["page"] = $a_page;
1189  $_GET["baseClass"] = "ilwikihandlergui";
1190  $_GET["cmdClass"] = "ilobjwikigui";
1191  /* if ($a_page != "")
1192  {
1193  $add = "&page=".rawurlencode($_GET["page"]);
1194  $ilNavigationHistory->addItem($_GET["ref_id"],
1195  "./goto.php?target=wiki_".$_GET["ref_id"].$add, "wiki");
1196  }*/
1197  include("ilias.php");
1198  exit;
1199  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
1200  ilObjectGUI::_gotoRepositoryNode($a_target, "infoScreen");
1201  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
1202  ilUtil::sendFailure(sprintf(
1203  $lng->txt("msg_no_perm_read_item"),
1205  ), true);
1207  }
1208 
1209  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1210  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
global $DIC
Definition: saml.php:7
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
static lookupWikiId($a_page_id)
Lookup wiki id.
$r
Definition: example_031.php:79
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
static _lookupObjId($a_id)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
exit
Definition: backend.php:16
$i
Definition: disco.tpl.php:19
+ Here is the call graph for this function:

◆ addImportantPageObject()

ilObjWikiGUI::addImportantPageObject ( )

Add important pages.

Parameters

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

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

1961  {
1962  $ilCtrl = $this->ctrl;
1963  $lng = $this->lng;
1964 
1965  $this->checkPermission("edit_wiki_navigation");
1966 
1967  if ($_POST["imp_page_id"] > 0) {
1968  $this->object->addImportantPage((int) $_POST["imp_page_id"]);
1969  ilUtil::sendSuccess($lng->txt("wiki_imp_page_added"), true);
1970  }
1971  $ilCtrl->redirect($this, "editImportantPages");
1972  }
global $ilCtrl
Definition: ilias.php:18
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjWikiGUI::addLocatorItems ( )

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

References $_GET, ilObjectGUI\$locator, and getGotoLink().

1138  {
1139  $ilLocator = $this->locator;
1140 
1141  if (is_object($this->object)) {
1142  $ilLocator->addItem(
1143  $this->object->getTitle(),
1144  $this->getGotoLink($this->object->getRefId()),
1145  "",
1146  $_GET["ref_id"]
1147  );
1148  }
1149  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
$_GET["client_id"]
+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

Add Pages SubTabs.

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

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

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

556  {
557  $ilTabs = $this->tabs;
559 
560  $ilTabs->activateTab("wiki_pages");
561 
562  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
563  $ilCtrl->setParameter(
564  $this,
565  "wpg_id",
567  $this->object->getId(),
569  )
570  );
571  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
572  $ilTabs->addSubTabTarget(
573  "wiki_all_pages",
574  $this->ctrl->getLinkTarget($this, "allPages"),
575  "allPages"
576  );
577  $ilTabs->addSubTabTarget(
578  "wiki_recent_changes",
579  $this->ctrl->getLinkTarget($this, "recentChanges"),
580  "recentChanges"
581  );
582  $ilTabs->addSubTabTarget(
583  "wiki_new_pages",
584  $this->ctrl->getLinkTarget($this, "newPages"),
585  "newPages"
586  );
587  $ilTabs->addSubTabTarget(
588  "wiki_popular_pages",
589  $this->ctrl->getLinkTarget($this, "popularPages"),
590  "popularPages"
591  );
592  $ilTabs->addSubTabTarget(
593  "wiki_orphaned_pages",
594  $this->ctrl->getLinkTarget($this, "orphanedPages"),
595  "orphanedPages"
596  );
597  }
$_GET["client_id"]
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
global $ilCtrl
Definition: ilias.php:18
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static makeDbTitle($a_par)
Handle page GET parameter.
+ 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 522 of file class.ilObjWikiGUI.php.

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

523  {
524  $ilTabs = $this->tabs;
526 
527  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
528  $ilCtrl->setParameter(
529  $this,
530  "wpg_id",
531  ilWikiPage::getPageIdForTitle($this->object->getId(), ilWikiUtil::makeDbTitle($_GET["page"]))
532  );
533  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
534  $ilTabs->addTarget(
535  "wiki_what_links_here",
536  $this->ctrl->getLinkTargetByClass(
537  "ilwikipagegui",
538  "whatLinksHere"
539  ),
540  "whatLinksHere"
541  );
542  $ilTabs->addTarget(
543  "wiki_print_view",
544  $this->ctrl->getLinkTargetByClass(
545  "ilwikipagegui",
546  "printViewSelection"
547  ),
548  "printViewSelection"
549  );
550  }
$_GET["client_id"]
static getPageIdForTitle($a_wiki_id, $a_title)
Get wiki page object for id and title.
global $ilCtrl
Definition: ilias.php:18
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static makeDbTitle($a_par)
Handle page GET parameter.
+ Here is the call graph for this function:

◆ afterSave()

ilObjWikiGUI::afterSave ( ilObject  $newObj)

save object public

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

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

379  {
381 
382  $newObj->setTitle($this->form_gui->getInput("title"));
383  $newObj->setDescription($this->form_gui->getInput("description"));
384  $newObj->setIntroduction($this->form_gui->getInput("intro"));
385  $newObj->setStartPage($this->form_gui->getInput("startpage"));
386  $newObj->setShortTitle($this->form_gui->getInput("shorttitle"));
387  $newObj->setRating($this->form_gui->getInput("rating"));
388  // $newObj->setRatingAsBlock($this->form_gui->getInput("rating_side"));
389  $newObj->setRatingForNewPages($this->form_gui->getInput("rating_new"));
390  $newObj->setRatingCategories($this->form_gui->getInput("rating_ext"));
391 
392  $newObj->setRatingOverall($this->form_gui->getInput("rating_overall"));
393  $newObj->setPageToc($this->form_gui->getInput("page_toc"));
394 
395 
396 
397  if (!$ilSetting->get("disable_comments")) {
398  $newObj->setPublicNotes($this->form_gui->getInput("public_notes"));
399  }
400  $newObj->setOnline($this->form_gui->getInput("online"));
401  $newObj->update();
402 
403  // always send a message
404  ilUtil::sendSuccess($this->lng->txt("object_added"), true);
406  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
setTitle($a_title)
set object title
global $ilSetting
Definition: privfeed.php:17
getRefId()
get reference id public
setDescription($a_desc)
set object description
update()
update object in db
static redirect($a_script)
+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

All pages of wiki.

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

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

1307  {
1308  $tpl = $this->tpl;
1309 
1310  $this->checkPermission("read");
1311 
1312  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1313 
1314  $this->addPagesSubTabs();
1315 
1316  $table_gui = new ilWikiPagesTableGUI(
1317  $this,
1318  "allPages",
1319  $this->object->getId(),
1321  );
1322 
1323  $this->setSideBlock();
1324  $tpl->setContent($table_gui->getHTML());
1325  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
const IL_WIKI_ALL_PAGES
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ cancelCreationPageUsingTemplateObject()

ilObjWikiGUI::cancelCreationPageUsingTemplateObject ( )

Cancel page creation using a template.

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

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

2194  {
2195  $ilCtrl = $this->ctrl;
2196 
2197  // redirect to newly created page
2198  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($_GET["from_page"])));
2199  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
2200  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
+ 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

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

References $a_type, and ilWikiPerm\check().

Referenced by saveObject().

2212  {
2213  if ($a_perm == "create") {
2214  return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_ref_id);
2215  } else {
2216  if (!$a_ref_id) {
2217  $a_ref_id = $this->object->getRefId();
2218  }
2219  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
2220  return ilWikiPerm::check($a_perm, $a_ref_id, $a_cmd);
2221  }
2222  }
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
$a_type
Definition: workflow.php:92
+ 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 1977 of file class.ilObjWikiGUI.php.

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

1978  {
1979  $ilCtrl = $this->ctrl;
1980  $tpl = $this->tpl;
1981  $lng = $this->lng;
1982 
1983  if (!is_array($_POST["imp_page_id"]) || count($_POST["imp_page_id"]) == 0) {
1984  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
1985  $ilCtrl->redirect($this, "editImportantPages");
1986  } else {
1987  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1988  $cgui = new ilConfirmationGUI();
1989  $cgui->setFormAction($ilCtrl->getFormAction($this));
1990  $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1991  $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1992  $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1993 
1994  foreach ($_POST["imp_page_id"] as $i) {
1995  $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1996  }
1997 
1998  $tpl->setContent($cgui->getHTML());
1999  }
2000  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
$i
Definition: disco.tpl.php:19
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

Save creation with template form.

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

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

2168  {
2169  $tpl = $this->tpl;
2170  $lng = $this->lng;
2171  $ilCtrl = $this->ctrl;
2172 
2173  $form = $this->initTemplateSelectionForm();
2174  if ($form->checkInput()) {
2175  $a_page = $_POST["page"];
2176  $this->object->createWikiPage($a_page, (int) $_POST["page_templ"]);
2177 
2178  // redirect to newly created page
2179  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
2180  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
2181 
2182  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2183  $ilCtrl->redirect($this, "");
2184  } else {
2185  $form->setValuesByPost();
2186  $tpl->setContent($form->getHtml());
2187  }
2188  }
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
initTemplateSelectionForm()
Init template selection form.
$_POST["username"]
+ Here is the call graph for this function:

◆ createStyleObject()

ilObjWikiGUI::createStyleObject ( )

Create Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1856  {
1857  $ilCtrl = $this->ctrl;
1858 
1859  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1860  }
global $ilCtrl
Definition: ilias.php:18

◆ deleteStyleObject()

ilObjWikiGUI::deleteStyleObject ( )

Delete Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1876  {
1877  $ilCtrl = $this->ctrl;
1878 
1879  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1880  }
global $ilCtrl
Definition: ilias.php:18

◆ downloadUserHTMLExportObject()

ilObjWikiGUI::downloadUserHTMLExportObject ( )

Download user html export file.

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

References ilObjectGUI\checkPermission().

2275  {
2276  $this->log->debug("download");
2277  $this->checkPermission("wiki_html_export");
2278  $this->object->deliverUserHTMLExport();
2279  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ editImportantPagesObject()

ilObjWikiGUI::editImportantPagesObject ( )

List important pages.

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

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

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

◆ editSettingsObject()

ilObjWikiGUI::editSettingsObject ( )

Edit settings.

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

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

784  {
785  $tpl = $this->tpl;
786 
787  $this->checkPermission("write");
788 
789  $this->setSettingsSubTabs("general_settings");
790 
791  $this->initSettingsForm();
792  $this->getSettingsFormValues();
793 
794  // Edit ecs export settings
795  include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
796  $ecs = new ilECSWikiSettings($this->object);
797  $ecs->addSettingsToForm($this->form_gui, 'wiki');
798 
799  $tpl->setContent($this->form_gui->getHtml());
800  $this->setSideBlock();
801  }
setSideBlock($a_wpg_id=0)
Side column.
setSettingsSubTabs($a_active)
Set sub tabs.
Class ilECSWikiSettings.
getSettingsFormValues($a_mode="edit")
initSettingsForm($a_mode="edit")
Init Settings Form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ editStyleObject()

ilObjWikiGUI::editStyleObject ( )

Edit Style.

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

References ilObjectGUI\$ctrl, and $ilCtrl.

1866  {
1867  $ilCtrl = $this->ctrl;
1868 
1869  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1870  }
global $ilCtrl
Definition: ilias.php:18

◆ editStylePropertiesObject()

ilObjWikiGUI::editStylePropertiesObject ( )

Edit style properties.

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

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

1754  {
1755  $ilTabs = $this->tabs;
1756  $tpl = $this->tpl;
1757 
1758  $this->checkPermission("write");
1759 
1760  $this->initStylePropertiesForm();
1761  $tpl->setContent($this->form->getHTML());
1762 
1763  $ilTabs->activateTab("settings");
1764  $this->setSettingsSubTabs("style");
1765 
1766  $this->setSideBlock();
1767  }
setSideBlock($a_wpg_id=0)
Side column.
initStylePropertiesForm()
Init style properties form.
setSettingsSubTabs($a_active)
Set sub tabs.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ executeCommand()

ilObjWikiGUI::executeCommand ( )

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

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

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

◆ exportHTML()

ilObjWikiGUI::exportHTML ( )

Create html package.

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

2065  {
2066  require_once("./Modules/Wiki/classes/class.ilWikiHTMLExport.php");
2067  $cont_exp = new ilWikiHTMLExport($this->object);
2068  $cont_exp->buildExportFile();
2069  }
Wiki HTML exporter class.

◆ getGotoLink()

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

Get goto link.

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

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

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

1216  {
1217  if ($a_page == "") {
1219  }
1220 
1221  $goto = "goto.php?target=wiki_" . $a_ref_id . "_" .
1222  ilWikiUtil::makeUrlTitle($a_page);
1223 
1224  return $goto;
1225  }
static _lookupStartPage($a_wiki_id)
Lookup start page.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static _lookupObjId($a_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPrintPageIds()

ilObjWikiGUI::getPrintPageIds ( )
protected

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

References $_GET, and $_POST.

Referenced by printViewObject().

1578  {
1579  // multiple ordered page ids
1580  if (is_array($_POST["wordr"])) {
1581  asort($_POST["wordr"]);
1582  $page_ids = array_keys($_POST["wordr"]);
1583  }
1584  // single page
1585  elseif ((int) $_GET["wpg_id"]) {
1586  $page_ids = array((int) $_GET["wpg_id"]);
1587  }
1588 
1589  return $page_ids;
1590  }
$_GET["client_id"]
$_POST["username"]
+ Here is the caller graph for this function:

◆ getSettingsFormValues()

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

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

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

Referenced by editSettingsObject(), and initCreationForms().

966  {
967  $lng = $this->lng;
969 
970  // set values
971  if ($a_mode == "create") {
972  //$values["startpage"] = $lng->txt("wiki_main_page");
973  $values["rating_new"] = true;
974 
975  $values["rating_overall"] = ilObject::hasAutoRating("wiki", $_GET["ref_id"]);
976 
977  $this->form_gui->setValuesByArray($values);
978  } else {
979  $values["online"] = $this->object->getOnline();
980  $values["title"] = $this->object->getTitle();
981  //$values["startpage"] = $this->object->getStartPage();
982  $values["startpage_id"] = ilWikiPage::_getPageIdForWikiTitle($this->object->getId(), $this->object->getStartPage());
983  $values["shorttitle"] = $this->object->getShortTitle();
984  $values["description"] = $this->object->getLongDescription();
985  $values["rating_overall"] = $this->object->getRatingOverall();
986  $values["rating"] = $this->object->getRating();
987  // $values["rating_side"] = $this->object->getRatingAsBlock();
988  $values["rating_new"] = $this->object->getRatingForNewPages();
989  $values["rating_ext"] = $this->object->getRatingCategories();
990  $values["public_notes"] = $this->object->getPublicNotes();
991  $values["intro"] = $this->object->getIntroduction();
992  // $values["imp_pages"] = $this->object->getImportantPages();
993  $values["page_toc"] = $this->object->getPageToc();
994  $values["link_md_values"] = $this->object->getLinkMetadataValues();
995 
996  // only set given values (because of adv. metadata)
997  $this->form_gui->setValuesByArray($values, true);
998  }
999  }
$_GET["client_id"]
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.
$values
$ilUser
Definition: imgupload.php:18
+ 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 2094 of file class.ilObjWikiGUI.php.

References ilWikiPage\lookupTitle().

2095  {
2096  include_once "Modules/Wiki/classes/class.ilWikiPage.php";
2097  return ilWikiPage::lookupTitle($a_id);
2098  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
+ Here is the call graph for this function:

◆ getTabs()

ilObjWikiGUI::getTabs ( )

get tabs public

Parameters
objecttabs gui object

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

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

605  {
607  $ilAccess = $this->access;
608  $lng = $this->lng;
609  $ilHelp = $this->help;
610 
611  $ilHelp->setScreenIdComponent("wiki");
612 
613  // wiki tabs
614  if (in_array($ilCtrl->getCmdClass(), array("", "ilobjwikigui",
615  "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui", "ilobjnotificationsettingsgui", "iltaxmdgui",
616  "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui'
617  )) || (in_array($ilCtrl->getNextClass(), array("ilpermissiongui")))) {
618  if ($_GET["page"] != "") {
619  $this->tabs_gui->setBackTarget(
620  $lng->txt("wiki_last_visited_page"),
621  $this->getGotoLink(
622  $_GET["ref_id"],
624  )
625  );
626  }
627 
628  // pages
629  if ($ilAccess->checkAccess('read', "", $this->object->getRefId())) {
630  $this->tabs_gui->addTab(
631  "wiki_pages",
632  $lng->txt("wiki_pages"),
633  $this->ctrl->getLinkTarget($this, "allPages")
634  );
635  }
636 
637  // info screen
638  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId())) {
639  $this->tabs_gui->addTab(
640  "info_short",
641  $lng->txt("info_short"),
642  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
643  );
644  }
645 
646  // settings
647  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
648  $this->tabs_gui->addTab(
649  "settings",
650  $lng->txt("settings"),
651  $this->ctrl->getLinkTarget($this, "editSettings")
652  );
653 
654  // metadata
655  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
656  $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
657  $mdtab = $mdgui->getTab();
658  if ($mdtab) {
659  $this->tabs_gui->addTab(
660  "advmd",
661  $this->lng->txt("meta_data"),
662  $mdtab
663  );
664  }
665  }
666 
667  // contributors
668  if ($ilAccess->checkAccess('write', "", $this->object->getRefId())) {
669  $this->tabs_gui->addTab(
670  "wiki_contributors",
671  $lng->txt("wiki_contributors"),
672  $this->ctrl->getLinkTarget($this, "listContributors")
673  );
674  }
675 
676  // statistics
677  if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId())) {
678  $this->tabs_gui->addTab(
679  "statistics",
680  $lng->txt("statistics"),
681  $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial")
682  );
683  }
684 
685  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
686  $this->tabs_gui->addTab(
687  "export",
688  $lng->txt("export"),
689  $this->ctrl->getLinkTargetByClass("ilexportgui", "")
690  );
691  }
692 
693  // edit permissions
694  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId())) {
695  $this->tabs_gui->addTab(
696  "perm_settings",
697  $lng->txt("perm_settings"),
698  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm")
699  );
700  }
701  }
702  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
Class ilObjectMetaDataGUI.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static makeDbTitle($a_par)
Handle page GET parameter.
+ Here is the call graph for this function:

◆ getUserHTMLExportProgressObject()

ilObjWikiGUI::getUserHTMLExportProgressObject ( )

Get user html export progress.

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

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

2253  {
2254  $this->log->debug("get progress");
2255  $this->checkPermission("wiki_html_export");
2256  $p = $this->object->getUserHTMLExportProgress();
2257 
2258  include_once("./Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php");
2260  $pb->setCurrent($p["progress"]);
2261 
2262  $r = new stdClass();
2263  $r->progressBar = $pb->render();
2264  $r->status = $p["status"];
2265  include_once("./Services/JSON/classes/class.ilJsonUtil.php");
2266  $this->log->debug("status: " . $r->status);
2268  exit;
2269  }
$r
Definition: example_031.php:79
static encode($mixed, $suppress_native=false)
static getInstance()
Factory.
exit
Definition: backend.php:16
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ 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 1380 of file class.ilObjWikiGUI.php.

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

Referenced by randomPageObject().

1381  {
1382  $ilCtrl = $this->ctrl;
1383 
1384  if ($a_page == "") {
1385  $a_page = $_GET["page"];
1386  }
1387 
1388  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1390  $this->object->getId(),
1391  ilWikiUtil::makeDbTitle($a_page)
1392  )) {
1393  // to do: get rid of this redirect
1394  ilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId(), $a_page));
1395  } else {
1396  if (!$this->object->getTemplateSelectionOnCreation()) {
1397  // check length
1398  include_once("./Services/Utilities/classes/class.ilStr.php");
1399  if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200) {
1400  ilUtil::sendFailure($this->lng->txt("wiki_page_title_too_long") . " (" . $a_page . ")", true);
1401  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
1402  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1403  }
1404  $this->object->createWikiPage($a_page);
1405 
1406  // redirect to newly created page
1407  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1408  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1409  } else {
1410  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
1411  $ilCtrl->setParameter($this, "from_page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
1412  $ilCtrl->redirect($this, "showTemplateSelection");
1413  }
1414  }
1415  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
static strLen($a_string)
Definition: class.ilStr.php:78
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static makeDbTitle($a_par)
Handle page GET parameter.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static _wikiPageExists($a_wiki_id, $a_title)
Check whether page exists for wiki or not.
static redirect($a_script)
+ 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 512 of file class.ilObjWikiGUI.php.

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

Referenced by viewObject().

513  {
515 
516  ilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId()));
517  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
global $ilCtrl
Definition: ilias.php:18
static redirect($a_script)
+ 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 424 of file class.ilObjWikiGUI.php.

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

425  {
426  $ilAccess = $this->access;
428  $ilTabs = $this->tabs;
429  $lng = $this->lng;
431 
432  $ilTabs->activateTab("info_short");
433 
434  if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId())) {
435  $ilErr->raiseError($this->lng->txt("msg_no_perm_read"), $ilErr->MESSAGE);
436  }
437 
438  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
439  $info = new ilInfoScreenGUI($this);
440  $info->enablePrivateNotes();
441  if (trim($this->object->getIntroduction()) != "") {
442  $info->addSection($lng->txt("wiki_introduction"));
443  $info->addProperty("", nl2br($this->object->getIntroduction()));
444  }
445 
446  // feedback from tutor; mark, status, comment
447  include_once("./Modules/Wiki/classes/class.ilWikiContributor.php");
448  include_once("./Services/Tracking/classes/class.ilLPMarks.php");
449  $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
450  $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
451  $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
452  if ($lpcomment != "" || $mark != "" || $status != ilWikiContributor::STATUS_NOT_GRADED) {
453  $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
454  if ($lpcomment != "") {
455  $info->addProperty(
456  $this->lng->txt("wiki_comment"),
457  $lpcomment
458  );
459  }
460  if ($mark != "") {
461  $info->addProperty(
462  $this->lng->txt("wiki_mark"),
463  $mark
464  );
465  }
466 
467  if ($status == ilWikiContributor::STATUS_PASSED) {
468  $info->addProperty(
469  $this->lng->txt("status"),
470  $this->lng->txt("wiki_passed")
471  );
472  }
473  if ($status == ilWikiContributor::STATUS_FAILED) {
474  $info->addProperty(
475  $this->lng->txt("status"),
476  $this->lng->txt("wiki_failed")
477  );
478  }
479  }
480 
481  /*
482  $info->enableNews();
483  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
484  {
485  //$info->enableNewsEditing();
486  $info->setBlockProperty("news", "settings", true);
487  }*/
488 
489  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
490  $info->addButton($lng->txt("wiki_start_page"), ilObjWikiGUI::getGotoLink($this->object->getRefId()));
491  }
492 
493  // general information
494  $this->lng->loadLanguageModule("meta");
495  $this->lng->loadLanguageModule("wiki");
496 
497  //$info->addSection($this->lng->txt("meta_general"));
498  //$info->addProperty($this->lng->txt("mcst_nr_items"),
499  // (int) count($med_items));
500 
501  // forward the command
502  $this->ctrl->forwardCommand($info);
503 
504  if ($ilAccess->checkAccess("read", "", $this->object->getRefId())) {
505  // $this->setSideBlock();
506  }
507  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
Class ilInfoScreenGUI.
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
$ilUser
Definition: imgupload.php:18
static _lookupMark($a_usr_id, $a_obj_id)
static _lookupComment($a_usr_id, $a_obj_id)
$info
Definition: index.php:5
+ 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 413 of file class.ilObjWikiGUI.php.

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

414  {
415  $this->checkPermission("visible");
416  $this->ctrl->setCmd("showSummary");
417  $this->ctrl->setCmdClass("ilinfoscreengui");
418  $this->infoScreen();
419  }
infoScreen()
show information screen
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ initCreationForms()

ilObjWikiGUI::initCreationForms (   $a_new_type)
protected

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

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

332  {
333  $this->initSettingsForm("create");
334  $this->getSettingsFormValues("create");
335 
336  $forms = array(self::CFORM_NEW => $this->form_gui,
337  self::CFORM_IMPORT => $this->initImportForm($a_new_type),
338  self::CFORM_CLONE => $this->fillCloneTemplate(null, $a_new_type));
339 
340  return $forms;
341  }
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...
initImportForm($a_new_type)
Init object import form.
getSettingsFormValues($a_mode="edit")
initSettingsForm($a_mode="edit")
Init Settings Form.
+ Here is the call graph for this function:

◆ initSettingsForm()

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

Init Settings Form.

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

References ilObjectGUI\$ctrl, $ilCtrl, $ilSetting, ilObjectGUI\$lng, ilObjectGUI\$object_service, PHPMailer\PHPMailer\$options, $section, ilObjectGUI\$settings, $si, $tabs, ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilSubEnabledFormPropertyGUI\addSubItem(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilWikiPage\getAllWikiPages(), ilUtil\getImagePath(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilTextAreaInputGUI\setCols(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), and ilUtil\shortenText().

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

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

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

Referenced by editStylePropertiesObject().

1773  {
1774  $ilCtrl = $this->ctrl;
1775  $lng = $this->lng;
1776  $ilTabs = $this->tabs;
1778 
1779  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1780  $lng->loadLanguageModule("style");
1781 
1782  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1783  $this->form = new ilPropertyFormGUI();
1784 
1785  $fixed_style = $ilSetting->get("fixed_content_style_id");
1786  $style_id = $this->object->getStyleSheetId();
1787 
1788  if ($fixed_style > 0) {
1789  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1790  $st->setValue(ilObject::_lookupTitle($fixed_style) . " (" .
1791  $this->lng->txt("global_fixed") . ")");
1792  $this->form->addItem($st);
1793  } else {
1795  true,
1796  false,
1797  $_GET["ref_id"]
1798  );
1799 
1800  $st_styles[0] = $this->lng->txt("default");
1801  ksort($st_styles);
1802 
1803  if ($style_id > 0) {
1804  // individual style
1805  if (!ilObjStyleSheet::_lookupStandard($style_id)) {
1806  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1807  $st->setValue(ilObject::_lookupTitle($style_id));
1808  $this->form->addItem($st);
1809 
1810  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1811 
1812  // delete command
1813  $this->form->addCommandButton(
1814  "editStyle",
1815  $lng->txt("style_edit_style")
1816  );
1817  $this->form->addCommandButton(
1818  "deleteStyle",
1819  $lng->txt("style_delete_style")
1820  );
1821  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1822  }
1823  }
1824 
1825  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id)) {
1826  $style_sel = ilUtil::formSelect(
1827  $style_id,
1828  "style_id",
1829  $st_styles,
1830  false,
1831  true
1832  );
1833  $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
1834  $style_sel->setOptions($st_styles);
1835  $style_sel->setValue($style_id);
1836  $this->form->addItem($style_sel);
1837  //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1838  $this->form->addCommandButton(
1839  "saveStyleSettings",
1840  $lng->txt("save")
1841  );
1842  $this->form->addCommandButton(
1843  "createStyle",
1844  $lng->txt("sty_create_ind_style")
1845  );
1846  }
1847  }
1848  $this->form->setTitle($lng->txt("wiki_style"));
1849  $this->form->setFormAction($ilCtrl->getFormAction($this));
1850  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
$_GET["client_id"]
static _lookupTitle($a_id)
lookup object title
static _getStandardStyles( $a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupStandard($a_id)
Lookup standard flag.
global $ilCtrl
Definition: ilias.php:18
setOptions($a_options)
Set Options.
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.
This class represents a non editable value in a property form.
global $ilSetting
Definition: privfeed.php:17
+ 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 2122 of file class.ilObjWikiGUI.php.

References $_GET, ilObjectGUI\$ctrl, $form, $ilCtrl, ilObjectGUI\$lng, $t, ilWikiPageTemplate\getAllInfo(), ilFormPropertyGUI\setRequired(), and ilWikiPageTemplate\TYPE_NEW_PAGES.

Referenced by createPageUsingTemplateObject(), and showTemplateSelectionObject().

2123  {
2124  $lng = $this->lng;
2125  $ilCtrl = $this->ctrl;
2126 
2127  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
2128  $form = new ilPropertyFormGUI();
2129 
2130  // page name
2131  $hi = new ilHiddenInputGUI("page");
2132  $hi->setValue($_GET["page"]);
2133  $form->addItem($hi);
2134 
2135  // page template
2136  $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
2137  $radg->setRequired(true);
2138 
2139  if ($this->object->getEmptyPageTemplate()) {
2140  $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
2141  $radg->addOption($op1);
2142  }
2143 
2144  include_once("./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
2145  $wt = new ilWikiPageTemplate($this->object->getId());
2147  foreach ($ts as $t) {
2148  $op = new ilRadioOption($t["title"], $t["wpage_id"]);
2149  $radg->addOption($op);
2150  }
2151 
2152  $form->addItem($radg);
2153 
2154  // save and cancel commands
2155  $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
2156  $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
2157 
2158  $form->setTitle($lng->txt("wiki_new_page") . ": " . $_GET["page"]);
2159  $form->setFormAction($ilCtrl->getFormAction($this));
2160 
2161  return $form;
2162  }
This class represents an option in a radio group.
getAllInfo($a_type=self::TYPE_ALL)
Get all info.
This class represents a property form user interface.
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
This class represents a hidden form property in a property form.
This class represents a property in a property form.
if(isset($_POST['submit'])) $form
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initUserHTMLExportObject()

ilObjWikiGUI::initUserHTMLExportObject ( )

Export html (as user)

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

References ilObjectGUI\checkPermission().

2233  {
2234  $this->log->debug("init");
2235  $this->checkPermission("wiki_html_export");
2236  $this->object->initUserHTMLExport();
2237  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ 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 314 of file class.ilObjWikiGUI.php.

References ilObjWiki\isOnlineHelpWiki().

315  {
316  if (is_object($this->object)) {
317  return ilObjWiki::isOnlineHelpWiki($this->object->getRefId());
318  }
319  return false;
320  }
static isOnlineHelpWiki($a_ref_id)
Is wiki an online help wiki?
+ Here is the call graph for this function:

◆ listContributorsObject()

ilObjWikiGUI::listContributorsObject ( )

List all contributors.

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

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

1074  {
1075  $tpl = $this->tpl;
1076  $ilTabs = $this->tabs;
1077 
1078  $this->checkPermission("write");
1079  $ilTabs->activateTab("wiki_contributors");
1080 
1081  include_once("./Modules/Wiki/classes/class.ilWikiContributorsTableGUI.php");
1082 
1083  $table_gui = new ilWikiContributorsTableGUI(
1084  $this,
1085  "listContributors",
1086  $this->object->getId()
1087  );
1088 
1089  $tpl->setContent($table_gui->getHTML());
1090 
1091  $this->setSideBlock();
1092  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for listing users that contributed to the wiki.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ 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 2078 of file class.ilObjWikiGUI.php.

2079  {
2080  include_once "Modules/Wiki/classes/class.ilWikiPage.php";
2081  $page = new ilWikiPage($a_page_id);
2082  if ($page->getWikiId() == $a_wiki_id) {
2083  return $page->getTitle();
2084  }
2085  }
Class ilWikiPage.

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

Latest pages.

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

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

1557  {
1558  $tpl = $this->tpl;
1559 
1560  $this->checkPermission("read");
1561 
1562  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1563 
1564  $this->addPagesSubTabs();
1565 
1566  $table_gui = new ilWikiPagesTableGUI(
1567  $this,
1568  "newPages",
1569  $this->object->getId(),
1571  );
1572 
1573  $this->setSideBlock();
1574  $tpl->setContent($table_gui->getHTML());
1575  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
const IL_WIKI_NEW_PAGES
+ Here is the call graph for this function:

◆ orphanedPagesObject()

ilObjWikiGUI::orphanedPagesObject ( )

Orphaned pages.

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

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

1355  {
1356  $tpl = $this->tpl;
1357 
1358  $this->checkPermission("read");
1359 
1360  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1361 
1362  $this->addPagesSubTabs();
1363 
1364  $table_gui = new ilWikiPagesTableGUI(
1365  $this,
1366  "orphanedPages",
1367  $this->object->getId(),
1369  );
1370 
1371  $this->setSideBlock();
1372  $tpl->setContent($table_gui->getHTML());
1373  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
const IL_WIKI_ORPHANED_PAGES
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ pdfExportObject()

ilObjWikiGUI::pdfExportObject ( )

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

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

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

◆ performSearchObject()

ilObjWikiGUI::performSearchObject ( )

Search.

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

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

1695  {
1696  $tpl = $this->tpl;
1697  $ilTabs = $this->tabs;
1698  $ilCtrl = $this->ctrl;
1699  $lng = $this->lng;
1700 
1701  $this->checkPermission("read");
1702 
1703  include_once("./Modules/Wiki/classes/class.ilWikiSearchResultsTableGUI.php");
1704 
1705  $ilTabs->setTabActive("wiki_search_results");
1706 
1707  if (trim($_POST["search_term"]) == "") {
1708  ilUtil::sendFailure($lng->txt("wiki_please_enter_search_term"), true);
1709  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1710  }
1711 
1712  $search_results = ilObjWiki::_performSearch(
1713  $this->object->getId(),
1714  ilUtil::stripSlashes($_POST["search_term"])
1715  );
1716  $table_gui = new ilWikiSearchResultsTableGUI(
1717  $this,
1718  "performSearch",
1719  $this->object->getId(),
1720  $search_results,
1721  $_POST["search_term"]
1722  );
1723 
1724  $this->setSideBlock();
1725  $tpl->setContent($table_gui->getHTML());
1726  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for recent changes in wiki.
global $ilCtrl
Definition: ilias.php:18
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
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ popularPagesObject()

ilObjWikiGUI::popularPagesObject ( )

Popular pages.

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

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

1331  {
1332  $tpl = $this->tpl;
1333 
1334  $this->checkPermission("read");
1335 
1336  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1337 
1338  $this->addPagesSubTabs();
1339 
1340  $table_gui = new ilWikiPagesTableGUI(
1341  $this,
1342  "popularPages",
1343  $this->object->getId(),
1345  );
1346 
1347  $this->setSideBlock();
1348  $tpl->setContent($table_gui->getHTML());
1349  }
setSideBlock($a_wpg_id=0)
Side column.
const IL_WIKI_POPULAR_PAGES
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ printViewObject()

ilObjWikiGUI::printViewObject (   $a_pdf_export = false)

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

References ilObjectGUI\$tpl, exit, ilObjStyleSheet\getContentPrintStyle(), getPrintPageIds(), ilObjStyleSheet\getSyntaxStylePath(), and setContentStyleSheet().

Referenced by pdfExportObject().

1593  {
1594  global $tpl;
1595  $tpl = $this->tpl;
1596 
1597  $page_ids = $this->getPrintPageIds();
1598  if (!$page_ids) {
1599  $this->ctrl->redirect($this, "");
1600  }
1601 
1602  $tpl = new ilTemplate("tpl.main.html", true, true);
1603  $tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
1604  $this->setContentStyleSheet($tpl);
1605 
1606  // syntax style
1607  $tpl->setCurrentBlock("SyntaxStyle");
1608  $tpl->setVariable(
1609  "LOCATION_SYNTAX_STYLESHEET",
1611  );
1612  $tpl->parseCurrentBlock();
1613 
1614 
1615  // determine target frames for internal links
1616 
1617  include_once("./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1618 
1619  $page_content = "";
1620 
1621  foreach ($page_ids as $p_id) {
1622  $page_gui = new ilWikiPageGUI($p_id);
1623  $page_gui->setWiki($this->object);
1624  $page_gui->setOutputMode("print");
1625  $page_content .= $page_gui->showPage();
1626 
1627  if ($a_pdf_export) {
1628  $page_content .= '<p style="page-break-after:always;"></p>';
1629  }
1630  }
1631 
1632  $page_content = '<div class="ilInvisibleBorder">' . $page_content . '</div>';
1633 
1634  if (!$a_pdf_export) {
1635  $page_content .= '<script type="text/javascript" language="javascript1.2">
1636  <!--
1637  il.Util.addOnLoad(function () {
1638  il.Util.print();
1639  });
1640  //-->
1641  </script>';
1642  }
1643 
1644  $tpl->setVariable("CONTENT", $page_content);
1645 
1646  if (!$a_pdf_export) {
1647  $tpl->show(false);
1648  exit;
1649  } else {
1650  return $tpl->get("DEFAULT", false, false, false, true, false, false);
1651  }
1652  }
static getContentPrintStyle()
get content print style
special template class to simplify handling of ITX/PEAR
Class ilWikiPage GUI class.
static getSyntaxStylePath()
get syntax style path
exit
Definition: backend.php:16
setContentStyleSheet($a_tpl=null)
Set content style sheet.
+ 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 1422 of file class.ilObjWikiGUI.php.

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

1423  {
1424  $this->checkPermission("read");
1425 
1426  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1427  $page = ilWikiPage::getRandomPage($this->object->getId());
1428  $this->gotoPageObject($page);
1429  }
static getRandomPage($a_wiki_id)
Get a random page.
gotoPageObject($a_page="")
Go to specific page.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ recentChangesObject()

ilObjWikiGUI::recentChangesObject ( )

Recent Changes.

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

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

1435  {
1436  $tpl = $this->tpl;
1437 
1438  $this->checkPermission("read");
1439 
1440  include_once("./Modules/Wiki/classes/class.ilWikiRecentChangesTableGUI.php");
1441 
1442  $this->addPagesSubTabs();
1443 
1444  $table_gui = new ilWikiRecentChangesTableGUI(
1445  $this,
1446  "recentChanges",
1447  $this->object->getId()
1448  );
1449 
1450  $this->setSideBlock();
1451  $tpl->setContent($table_gui->getHTML());
1452  }
setSideBlock($a_wpg_id=0)
Side column.
addPagesSubTabs()
Add Pages SubTabs.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
TableGUI class for recent changes in wiki.
+ Here is the call graph for this function:

◆ removeImportantPagesObject()

ilObjWikiGUI::removeImportantPagesObject ( )

Remove important pages.

Parameters

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

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

2009  {
2010  $ilCtrl = $this->ctrl;
2011  $lng = $this->lng;
2012 
2013  $this->checkPermission("edit_wiki_navigation");
2014 
2015  if (is_array($_POST["imp_page_id"])) {
2016  foreach ($_POST["imp_page_id"] as $i) {
2017  $this->object->removeImportantPage((int) $i);
2018  }
2019  }
2020  ilUtil::sendSuccess($lng->txt("wiki_removed_imp_pages"), true);
2021  $ilCtrl->redirect($this, "editImportantPages");
2022  }
global $ilCtrl
Definition: ilias.php:18
$i
Definition: disco.tpl.php:19
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ 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 1466 of file class.ilObjWikiGUI.php.

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

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

1467  {
1468  global $DIC;
1469 
1470  $tpl = $DIC["tpl"];
1471  $lng = $DIC->language();
1472  $ilAccess = $DIC->access();
1473  $ilCtrl = $DIC->ctrl();
1474 
1475  $tpl->addJavaScript("./Modules/Wiki/js/WikiPres.js");
1476 
1477  // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1478  // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1479  $tpl->addOnLoadCode("il.Wiki.Pres.init('" . $ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false) . "');");
1480 
1481  if ($a_wpg_id > 0 && !$a_wp) {
1482  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1483  $a_wp = ilWikiPage($a_wpg_id);
1484  }
1485 
1486  // search block
1487  include_once './Services/Search/classes/class.ilRepositoryObjectSearchGUI.php';
1488  $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1489 
1490  #include_once("./Modules/Wiki/classes/class.ilWikiSearchBlockGUI.php");
1491  #$wiki_search_block = new ilWikiSearchBlockGUI();
1492  #$rcontent = $wiki_search_block->getHTML();
1493 
1494  // quick navigation
1495  if ($a_wpg_id > 0) {
1496  // include_once("./Modules/Wiki/classes/class.ilWikiSideBlockGUI.php");
1497  // $wiki_side_block = new ilWikiSideBlockGUI();
1498  // $wiki_side_block->setPageObject($a_wp);
1499  // $rcontent.= $wiki_side_block->getHTML();
1500 
1501  // rating
1502  $wiki_id = ilObject::_lookupObjId($a_wiki_ref_id);
1503  if (ilObjWiki::_lookupRating($wiki_id) &&
1504  // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1505  $a_wp->getRating()) {
1506  include_once("./Services/Rating/classes/class.ilRatingGUI.php");
1507  $rgui = new ilRatingGUI();
1508  $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1509  $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1510  $rgui->setYourRatingText("#");
1511  $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1512  }
1513 
1514  // advanced metadata
1515  if (!ilWikiPage::lookupAdvancedMetadataHidden($a_wpg_id)) {
1516  $cmd = null;
1517  if ($ilAccess->checkAccess("write", "", $a_wiki_ref_id) ||
1518  $ilAccess->checkAccess("edit_page_meta", "", $a_wiki_ref_id)) {
1519  $cmd = array(
1520  "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1521  "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1522  );
1523  }
1524  include_once("./Services/Object/classes/class.ilObjectMetaDataGUI.php");
1525  $wiki = new ilObjWiki($a_wiki_ref_id);
1526  $callback = $wiki->getLinkMetadataValues()
1527  ? array($wiki, "decorateAdvMDValue")
1528  : null;
1529  $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1530  $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1531  }
1532  }
1533 
1534  // important pages
1535  // if (ilObjWiki::_lookupImportantPages(ilObject::_lookupObjId($a_wiki_ref_id)))
1536  // {
1537  include_once("./Modules/Wiki/classes/class.ilWikiImportantPagesBlockGUI.php");
1538  $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1539  $rcontent .= $imp_pages_block->getHTML();
1540  // }
1541 
1542  // wiki functions block
1543  if ($a_wpg_id > 0) {
1544  include_once("./Modules/Wiki/classes/class.ilWikiFunctionsBlockGUI.php");
1545  $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1546  $wiki_functions_block->setPageObject($a_wp);
1547  $rcontent .= $wiki_functions_block->getHTML();
1548  }
1549 
1550  $tpl->setRightContent($rcontent);
1551  }
Class ilObjectMetaDataGUI.
global $DIC
Definition: saml.php:7
static _lookupRatingCategories($a_wiki_id)
Lookup whether rating categories are activated.
static lookupAdvancedMetadataHidden($a_page_id)
global $ilCtrl
Definition: ilias.php:18
BlockGUI class for wiki functions block.
static _lookupRating($a_wiki_id)
Lookup whether rating is activated.
Class ilRatingGUI.
Class ilObjWiki.
static _lookupObjId($a_id)
Class ilWikiPage.
static getSearchBlockHTML($a_title)
Get standar search block html.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveGradingObject()

ilObjWikiGUI::saveGradingObject ( )

Save grading.

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

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

1098  {
1099  $ilCtrl = $this->ctrl;
1100  $lng = $this->lng;
1101 
1102  $this->checkPermission("write");
1103 
1104  $users = (is_array($_POST["user_id"])
1105  ? $_POST["user_id"]
1106  : array());
1107 
1108  include_once("./Modules/Wiki/classes/class.ilWikiContributor.php");
1109  include_once("./Services/Tracking/classes/class.ilLPMarks.php");
1110  $saved = false;
1111  foreach ($users as $user_id) {
1112  if ($user_id != "") {
1113  $marks_obj = new ilLPMarks($this->object->getId(), $user_id);
1114  $new_mark = ilUtil::stripSlashes($_POST['mark'][$user_id]);
1115  $new_comment = ilUtil::stripSlashes($_POST['lcomment'][$user_id]);
1116  $new_status = ilUtil::stripSlashes($_POST["status"][$user_id]);
1117 
1118  if ($marks_obj->getMark() != $new_mark ||
1119  $marks_obj->getComment() != $new_comment ||
1120  ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) != $new_status) {
1121  ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
1122  $marks_obj->setMark($new_mark);
1123  $marks_obj->setComment($new_comment);
1124  $marks_obj->update();
1125  $saved = true;
1126  }
1127  }
1128  }
1129  if ($saved) {
1130  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1131  }
1132 
1133  $ilCtrl->redirect($this, "listContributors");
1134  }
static _writeStatus($a_obj_id, $a_user_id, $a_status)
Write success status.
static _lookupStatus($a_obj_id, $a_user_id)
Lookup current success status (STATUS_NOT_GRADED|STATUS_PASSED|STATUS_FAILED)
global $ilCtrl
Definition: ilias.php:18
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$users
Definition: authpage.php:44
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveObject()

ilObjWikiGUI::saveObject ( )

save object public

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

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

348  {
349  $tpl = $this->tpl;
350  $lng = $this->lng;
352 
353  if (!$this->checkPermissionBool("create", "", "wiki", $_GET["ref_id"])) {
354  $ilErr->raiseError($this->lng->txt("permission_denied"), $ilErr->MESSAGE);
355  }
356 
357  $this->initSettingsForm("create");
358  if ($this->form_gui->checkInput()) {
359  if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle"))) {
360  $short_item = $this->form_gui->getItemByPostVar("shorttitle");
361  $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
362  } else {
363  // create and insert forum in objecttree
364  $_POST["title"] = $this->form_gui->getInput("title");
365  $_POST["desc"] = $this->form_gui->getInput("description");
366  return parent::saveObject();
367  }
368  }
369 
370  $this->form_gui->setValuesByPost();
371  $tpl->setContent($this->form_gui->getHtml());
372  }
$_GET["client_id"]
static checkShortTitleAvailability($a_short_title)
Check availability of short title.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.
initSettingsForm($a_mode="edit")
Init Settings Form.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveOrderingAndIndentObject()

ilObjWikiGUI::saveOrderingAndIndentObject ( )

Save important pages ordering and indentation.

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

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

2028  {
2029  $ilCtrl = $this->ctrl;
2030  $lng = $this->lng;
2031 
2032  $this->checkPermission("edit_wiki_navigation");
2033 
2034  $this->object->saveOrderingAndIndentation($_POST["ord"], $_POST["indent"]);
2035  ilUtil::sendSuccess($lng->txt("wiki_ordering_and_indent_saved"), true);
2036  $ilCtrl->redirect($this, "editImportantPages");
2037  }
global $ilCtrl
Definition: ilias.php:18
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ saveSettingsObject()

ilObjWikiGUI::saveSettingsObject ( )

Save Settings.

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

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

1006  {
1007  $ilCtrl = $this->ctrl;
1008  $lng = $this->lng;
1009  $ilUser = $this->user;
1011  $obj_service = $this->object_service;
1012 
1013  $this->checkPermission("write");
1014 
1015  $this->initSettingsForm();
1016 
1017  if ($this->form_gui->checkInput()) {
1018  if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")) &&
1019  $this->form_gui->getInput("shorttitle") != $this->object->getShortTitle()) {
1020  $short_item = $this->form_gui->getItemByPostVar("shorttitle");
1021  $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
1022  } else {
1023  $this->object->setTitle($this->form_gui->getInput("title"));
1024  $this->object->setDescription($this->form_gui->getInput("description"));
1025  $this->object->setOnline($this->form_gui->getInput("online"));
1026  $this->object->setStartPage(ilWikiPage::lookupTitle($this->form_gui->getInput("startpage_id")));
1027  $this->object->setShortTitle($this->form_gui->getInput("shorttitle"));
1028  $this->object->setRatingOverall($this->form_gui->getInput("rating_overall"));
1029  $this->object->setRating($this->form_gui->getInput("rating"));
1030  // $this->object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
1031  $this->object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
1032  $this->object->setRatingCategories($this->form_gui->getInput("rating_ext"));
1033 
1034  if (!$ilSetting->get("disable_comments")) {
1035  $this->object->setPublicNotes($this->form_gui->getInput("public_notes"));
1036  }
1037  $this->object->setIntroduction($this->form_gui->getInput("intro"));
1038  // $this->object->setImportantPages($this->form_gui->getInput("imp_pages"));
1039  $this->object->setPageToc($this->form_gui->getInput("page_toc"));
1040  $this->object->setLinkMetadataValues($this->form_gui->getInput("link_md_values"));
1041  $this->object->update();
1042 
1043  // tile image
1044  $obj_service->commonSettings()->legacyForm($this->form_gui, $this->object)->saveTileImage();
1045 
1046 
1047  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
1049  $this->object->getId(),
1050  $this->form_gui,
1051  array(
1053  )
1054  );
1055 
1056  // Update ecs export settings
1057  include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
1058  $ecs = new ilECSWikiSettings($this->object);
1059  if ($ecs->handleSettingsUpdate()) {
1060  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1061  $ilCtrl->redirect($this, "editSettings");
1062  }
1063  }
1064  }
1065 
1066  $this->form_gui->setValuesByPost();
1067  $this->tpl->setContent($this->form_gui->getHTML());
1068  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
static checkShortTitleAvailability($a_short_title)
Check availability of short title.
global $ilCtrl
Definition: ilias.php:18
Class ilECSWikiSettings.
$ilUser
Definition: imgupload.php:18
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
initSettingsForm($a_mode="edit")
Init Settings Form.
global $ilSetting
Definition: privfeed.php:17
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ saveStyleSettingsObject()

ilObjWikiGUI::saveStyleSettingsObject ( )

Save style settings.

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

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

1886  {
1888 
1889  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1890  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1891  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1892  || $this->object->getStyleSheetId() == 0)) {
1893  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1894  $this->object->update();
1895  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1896  }
1897  $this->ctrl->redirect($this, "editStyleProperties");
1898  }
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $ilSetting
Definition: privfeed.php:17
$_POST["username"]
+ Here is the call graph for this function:

◆ setAsStartPageObject()

ilObjWikiGUI::setAsStartPageObject ( )

Confirm important pages deletion.

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

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

2043  {
2044  $ilCtrl = $this->ctrl;
2045  $lng = $this->lng;
2046 
2047  $this->checkPermission("edit_wiki_navigation");
2048 
2049  if (!is_array($_POST["imp_page_id"]) || count($_POST["imp_page_id"]) != 1) {
2050  ilUtil::sendInfo($lng->txt("wiki_select_one_item"), true);
2051  } else {
2052  $this->object->removeImportantPage((int) $_POST["imp_page_id"][0]);
2053  $this->object->setStartPage(ilWikiPage::lookupTitle((int) $_POST["imp_page_id"][0]));
2054  $this->object->update();
2055  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
2056  }
2057  $ilCtrl->redirect($this, "editImportantPages");
2058  }
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$_POST["username"]
+ Here is the call graph for this function:

◆ setContentStyleSheet()

ilObjWikiGUI::setContentStyleSheet (   $a_tpl = null)

Set content style sheet.

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

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

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

1732  {
1733  $tpl = $this->tpl;
1734 
1735  if ($a_tpl != null) {
1736  $ctpl = $a_tpl;
1737  } else {
1738  $ctpl = $tpl;
1739  }
1740 
1741  $ctpl->setCurrentBlock("ContentStyle");
1742  $ctpl->setVariable(
1743  "LOCATION_CONTENT_STYLESHEET",
1744  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId())
1745  );
1746  $ctpl->parseCurrentBlock();
1747  }
static getContentStylePath($a_style_id, $add_random=true)
get content style path
+ 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 707 of file class.ilObjWikiGUI.php.

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

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

708  {
709  $ilTabs = $this->tabs;
711  $lng = $this->lng;
712  $ilAccess = $this->access;
713 
714  if (in_array(
715  $a_active,
716  array("general_settings", "style", "imp_pages", "rating_categories",
717  "page_templates", "advmd", "permission_settings", "notifications")
718  )) {
719  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
720  // general properties
721  $ilTabs->addSubTab(
722  "general_settings",
723  $lng->txt("wiki_general_settings"),
724  $ilCtrl->getLinkTarget($this, 'editSettings')
725  );
726 
727  // permission settings
728  $ilTabs->addSubTab(
729  "permission_settings",
730  $lng->txt("obj_permission_settings"),
731  $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", "")
732  );
733 
734  // style properties
735  $ilTabs->addSubTab(
736  "style",
737  $lng->txt("wiki_style"),
738  $ilCtrl->getLinkTarget($this, 'editStyleProperties')
739  );
740  }
741 
742  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
743  // important pages
744  $ilTabs->addSubTab(
745  "imp_pages",
746  $lng->txt("wiki_navigation"),
747  $ilCtrl->getLinkTarget($this, 'editImportantPages')
748  );
749  }
750 
751  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
752  // page templates
753  $ilTabs->addSubTab(
754  "page_templates",
755  $lng->txt("wiki_page_templates"),
756  $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", "")
757  );
758 
759  // rating categories
760  if ($this->object->getRating() && $this->object->getRatingCategories()) {
761  $lng->loadLanguageModule("rating");
762  $ilTabs->addSubTab(
763  "rating_categories",
764  $lng->txt("rating_categories"),
765  $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), '')
766  );
767  }
768 
769  $ilTabs->addSubTab(
770  'notifications',
771  $lng->txt("notifications"),
772  $ilCtrl->getLinkTargetByClass("ilobjnotificationsettingsgui", '')
773  );
774  }
775 
776  $ilTabs->activateSubTab($a_active);
777  }
778  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the caller graph for this function:

◆ setSideBlock()

ilObjWikiGUI::setSideBlock (   $a_wpg_id = 0)

Side column.

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

References renderSideBlock().

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

1458  {
1459  ilObjWikiGUI::renderSideBlock($a_wpg_id, $this->object->getRefId());
1460  }
static renderSideBlock($a_wpg_id, $a_wiki_ref_id, $a_wp=null)
Side column.
+ 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 2103 of file class.ilObjWikiGUI.php.

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

2104  {
2105  $lng = $this->lng;
2106  $tpl = $this->tpl;
2107  $ilTabs = $this->tabs;
2108  $ilCtrl = $this->ctrl;
2109 
2110 
2111  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
2112  $ilTabs->clearTargets();
2113  ilUtil::sendInfo($lng->txt("wiki_page_not_exist_select_templ"));
2114 
2115  $form = $this->initTemplateSelectionForm();
2116  $tpl->setContent($form->getHTML());
2117  }
$_GET["client_id"]
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_POST['submit'])) $form
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
initTemplateSelectionForm()
Init template selection form.
+ Here is the call graph for this function:

◆ startUserHTMLExportObject()

ilObjWikiGUI::startUserHTMLExportObject ( )

Export html (as user)

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

References ilObjectGUI\checkPermission().

2243  {
2244  $this->log->debug("start");
2245  $this->checkPermission("wiki_html_export");
2246  $this->object->startUserHTMLExport();
2247  }
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ viewObject()

ilObjWikiGUI::viewObject ( )

Start page.

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

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

326  {
327  $this->checkPermission("read");
328  $this->gotoStartPageObject();
329  }
gotoStartPageObject()
Go to start page.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
+ Here is the call graph for this function:

◆ viewPageObject()

ilObjWikiGUI::viewPageObject ( )

view wiki page

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

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

1231  {
1232  $lng = $this->lng;
1233  $ilCtrl = $this->ctrl;
1234  $tpl = $this->tpl;
1235  $ilTabs = $this->tabs;
1236  $ilAccess = $this->access;
1237 
1238  $this->checkPermission("read");
1239 
1240  $ilTabs->clearTargets();
1241  $tpl->setHeaderActionMenu(null);
1242 
1243  $page = ($_GET["page"] != "")
1244  ? $_GET["page"]
1245  : $this->object->getStartPage();
1246  $_GET["page"] = $page;
1247 
1248  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1249  if (!ilWikiPage::exists($this->object->getId(), $page)) {
1250  $page = $this->object->getStartPage();
1251  }
1252 
1253  if (!ilWikiPage::exists($this->object->getId(), $page)) {
1254  ilUtil::sendInfo($lng->txt("wiki_no_start_page"), true);
1255  $ilCtrl->redirect($this, "infoScreen");
1256  return;
1257  }
1258 
1259  // page exists, show it !
1260  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($page));
1261 
1262  include_once("./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1263  $wpage_gui = ilWikiPageGUI::getGUIForTitle(
1264  $this->object->getId(),
1265  ilWikiUtil::makeDbTitle($page),
1266  0,
1267  $this->object->getRefId()
1268  );
1269  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1270  $wpage_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
1271  $this->object->getStyleSheetId(),
1272  "wiki"
1273  ));
1274 
1275  $this->setContentStyleSheet();
1276  //$wpage_gui->setOutputMode(IL_PAGE_PREVIEW);
1277 
1278  //$wpage_gui->setSideBlock();
1279  $ilCtrl->setCmdClass("ilwikipagegui");
1280  $ilCtrl->setCmd("preview");
1281  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
1282  (
1283  !$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
1284  $wpage_gui->getPageObject()->getBlocked()
1285  )) {
1286  $wpage_gui->setEnableEditing(false);
1287  }
1288 
1289  // alter title and description
1290  //$tpl->setTitle($wpage_gui->getPageObject()->getTitle());
1291  //$tpl->setDescription($this->object->getTitle());
1292  if ($ilAccess->checkAccess("write", "", $this->object->getRefId())) {
1293  $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
1294  }
1295 
1296 
1297  $html = $ilCtrl->forwardCommand($wpage_gui);
1298  //$this->addPageTabs();
1299 
1300  $tpl->setContent($html);
1301  }
$_GET["client_id"]
static getGUIForTitle($a_wiki_id, $a_title, $a_old_nr=0, $a_wiki_ref_id=0)
Get wiki page gui for id and title.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static makeDbTitle($a_par)
Handle page GET parameter.
static exists($a_wiki_id, $a_title)
Checks whether a page with given title exists.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

Field Documentation

◆ $error

ilObjWikiGUI::$error
protected

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

Referenced by infoScreen(), and saveObject().

◆ $help

ilObjWikiGUI::$help
protected

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

Referenced by getTabs().

◆ $log

ilObjWikiGUI::$log
protected

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

◆ $tabs


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