ILIAS  release_7 Revision v7.30-3-g800a261c036
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 global $DIC; /* @var ILIAS\DI\Container $DIC */
24 $this->lng = $DIC['lng'];
25
27 }
28
33 {
34 //if( !$this->object->getSelfAssessmentEditingMode() && !$_GET["calling_test"] )
35 // $this->addCommandButton("saveEdit", $this->lng->txt("save_edit"));
36
37 if (!$questionOBJ->getSelfAssessmentEditingMode()) {
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 /* @var ilFormPropertyGUI $dodgingItem */
56
57 if ($dodgingItem->getPostVar() == $replacingItem->getPostVar()) {
58 $preparedItems[] = $replacingItem;
59 $itemWasReplaced = true;
60 continue;
61 }
62
63 $preparedItems[] = $dodgingItem;
64 }
65
66 $this->setItems($preparedItems);
67
68 return $itemWasReplaced;
69 }
70}
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.
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc