ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilAssOrderingQuestionAuthoringFormGUI Class Reference
+ Inheritance diagram for ilAssOrderingQuestionAuthoringFormGUI:
+ Collaboration diagram for ilAssOrderingQuestionAuthoringFormGUI:

Public Member Functions

 __construct ()
 
 addSpecificOrderingQuestionCommandButtons (assOrderingQuestion $questionOBJ)
 
 getOrderingElementInputField ()
 
 prepareValuesReprintable (assOrderingQuestion $questionOBJ)
 
 ensureReprintableFormStructure (assOrderingQuestion $questionOBJ)
 
- Public Member Functions inherited from ilAssQuestionAuthoringFormGUI
 __construct ()
 ilAssQuestionAuthoringFormGUI constructor. More...
 
 addGenericAssessmentQuestionCommandButtons (assQuestion $questionOBJ)
 
 replaceFormItemByPostVar (ilFormPropertyGUI $replacingItem)
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 setTableWidth ($a_width)
 Set table width. More...
 
 getTableWidth ()
 get table width More...
 
 setMode ($a_mode)
 Set Mode ('std', 'subform'). More...
 
 getMode ()
 Get Mode ('std', 'subform'). More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setTitleIcon ($a_titleicon)
 Set TitleIcon. More...
 
 getTitleIcon ()
 Get TitleIcon. More...
 
 setDescription ($a_val)
 Set description. More...
 
 getDescription ()
 Get description. More...
 
 setTopAnchor ($a_val)
 Set top anchor. More...
 
 getTopAnchor ()
 Get top anchor. More...
 
 setShowTopButtons ($a_val)
 Get show top buttons. More...
 
 getShowTopButtons ()
 Set show top buttons. More...
 
 addItem ($a_item)
 Add Item (Property, SectionHeader). More...
 
 removeItemByPostVar ($a_post_var)
 Remove Item. More...
 
 getItemByPostVar ($a_post_var)
 Get Item by POST variable. More...
 
 setItems ($a_items)
 Set Items. More...
 
 getItems ()
 Get Items. More...
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage ($a_val)
 Set disable standard message. More...
 
 getDisableStandardMessage ()
 Get disable standard message. More...
 
 getHideLabels ()
 Get a value indicating whether the labels should be hidden or not. More...
 
 setHideLabels ($a_value=true)
 Set a value indicating whether the labels should be hidden or not. More...
 
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 Set form values from an array. More...
 
 setValuesByPost ()
 Set form values from POST values. More...
 
 checkInput ()
 Check Post Input. More...
 
 getInput ($a_post_var, $ensureValidation=true)
 Returns the value of a HTTP-POST variable, identified by the passed id. More...
 
 addCustomProperty ($a_title, $a_html, $a_info="", $a_alert="", $a_required=false)
 Add a custom property. More...
 
 addCommandButton ($a_cmd, $a_text, $a_id="")
 Add Command button. More...
 
 getCommandButtons ()
 Return all Command buttons. More...
 
 clearCommandButtons ()
 Remove all command buttons. More...
 
 getContent ()
 Get Content. More...
 
 insertItem ($item, $a_sub_item=false)
 
 getHTML ()
 
 getFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Was any file uploaded? More...
 
 moveFileUpload ($a_target_directory, $a_field, $a_target_name=null, $a_index=null, $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction ($a_formaction)
 Set FormAction. More...
 
 getFormAction ()
 Get FormAction. More...
 
 setTarget ($a_target)
 Set Target. More...
 
 getTarget ()
 Get Target. More...
 
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false. More...
 
 getMultipart ()
 Get Enctype Multipart/Formdata true/false. More...
 
 setId ($a_id)
 Set Id. More...
 
 getId ()
 Get Id. More...
 
 setName ($a_name)
 Set Name. More...
 
 getName ()
 Get Name. More...
 
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open. More...
 
 getKeepOpen ()
 Get Keep Form Tag Open. More...
 
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag. More...
 
 getOpenTag ()
 Get Open Form Tag Enabled. More...
 
 setCloseTag ($a_val)
 Set close tag. More...
 
 getCloseTag ()
 Get close tag. More...
 
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission. More...
 
 getPreventDoubleSubmission ()
 Get prevent double submission. More...
 
 getHTML ()
 Get HTML. More...
 
 getContent ()
 Get Content. More...
 

Data Fields

const COMMAND_BUTTON_PREFIX = 'assOrderingQuestionBtn_'
 

Protected Member Functions

 setAvailableCommandButtonIds ($availableCommandButtonIds)
 
 getAvailableCommandButtonIds ()
 
 renewOrderingElementInput (assOrderingQuestion $questionOBJ)
 
 buildCommandButtonId ($orderingType)
 
 renewOrderingCommandButtons (assOrderingQuestion $questionOBJ)
 
- Protected Member Functions inherited from ilPropertyFormGUI
 hideRequired ($a_type)
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 

Protected Attributes

 $availableCommandButtonIds = null
 
- Protected Attributes inherited from ilAssQuestionAuthoringFormGUI
 $lng = null
 
- Protected Attributes inherited from ilPropertyFormGUI
 $mode = "std"
 
 $check_input_called = false
 
 $disable_standard_message = false
 
 $top_anchor = "il_form_top"
 
 $titleicon = false
 
 $description = ""
 
 $tbl_width = false
 
 $show_top_buttons = true
 
 $hide_labels = false
 
- Protected Attributes inherited from ilFormGUI
 $formaction
 
 $multipart = false
 
 $keepopen = false
 
 $opentag = true
 
 $id
 
 $name
 
 $prevent_double_submission = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAssOrderingQuestionAuthoringFormGUI::__construct ( )

Definition at line 17 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References array, buildCommandButtonId(), OQ_NESTED_PICTURES, OQ_NESTED_TERMS, OQ_PICTURES, OQ_TERMS, and setAvailableCommandButtonIds().

18  {
24  ));
25 
26  parent::__construct();
27  }
const OQ_NESTED_TERMS
const OQ_PICTURES
Ordering question constants.
Create styles array
The data for the language used.
const OQ_TERMS
const OQ_NESTED_PICTURES
+ Here is the call graph for this function:

Member Function Documentation

◆ addSpecificOrderingQuestionCommandButtons()

ilAssOrderingQuestionAuthoringFormGUI::addSpecificOrderingQuestionCommandButtons ( assOrderingQuestion  $questionOBJ)

Definition at line 39 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References ilPropertyFormGUI\addCommandButton(), buildCommandButtonId(), assOrderingQuestion\getOrderingType(), OQ_NESTED_PICTURES, OQ_NESTED_TERMS, OQ_PICTURES, and OQ_TERMS.

Referenced by renewOrderingCommandButtons().

40  {
41  switch( $questionOBJ->getOrderingType() )
42  {
43  case OQ_TERMS:
44 
45  $this->addCommandButton(
46  "changeToPictures", $this->lng->txt("oq_btn_use_order_pictures"), $this->buildCommandButtonId(OQ_PICTURES)
47  );
48  $this->addCommandButton(
49  "orderNestedTerms", $this->lng->txt("oq_btn_nest_terms"), $this->buildCommandButtonId(OQ_NESTED_TERMS)
50  );
51  break;
52 
53  case OQ_PICTURES:
54 
55  $this->addCommandButton(
56  "changeToText", $this->lng->txt("oq_btn_use_order_terms"), $this->buildCommandButtonId(OQ_TERMS)
57  );
58  $this->addCommandButton(
59  "orderNestedPictures", $this->lng->txt("oq_btn_nest_pictures"), $this->buildCommandButtonId(OQ_NESTED_PICTURES)
60  );
61  break;
62 
63  case OQ_NESTED_TERMS:
64 
65  $this->addCommandButton(
66  "changeToPictures", $this->lng->txt("oq_btn_use_order_pictures"), $this->buildCommandButtonId(OQ_PICTURES)
67  );
68  $this->addCommandButton(
69  "changeToText", $this->lng->txt("oq_btn_define_terms"), $this->buildCommandButtonId(OQ_TERMS)
70  );
71  break;
72 
73  case OQ_NESTED_PICTURES:
74 
75  $this->addCommandButton(
76  "changeToText", $this->lng->txt("oq_btn_use_order_terms"), 'assOrderingQuestionBtn_'.OQ_TERMS
77  );
78  $this->addCommandButton(
79  "changeToPictures", $this->lng->txt("oq_btn_define_pictures"), 'assOrderingQuestionBtn_'.OQ_PICTURES
80  );
81  break;
82  }
83  }
getOrderingType()
Returns the ordering question type.
const OQ_NESTED_TERMS
const OQ_PICTURES
Ordering question constants.
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
const OQ_TERMS
const OQ_NESTED_PICTURES
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildCommandButtonId()

ilAssOrderingQuestionAuthoringFormGUI::buildCommandButtonId (   $orderingType)
protected

Definition at line 119 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

Referenced by __construct(), and addSpecificOrderingQuestionCommandButtons().

120  {
121  return self::COMMAND_BUTTON_PREFIX.$orderingType;
122  }
+ Here is the caller graph for this function:

◆ ensureReprintableFormStructure()

ilAssOrderingQuestionAuthoringFormGUI::ensureReprintableFormStructure ( assOrderingQuestion  $questionOBJ)

Definition at line 100 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References renewOrderingCommandButtons(), and renewOrderingElementInput().

101  {
102  $this->renewOrderingElementInput($questionOBJ);
103  $this->renewOrderingCommandButtons($questionOBJ);
104  }
+ Here is the call graph for this function:

◆ getAvailableCommandButtonIds()

ilAssOrderingQuestionAuthoringFormGUI::getAvailableCommandButtonIds ( )
protected

◆ getOrderingElementInputField()

ilAssOrderingQuestionAuthoringFormGUI::getOrderingElementInputField ( )
Returns
ilIdentifiedMultiValuesInputGUI

Definition at line 88 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References ilPropertyFormGUI\getItemByPostVar(), and assOrderingQuestion\ORDERING_ELEMENT_FORM_FIELD_POSTVAR.

Referenced by prepareValuesReprintable().

89  {
90  return $this->getItemByPostVar(
92  );
93  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ prepareValuesReprintable()

ilAssOrderingQuestionAuthoringFormGUI::prepareValuesReprintable ( assOrderingQuestion  $questionOBJ)

Definition at line 95 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References getOrderingElementInputField().

96  {
97  $this->getOrderingElementInputField()->prepareReprintable($questionOBJ);
98  }
+ Here is the call graph for this function:

◆ renewOrderingCommandButtons()

ilAssOrderingQuestionAuthoringFormGUI::renewOrderingCommandButtons ( assOrderingQuestion  $questionOBJ)
protected

Definition at line 124 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References ilAssQuestionAuthoringFormGUI\addGenericAssessmentQuestionCommandButtons(), addSpecificOrderingQuestionCommandButtons(), and ilPropertyFormGUI\clearCommandButtons().

Referenced by ensureReprintableFormStructure().

125  {
126  $this->clearCommandButtons();
127  $this->addSpecificOrderingQuestionCommandButtons($questionOBJ);
128  $this->addGenericAssessmentQuestionCommandButtons($questionOBJ);
129  }
addGenericAssessmentQuestionCommandButtons(assQuestion $questionOBJ)
clearCommandButtons()
Remove all command buttons.
addSpecificOrderingQuestionCommandButtons(assOrderingQuestion $questionOBJ)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renewOrderingElementInput()

ilAssOrderingQuestionAuthoringFormGUI::renewOrderingElementInput ( assOrderingQuestion  $questionOBJ)
protected
Parameters
assOrderingQuestion$questionOBJ
Exceptions
ilTestQuestionPoolException

Definition at line 110 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References assOrderingQuestion\buildOrderingElementInputGui(), assQuestion\getId(), ilPropertyFormGUI\getItemByPostVar(), assOrderingQuestion\initOrderingElementAuthoringProperties(), and ilAssQuestionAuthoringFormGUI\replaceFormItemByPostVar().

Referenced by ensureReprintableFormStructure().

111  {
112  $replacingInput = $questionOBJ->buildOrderingElementInputGui();
113  $questionOBJ->initOrderingElementAuthoringProperties($replacingInput);
114  $dodgingInput = $this->getItemByPostVar($replacingInput->getPostVar());
115  $replacingInput->setElementList($dodgingInput->getElementList($questionOBJ->getId()));
116  $this->replaceFormItemByPostVar($replacingInput);
117  }
initOrderingElementAuthoringProperties(ilFormPropertyGUI $formField)
getId()
Gets the id of the assQuestion object.
getItemByPostVar($a_post_var)
Get Item by POST variable.
replaceFormItemByPostVar(ilFormPropertyGUI $replacingItem)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAvailableCommandButtonIds()

ilAssOrderingQuestionAuthoringFormGUI::setAvailableCommandButtonIds (   $availableCommandButtonIds)
protected

Definition at line 29 of file class.ilAssOrderingQuestionAuthoringFormGUI.php.

References $availableCommandButtonIds.

Referenced by __construct().

30  {
31  $this->availableCommandButtonIds = $availableCommandButtonIds;
32  }
+ Here is the caller graph for this function:

Field Documentation

◆ $availableCommandButtonIds

ilAssOrderingQuestionAuthoringFormGUI::$availableCommandButtonIds = null
protected

◆ COMMAND_BUTTON_PREFIX

const ilAssOrderingQuestionAuthoringFormGUI::COMMAND_BUTTON_PREFIX = 'assOrderingQuestionBtn_'

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