ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLMPageObjectGUI Class Reference

Class ilLMPageObjectGUI. More...

+ Inheritance diagram for ilLMPageObjectGUI:
+ Collaboration diagram for ilLMPageObjectGUI:

Public Member Functions

 __construct (&$a_content_obj)
 Constructor. More...
 
 setLMPageObject ($a_pg_obj)
 Set content object dependent page object (co page) More...
 
 executeCommand ()
 execute command More...
 
 edit ()
 
 preview ()
 
 save ()
 save co page object More...
 
 cancel ()
 cancel More...
 
 getLinkXML ($a_int_links)
 get link targets More...
 
 updateHistory ()
 update history More...
 
 editLayout ()
 Edit layout of page. More...
 
 initEditLayoutForm ()
 Init edit layout form. More...
 
 saveLayout ()
 Save layout. More...
 
 addPageTabs ()
 Add page tabs. More...
 
 downloadFile ()
 download file of file lists More...
 
- Public Member Functions inherited from ilLMObjectGUI
 __construct (&$a_content_obj)
 constructor More...
 
 setActions ($a_actions="")
 build action array More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 create ()
 structure / page object creation form More...
 
 putInTree ()
 put this object into content object tree More...
 
 delete ()
 Confirm deletion screen (delete page or structure objects) More...
 
 cancelDelete ()
 cancel deletion of page/structure objects More...
 
 confirmedDelete ()
 page and structure object deletion More...
 
 add_cell ($val, $link="")
 output a cell in object list More...
 
 showActions ($a_actions)
 show possible action (form buttons) More...
 
 checkTree ()
 check the content object tree More...
 

Static Public Member Functions

static _goto ($a_target)
 redirect script More...
 

Data Fields

 $obj
 
- Data Fields inherited from ilLMObjectGUI
 $tpl
 
 $lng
 
 $obj
 
 $ctrl
 
 $content_object
 
 $actions
 

Protected Attributes

 $tabs
 
 $settings
 

Detailed Description

Class ilLMPageObjectGUI.

User Interface for Learning Module Page Objects Editing

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

@ilCtrl_Calls ilLMPageObjectGUI: ilLMPageGUI, ilAssGenFeedbackPageGUI

Definition at line 21 of file class.ilLMPageObjectGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLMPageObjectGUI::__construct ( $a_content_obj)

Constructor.

Parameters
object$a_content_objcontent object (lm | dbk) @access public

Reimplemented from ilLMObjectGUI.

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

42 {
43 global $DIC;
44
45 $this->tpl = $DIC["tpl"];
46 $this->ctrl = $DIC->ctrl();
47 $this->tabs = $DIC->tabs();
48 $this->settings = $DIC->settings();
49 $this->lng = $DIC->language();
50 parent::__construct($a_content_obj);
51 }
global $DIC
Definition: saml.php:7
settings()
Definition: settings.php:2

References $DIC, and settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilLMPageObjectGUI::_goto (   $a_target)
static

redirect script

Parameters
string$a_target

Definition at line 384 of file class.ilLMPageObjectGUI.php.

385 {
386 global $DIC;
387
388 $rbacsystem = $DIC->rbac()->system();
389 $ilErr = $DIC["ilErr"];
390 $lng = $DIC->language();
391 $ilAccess = $DIC->access();
392
393 $first = strpos($a_target, "_");
394 $second = strpos($a_target, "_", $first + 1);
395 $page_id = substr($a_target, 0, $first);
396 if ($first > 0) {
397 $page_id = substr($a_target, 0, $first);
398 if ($second > 0) {
399 $ref_id = substr($a_target, $first + 1, $second - ($first + 1));
400 $anchor = substr($a_target, $second + 1);
401 } else {
402 $ref_id = substr($a_target, $first + 1);
403 }
404 } else {
405 $page_id = $a_target;
406 }
407
408 // determine learning object
409 $lm_id = ilLMObject::_lookupContObjID($page_id);
410
411 // get all references
412 $ref_ids = ilObject::_getAllReferences($lm_id);
413
414 // always try passed ref id first
415 if (in_array($ref_id, $ref_ids)) {
416 $ref_ids = array_merge(array($ref_id), $ref_ids);
417 }
418
419 // check read permissions
420 foreach ($ref_ids as $ref_id) {
421 // check read permissions
422 if ($ilAccess->checkAccess("read", "", $ref_id)) {
423 // don't redirect anymore, just set parameters
424 // (goto.php includes "ilias.php")
425 $_GET["baseClass"] = "ilLMPresentationGUI";
426 $_GET["obj_id"] = $page_id;
427 $_GET["ref_id"] = $ref_id;
428 $_GET["anchor"] = $anchor;
429 include_once("ilias.php");
430 exit;
431 }
432 }
433
434 if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
435 if ($lm_id > 0) {
437 $lng->txt("msg_no_perm_read_item"),
439 ), true);
440 } else {
441 $lng->loadLanguageModule("content");
442 ilUtil::sendFailure($lng->txt("page_does_not_exist"), true);
443 }
444 include_once("./Services/Object/classes/class.ilObjectGUI.php");
446 }
447
448 $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
449 }
sprintf('%.4f', $callTime)
$_GET["client_id"]
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
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 sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilErr
Definition: raiseError.php:16

References $_GET, $DIC, $ilErr, ilLMObjectGUI\$lng, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryRoot(), ilLMObject\_lookupContObjID(), ilObject\_lookupTitle(), exit, ilUtil\sendFailure(), and sprintf.

+ Here is the call graph for this function:

◆ addPageTabs()

ilLMPageObjectGUI::addPageTabs ( )

Add page tabs.

Definition at line 546 of file class.ilLMPageObjectGUI.php.

547 {
548 $ilTabs = $this->tabs;
550
551 $ilTabs->addTarget(
552 "cont_layout",
553 $ilCtrl->getLinkTarget($this, 'editLayout'),
554 "editLayout"
555 );
556 }
global $ilCtrl
Definition: ilias.php:18

References ilLMObjectGUI\$ctrl, $ilCtrl, and $tabs.

◆ cancel()

ilLMPageObjectGUI::cancel ( )

cancel

Definition at line 231 of file class.ilLMPageObjectGUI.php.

232 {
233 if ($_GET["obj_id"] != 0) {
234 ilUtil::redirect($this->ctrl->getLinkTargetByClass(
235 "ilStructureObjectGUI",
236 "view",
237 "",
238 true
239 ));
240 }
241 $up_gui = "ilobjlearningmodulegui";
242 $this->ctrl->redirectByClass($up_gui, "pages");
243 }
static redirect($a_script)

References $_GET, and ilUtil\redirect().

+ Here is the call graph for this function:

◆ downloadFile()

ilLMPageObjectGUI::downloadFile ( )

download file of file lists

Definition at line 561 of file class.ilLMPageObjectGUI.php.

562 {
563 $pg_obj = $this->obj->getPageObject();
564 $pg_obj->buildDom();
565 $int_links = $pg_obj->getInternalLinks();
566 foreach ($int_links as $il) {
567 if ($il["Target"] == str_replace("_file_", "_dfile_", $_GET["file_id"])) {
568 $file = explode("_", $_GET["file_id"]);
569 $file_id = (int) $file[count($file) - 1];
570 require_once("./Modules/File/classes/class.ilObjFile.php");
571 $fileObj = new ilObjFile($file_id, false);
572 $fileObj->sendFile();
573 exit;
574 }
575 }
576 }
Class ilObjFile.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file

References $_GET, $file, and exit.

◆ edit()

ilLMPageObjectGUI::edit ( )

Definition at line 176 of file class.ilLMPageObjectGUI.php.

177 {
178 //echo "<br>umschuss";
179 $this->ctrl->setCmdClass("ilLMPageGUI");
180 $this->ctrl->setCmd("edit");
181 $this->executeCommand();
182 //$this->setTabs();
183 }
executeCommand()
execute command

References executeCommand().

+ Here is the call graph for this function:

◆ editLayout()

ilLMPageObjectGUI::editLayout ( )

Edit layout of page.

Definition at line 454 of file class.ilLMPageObjectGUI.php.

455 {
458 $ilTabs = $this->tabs;
459
460 $page_gui = new ilLMPageGUI($this->obj->getId());
461 $page_gui->setEditPreview(true);
462 $page_gui->activateMetaDataEditor(
463 $this->content_object,
464 $this->obj->getType(),
465 $this->obj->getId(),
466 $this->obj,
467 "MDUpdateListener"
468 );
469 $page_gui->setActivationListener($this, "activatePage");
470 $page_gui->setTabHook($this, "addPageTabs");
471 $lm_set = new ilSetting("lm");
472 $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg.svg"));
473 $tpl->setTitle($this->lng->txt("page") . ": " . $this->obj->getTitle());
474 $ilCtrl->getHTML($page_gui);
475 $ilTabs->setTabActive("cont_layout");
476 $this->initEditLayoutForm();
477 $tpl->setContent($this->form->getHTML());
478 }
Extension of ilPageObjectGUI for learning modules.
initEditLayoutForm()
Init edit layout form.
ILIAS Setting Class.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$lm_set

