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
4require_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}
An exception for terminatinating execution or to throw for unit testing.
Abstract basic class which is to be extended by the concrete assessment question type classes.
getSelfAssessmentEditingMode()
Get Self-Assessment Editing Mode.
replaceFormItemByPostVar(ilFormPropertyGUI $replacingItem)
__construct()
ilAssQuestionAuthoringFormGUI constructor.
addGenericAssessmentQuestionCommandButtons(assQuestion $questionOBJ)
This class represents a property in a property form.
getPostVar()
Get Post Variable.
This class represents a property form user interface.
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
setItems($a_items)
Set Items.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.