ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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...
 
 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...
 

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
 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...
 
 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...
 
 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

 $log
 
- Protected Attributes inherited from ilObjectGUI
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $ilias
 
 $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 35 of file class.ilObjWikiGUI.php.

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

36  {
37  global $ilCtrl, $lng;
38 
39  $this->type = "wiki";
40 
41  $this->log = ilLoggerFactory::getLogger('wiki');
42 
43  parent::__construct($a_data,$a_id,$a_call_by_reference,$a_prepare_output);
44  $lng->loadLanguageModule("obj");
45  $lng->loadLanguageModule("wiki");
46 
47  if ($_GET["page"] != "")
48  {
49  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
50  }
51  }
$_GET["client_id"]
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 1045 of file class.ilObjWikiGUI.php.

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

1046  {
1047  global $ilAccess, $ilErr, $lng, $ilNavigationHistory;
1048 
1049  $i = strpos($a_target, "_");
1050  if ($i > 0)
1051  {
1052  $a_page = substr($a_target, $i+1);
1053  $a_target = substr($a_target, 0, $i);
1054  }
1055 
1056  if ($a_target == "wpage")
1057  {
1058  $a_page_arr = explode("_", $a_page);
1059  $wpg_id = (int) $a_page_arr[0];
1060  $ref_id = (int) $a_page_arr[1];
1061  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1062  $w_id = ilWikiPage::lookupWikiId($wpg_id);
1063  if ($ref_id > 0)
1064  {
1065  $refs = array($ref_id);
1066  }
1067  else
1068  {
1069  $refs = ilObject::_getAllReferences($w_id);
1070  }
1071  foreach ($refs as $r)
1072  {
1073  if ($ilAccess->checkAccess("read", "", $r))
1074  {
1075  $a_target = $r;
1076  $a_page = ilWikiPage::lookupTitle($wpg_id);
1077  }
1078  }
1079  }
1080 
1081  if ($ilAccess->checkAccess("read", "", $a_target))
1082  {
1083  $_GET["cmd"] = "viewPage";
1084  $_GET["ref_id"] = $a_target;
1085  $_GET["page"] = $a_page;
1086  $_GET["baseClass"] = "ilwikihandlergui";
1087  $_GET["cmdClass"] = "ilobjwikigui";
1088 /* if ($a_page != "")
1089  {
1090  $add = "&page=".rawurlencode($_GET["page"]);
1091  $ilNavigationHistory->addItem($_GET["ref_id"],
1092  "./goto.php?target=wiki_".$_GET["ref_id"].$add, "wiki");
1093  }*/
1094  include("ilias.php");
1095  exit;
1096  }
1097  else if ($ilAccess->checkAccess("visible", "", $a_target))
1098  {
1099  ilObjectGUI::_gotoRepositoryNode($tarr[0], "infoScreen");
1100  }
1101  else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
1102  {
1103  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
1106  }
1107 
1108  $ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
1109  }
global $ilErr
Definition: raiseError.php:16
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
$_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)
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:

◆ addImportantPageObject()

ilObjWikiGUI::addImportantPageObject ( )

Add important pages.

Parameters

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

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

1821  {
1822  global $ilCtrl, $lng;
1823 
1824  $this->checkPermission("edit_wiki_navigation");
1825 
1826  if ($_POST["imp_page_id"] > 0)
1827  {
1828  $this->object->addImportantPage((int) $_POST["imp_page_id"]);
1829  ilUtil::sendSuccess($lng->txt("wiki_imp_page_added"), true);
1830  }
1831  $ilCtrl->redirect($this, "editImportantPages");
1832  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 1034 of file class.ilObjWikiGUI.php.

References $_GET, getGotoLink(), and object.

1035  {
1036  global $ilLocator;
1037 
1038  if (is_object($this->object))
1039  {
1040  $ilLocator->addItem($this->object->getTitle(),
1041  $this->getGotoLink($this->object->getRefId()), "", $_GET["ref_id"]);
1042  }
1043  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
$_GET["client_id"]
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ addPagesSubTabs()

ilObjWikiGUI::addPagesSubTabs ( )

Add Pages SubTabs.

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

References $_GET, $ilCtrl, ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), and object.

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

507  {
508  global $ilTabs, $ilCtrl;
509 
510  $ilTabs->activateTab("wiki_pages");
511 
512  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
513  $ilCtrl->setParameter($this, "wpg_id",
514  ilWikiPage::getPageIdForTitle($this->object->getId(),
515  ilWikiUtil::makeDbTitle($_GET["page"])));
516  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
517  $ilTabs->addSubTabTarget("wiki_all_pages",
518  $this->ctrl->getLinkTarget($this, "allPages"), "allPages");
519  $ilTabs->addSubTabTarget("wiki_recent_changes",
520  $this->ctrl->getLinkTarget($this, "recentChanges"), "recentChanges");
521  $ilTabs->addSubTabTarget("wiki_new_pages",
522  $this->ctrl->getLinkTarget($this, "newPages"), "newPages");
523  $ilTabs->addSubTabTarget("wiki_popular_pages",
524  $this->ctrl->getLinkTarget($this, "popularPages"), "popularPages");
525  $ilTabs->addSubTabTarget("wiki_orphaned_pages",
526  $this->ctrl->getLinkTarget($this, "orphanedPages"), "orphanedPages");
527  }
$_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.
Create new PHPExcel object
obj_idprivate
+ 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 487 of file class.ilObjWikiGUI.php.

References $_GET, $ilCtrl, ilWikiPage\getPageIdForTitle(), ilWikiUtil\makeDbTitle(), ilWikiUtil\makeUrlTitle(), and object.

488  {
489  global $ilTabs, $ilCtrl;
490 
491  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
492  $ilCtrl->setParameter($this, "wpg_id",
494  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
495  $ilTabs->addTarget("wiki_what_links_here",
496  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
497  "whatLinksHere"), "whatLinksHere");
498  $ilTabs->addTarget("wiki_print_view",
499  $this->ctrl->getLinkTargetByClass("ilwikipagegui",
500  "printViewSelection"), "printViewSelection");
501  }
$_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.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:

◆ afterSave()

ilObjWikiGUI::afterSave ( ilObject  $newObj)

save object public

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

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

346  {
347  global $ilSetting;
348 
349  $newObj->setTitle($this->form_gui->getInput("title"));
350  $newObj->setDescription($this->form_gui->getInput("description"));
351  $newObj->setIntroduction($this->form_gui->getInput("intro"));
352  $newObj->setStartPage($this->form_gui->getInput("startpage"));
353  $newObj->setShortTitle($this->form_gui->getInput("shorttitle"));
354  $newObj->setRating($this->form_gui->getInput("rating"));
355  // $newObj->setRatingAsBlock($this->form_gui->getInput("rating_side"));
356  $newObj->setRatingForNewPages($this->form_gui->getInput("rating_new"));
357  $newObj->setRatingCategories($this->form_gui->getInput("rating_ext"));
358 
359  $newObj->setRatingOverall($this->form_gui->getInput("rating_overall"));
360  $newObj->setPageToc($this->form_gui->getInput("page_toc"));
361 
362 
363 
364  if (!$ilSetting->get("disable_comments"))
365  {
366  $newObj->setPublicNotes($this->form_gui->getInput("public_notes"));
367  }
368  $newObj->setOnline($this->form_gui->getInput("online"));
369  $newObj->update();
370 
371  // always send a message
372  ilUtil::sendSuccess($this->lng->txt("object_added"),true);
374  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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)
http redirect to other script
+ Here is the call graph for this function:

◆ allPagesObject()

ilObjWikiGUI::allPagesObject ( )

All pages of wiki.

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

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

1200  {
1201  global $tpl;
1202 
1203  $this->checkPermission("read");
1204 
1205  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1206 
1207  $this->addPagesSubTabs();
1208 
1209  $table_gui = new ilWikiPagesTableGUI($this, "allPages",
1210  $this->object->getId(), IL_WIKI_ALL_PAGES);
1211 
1212  $this->setSideBlock();
1213  $tpl->setContent($table_gui->getHTML());
1214  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
const IL_WIKI_ALL_PAGES
Create new PHPExcel object
obj_idprivate
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 2057 of file class.ilObjWikiGUI.php.

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

2058  {
2059  global $ilCtrl;
2060 
2061  // redirect to newly created page
2062  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($_GET["from_page"])));
2063  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
2064  }
$_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 2075 of file class.ilObjWikiGUI.php.

References $a_type, and ilWikiPerm\check().

Referenced by saveObject().

2076  {
2077  if($a_perm == "create")
2078  {
2079  return parent::checkPermissionBool($a_perm, $a_cmd, $a_type, $a_ref_id);
2080  }
2081  else
2082  {
2083  if (!$a_ref_id)
2084  {
2085  $a_ref_id = $this->object->getRefId();
2086  }
2087  include_once("./Modules/Wiki/classes/class.ilWikiPerm.php");
2088  return ilWikiPerm::check($a_perm, $a_ref_id, $a_cmd);
2089  }
2090  }
static check($a_perm, $a_ref_id, $a_cmd="")
Check permission.
$a_type
Definition: workflow.php:93
+ 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 1837 of file class.ilObjWikiGUI.php.

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

1838  {
1839  global $ilCtrl, $tpl, $lng;
1840 
1841  if (!is_array($_POST["imp_page_id"]) || count($_POST["imp_page_id"]) == 0)
1842  {
1843  ilUtil::sendInfo($lng->txt("no_checkbox"), true);
1844  $ilCtrl->redirect($this, "editImportantPages");
1845  }
1846  else
1847  {
1848  include_once("./Services/Utilities/classes/class.ilConfirmationGUI.php");
1849  $cgui = new ilConfirmationGUI();
1850  $cgui->setFormAction($ilCtrl->getFormAction($this));
1851  $cgui->setHeaderText($lng->txt("wiki_sure_remove_imp_pages"));
1852  $cgui->setCancel($lng->txt("cancel"), "editImportantPages");
1853  $cgui->setConfirm($lng->txt("remove"), "removeImportantPages");
1854 
1855  foreach ($_POST["imp_page_id"] as $i)
1856  {
1857  $cgui->addItem("imp_page_id[]", $i, ilWikiPage::lookupTitle((int) $i));
1858  }
1859 
1860  $tpl->setContent($cgui->getHTML());
1861  }
1862  }
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.
$_POST["username"]
Confirmation screen class.
+ Here is the call graph for this function:

◆ createPageUsingTemplateObject()

ilObjWikiGUI::createPageUsingTemplateObject ( )

Save creation with template form.

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

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

2031  {
2032  global $tpl, $lng, $ilCtrl;
2033 
2034  $form = $this->initTemplateSelectionForm();
2035  if ($form->checkInput())
2036  {
2037  $a_page = $_POST["page"];
2038  $this->object->createWikiPage($a_page, (int) $_POST["page_templ"]);
2039 
2040  // redirect to newly created page
2041  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
2042  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
2043 
2044  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
2045  $ilCtrl->redirect($this, "");
2046  }
2047  else
2048  {
2049  $form->setValuesByPost();
2050  $tpl->setContent($form->getHtml());
2051  }
2052  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
global $ilCtrl
Definition: ilias.php:18
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 1714 of file class.ilObjWikiGUI.php.

References $ilCtrl.

1715  {
1716  global $ilCtrl;
1717 
1718  $ilCtrl->redirectByClass("ilobjstylesheetgui", "create");
1719  }
global $ilCtrl
Definition: ilias.php:18

◆ deleteStyleObject()

ilObjWikiGUI::deleteStyleObject ( )

Delete Style.

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

References $ilCtrl.

1735  {
1736  global $ilCtrl;
1737 
1738  $ilCtrl->redirectByClass("ilobjstylesheetgui", "delete");
1739  }
global $ilCtrl
Definition: ilias.php:18

◆ downloadUserHTMLExportObject()

ilObjWikiGUI::downloadUserHTMLExportObject ( )

Download user html export file.

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

References ilObjectGUI\checkPermission().

2143  {
2144  $this->log->debug("download");
2145  $this->checkPermission("wiki_html_export");
2146  $this->object->deliverUserHTMLExport();
2147  }
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 1767 of file class.ilObjWikiGUI.php.

References $ilCtrl, ilObjectGUI\$lng, $options, $si, ilObjectGUI\$tpl, ilObjWiki\_lookupImportantPagesList(), array, ilObjectGUI\checkPermission(), ilWikiPage\getAllWikiPages(), object, ilUtil\sendInfo(), setSettingsSubTabs(), and ilUtil\shortenText().

1768  {
1769  global $tpl, $ilToolbar, $ilTabs, $lng, $ilCtrl;
1770 
1771  $this->checkPermission("edit_wiki_navigation");
1772 
1773  ilUtil::sendInfo($lng->txt("wiki_navigation_info"));
1774 
1775  $ipages = ilObjWiki::_lookupImportantPagesList($this->object->getId());
1776  $ipages_ids = array();
1777  foreach ($ipages as $i)
1778  {
1779  $ipages_ids[] = $i["page_id"];
1780  }
1781 
1782  // list pages
1783  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1784  $pages = ilWikiPage::getAllWikiPages($this->object->getId());
1785  $options = array("" => $lng->txt("please_select"));
1786  foreach ($pages as $p)
1787  {
1788  if (!in_array($p["id"], $ipages_ids))
1789  {
1790  $options[$p["id"]] = ilUtil::shortenText($p["title"], 60, true);
1791  }
1792  }
1793  if (count($options) > 0)
1794  {
1795  include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
1796  $si = new ilSelectInputGUI($lng->txt("wiki_pages"), "imp_page_id");
1797  $si->setOptions($options);
1798  $si->setInfo($lng->txt(""));
1799  $ilToolbar->addInputItem($si);
1800  $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
1801  $ilToolbar->addFormButton($lng->txt("add"), "addImportantPage");
1802  }
1803 
1804 
1805  $ilTabs->activateTab("settings");
1806  $this->setSettingsSubTabs("imp_pages");
1807 
1808  include_once("./Modules/Wiki/classes/class.ilImportantPagesTableGUI.php");
1809  $imp_table = new ilImportantPagesTableGUI($this, "editImportantPages");
1810 
1811  $tpl->setContent($imp_table->getHTML());
1812  }
static _lookupImportantPagesList($a_wiki_id)
Get important pages list.
This class represents a selection list property in a property form.
static shortenText($a_str, $a_len, $a_dots=false, $a_next_blank=false, $a_keep_extension=false)
shorten a string to given length.
global $ilCtrl
Definition: ilias.php:18
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
setSettingsSubTabs($a_active)
Set sub tabs.
if(!is_array($argv)) $options
static getAllWikiPages($a_wiki_id)
Get all pages of wiki.
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
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 682 of file class.ilObjWikiGUI.php.

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

683  {
684  global $tpl;
685 
686  $this->checkPermission("write");
687 
688  $this->setSettingsSubTabs("general_settings");
689 
690  $this->initSettingsForm();
691  $this->getSettingsFormValues();
692 
693  // Edit ecs export settings
694  include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
695  $ecs = new ilECSWikiSettings($this->object);
696  $ecs->addSettingsToForm($this->form_gui, 'wiki');
697 
698  $tpl->setContent($this->form_gui->getHtml());
699  $this->setSideBlock();
700  }
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 1724 of file class.ilObjWikiGUI.php.

References $ilCtrl.

1725  {
1726  global $ilCtrl;
1727 
1728  $ilCtrl->redirectByClass("ilobjstylesheetgui", "edit");
1729  }
global $ilCtrl
Definition: ilias.php:18

◆ editStylePropertiesObject()

ilObjWikiGUI::editStylePropertiesObject ( )

Edit style properties.

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

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

1627  {
1628  global $ilTabs, $tpl;
1629 
1630  $this->checkPermission("write");
1631 
1632  $this->initStylePropertiesForm();
1633  $tpl->setContent($this->form->getHTML());
1634 
1635  $ilTabs->activateTab("settings");
1636  $this->setSettingsSubTabs("style");
1637 
1638  $this->setSideBlock();
1639  }
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 53 of file class.ilObjWikiGUI.php.

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

54  {
55  global $ilUser, $ilCtrl, $tpl, $ilTabs, $ilAccess;
56 
57  $next_class = $this->ctrl->getNextClass($this);
58  $cmd = $this->ctrl->getCmd();
59 
60  $this->prepareOutput();
61 
62  // see ilWikiPageGUI::printViewOrderList()
63  // printView() and pdfExport() cannot be in ilWikiPageGUI because of stylesheet confusion
64  if($cmd == "printView" || $cmd == "pdfExport")
65  {
66  $next_class = null;
67  }
68 
69  switch($next_class)
70  {
71  case "ilinfoscreengui":
72  $this->checkPermission("visible");
73  $this->addHeaderAction();
74  $this->infoScreen(); // forwards command
75  break;
76 
77  case 'ilpermissiongui':
78  $this->addHeaderAction();
79  $ilTabs->activateTab("perm_settings");
80  include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
81  $perm_gui = new ilPermissionGUI($this);
82  $ret = $this->ctrl->forwardCommand($perm_gui);
83  break;
84 
85  case 'ilsettingspermissiongui':
86  $this->checkPermission("write");
87  $this->addHeaderAction();
88  $ilTabs->activateTab("settings");
89  $this->setSettingsSubTabs("permission_settings");
90  include_once("Services/AccessControl/classes/class.ilSettingsPermissionGUI.php");
91  $perm_gui = new ilSettingsPermissionGUI($this);
92  $perm_gui->setPermissions(array("edit_wiki_navigation", "delete_wiki_pages", "activate_wiki_protection",
93  "wiki_html_export"));
94  $perm_gui->setRoleRequiredPermissions(array("edit_content"));
95  $perm_gui->setRoleProhibitedPermissions(array("write"));
96  $ret = $this->ctrl->forwardCommand($perm_gui);
97  break;
98 
99  case 'ilwikipagegui':
100  $this->checkPermission("read");
101  include_once("./Modules/Wiki/classes/class.ilWikiPageGUI.php");
102  $wpage_gui = ilWikiPageGUI::getGUIForTitle($this->object->getId(),
103  ilWikiUtil::makeDbTitle($_GET["page"]), $_GET["old_nr"], $this->object->getRefId());
104  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
105  $wpage_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
106  $this->object->getStyleSheetId(), "wiki"));
107  $this->setContentStyleSheet();
108  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
109  (!$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
110  $wpage_gui->getPageObject()->getBlocked()
111  ))
112  {
113  $wpage_gui->setEnableEditing(false);
114  }
115 
116  // alter title and description
117 // $tpl->setTitle($wpage_gui->getPageObject()->getTitle());
118 // $tpl->setDescription($this->object->getTitle());
119  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
120  {
121  $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
122  }
123 
124  $ret = $this->ctrl->forwardCommand($wpage_gui);
125  if ($ret != "")
126  {
127  $tpl->setContent($ret);
128  }
129  break;
130 
131  case 'ilobjectcopygui':
132  include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
133  $cp = new ilObjectCopyGUI($this);
134  $cp->setType('wiki');
135  $this->ctrl->forwardCommand($cp);
136  break;
137 
138  case 'ilpublicuserprofilegui':
139  require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
140  $profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
141  $ret = $this->ctrl->forwardCommand($profile_gui);
142  $tpl->setContent($ret);
143  break;
144 
145  case "ilobjstylesheetgui":
146  include_once ("./Services/Style/Content/classes/class.ilObjStyleSheetGUI.php");
147  $this->ctrl->setReturn($this, "editStyleProperties");
148  $style_gui = new ilObjStyleSheetGUI("", $this->object->getStyleSheetId(), false, false);
149  $style_gui->omitLocator();
150  if ($cmd == "create" || $_GET["new_type"]=="sty")
151  {
152  $style_gui->setCreationMode(true);
153  }
154 
155  if ($cmd == "confirmedDelete")
156  {
157  $this->object->setStyleSheetId(0);
158  $this->object->update();
159  }
160 
161  $ret = $this->ctrl->forwardCommand($style_gui);
162 
163  if ($cmd == "save" || $cmd == "copyStyle" || $cmd == "importStyle")
164  {
165  $style_id = $ret;
166  $this->object->setStyleSheetId($style_id);
167  $this->object->update();
168  $this->ctrl->redirectByClass("ilobjstylesheetgui", "edit");
169  }
170  break;
171 
172  case "ilexportgui":
173 // $this->prepareOutput();
174  $this->addHeaderAction();
175  $ilTabs->activateTab("export");
176  include_once("./Services/Export/classes/class.ilExportGUI.php");
177  $exp_gui = new ilExportGUI($this);
178  $exp_gui->addFormat("xml");
179  $exp_gui->addFormat("html", "", $this, "exportHTML");
180  $ret = $this->ctrl->forwardCommand($exp_gui);
181 // $this->tpl->show();
182  break;
183 
184  case "ilcommonactiondispatchergui":
185  include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
187  $this->ctrl->forwardCommand($gui);
188  break;
189 
190  case "ilratinggui":
191  // for rating category editing
192  $this->checkPermission("write");
193  $this->addHeaderAction();
194  $ilTabs->activateTab("settings");
195  $this->setSettingsSubTabs("rating_categories");
196  include_once("Services/Rating/classes/class.ilRatingGUI.php");
197  $gui = new ilRatingGUI();
198  $gui->setObject($this->object->getId(), $this->object->getType());
199  $gui->setExportCallback(array($this, "getSubObjectTitle"), $this->lng->txt("page"));
200  $this->ctrl->forwardCommand($gui);
201  break;
202 
203  case "ilwikistatgui":
204  $this->checkPermission("statistics_read");
205 
206  $this->addHeaderAction();
207  $ilTabs->activateTab("statistics");
208 
209  include_once "Modules/Wiki/classes/class.ilWikiStatGUI.php";
210  $gui = new ilWikiStatGUI($this->object->getId());
211  $this->ctrl->forwardCommand($gui);
212  break;
213 
214  case "ilwikipagetemplategui":
215  $this->checkPermission("write");
216  $this->addHeaderAction();
217  $ilTabs->activateTab("settings");
218  $this->setSettingsSubTabs("page_templates");
219  include_once("./Modules/Wiki/classes/class.ilWikiPageTemplateGUI.php");
220  $wptgui = new ilWikiPageTemplateGUI($this);
221  $this->ctrl->forwardCommand($wptgui);
222  break;
223 
224  case 'ilobjectmetadatagui';
225  $this->checkPermission("write");
226  $this->addHeaderAction();
227  $ilTabs->activateTab("advmd");
228  include_once 'Services/Object/classes/class.ilObjectMetaDataGUI.php';
229  $md_gui = new ilObjectMetaDataGUI($this->object, "wpg");
230  $this->ctrl->forwardCommand($md_gui);
231  break;
232 
233  case 'ilrepositoryobjectsearchgui':
234  $this->addHeaderAction();
235  $this->setSideBlock();
236  $ilTabs->setTabActive("wiki_search_results");
237  $ilCtrl->setReturn($this,'view');
238  include_once './Services/Search/classes/class.ilRepositoryObjectSearchGUI.php';
239  $search_gui = new ilRepositoryObjectSearchGUI(
240  $this->object->getRefId(),
241  $this,
242  'view'
243  );
244  $ilCtrl->forwardCommand($search_gui);
245  break;
246 
247  default:
248  $this->addHeaderAction();
249  if(!$cmd)
250  {
251  $cmd = "infoScreen";
252  }
253  $cmd .= "Object";
254  if ($cmd != "infoScreenObject")
255  {
256  if (!in_array($cmd, array("createObject", "saveObject", "importFileObject")))
257  {
258  $this->checkPermission("read");
259  }
260  }
261  else
262  {
263  $this->checkPermission("visible");
264  }
265  $this->$cmd();
266  break;
267  }
268 
269  return $ret;
270  }
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.
$cmd
Definition: sahs_server.php:35
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.
Create styles array
The data for the language used.
setContentStyleSheet($a_tpl=null)
Set content style sheet.
Create new PHPExcel object
obj_idprivate
Class ilObjStyleSheetGUI.
$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 1928 of file class.ilObjWikiGUI.php.

