ILIAS  trunk Revision v11.0_alpha-1851-ga8564da6fed
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilAssQuestionAuthoringFormGUI Class Reference
+ Inheritance diagram for ilAssQuestionAuthoringFormGUI:
+ Collaboration diagram for ilAssQuestionAuthoringFormGUI:

Public Member Functions

 __construct ()
 ilAssQuestionAuthoringFormGUI constructor. More...
 
 addGenericAssessmentQuestionCommandButtons (assQuestion $questionOBJ)
 
 replaceFormItemByPostVar (ilFormPropertyGUI $replacingItem)
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 
 checkForRequiredField ()
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionAuthoringFormGUI::__construct ( )

ilAssQuestionAuthoringFormGUI constructor.

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

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

31  {
32  global $DIC; /* @var ILIAS\DI\Container $DIC */
33  $this->lng = $DIC['lng'];
34 
36  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addGenericAssessmentQuestionCommandButtons()

ilAssQuestionAuthoringFormGUI::addGenericAssessmentQuestionCommandButtons ( assQuestion  $questionOBJ)
Parameters
assQuestion$questionOBJ

Definition at line 41 of file class.ilAssQuestionAuthoringFormGUI.php.

References ilPropertyFormGUI\addCommandButton(), assQuestion\getSelfAssessmentEditingMode(), and ILIAS\Repository\lng().

Referenced by ilAssOrderingQuestionAuthoringFormGUI\renewOrderingCommandButtons().

41  : void
42  {
43  if (!$questionOBJ->getSelfAssessmentEditingMode()) {
44  $this->addCommandButton("saveReturn", $this->lng->txt("save_return"));
45  }
46 
47  $this->addCommandButton("save", $this->lng->txt("save"));
48  }
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replaceFormItemByPostVar()

ilAssQuestionAuthoringFormGUI::replaceFormItemByPostVar ( ilFormPropertyGUI  $replacingItem)
Parameters
ilFormPropertyGUI$replacingItem
Returns
bool

Definition at line 54 of file class.ilAssQuestionAuthoringFormGUI.php.

References ilPropertyFormGUI\getItems(), ilFormPropertyGUI\getPostVar(), and ilPropertyFormGUI\setItems().

Referenced by ilAssOrderingQuestionAuthoringFormGUI\renewOrderingElementInput().

54  : bool
55  {
56  $itemWasReplaced = false;
57 
58  $preparedItems = [];
59 
60  foreach ($this->getItems() as $dodgingItem) {
61  /* @var ilFormPropertyGUI $dodgingItem */
62 
63  if ($dodgingItem->getPostVar() == $replacingItem->getPostVar()) {
64  $preparedItems[] = $replacingItem;
65  $itemWasReplaced = true;
66  continue;
67  }
68 
69  $preparedItems[] = $dodgingItem;
70  }
71 
72  $this->setItems($preparedItems);
73 
74  return $itemWasReplaced;
75  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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