References ilLMObjectGUI\$ctrl, $ilCtrl, $lm_set, $tabs, ilLMObjectGUI\$tpl, ilUtil\getImagePath(), and initEditLayoutForm().

+ Here is the call graph for this function:

◆ executeCommand()

ilLMPageObjectGUI::executeCommand ( )

execute command

Definition at line 66 of file class.ilLMPageObjectGUI.php.

67 {
70 $ilTabs = $this->tabs;
72
73 $next_class = $this->ctrl->getNextClass($this);
74 $cmd = $this->ctrl->getCmd();
75
76 //echo "<br>:cmd:".$this->ctrl->getCmd().":cmdClass:".$this->ctrl->getCmdClass().":".
77 // ":nextClass:".$next_class.":"; flush();
78
79 switch ($next_class) {
80 case "illmpagegui":
81
82 // Determine whether the view of a learning resource should
83 // be shown in the frameset of ilias, or in a separate window.
84 $showViewInFrameset = true;
85 $lm_set = new ilSetting("lm");
86
87 $this->ctrl->setReturn($this, "edit");
88 if (!ilPageObject::_exists("lm", $this->obj->getId(), $_GET["transl"]) &&
89 ilPageObject::_exists("lm", $this->obj->getId(), "-")) {
90 if ($_GET["totransl"] == "") {
91 $_GET["totransl"] = $_GET["transl"];
92 $ilCtrl->setCmd("switchToLanguage");
93 }
94 $ilCtrl->setCmdClass("illmpagegui");
95 $page_gui = new ilLMPageGUI($this->obj->getId(), 0, false, "-");
96 } else {
97 $page_gui = new ilLMPageGUI($this->obj->getId());
98 }
99 $page_gui->setEditPreview(true);
100 $page_gui->activateMetaDataEditor(
101 $this->content_object,
102 $this->obj->getType(),
103 $this->obj->getId(),
104 $this->obj,
105 "MDUpdateListener"
106 );
107 if ($ilSetting->get("block_activated_news")) {
108 $page_gui->setEnabledNews(
109 true,
110 $this->obj->content_object->getId(),
111 $this->obj->content_object->getType()
112 );
113 }
114
115 // set page view link
116 if ($showViewInFrameset) {
117 $view_frame = ilFrameTargetInfo::_getFrame("MainContent");
118 } else {
119 $view_frame = "ilContObj" . $this->content_object->getID();
120 }
121 $page_gui->setViewPageLink(
122 ILIAS_HTTP_PATH . "/goto.php?target=pg_" . $this->obj->getId() .
123 "_" . $_GET["ref_id"],
124 $view_frame
125 );
126
127 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
129 $this->content_object->getStyleSheetId(),
130 "lm"
131 ));
132 $page_gui->setTemplateTargetVar("ADM_CONTENT");
133 $page_gui->getPageObject()->buildDom();
134 $int_links = $page_gui->getPageObject()->getInternalLinks();
135 $link_xml = $this->getLinkXML($int_links);
136 $page_gui->setLinkXML($link_xml);
137
138 $page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
139 $page_gui->setFileDownloadLink("ilias.php?cmd=downloadFile&ref_id=" . $_GET["ref_id"] . "&baseClass=ilLMPresentationGUI");
140 $page_gui->setFullscreenLink("ilias.php?cmd=fullscreen&ref_id=" . $_GET["ref_id"] . "&baseClass=ilLMPresentationGUI");
141 $page_gui->setLinkParams("ref_id=" . $this->content_object->getRefId());
142 $page_gui->setSourcecodeDownloadScript("ilias.php?ref_id=" . $_GET["ref_id"] . "&baseClass=ilLMPresentationGUI");
143 $page_gui->setPresentationTitle(
145 $this->obj->getId(),
146 $this->content_object->getPageHeader(),
147 $this->content_object->isActiveNumbering()
148 )
149 );
150 $page_gui->setLocator($contObjLocator);
151 $page_gui->setHeader($this->lng->txt("page") . ": " . $this->obj->getTitle());
152 $page_gui->setActivationListener($this, "activatePage");
153
154 $up_gui = "ilobjlearningmodulegui";
155 $ilCtrl->setParameterByClass($up_gui, "active_node", $this->obj->getId());
156
157 $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg.svg"));
158 $tpl->setTitle($this->lng->txt("page") . ": " . $this->obj->getTitle());
159 if ($this->content_object->getLayoutPerPage()) {
160 $page_gui->setTabHook($this, "addPageTabs");
161 }
162 $ret = $this->ctrl->forwardCommand($page_gui);
163 $tpl->setContent($ret);
164 break;
165
166 default:
167 $ret = $this->$cmd();
168 break;
169 }
170 }
static _getFrame($a_class, $a_type='')
Get content frame name.
getLinkXML($a_int_links)
get link targets
static _getPresentationTitle( $a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-", $a_include_short=false)
presentation title doesn't have to be page title, it may be chapter title + page title or chapter tit...
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
$ret
Definition: parser.php:6
global $ilSetting
Definition: privfeed.php:17

References $_GET, ilLMObjectGUI\$ctrl, $ilCtrl, $ilSetting, $lm_set, $ret, $settings, $tabs, ilLMObjectGUI\$tpl, ilPageObject\_exists(), ilFrameTargetInfo\_getFrame(), ilLMPageObject\_getPresentationTitle(), ilObjStyleSheet\getEffectiveContentStyleId(), ilUtil\getImagePath(), and getLinkXML().

Referenced by edit(), and preview().

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

◆ getLinkXML()

ilLMPageObjectGUI::getLinkXML (   $a_int_links)

get link targets

Definition at line 248 of file class.ilLMPageObjectGUI.php.

249 {
250 if ($a_layoutframes == "") {
251 $a_layoutframes = array();
252 }
253 $link_info = "<IntLinkInfos>";
254 foreach ($a_int_links as $int_link) {
255 $target = $int_link["Target"];
256 if (substr($target, 0, 4) == "il__") {
257 $target_arr = explode("_", $target);
258 $target_id = $target_arr[count($target_arr) - 1];
259 $type = $int_link["Type"];
260 $targetframe = ($int_link["TargetFrame"] != "")
261 ? $int_link["TargetFrame"]
262 : "None";
263
264 // anchor
265 $anc = $anc_add = "";
266 if ($int_link["Anchor"] != "") {
267 $anc = $int_link["Anchor"];
268 $anc_add = "_" . rawurlencode($int_link["Anchor"]);
269 }
270
271 switch ($type) {
272 case "PageObject":
273 case "StructureObject":
275 $cont_obj = $this->content_object;
276 if ($lm_id == $cont_obj->getId()) {
277 $ltarget = "";
278 if ($type == "PageObject") {
279 $this->ctrl->setParameter($this, "obj_id", $target_id);
280 $href = $this->ctrl->getLinkTargetByClass(get_class($this), "edit");
281 } else {
282 $this->ctrl->setParameterByClass("ilstructureobjectgui", "obj_id", $target_id);
283 $href = $this->ctrl->getLinkTargetByClass("ilstructureobjectgui", "view");
284 }
285 $href = str_replace("&", "&amp;", $href);
286 $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
287 } else {
288 if ($type == "PageObject") {
289 $href = "goto.php?target=pg_" . $target_id . $anc_add;
290 } else {
291 $href = "goto.php?target=st_" . $target_id;
292 }
293 $ltarget = "ilContObj" . $lm_id;
294 }
295 if ($lm_id == "") {
296 $href = "";
297 }
298 break;
299
300 case "GlossaryItem":
301 $ltarget = $nframe = "_blank";
302 $href = "ilias.php?cmdClass=illmpresentationgui&amp;baseClass=ilLMPresentationGUI&amp;" .
303 "obj_type=$type&amp;cmd=glossary&amp;ref_id=" . $_GET["ref_id"] .
304 "&amp;obj_id=" . $target_id . "&amp;frame=$nframe";
305 break;
306
307 case "MediaObject":
308 $ltarget = $nframe = "_blank";
309 $href = "ilias.php?cmdClass=illmpresentationgui&amp;baseClass=ilLMPresentationGUI&amp;obj_type=$type&amp;cmd=media&amp;ref_id=" . $_GET["ref_id"] .
310 "&amp;mob_id=" . $target_id . "&amp;frame=$nframe";
311 break;
312
313 case "RepositoryItem":
314 $obj_type = ilObject::_lookupType($target_id, true);
316 $href = "./goto.php?target=" . $obj_type . "_" . $target_id;
317 $t_frame = ilFrameTargetInfo::_getFrame("MainContent", $obj_type);
318 $ltarget = $t_frame;
319 break;
320
321 case "File":
322 $this->ctrl->setParameter($this, "file_id", "il__file_" . $target_id);
323 $href = $this->ctrl->getLinkTarget($this, "downloadFile");
324 $this->ctrl->setParameter($this, "file_id", "");
325 break;
326
327 case "User":
329 if ($obj_type == "usr") {
330 include_once("./Services/User/classes/class.ilUserUtil.php");
331 $back = $this->ctrl->getLinkTarget($this, "edit");
332 //var_dump($back); exit;
333 $this->ctrl->setParameterByClass("ilpublicuserprofilegui", "user_id", $target_id);
334 $this->ctrl->setParameterByClass(
335 "ilpublicuserprofilegui",
336 "back_url",
337 rawurlencode($back)
338 );
339 $href = "";
340 include_once("./Services/User/classes/class.ilUserUtil.php");
342 $href = $this->ctrl->getLinkTargetByClass("ilpublicuserprofilegui", "getHTML");
343 }
344 $this->ctrl->setParameterByClass("ilpublicuserprofilegui", "user_id", "");
345 $lcontent = ilUserUtil::getNamePresentation($target_id, false, false);
346 }
347 break;
348
349 }
350
351 if ($href != "") {
352 $anc_par = 'Anchor="' . $anc . '"';
353 $link_info .= "<IntLinkInfo Target=\"$target\" Type=\"$type\" " .
354 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" $anc_par/>";
355 }
356 }
357 }
358 $link_info.= "</IntLinkInfos>";
359 //echo ":".htmlentities($link_info).":";
360 return $link_info;
361 }
static _lookupObjId($a_id)
static _lookupType($a_id, $a_reference=false)
lookup object type
static hasPublicProfile($a_user_id)
Has public profile.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
$target_id
Definition: goto.php:49
$target_arr
Definition: goto.php:47
$type