1929  {
1930  require_once("./Modules/Wiki/classes/class.ilWikiHTMLExport.php");
1931  $cont_exp = new ilWikiHTMLExport($this->object);
1932  $cont_exp->buildExportFile();
1933  }
Wiki HTML exporter class.

◆ getGotoLink()

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

Get goto link.

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

1115  {
1116  if ($a_page == "")
1117  {
1119  }
1120 
1121  $goto = "goto.php?target=wiki_".$a_ref_id."_".
1122  ilWikiUtil::makeUrlTitle($a_page);
1123 
1124  return $goto;
1125  }
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 1457 of file class.ilObjWikiGUI.php.

References $_GET, $_POST, and array.

Referenced by printViewObject().

1458  {
1459  // multiple ordered page ids
1460  if(is_array($_POST["wordr"]))
1461  {
1462  asort($_POST["wordr"]);
1463  $page_ids = array_keys($_POST["wordr"]);
1464  }
1465  // single page
1466  else if((int)$_GET["wpg_id"])
1467  {
1468  $page_ids = array((int)$_GET["wpg_id"]);
1469  }
1470 
1471  return $page_ids;
1472  }
$_GET["client_id"]
Create styles array
The data for the language used.
$_POST["username"]
+ Here is the caller graph for this function:

◆ getSettingsFormValues()

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

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

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

Referenced by editSettingsObject(), and initCreationForms().

864  {
865  global $lng, $ilUser;
866 
867  // set values
868  if ($a_mode == "create")
869  {
870  //$values["startpage"] = $lng->txt("wiki_main_page");
871  $values["rating_new"] = true;
872 
873  $values["rating_overall"] = ilObject::hasAutoRating("wiki", $_GET["ref_id"]);
874 
875  $this->form_gui->setValuesByArray($values);
876  }
877  else
878  {
879  $values["online"] = $this->object->getOnline();
880  $values["title"] = $this->object->getTitle();
881  //$values["startpage"] = $this->object->getStartPage();
882  $values["startpage_id"] = ilWikiPage::_getPageIdForWikiTitle($this->object->getId(), $this->object->getStartPage());
883  $values["shorttitle"] = $this->object->getShortTitle();
884  $values["description"] = $this->object->getLongDescription();
885  $values["rating_overall"] = $this->object->getRatingOverall();
886  $values["rating"] = $this->object->getRating();
887  // $values["rating_side"] = $this->object->getRatingAsBlock();
888  $values["rating_new"] = $this->object->getRatingForNewPages();
889  $values["rating_ext"] = $this->object->getRatingCategories();
890  $values["public_notes"] = $this->object->getPublicNotes();
891  $values["intro"] = $this->object->getIntroduction();
892 // $values["imp_pages"] = $this->object->getImportantPages();
893  $values["page_toc"] = $this->object->getPageToc();
894  $values["link_md_values"] = $this->object->getLinkMetadataValues();
895 
896  // only set given values (because of adv. metadata)
897  $this->form_gui->setValuesByArray($values, true);
898  }
899  }
$_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.
$ilUser
Definition: imgupload.php:18
Create new PHPExcel object
obj_idprivate
+ 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 1959 of file class.ilObjWikiGUI.php.

References ilWikiPage\lookupTitle().

1960  {
1961  include_once "Modules/Wiki/classes/class.ilWikiPage.php";
1962  return ilWikiPage::lookupTitle($a_id);
1963  }
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 534 of file class.ilObjWikiGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, array, getGotoLink(), and ilWikiUtil\makeDbTitle().

