ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilAssQuestionAuthoringFormGUI.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
12 {
16  protected $lng = null;
17 
21  public function __construct()
22  {
23  $this->lng = $GLOBALS['DIC'] ? $GLOBALS['DIC']['lng'] : $GLOBALS['lng'];
24 
25  parent::__construct();
26  }
27 
32  {
33  //if( !$this->object->getSelfAssessmentEditingMode() && !$_GET["calling_test"] )
34  // $this->addCommandButton("saveEdit", $this->lng->txt("save_edit"));
35 
36  if (!$questionOBJ->getSelfAssessmentEditingMode()) {
37  $this->addCommandButton("saveReturn", $this->lng->txt("save_return"));
38  }
39 
40  $this->addCommandButton("save", $this->lng->txt("save"));
41  }
42 
47  public function replaceFormItemByPostVar(ilFormPropertyGUI $replacingItem)
48  {
49  $itemWasReplaced = false;
50 
51  $preparedItems = array();
52 
53  foreach ($this->getItems() as $dodgingItem) {
54  /* @var ilFormPropertyGUI $dodgingItem */
55 
56  if ($dodgingItem->getPostVar() == $replacingItem->getPostVar()) {
57  $preparedItems[] = $replacingItem;
58  $itemWasReplaced = true;
59  continue;
60  }
61 
62  $preparedItems[] = $dodgingItem;
63  }
64 
65  $this->setItems($preparedItems);
66 
67  return $itemWasReplaced;
68  }
69 }
addGenericAssessmentQuestionCommandButtons(assQuestion $questionOBJ)
This class represents a property form user interface.
setItems($a_items)
Set Items.
Abstract basic class which is to be extended by the concrete assessment question type classes...
getPostVar()
Get Post Variable.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
getSelfAssessmentEditingMode()
Get Self-Assessment Editing Mode.
__construct()
ilAssQuestionAuthoringFormGUI constructor.
replaceFormItemByPostVar(ilFormPropertyGUI $replacingItem)
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
Create styles array
The data for the language used.
This class represents a property in a property form.