References $_GET, ilLMObjectGUI\$content_object, $target, $target_arr, $target_id, $type, ilFrameTargetInfo\_getFrame(), ilLMObject\_lookupContObjID(), ilObject\_lookupObjId(), ilObject\_lookupType(), ilUserUtil\getNamePresentation(), and ilUserUtil\hasPublicProfile().

Referenced by executeCommand().

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

◆ initEditLayoutForm()

ilLMPageObjectGUI::initEditLayoutForm ( )

Init edit layout form.

Parameters
int$a_modeEdit Mode

Definition at line 485 of file class.ilLMPageObjectGUI.php.

486 {
489
490 include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
491 $this->form = new ilPropertyFormGUI();
492
493 // default layout
494 $layout = new ilRadioGroupInputGUI($lng->txt("cont_layout"), "layout");
495
496 if (is_file($im = ilUtil::getImagePath("layout_" . $this->content_object->getLayout() . ".png"))) {
497 $im_tag = ilUtil::img($im, $this->content_object->getLayout());
498 }
499 $layout->addOption(new ilRadioOption("<table><tr><td>" . $im_tag . "</td><td><b>" .
500 $lng->txt("cont_lm_default_layout") .
501 "</b>: " . $lng->txt("cont_layout_" . $this->content_object->getLayout()) .
502 "</td></tr></table>", ""));
503
505 $im_tag = "";
506 if (is_file($im = ilUtil::getImagePath("layout_" . $l . ".png"))) {
507 $im_tag = ilUtil::img($im, $l);
508 }
509 $layout->addOption(new ilRadioOption("<table><tr><td>" . $im_tag . "</td><td><b>" .
510 $lng->txt("cont_layout_" . $l) . "</b>: " . $lng->txt("cont_layout_" . $l . "_desc") .
511 "</td></tr></table>", $l));
512 }
513
514 $layout->setValue($this->obj->getLayout());
515 $this->form->addItem($layout);
516
517 $this->form->addCommandButton("saveLayout", $lng->txt("save"));
518
519 $this->form->setTitle($lng->txt("cont_page_layout"));
520 $this->form->setFormAction($ilCtrl->getFormAction($this));
521 }
global $l
Definition: afr.php:30
static getAvailableLayouts()
get all available lm layouts
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="", $a_class="")
Build img tag.