535  {
536  global $ilCtrl, $ilAccess, $lng, $ilHelp;
537 
538  $ilHelp->setScreenIdComponent("wiki");
539 
540  // wiki tabs
541  if (in_array($ilCtrl->getCmdClass(), array("", "ilobjwikigui",
542  "ilinfoscreengui", "ilpermissiongui", "ilexportgui", "ilratingcategorygui",
543  "ilwikistatgui", "ilwikipagetemplategui", "iladvancedmdsettingsgui", "ilsettingspermissiongui", 'ilrepositoryobjectsearchgui'
544  )) || (in_array($ilCtrl->getNextClass(), array("ilpermissiongui"))))
545  {
546  if ($_GET["page"] != "")
547  {
548  $this->tabs_gui->setBackTarget($lng->txt("wiki_last_visited_page"),
549  $this->getGotoLink($_GET["ref_id"],
550  ilWikiUtil::makeDbTitle($_GET["page"])));
551  }
552 
553  // pages
554  if ($ilAccess->checkAccess('read', "", $this->object->getRefId()))
555  {
556  $this->tabs_gui->addTab("wiki_pages",
557  $lng->txt("wiki_pages"),
558  $this->ctrl->getLinkTarget($this, "allPages"));
559  }
560 
561  // info screen
562  if ($ilAccess->checkAccess('visible', "", $this->object->getRefId()))
563  {
564  $this->tabs_gui->addTab("info_short",
565  $lng->txt("info_short"),
566  $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary"));
567  }
568 
569  // settings
570  if ($ilAccess->checkAccess('write', "", $this->object->getRefId()))
571  {
572  $this->tabs_gui->addTab("settings",
573  $lng->txt("settings"),
574  $this->ctrl->getLinkTarget($this, "editSettings"));
575 
576  // metadata
577  include_once "Services/Object/classes/class.ilObjectMetaDataGUI.php";
578  $mdgui = new ilObjectMetaDataGUI($this->object, "wpg");
579  $mdtab = $mdgui->getTab();
580  if($mdtab)
581  {
582  $this->tabs_gui->addTab("advmd",
583  $this->lng->txt("meta_data"),
584  $mdtab);
585  }
586  }
587 
588  // contributors
589  if ($ilAccess->checkAccess('write', "", $this->object->getRefId()))
590  {
591  $this->tabs_gui->addTab("wiki_contributors",
592  $lng->txt("wiki_contributors"),
593  $this->ctrl->getLinkTarget($this, "listContributors"));
594  }
595 
596  // statistics
597  if ($ilAccess->checkAccess('statistics_read', "", $this->object->getRefId()))
598  {
599  $this->tabs_gui->addTab("statistics",
600  $lng->txt("statistics"),
601  $this->ctrl->getLinkTargetByClass("ilWikiStatGUI", "initial"));
602  }
603 
604  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
605  {
606  $this->tabs_gui->addTab("export",
607  $lng->txt("export"),
608  $this->ctrl->getLinkTargetByClass("ilexportgui", ""));
609  }
610 
611  // edit permissions
612  if ($ilAccess->checkAccess('edit_permission', "", $this->object->getRefId()))
613  {
614  $this->tabs_gui->addTab("perm_settings",
615  $lng->txt("perm_settings"),
616  $this->ctrl->getLinkTargetByClass("ilpermissiongui", "perm"));
617  }
618  }
619  }
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.
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ getUserHTMLExportProgressObject()

ilObjWikiGUI::getUserHTMLExportProgressObject ( )

Get user html export progress.

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

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

2121  {
2122  $this->log->debug("get progress");
2123  $this->checkPermission("wiki_html_export");
2124  $p = $this->object->getUserHTMLExportProgress();
2125 
2126  include_once("./Services/UIComponent/ProgressBar/classes/class.ilProgressBar.php");
2128  $pb->setCurrent($p["progress"]);
2129 
2130  $r = new stdClass();
2131  $r->progressBar = $pb->render();
2132  $r->status = $p["status"];
2133  include_once("./Services/JSON/classes/class.ilJsonUtil.php");
2134  $this->log->debug("status: ".$r->status);
2136  exit;
2137  }
$r
Definition: example_031.php:79
static encode($mixed, $suppress_native=false)
static getInstance()
Factory.
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 1261 of file class.ilObjWikiGUI.php.

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

Referenced by randomPageObject().

1262  {
1263  global $ilCtrl;
1264 
1265  if ($a_page == "")
1266  {
1267  $a_page = $_GET["page"];
1268  }
1269 
1270  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1271  if (ilWikiPage::_wikiPageExists($this->object->getId(),
1272  ilWikiUtil::makeDbTitle($a_page)))
1273  {
1274  // to do: get rid of this redirect
1275  ilUtil::redirect(ilObjWikiGUI::getGotoLink($this->object->getRefId(), $a_page));
1276  }
1277  else
1278  {
1279  if (!$this->object->getTemplateSelectionOnCreation())
1280  {
1281  // check length
1282  include_once("./Services/Utilities/classes/class.ilStr.php");
1283  if (ilStr::strLen(ilWikiUtil::makeDbTitle($a_page)) > 200)
1284  {
1285  ilUtil::sendFailure($this->lng->txt("wiki_page_title_too_long")." (".$a_page.")", true);
1286  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
1287  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1288  }
1289  $this->object->createWikiPage($a_page);
1290 
1291  // redirect to newly created page
1292  $ilCtrl->setParameterByClass("ilwikipagegui", "page", ilWikiUtil::makeUrlTitle(($a_page)));
1293  $ilCtrl->redirectByClass("ilwikipagegui", "edit");
1294  }
1295  else
1296  {
1297  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($_GET["page"]));
1298  $ilCtrl->setParameter($this, "from_page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
1299  $ilCtrl->redirect($this, "showTemplateSelection");
1300  }
1301  }
1302  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
static strLen($a_string)
Definition: class.ilStr.php:91
$_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.
Create new PHPExcel object
obj_idprivate
static redirect($a_script)
http redirect to other 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 477 of file class.ilObjWikiGUI.php.

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

Referenced by viewObject().

478  {
479  global $ilCtrl;
480 
482  }
static getGotoLink($a_ref_id, $a_page="")
Get goto link.
global $ilCtrl
Definition: ilias.php:18
Create new PHPExcel object
obj_idprivate
static redirect($a_script)
http redirect to other 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 392 of file class.ilObjWikiGUI.php.

References $ilUser, $info, ilObjectGUI\$lng, ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilWikiContributor\_lookupStatus(), getGotoLink(), object, ilWikiContributor\STATUS_FAILED, ilWikiContributor\STATUS_NOT_GRADED, and ilWikiContributor\STATUS_PASSED.

Referenced by executeCommand(), and infoScreenObject().

393  {
394  global $ilAccess, $ilUser, $ilTabs, $lng;
395 
396  $ilTabs->activateTab("info_short");
397 
398  if (!$ilAccess->checkAccess("visible", "", $this->object->getRefId()))
399  {
400  $this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
401  }
402 
403  include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
404  $info = new ilInfoScreenGUI($this);
405  $info->enablePrivateNotes();
406  if (trim($this->object->getIntroduction()) != "")
407  {
408  $info->addSection($lng->txt("wiki_introduction"));
409  $info->addProperty("", nl2br($this->object->getIntroduction()));
410  }
411 
412  // feedback from tutor; mark, status, comment
413  include_once("./Modules/Wiki/classes/class.ilWikiContributor.php");
414  include_once("./Services/Tracking/classes/class.ilLPMarks.php");
415  $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
416  $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
417  $status = ilWikiContributor::_lookupStatus($this->object->getId(), $ilUser->getId());
418  if ($lpcomment != "" || $mark != "" || $status != ilWikiContributor::STATUS_NOT_GRADED)
419  {
420  $info->addSection($this->lng->txt("wiki_feedback_from_tutor"));
421  if ($lpcomment != "")
422  {
423  $info->addProperty($this->lng->txt("wiki_comment"),
424  $lpcomment);
425  }
426  if ($mark != "")
427  {
428  $info->addProperty($this->lng->txt("wiki_mark"),
429  $mark);
430  }
431 
432  if ($status == ilWikiContributor::STATUS_PASSED)
433  {
434  $info->addProperty($this->lng->txt("status"),
435  $this->lng->txt("wiki_passed"));
436  }
437  if ($status == ilWikiContributor::STATUS_FAILED)
438  {
439  $info->addProperty($this->lng->txt("status"),
440  $this->lng->txt("wiki_failed"));
441  }
442  }
443 
444  /*
445  $info->enableNews();
446  if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
447  {
448  //$info->enableNewsEditing();
449  $info->setBlockProperty("news", "settings", true);
450  }*/
451 
452  if ($ilAccess->checkAccess("read", "", $this->object->getRefId()))
453  {
454  $info->addButton($lng->txt("wiki_start_page"), ilObjWikiGUI::getGotoLink($this->object->getRefId()));
455  }
456 
457  // general information
458  $this->lng->loadLanguageModule("meta");
459  $this->lng->loadLanguageModule("wiki");
460 
461  //$info->addSection($this->lng->txt("meta_general"));
462  //$info->addProperty($this->lng->txt("mcst_nr_items"),
463  // (int) count($med_items));
464 
465  // forward the command
466  $this->ctrl->forwardCommand($info);
467 
468  if ($ilAccess->checkAccess("read", "", $this->object->getRefId()))
469  {
470 // $this->setSideBlock();
471  }
472  }
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)
$info
Definition: example_052.php:80
$ilUser
Definition: imgupload.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...
Create new PHPExcel object
obj_idprivate
static _lookupMark($a_usr_id, $a_obj_id)
static _lookupComment($a_usr_id, $a_obj_id)
+ 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 381 of file class.ilObjWikiGUI.php.

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

382  {
383  $this->checkPermission("visible");
384  $this->ctrl->setCmd("showSummary");
385  $this->ctrl->setCmdClass("ilinfoscreengui");
386  $this->infoScreen();
387  }
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 295 of file class.ilObjWikiGUI.php.

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

296  {
297  $this->initSettingsForm("create");
298  $this->getSettingsFormValues("create");
299 
300  $forms = array(self::CFORM_NEW => $this->form_gui,
301  self::CFORM_IMPORT => $this->initImportForm($a_new_type),
302  self::CFORM_CLONE => $this->fillCloneTemplate(null, $a_new_type));
303 
304  return $forms;
305  }
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.
Create styles array
The data for the language used.
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 705 of file class.ilObjWikiGUI.php.

References $ilCtrl, $ilSetting, ilObjectGUI\$lng, $new, $options, $si, ilAdvancedMDRecord\_getSelectedRecordsByObject(), ilSubEnabledFormPropertyGUI\addSubItem(), array, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilWikiPage\getAllWikiPages(), ilUtil\getImagePath(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), object, ilTextAreaInputGUI\setCols(), ilFormPropertyGUI\setInfo(), ilFormPropertyGUI\setRequired(), and ilUtil\shortenText().

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

706  {
707  global $lng, $ilCtrl, $ilTabs, $ilSetting;
708 
709  $lng->loadLanguageModule("wiki");
710  $ilTabs->activateTab("settings");
711 
712  require_once("Services/Form/classes/class.ilPropertyFormGUI.php");
713  $this->form_gui = new ilPropertyFormGUI();
714 
715  // Title
716  $tit = new ilTextInputGUI($lng->txt("title"), "title");
717  $tit->setRequired(true);
718  $this->form_gui->addItem($tit);
719 
720  // Short Title
721  // The problem with the short title is, that it is per object
722  // and can't be a substitute for a ref id in the permanent link
723 /*
724  $stit = new ilRegExpInputGUI($lng->txt("wiki_short_title"), "shorttitle");
725  $stit->setPattern("/^[^0-9][^ _\&]+$/");
726  $stit->setRequired(false);
727  $stit->setNoMatchMessage($lng->txt("wiki_msg_short_name_regexp")." & _");
728  $stit->setSize(20);
729  $stit->setMaxLength(20);
730  $stit->setInfo($lng->txt("wiki_short_title_desc2"));
731  $this->form_gui->addItem($stit);
732 */
733 
734  // Description
735  $des = new ilTextAreaInputGUI($lng->txt("description"), "description");
736  $this->form_gui->addItem($des);
737 
738  // Introduction
739  $intro = new ilTextAreaInputGUI($lng->txt("wiki_introduction"), "intro");
740  $intro->setCols(40);
741  $intro->setRows(4);
742  $this->form_gui->addItem($intro);
743 
744  // Start Page
745  if ($a_mode == "edit")
746  {
747  $pages = ilWikiPage::getAllWikiPages($this->object->getId());
748  foreach ($pages as $p)
749  {
750  $options[$p["id"]] = ilUtil::shortenText($p["title"], 60, true);
751  }
752  $si = new ilSelectInputGUI($lng->txt("wiki_start_page"), "startpage_id");
753  $si->setOptions($options);
754  $this->form_gui->addItem($si);
755  }
756  else
757  {
758  $sp = new ilTextInputGUI($lng->txt("wiki_start_page"), "startpage");
759  if ($a_mode == "edit")
760  {
761  $sp->setInfo($lng->txt("wiki_start_page_info"));
762  }
763  $sp->setMaxLength(200);
764  $sp->setRequired(true);
765  $this->form_gui->addItem($sp);
766  }
767 
768  // Online
769  $online = new ilCheckboxInputGUI($lng->txt("online"), "online");
770  $this->form_gui->addItem($online);
771 
772 
773  // rating
774 
775  $lng->loadLanguageModule('rating');
776  $rate = new ilCheckboxInputGUI($lng->txt('rating_activate_rating'), 'rating_overall');
777  $rate->setInfo($lng->txt('rating_activate_rating_info'));
778  $this->form_gui->addItem($rate);
779 
780  $rating = new ilCheckboxInputGUI($lng->txt("wiki_activate_rating"), "rating");
781  $this->form_gui->addItem($rating);
782 
783  /* always active
784  $side = new ilCheckboxInputGUI($lng->txt("wiki_activate_sideblock_rating"), "rating_side");
785  $rating->addSubItem($side);
786  */
787 
788  $new = new ilCheckboxInputGUI($lng->txt("wiki_activate_new_page_rating"), "rating_new");
789  $rating->addSubItem($new);
790 
791  $extended = new ilCheckboxInputGUI($lng->txt("wiki_activate_extended_rating"), "rating_ext");
792  $rating->addSubItem($extended);
793 
794 
795  // public comments
796  if (!$ilSetting->get("disable_comments"))
797  {
798  $comments = new ilCheckboxInputGUI($lng->txt("wiki_public_comments"), "public_notes");
799  $this->form_gui->addItem($comments);
800  }
801 
802  // important pages
803 // $imp_pages = new ilCheckboxInputGUI($lng->txt("wiki_important_pages"), "imp_pages");
804 // $this->form_gui->addItem($imp_pages);
805 
806  // page toc
807  $page_toc = new ilCheckboxInputGUI($lng->txt("wiki_page_toc"), "page_toc");
808  $page_toc->setInfo($lng->txt("wiki_page_toc_info"));
809  $this->form_gui->addItem($page_toc);
810 
811  if($a_mode == "edit")
812  {
813  // advanced metadata auto-linking
814  include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php');
815  if(count(ilAdvancedMDRecord::_getSelectedRecordsByObject("wiki", $this->object->getId(), "wpg")) > 0)
816  {
817  $link_md = new ilCheckboxInputGUI($lng->txt("wiki_link_md_values"), "link_md_values");
818  $link_md->setInfo($lng->txt("wiki_link_md_values_info"));
819  $this->form_gui->addItem($link_md);
820  }
821 
822  // additional features
823  $feat = new ilFormSectionHeaderGUI();
824  $feat->setTitle($this->lng->txt('obj_features'));
825  $this->form_gui->addItem($feat);
826 
827  include_once './Services/Container/classes/class.ilContainer.php';
828  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
830  $this->object->getId(),
831  $this->form_gui,
832  array(
834  )
835  );
836  }
837 
838  // :TODO: sorting
839 
840  // Form action and save button
841  $this->form_gui->setTitleIcon(ilUtil::getImagePath("icon_wiki.svg"));
842  if ($a_mode != "create")
843  {
844  $this->form_gui->setTitle($lng->txt("wiki_settings"));
845  $this->form_gui->addCommandButton("saveSettings", $lng->txt("save"));
846  }
847  else
848  {
849  $this->form_gui->setTitle($lng->txt("wiki_new"));
850  $this->form_gui->addCommandButton("save", $lng->txt("wiki_add"));
851  $this->form_gui->addCommandButton("cancel", $lng->txt("cancel"));
852  }
853 
854  // set values
855  if ($a_mode == "create")
856  {
857  $ilCtrl->setParameter($this, "new_type", "wiki");
858  }
859 
860  $this->form_gui->setFormAction($ilCtrl->getFormAction($this, "saveSettings"));
861  }
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.
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 checkbox property in a property form.
global $ilCtrl
Definition: ilias.php:18
setInfo($a_info)
Set Information Text.
if(!is_array($argv)) $options
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 _getSelectedRecordsByObject($a_obj_type, $a_obj_id, $a_sub_type="")
Get selected records by object.
static getAllWikiPages($a_wiki_id)
Get all pages of wiki.
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
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 1644 of file class.ilObjWikiGUI.php.

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

