ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLMEditShortTitlesGUI Class Reference
+ Collaboration diagram for ilLMEditShortTitlesGUI:

Public Member Functions

 __construct (ilObjLearningModuleGUI $a_lm_gui)
 Learning module. More...
 
 executeCommand ()
 Execute command. More...
 
 listShortTitles ()
 List short titles. More...
 
 save ()
 Save short titles. More...
 

Protected Attributes

 $ctrl
 
 $lm
 
 $lm_gui
 
 $tpl
 
 $lng
 

Detailed Description

Definition at line 5 of file class.ilLMEditShortTitlesGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilLMEditShortTitlesGUI::__construct ( ilObjLearningModuleGUI  $a_lm_gui)

Learning module.

Parameters
ilObjLearningModule$a_lmlearning module

Definition at line 37 of file class.ilLMEditShortTitlesGUI.php.

References $_GET, and $DIC.

38  {
39  global $DIC;
40 
41  $this->ctrl = $DIC->ctrl();
42  $this->lm = $a_lm_gui->object;
43  $this->lm_gui = $a_lm_gui;
44  $this->tpl = $DIC["tpl"];
45  $this->lng = $DIC->language();
46 
47  $this->lang = ($_GET["transl"] == "")
48  ? "-"
49  : $_GET["transl"];
50  }
global $DIC
Definition: saml.php:7
$_GET["client_id"]

Member Function Documentation

◆ executeCommand()

ilLMEditShortTitlesGUI::executeCommand ( )

Execute command.

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

References array.

56  {
57  $next_class = $this->ctrl->getNextClass($this);
58  $cmd = $this->ctrl->getCmd("listShortTitles");
59 
60  switch ($next_class) {
61  default:
62  if (in_array($cmd, array("listShortTitles", "save"))) {
63  $this->$cmd();
64  }
65  }
66  }
Create styles array
The data for the language used.

◆ listShortTitles()

ilLMEditShortTitlesGUI::listShortTitles ( )

List short titles.

Definition at line 71 of file class.ilLMEditShortTitlesGUI.php.

References $lm_gui, $tab, ilObjContentObjectGUI\getMultiLangHeader(), and ilUtil\sendInfo().

72  {
73  ilUtil::sendInfo($this->lng->txt("cont_short_title_info"));
74  $ml_head = ilObjContentObjectGUI::getMultiLangHeader($this->lm->getId(), $this->lm_gui, "short_titles");
75  include_once("./Modules/LearningModule/classes/class.ilLMEditShortTitlesTableGUI.php");
76  $tab = new ilLMEditShortTitlesTableGUI($this, "listShortTitles", $this->lm, $this->lang);
77  $this->tpl->setContent($ml_head . $tab->getHTML());
78  }
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getMultiLangHeader($a_lm_id, $a_gui_class, $a_mode="")
Get multi lang header.
TableGUI class for lm short titles.
+ Here is the call graph for this function:

◆ save()

ilLMEditShortTitlesGUI::save ( )

Save short titles.

Definition at line 83 of file class.ilLMEditShortTitlesGUI.php.

References $_POST, $id, $title, ilLMObject\_lookupContObjID(), ilUtil\sendSuccess(), ilUtil\stripSlashes(), and ilLMObject\writeShortTitle().

84  {
85  if (is_array($_POST["short_title"])) {
86  foreach ($_POST["short_title"] as $id => $title) {
87  if (ilLMObject::_lookupContObjID($id) == $this->lm->getId()) {
89  }
90  }
91  }
92  ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
93  $this->ctrl->redirect($this, "listShortTitles");
94  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
if(!array_key_exists('StateId', $_REQUEST)) $id
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static writeShortTitle($a_id, $a_short_title, $a_lang="-")
Write short title.
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilLMEditShortTitlesGUI::$ctrl
protected

Definition at line 10 of file class.ilLMEditShortTitlesGUI.php.

◆ $lm

ilLMEditShortTitlesGUI::$lm
protected

Definition at line 15 of file class.ilLMEditShortTitlesGUI.php.

◆ $lm_gui

ilLMEditShortTitlesGUI::$lm_gui
protected

Definition at line 20 of file class.ilLMEditShortTitlesGUI.php.

Referenced by listShortTitles().

◆ $lng

ilLMEditShortTitlesGUI::$lng
protected

Definition at line 30 of file class.ilLMEditShortTitlesGUI.php.

◆ $tpl

ilLMEditShortTitlesGUI::$tpl
protected

Definition at line 25 of file class.ilLMEditShortTitlesGUI.php.


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