ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 {
38 $this->addCommandButton("saveReturn", $this->lng->txt("save_return"));
39 }
40
41 $this->addCommandButton("save", $this->lng->txt("save"));
42 }
43
48 public function replaceFormItemByPostVar(ilFormPropertyGUI $replacingItem)
49 {
50 $itemWasReplaced = false;
51
52 $preparedItems = array();
53
54 foreach($this->getItems() as $dodgingItem)
55 {
56 /* @var ilFormPropertyGUI $dodgingItem */
57
58 if( $dodgingItem->getPostVar() == $replacingItem->getPostVar() )
59 {
60 $preparedItems[] = $replacingItem;
61 $itemWasReplaced = true;
62 continue;
63 }
64
65 $preparedItems[] = $dodgingItem;
66 }
67
68 $this->setItems($preparedItems);
69
70 return $itemWasReplaced;
71 }
72}
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.