Referenced by editStylePropertiesObject().

1645  {
1646  global $ilCtrl, $lng, $ilTabs, $ilSetting;
1647 
1648  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1649  $lng->loadLanguageModule("style");
1650 
1651  include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
1652  $this->form = new ilPropertyFormGUI();
1653 
1654  $fixed_style = $ilSetting->get("fixed_content_style_id");
1655  $style_id = $this->object->getStyleSheetId();
1656 
1657  if ($fixed_style > 0)
1658  {
1659  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1660  $st->setValue(ilObject::_lookupTitle($fixed_style)." (".
1661  $this->lng->txt("global_fixed").")");
1662  $this->form->addItem($st);
1663  }
1664  else
1665  {
1666  $st_styles = ilObjStyleSheet::_getStandardStyles(true, false,
1667  $_GET["ref_id"]);
1668 
1669  $st_styles[0] = $this->lng->txt("default");
1670  ksort($st_styles);
1671 
1672  if ($style_id > 0)
1673  {
1674  // individual style
1675  if (!ilObjStyleSheet::_lookupStandard($style_id))
1676  {
1677  $st = new ilNonEditableValueGUI($lng->txt("style_current_style"));
1678  $st->setValue(ilObject::_lookupTitle($style_id));
1679  $this->form->addItem($st);
1680 
1681 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "edit"));
1682 
1683  // delete command
1684  $this->form->addCommandButton("editStyle",
1685  $lng->txt("style_edit_style"));
1686  $this->form->addCommandButton("deleteStyle",
1687  $lng->txt("style_delete_style"));
1688 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "delete"));
1689  }
1690  }
1691 
1692  if ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))
1693  {
1694  $style_sel = ilUtil::formSelect ($style_id, "style_id",
1695  $st_styles, false, true);
1696  $style_sel = new ilSelectInputGUI($lng->txt("style_current_style"), "style_id");
1697  $style_sel->setOptions($st_styles);
1698  $style_sel->setValue($style_id);
1699  $this->form->addItem($style_sel);
1700 //$this->ctrl->getLinkTargetByClass("ilObjStyleSheetGUI", "create"));
1701  $this->form->addCommandButton("saveStyleSettings",
1702  $lng->txt("save"));
1703  $this->form->addCommandButton("createStyle",
1704  $lng->txt("sty_create_ind_style"));
1705  }
1706  }
1707  $this->form->setTitle($lng->txt("wiki_style"));
1708  $this->form->setFormAction($ilCtrl->getFormAction($this));
1709  }
This class represents a selection list property in a property form.
This class represents a property form user interface.
$_GET["client_id"]
static _getStandardStyles($a_exclude_default_style=false, $a_include_deactivated=false, $a_scope=0)
Get standard styles.
static _lookupTitle($a_id)
lookup object title
static _lookupStandard($a_id)
Lookup standard flag.
global $ilCtrl
Definition: ilias.php:18
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.
setOptions($a_options)
Set Options.
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 1984 of file class.ilObjWikiGUI.php.

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

Referenced by createPageUsingTemplateObject(), and showTemplateSelectionObject().

1985  {
1986  global $lng, $ilCtrl;
1987 
1988  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
1989  $form = new ilPropertyFormGUI();
1990 
1991  // page name
1992  $hi = new ilHiddenInputGUI("page");
1993  $hi->setValue($_GET["page"]);
1994  $form->addItem($hi);
1995 
1996  // page template
1997  $radg = new ilRadioGroupInputGUI($lng->txt("wiki_page_template"), "page_templ");
1998  $radg->setRequired(true);
1999 
2000  if ($this->object->getEmptyPageTemplate())
2001  {
2002  $op1 = new ilRadioOption($lng->txt("wiki_empty_page"), 0);
2003  $radg->addOption($op1);
2004  }
2005 
2006  include_once("./Modules/Wiki/classes/class.ilWikiPageTemplate.php");
2007  $wt = new ilWikiPageTemplate($this->object->getId());
2009  foreach ($ts as $t)
2010  {
2011  $op = new ilRadioOption($t["title"], $t["wpage_id"]);
2012  $radg->addOption($op);
2013  }
2014 
2015  $form->addItem($radg);
2016 
2017  // save and cancel commands
2018  $form->addCommandButton("createPageUsingTemplate", $lng->txt("wiki_create_page"));
2019  $form->addCommandButton("cancelCreationPageUsingTemplate", $lng->txt("cancel"));
2020 
2021  $form->setTitle($lng->txt("wiki_new_page").": ".$_GET["page"]);
2022  $form->setFormAction($ilCtrl->getFormAction($this));
2023 
2024  return $form;
2025  }
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.
Create new PHPExcel object
obj_idprivate
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 2100 of file class.ilObjWikiGUI.php.