References ilLMObjectGUI\$ctrl, $ilCtrl, $l, $layout, ilLMObjectGUI\$lng, ilObjContentObject\getAvailableLayouts(), ilUtil\getImagePath(), and ilUtil\img().

Referenced by editLayout(), and saveLayout().

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

◆ preview()

ilLMPageObjectGUI::preview ( )

Definition at line 188 of file class.ilLMPageObjectGUI.php.

189 {
190 $this->ctrl->setCmdClass("ilLMPageGUI");
191 $this->ctrl->setCmd("preview");
192 $this->executeCommand();
193 // $this->setTabs();
194 }

References executeCommand().

+ Here is the call graph for this function:

◆ save()

ilLMPageObjectGUI::save ( )

save co page object

Definition at line 199 of file class.ilLMPageObjectGUI.php.

200 {
201 $this->obj = new ilLMPageObject($this->content_object);
202 $this->obj->setType("pg");
203 $this->obj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
204 $this->obj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
205 $this->obj->setLMId($this->content_object->getId());
206 $this->obj->create();
207
208 // obj_id is empty, if page is created from "all pages" screen
209 // -> a free page is created (not in the tree)
210 //echo "<br>savePage:".$_GET["obj_id"].":";
211 if ($_GET["obj_id"] != 0) {
212 $this->putInTree();
213
214 // check the tree
215 $this->checkTree();
216
217 ilUtil::redirect($this->ctrl->getLinkTargetByClass(
218 "ilStructureObjectGUI",
219 "edit",
220 "",
221 true
222 ));
223 }
224 $up_gui = "ilobjlearningmodulegui";
225 $this->ctrl->redirectByClass($up_gui, "pages");
226 }
$_POST["username"]
putInTree()
put this object into content object tree
checkTree()
check the content object tree
Class ilLMPageObject.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled

References $_GET, $_POST, ilLMObjectGUI\checkTree(), ilLMObjectGUI\putInTree(), ilUtil\redirect(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ saveLayout()

ilLMPageObjectGUI::saveLayout ( )

Save layout.

Definition at line 527 of file class.ilLMPageObjectGUI.php.

528 {
532
533 $this->initEditLayoutForm();
534 if ($this->form->checkInput()) {
535 ilLMObject::writeLayout($this->obj->getId(), $this->form->getInput("layout"));
536 ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
537 $ilCtrl->redirect($this, "editLayout");
538 }
539 $this->form->setValuesByPost();
540 $tpl->setContent($this->form->getHtml());
541 }
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

References ilLMObjectGUI\$ctrl, $ilCtrl, ilLMObjectGUI\$lng, ilLMObjectGUI\$tpl, initEditLayoutForm(), ilUtil\sendSuccess(), and ilLMObject\writeLayout().

+ Here is the call graph for this function:

◆ setLMPageObject()

ilLMPageObjectGUI::setLMPageObject (   $a_pg_obj)

Set content object dependent page object (co page)

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

58 {
59 $this->obj = $a_pg_obj;
60 $this->obj->setLMId($this->content_object->getId());
61 }

◆ updateHistory()

ilLMPageObjectGUI::updateHistory ( )

update history

Definition at line 366 of file class.ilLMPageObjectGUI.php.

367 {
368 require_once("./Services/History/classes/class.ilHistory.php");
370 $this->obj->getId(),
371 "update",
372 "",
373 $this->content_object->getType() . ":pg",
374 "",
375 true
376 );
377 }
static _createEntry( $a_obj_id, $a_action, $a_info_params="", $a_obj_type="", $a_user_comment="", $a_update_last=false)
Creates a new history entry for an object.

References ilHistory\_createEntry().

+ Here is the call graph for this function:

Field Documentation

◆ $obj

ilLMPageObjectGUI::$obj

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

◆ $settings

ilLMPageObjectGUI::$settings
protected

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

Referenced by executeCommand().

◆ $tabs

ilLMPageObjectGUI::$tabs
protected

Definition at line 26 of file class.ilLMPageObjectGUI.php.

Referenced by addPageTabs(), editLayout(), and executeCommand().


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