References ilObjectGUI\checkPermission().

2101  {
2102  $this->log->debug("init");
2103  $this->checkPermission("wiki_html_export");
2104  $this->object->initUserHTMLExport();
2105  }
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 277 of file class.ilObjWikiGUI.php.

References ilObjWiki\isOnlineHelpWiki(), and object.

278  {
279  if (is_object($this->object))
280  {
281  return ilObjWiki::isOnlineHelpWiki($this->object->getRefId());
282  }
283  return false;
284  }
Create new PHPExcel object
obj_idprivate
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 971 of file class.ilObjWikiGUI.php.

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

972  {
973  global $tpl, $ilTabs;
974 
975  $this->checkPermission("write");
976  $ilTabs->activateTab("wiki_contributors");
977 
978  include_once("./Modules/Wiki/classes/class.ilWikiContributorsTableGUI.php");
979 
980  $table_gui = new ilWikiContributorsTableGUI($this, "listContributors",
981  $this->object->getId());
982 
983  $tpl->setContent($table_gui->getHTML());
984 
985  $this->setSideBlock();
986  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for listing users that contributed to the wiki.
Create new PHPExcel object
obj_idprivate
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 1942 of file class.ilObjWikiGUI.php.

1943  {
1944  include_once "Modules/Wiki/classes/class.ilWikiPage.php";
1945  $page = new ilWikiPage($a_page_id);
1946  if($page->getWikiId() == $a_wiki_id)
1947  {
1948  return $page->getTitle();
1949  }
1950  }
Class ilWikiPage.

◆ newPagesObject()

ilObjWikiGUI::newPagesObject ( )

Latest pages.

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

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

1441  {
1442  global $tpl;
1443 
1444  $this->checkPermission("read");
1445 
1446  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1447 
1448  $this->addPagesSubTabs();
1449 
1450  $table_gui = new ilWikiPagesTableGUI($this, "newPages",
1451  $this->object->getId(), IL_WIKI_NEW_PAGES);
1452 
1453  $this->setSideBlock();
1454  $tpl->setContent($table_gui->getHTML());
1455  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
Create new PHPExcel object
obj_idprivate
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 1239 of file class.ilObjWikiGUI.php.

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

1240  {
1241  global $tpl;
1242 
1243  $this->checkPermission("read");
1244 
1245  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1246 
1247  $this->addPagesSubTabs();
1248 
1249  $table_gui = new ilWikiPagesTableGUI($this, "orphanedPages",
1250  $this->object->getId(), IL_WIKI_ORPHANED_PAGES);
1251 
1252  $this->setSideBlock();
1253  $tpl->setContent($table_gui->getHTML());
1254  }
setSideBlock($a_wpg_id=0)
Side column.
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
Create new PHPExcel object
obj_idprivate
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 1540 of file class.ilObjWikiGUI.php.

References $html, ilPDFGeneration\doJob(), ilPDFGeneration\prepareGeneration(), and printViewObject().

1541  {
1542 
1543  // prepare generation before contents are processed (for mathjax)
1544  require_once 'Services/PDFGeneration/classes/class.ilPDFGeneration.php';
1546 
1547  $html = $this->printViewObject(true);
1548 
1549  // :TODO: fixing css dummy parameters
1550  $html = preg_replace("/\?dummy\=[0-9]+/", "", $html);
1551  $html = preg_replace("/\?vers\=[0-9A-Za-z\-]+/", "", $html);
1552 
1553  include_once "Services/PDFGeneration/classes/class.ilPDFGeneration.php";
1554  include_once "Services/PDFGeneration/classes/class.ilPDFGenerationJob.php";
1555 
1556  $job = new ilPDFGenerationJob();
1557  $job->setAutoPageBreak(true)
1558  ->setMarginLeft("10")
1559  ->setMarginRight("10")
1560  ->setMarginTop("10")
1561  ->setMarginBottom("10")
1562  ->setOutputMode("D") // download
1563  ->setFilename("wiki.pdf") // :TODO:
1564  ->setCreator("ILIAS Wiki") // :TODO:
1565  ->setImageScale(1.25) // complete content scaling ?!
1566  ->addPage($html);
1567 
1568  ilPDFGeneration::doJob($job);
1569  }
printViewObject($a_pdf_export=false)
static prepareGeneration()
Prepare the PDF generation This initializes the purpose for MathJax rendering It has to be called bef...
Class ilPDFGenerationJob.
static doJob(ilPDFGenerationJob $job)
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ performSearchObject()

ilObjWikiGUI::performSearchObject ( )

Search.

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

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

1575  {
1576  global $tpl, $ilTabs, $ilCtrl, $lng;
1577 
1578  $this->checkPermission("read");
1579 
1580  include_once("./Modules/Wiki/classes/class.ilWikiSearchResultsTableGUI.php");
1581 
1582  $ilTabs->setTabActive("wiki_search_results");
1583 
1584  if (trim($_POST["search_term"]) == "")
1585  {
1586  ilUtil::sendFailure($lng->txt("wiki_please_enter_search_term"), true);
1587  $ilCtrl->redirectByClass("ilwikipagegui", "preview");
1588  }
1589 
1590  $search_results = ilObjWiki::_performSearch($this->object->getId(),
1591  ilUtil::stripSlashes($_POST["search_term"]));
1592  $table_gui = new ilWikiSearchResultsTableGUI($this, "performSearch",
1593  $this->object->getId(), $search_results, $_POST["search_term"]);
1594 
1595  $this->setSideBlock();
1596  $tpl->setContent($table_gui->getHTML());
1597  }
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.
Create new PHPExcel object
obj_idprivate
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 1219 of file class.ilObjWikiGUI.php.

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

1220  {
1221  global $tpl;
1222 
1223  $this->checkPermission("read");
1224 
1225  include_once("./Modules/Wiki/classes/class.ilWikiPagesTableGUI.php");
1226 
1227  $this->addPagesSubTabs();
1228 
1229  $table_gui = new ilWikiPagesTableGUI($this, "popularPages",
1230  $this->object->getId(), IL_WIKI_POPULAR_PAGES);
1231 
1232  $this->setSideBlock();
1233  $tpl->setContent($table_gui->getHTML());
1234  }
setSideBlock($a_wpg_id=0)
Side column.
const IL_WIKI_POPULAR_PAGES
TableGUI class for wiki pages table.
addPagesSubTabs()
Add Pages SubTabs.
Create new PHPExcel object
obj_idprivate
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 1474 of file class.ilObjWikiGUI.php.

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

Referenced by pdfExportObject().

1475  {
1476  global $tpl;
1477 
1478  $page_ids = $this->getPrintPageIds();
1479  if(!$page_ids)
1480  {
1481  $this->ctrl->redirect($this, "");
1482  }
1483 
1484  $tpl = new ilTemplate("tpl.main.html", true, true);
1485  $tpl->setVariable("LOCATION_STYLESHEET", ilObjStyleSheet::getContentPrintStyle());
1486  $this->setContentStyleSheet($tpl);
1487 
1488  // syntax style
1489  $tpl->setCurrentBlock("SyntaxStyle");
1490  $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET",
1492  $tpl->parseCurrentBlock();
1493 
1494 
1495  // determine target frames for internal links
1496 
1497  include_once("./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1498 
1499  $page_content = "";
1500 
1501  foreach ($page_ids as $p_id)
1502  {
1503  $page_gui = new ilWikiPageGUI($p_id);
1504  $page_gui->setWiki($this->object);
1505  $page_gui->setOutputMode("print");
1506  $page_content.= $page_gui->showPage();
1507 
1508  if($a_pdf_export)
1509  {
1510  $page_content .= '<p style="page-break-after:always;"></p>';
1511  }
1512  }
1513 
1514  $page_content = '<div class="ilInvisibleBorder">'.$page_content.'</div>';
1515 
1516  if(!$a_pdf_export)
1517  {
1518  $page_content .= '<script type="text/javascript" language="javascript1.2">
1519  <!--
1520  il.Util.addOnLoad(function () {
1521  il.Util.print();
1522  });
1523  //-->
1524  </script>';
1525  }
1526 
1527  $tpl->setVariable("CONTENT", $page_content);
1528 
1529  if(!$a_pdf_export)
1530  {
1531  $tpl->show(false);
1532  exit;
1533  }
1534  else
1535  {
1536  return $tpl->get("DEFAULT", false, false, false, true, false, false);
1537  }
1538  }
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
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 1309 of file class.ilObjWikiGUI.php.

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

1310  {
1311  $this->checkPermission("read");
1312 
1313  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1314  $page = ilWikiPage::getRandomPage($this->object->getId());
1315  $this->gotoPageObject($page);
1316  }
static getRandomPage($a_wiki_id)
Get a random page.
Create new PHPExcel object
obj_idprivate
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 1321 of file class.ilObjWikiGUI.php.

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

1322  {
1323  global $tpl;
1324 
1325  $this->checkPermission("read");
1326 
1327  include_once("./Modules/Wiki/classes/class.ilWikiRecentChangesTableGUI.php");
1328 
1329  $this->addPagesSubTabs();
1330 
1331  $table_gui = new ilWikiRecentChangesTableGUI($this, "recentChanges",
1332  $this->object->getId());
1333 
1334  $this->setSideBlock();
1335  $tpl->setContent($table_gui->getHTML());
1336  }
setSideBlock($a_wpg_id=0)
Side column.
addPagesSubTabs()
Add Pages SubTabs.
Create new PHPExcel object
obj_idprivate
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 1870 of file class.ilObjWikiGUI.php.

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

1871  {
1872  global $ilCtrl, $lng;
1873 
1874  $this->checkPermission("edit_wiki_navigation");
1875 
1876  if (is_array($_POST["imp_page_id"]))
1877  {
1878  foreach ($_POST["imp_page_id"] as $i)
1879  {
1880  $this->object->removeImportantPage((int) $i);
1881  }
1882  }
1883  ilUtil::sendSuccess($lng->txt("wiki_removed_imp_pages"), true);
1884  $ilCtrl->redirect($this, "editImportantPages");
1885  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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:

◆ renderSideBlock()

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

Side column.

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

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

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

1351  {
1352  global $tpl, $lng, $ilAccess, $ilCtrl;
1353 
1354  $tpl->addJavaScript("./Modules/Wiki/js/WikiPres.js");
1355 
1356  // setting asynch to false fixes #0019457, since otherwise ilBlockGUI would act on asynch and output html when side blocks
1357  // being processed during the export. This is a flaw in ilCtrl and/or ilBlockGUI.
1358  $tpl->addOnLoadCode("il.Wiki.Pres.init('".$ilCtrl->getLinkTargetByClass("ilobjwikigui", "", "", false, false)."');");
1359 
1360  if ($a_wpg_id > 0 && !$a_wp)
1361  {
1362  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1363  $a_wp = ilWikiPage($a_wpg_id);
1364  }
1365 
1366  // search block
1367  include_once './Services/Search/classes/class.ilRepositoryObjectSearchGUI.php';
1368  $rcontent = ilRepositoryObjectSearchGUI::getSearchBlockHTML($lng->txt('wiki_search'));
1369 
1370  #include_once("./Modules/Wiki/classes/class.ilWikiSearchBlockGUI.php");
1371  #$wiki_search_block = new ilWikiSearchBlockGUI();
1372  #$rcontent = $wiki_search_block->getHTML();
1373 
1374  // quick navigation
1375  if ($a_wpg_id > 0)
1376  {
1377 // include_once("./Modules/Wiki/classes/class.ilWikiSideBlockGUI.php");
1378 // $wiki_side_block = new ilWikiSideBlockGUI();
1379 // $wiki_side_block->setPageObject($a_wp);
1380 // $rcontent.= $wiki_side_block->getHTML();
1381 
1382  // rating
1383  $wiki_id =ilObject::_lookupObjId($a_wiki_ref_id);
1384  if(ilObjWiki::_lookupRating($wiki_id) &&
1385  // ilObjWiki::_lookupRatingAsBlock($wiki_id) &&
1386  $a_wp->getRating())
1387  {
1388  include_once("./Services/Rating/classes/class.ilRatingGUI.php");
1389  $rgui = new ilRatingGUI();
1390  $rgui->setObject($wiki_id, "wiki", $a_wpg_id, "wpg");
1391  $rgui->enableCategories(ilObjWiki::_lookupRatingCategories($wiki_id));
1392  $rgui->setYourRatingText("#");
1393  $rcontent .= $rgui->getBlockHTML($lng->txt("wiki_rate_page"));
1394  }
1395 
1396  // advanced metadata
1398  {
1399  $cmd = null;
1400  if($ilAccess->checkAccess("write", "", $a_wiki_ref_id))
1401  {
1402  $cmd = array(
1403  "edit" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "editAdvancedMetaData"),
1404  "hide" => $ilCtrl->getLinkTargetByClass("ilwikipagegui", "hideAdvancedMetaData")
1405  );
1406  }
1407  include_once("./Services/Object/classes/class.ilObjectMetaDataGUI.php");
1408  $wiki = new ilObjWiki($a_wiki_ref_id);
1409  $callback = $wiki->getLinkMetadataValues()
1410  ? array($wiki, "decorateAdvMDValue")
1411  : null;
1412  $mdgui = new ilObjectMetaDataGUI($wiki, "wpg", $a_wpg_id);
1413  $rcontent .= $mdgui->getBlockHTML($cmd, $callback); // #17291
1414  }
1415  }
1416 
1417  // important pages
1418 // if (ilObjWiki::_lookupImportantPages(ilObject::_lookupObjId($a_wiki_ref_id)))
1419 // {
1420  include_once("./Modules/Wiki/classes/class.ilWikiImportantPagesBlockGUI.php");
1421  $imp_pages_block = new ilWikiImportantPagesBlockGUI();
1422  $rcontent.= $imp_pages_block->getHTML();
1423 // }
1424 
1425  // wiki functions block
1426  if ($a_wpg_id > 0)
1427  {
1428  include_once("./Modules/Wiki/classes/class.ilWikiFunctionsBlockGUI.php");
1429  $wiki_functions_block = new ilWikiFunctionsBlockGUI();
1430  $wiki_functions_block->setPageObject($a_wp);
1431  $rcontent .= $wiki_functions_block->getHTML();
1432  }
1433 
1434  $tpl->setRightContent($rcontent);
1435  }
Class ilObjectMetaDataGUI.
$cmd
Definition: sahs_server.php:35
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.
Create styles array
The data for the language used.
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 991 of file class.ilObjWikiGUI.php.

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

992  {
993  global $ilCtrl, $lng;
994 
995  $this->checkPermission("write");
996 
997  $users = (is_array($_POST["user_id"])
998  ? $_POST["user_id"]
999  : array());
1000 
1001  include_once("./Modules/Wiki/classes/class.ilWikiContributor.php");
1002  include_once("./Services/Tracking/classes/class.ilLPMarks.php");
1003  $saved = false;
1004  foreach($users as $user_id)
1005  {
1006  if ($user_id != "")
1007  {
1008  $marks_obj = new ilLPMarks($this->object->getId(),$user_id);
1009  $new_mark = ilUtil::stripSlashes($_POST['mark'][$user_id]);
1010  $new_comment = ilUtil::stripSlashes($_POST['lcomment'][$user_id]);
1011  $new_status = ilUtil::stripSlashes($_POST["status"][$user_id]);
1012 
1013  if ($marks_obj->getMark() != $new_mark ||
1014  $marks_obj->getComment() != $new_comment ||
1015  ilWikiContributor::_lookupStatus($this->object->getId(), $user_id) != $new_status)
1016  {
1017  ilWikiContributor::_writeStatus($this->object->getId(), $user_id, $new_status);
1018  $marks_obj->setMark($new_mark);
1019  $marks_obj->setComment($new_comment);
1020  $marks_obj->update();
1021  $saved = true;
1022  }
1023  }
1024  }
1025  if ($saved)
1026  {
1027  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
1028  }
1029 
1030  $ilCtrl->redirect($this, "listContributors");
1031  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
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 311 of file class.ilObjWikiGUI.php.

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

312  {
313  global $tpl, $lng, $rbacsystem;
314 
315  if (!$this->checkPermissionBool("create", "", "wiki", $_GET["ref_id"]))
316  {
317  $this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
318  }
319 
320  $this->initSettingsForm("create");
321  if ($this->form_gui->checkInput())
322  {
323  if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")))
324  {
325  $short_item = $this->form_gui->getItemByPostVar("shorttitle");
326  $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
327  }
328  else
329  {
330  // create and insert forum in objecttree
331  $_POST["title"] = $this->form_gui->getInput("title");
332  $_POST["desc"] = $this->form_gui->getInput("description");
333  return parent::saveObject();
334  }
335  }
336 
337  $this->form_gui->setValuesByPost();
338  $tpl->setContent($this->form_gui->getHtml());
339  }
$_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.
redirection script todo: (a better solution should control the processing via a xml file) ...
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 1890 of file class.ilObjWikiGUI.php.

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

1891  {
1892  global $ilCtrl, $lng;
1893 
1894  $this->checkPermission("edit_wiki_navigation");
1895 
1896  $this->object->saveOrderingAndIndentation($_POST["ord"], $_POST["indent"]);
1897  ilUtil::sendSuccess($lng->txt("wiki_ordering_and_indent_saved"), true);
1898  $ilCtrl->redirect($this, "editImportantPages");
1899  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 905 of file class.ilObjWikiGUI.php.

References $ilCtrl, $ilSetting, $ilUser, ilObjectGUI\$lng, array, ilObjectGUI\checkPermission(), ilObjWiki\checkShortTitleAvailability(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, initSettingsForm(), ilWikiPage\lookupTitle(), object, ilUtil\sendSuccess(), and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

906  {
907  global $ilCtrl, $lng, $ilUser, $ilSetting;
908 
909  $this->checkPermission("write");
910 
911  $this->initSettingsForm();
912 
913  if ($this->form_gui->checkInput())
914  {
915  if (!ilObjWiki::checkShortTitleAvailability($this->form_gui->getInput("shorttitle")) &&
916  $this->form_gui->getInput("shorttitle") != $this->object->getShortTitle())
917  {
918  $short_item = $this->form_gui->getItemByPostVar("shorttitle");
919  $short_item->setAlert($lng->txt("wiki_short_title_already_in_use"));
920  }
921  else
922  {
923  $this->object->setTitle($this->form_gui->getInput("title"));
924  $this->object->setDescription($this->form_gui->getInput("description"));
925  $this->object->setOnline($this->form_gui->getInput("online"));
926  $this->object->setStartPage(ilWikiPage::lookupTitle($this->form_gui->getInput("startpage_id")));
927  $this->object->setShortTitle($this->form_gui->getInput("shorttitle"));
928  $this->object->setRatingOverall($this->form_gui->getInput("rating_overall"));
929  $this->object->setRating($this->form_gui->getInput("rating"));
930  // $this->object->setRatingAsBlock($this->form_gui->getInput("rating_side"));
931  $this->object->setRatingForNewPages($this->form_gui->getInput("rating_new"));
932  $this->object->setRatingCategories($this->form_gui->getInput("rating_ext"));
933 
934  if (!$ilSetting->get("disable_comments"))
935  {
936  $this->object->setPublicNotes($this->form_gui->getInput("public_notes"));
937  }
938  $this->object->setIntroduction($this->form_gui->getInput("intro"));
939 // $this->object->setImportantPages($this->form_gui->getInput("imp_pages"));
940  $this->object->setPageToc($this->form_gui->getInput("page_toc"));
941  $this->object->setLinkMetadataValues($this->form_gui->getInput("link_md_values"));
942  $this->object->update();
943 
944  include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
946  $this->object->getId(),
947  $this->form_gui,
948  array(
950  )
951  );
952 
953  // Update ecs export settings
954  include_once 'Modules/Wiki/classes/class.ilECSWikiSettings.php';
955  $ecs = new ilECSWikiSettings($this->object);
956  if($ecs->handleSettingsUpdate())
957  {
958  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
959  $ilCtrl->redirect($this, "editSettings");
960  }
961  }
962  }
963 
964  $this->form_gui->setValuesByPost();
965  $this->tpl->setContent($this->form_gui->getHTML());
966  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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.
Create styles array
The data for the language used.
initSettingsForm($a_mode="edit")
Init Settings Form.
Create new PHPExcel object
obj_idprivate
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 1744 of file class.ilObjWikiGUI.php.

References $_POST, $ilSetting, ilObjStyleSheet\_lookupStandard(), object, ilUtil\sendSuccess(), and ilUtil\stripSlashes().

1745  {
1746  global $ilSetting;
1747 
1748  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1749  if ($ilSetting->get("fixed_content_style_id") <= 0 &&
1750  (ilObjStyleSheet::_lookupStandard($this->object->getStyleSheetId())
1751  || $this->object->getStyleSheetId() == 0))
1752  {
1753  $this->object->setStyleSheetId(ilUtil::stripSlashes($_POST["style_id"]));
1754  $this->object->update();
1755  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
1756  }
1757  $this->ctrl->redirect($this, "editStyleProperties");
1758  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupStandard($a_id)
Lookup standard flag.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
Create new PHPExcel object
obj_idprivate
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 1904 of file class.ilObjWikiGUI.php.

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

1905  {
1906  global $ilCtrl, $lng;
1907 
1908  $this->checkPermission("edit_wiki_navigation");
1909 
1910  if (!is_array($_POST["imp_page_id"]) || count($_POST["imp_page_id"]) != 1)
1911  {
1912  ilUtil::sendInfo($lng->txt("wiki_select_one_item"), true);
1913  }
1914  else
1915  {
1916  $this->object->removeImportantPage((int) $_POST["imp_page_id"][0]);
1917  $this->object->setStartPage(ilWikiPage::lookupTitle((int) $_POST["imp_page_id"][0]));
1918  $this->object->update();
1919  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"),true);
1920  }
1921  $ilCtrl->redirect($this, "editImportantPages");
1922  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
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 1602 of file class.ilObjWikiGUI.php.

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

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

1603  {
1604  global $tpl;
1605 
1606  if ($a_tpl != null)
1607  {
1608  $ctpl = $a_tpl;
1609  }
1610  else
1611  {
1612  $ctpl = $tpl;
1613  }
1614 
1615  $ctpl->setCurrentBlock("ContentStyle");
1616  $ctpl->setVariable("LOCATION_CONTENT_STYLESHEET",
1617  ilObjStyleSheet::getContentStylePath($this->object->getStyleSheetId()));
1618  $ctpl->parseCurrentBlock();
1619 
1620  }
static getContentStylePath($a_style_id)
get content style path
Create new PHPExcel object
obj_idprivate
+ 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 624 of file class.ilObjWikiGUI.php.

References $ilCtrl, ilObjectGUI\$lng, array, and object.

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

625  {
626  global $ilTabs, $ilCtrl, $lng, $ilAccess;
627 
628  if (in_array($a_active,
629  array("general_settings", "style", "imp_pages", "rating_categories",
630  "page_templates", "advmd", "permission_settings")))
631  {
632  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
633  {
634  // general properties
635  $ilTabs->addSubTab("general_settings",
636  $lng->txt("wiki_general_settings"),
637  $ilCtrl->getLinkTarget($this, 'editSettings'));
638 
639  // permission settings
640  $ilTabs->addSubTab("permission_settings",
641  $lng->txt("obj_permission_settings"),
642  $this->ctrl->getLinkTargetByClass("ilsettingspermissiongui", ""));
643 
644  // style properties
645  $ilTabs->addSubTab("style",
646  $lng->txt("wiki_style"),
647  $ilCtrl->getLinkTarget($this, 'editStyleProperties'));
648  }
649 
650  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
651  {
652  // important pages
653  $ilTabs->addSubTab("imp_pages",
654  $lng->txt("wiki_navigation"),
655  $ilCtrl->getLinkTarget($this, 'editImportantPages'));
656  }
657 
658  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
659  {
660  // page templates
661  $ilTabs->addSubTab("page_templates",
662  $lng->txt("wiki_page_templates"),
663  $ilCtrl->getLinkTargetByClass("ilwikipagetemplategui", ""));
664 
665  // rating categories
666  if ($this->object->getRating() && $this->object->getRatingCategories())
667  {
668  $lng->loadLanguageModule("rating");
669  $ilTabs->addSubTab("rating_categories",
670  $lng->txt("rating_categories"),
671  $ilCtrl->getLinkTargetByClass(array('ilratinggui', 'ilratingcategorygui'), ''));
672  }
673  }
674 
675  $ilTabs->activateSubTab($a_active);
676  }
677  }
global $ilCtrl
Definition: ilias.php:18
Create styles array
The data for the language used.
Create new PHPExcel object
obj_idprivate
+ Here is the caller graph for this function:

◆ setSideBlock()

ilObjWikiGUI::setSideBlock (   $a_wpg_id = 0)

Side column.

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

References object, and renderSideBlock().

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

1342  {
1343  ilObjWikiGUI::renderSideBlock($a_wpg_id, $this->object->getRefId());
1344  }
static renderSideBlock($a_wpg_id, $a_wiki_ref_id, $a_wp=null)
Side column.
Create new PHPExcel object
obj_idprivate
+ 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 1968 of file class.ilObjWikiGUI.php.

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

1969  {
1970  global $lng, $tpl, $ilTabs, $ilCtrl;
1971 
1972 
1973  $ilCtrl->setParameterByClass("ilobjwikigui", "from_page", ilWikiUtil::makeUrlTitle($_GET["from_page"]));
1974  $ilTabs->clearTargets();
1975  ilUtil::sendInfo($lng->txt("wiki_page_not_exist_select_templ"));
1976 
1977  $form = $this->initTemplateSelectionForm();
1978  $tpl->setContent($form->getHTML());
1979  }
$_GET["client_id"]
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.
initTemplateSelectionForm()
Init template selection form.
+ Here is the call graph for this function:

◆ startUserHTMLExportObject()

ilObjWikiGUI::startUserHTMLExportObject ( )

Export html (as user)

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

References ilObjectGUI\checkPermission().

2111  {
2112  $this->log->debug("start");
2113  $this->checkPermission("wiki_html_export");
2114  $this->object->startUserHTMLExport();
2115  }
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 289 of file class.ilObjWikiGUI.php.

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

290  {
291  $this->checkPermission("read");
292  $this->gotoStartPageObject();
293  }
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 1130 of file class.ilObjWikiGUI.php.

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

1131  {
1132  global $lng, $ilCtrl, $tpl, $ilTabs, $ilAccess;
1133 
1134  $this->checkPermission("read");
1135 
1136  $ilTabs->clearTargets();
1137  $tpl->setHeaderActionMenu(null);
1138 
1139  $page = ($_GET["page"] != "")
1140  ? $_GET["page"]
1141  : $this->object->getStartPage();
1142  $_GET["page"] = $page;
1143 
1144  include_once("./Modules/Wiki/classes/class.ilWikiPage.php");
1145  if (!ilWikiPage::exists($this->object->getId(), $page))
1146  {
1147  $page = $this->object->getStartPage();
1148  }
1149 
1150  if (!ilWikiPage::exists($this->object->getId(), $page))
1151  {
1152  ilUtil::sendInfo($lng->txt("wiki_no_start_page"), true);
1153  $ilCtrl->redirect($this, "infoScreen");
1154  return;
1155  }
1156 
1157  // page exists, show it !
1158  $ilCtrl->setParameter($this, "page", ilWikiUtil::makeUrlTitle($page));
1159 
1160  include_once("./Modules/Wiki/classes/class.ilWikiPageGUI.php");
1161  $wpage_gui = ilWikiPageGUI::getGUIForTitle($this->object->getId(),
1162  ilWikiUtil::makeDbTitle($page), 0, $this->object->getRefId());
1163  include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1164  $wpage_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
1165  $this->object->getStyleSheetId(), "wiki"));
1166 
1167  $this->setContentStyleSheet();
1168  //$wpage_gui->setOutputMode(IL_PAGE_PREVIEW);
1169 
1170  //$wpage_gui->setSideBlock();
1171  $ilCtrl->setCmdClass("ilwikipagegui");
1172  $ilCtrl->setCmd("preview");
1173  if (!$ilAccess->checkAccess("write", "", $this->object->getRefId()) &&
1174  (!$ilAccess->checkAccess("edit_content", "", $this->object->getRefId()) ||
1175  $wpage_gui->getPageObject()->getBlocked()
1176  ))
1177  {
1178  $wpage_gui->setEnableEditing(false);
1179  }
1180 
1181  // alter title and description
1182  //$tpl->setTitle($wpage_gui->getPageObject()->getTitle());
1183  //$tpl->setDescription($this->object->getTitle());
1184  if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
1185  {
1186  $wpage_gui->activateMetaDataEditor($this->object, "wpg", $wpage_gui->getId());
1187  }
1188 
1189 
1190  $html = $ilCtrl->forwardCommand($wpage_gui);
1191  //$this->addPageTabs();
1192 
1193  $tpl->setContent($html);
1194  }
$_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.
Create new PHPExcel object
obj_idprivate
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

◆ $log

ilObjWikiGUI::$log
protected

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


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