ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilAssLongmenuCorrectionsInputGUI Class Reference
+ Inheritance diagram for ilAssLongmenuCorrectionsInputGUI:
+ Collaboration diagram for ilAssLongmenuCorrectionsInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert (ilTemplate $a_tpl)
 
- Public Member Functions inherited from ilAnswerWizardInputGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 
 setValues ($a_values)
 Set Values. More...
 
 getValues ()
 Get Values. More...
 
 setSingleline ($a_value)
 Set singleline. More...
 
 getSingleline ()
 Get singleline. More...
 
 setQuestionObject ($a_value)
 Set question object. More...
 
 getQuestionObject ()
 Get question object. More...
 
 setAllowMove ($a_allow_move)
 Set allow move. More...
 
 getAllowMove ()
 Get allow move. More...
 
 isAddRemoveAllowed ()
 
 setAllowAddRemove ($allowAddRemove)
 
 setMinvalueShouldBeGreater ($a_bool)
 Set minvalueShouldBeGreater. More...
 
 minvalueShouldBeGreater ()
 Get minvalueShouldBeGreater. More...
 
 setMinValue ($a_minvalue)
 Set Minimum Value. More...
 
 getMinValue ()
 Get Minimum Value. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 insert (ilTemplate $a_tpl)
 
- Public Member Functions inherited from ilTextInputGUI
 __construct (string $a_title="", string $a_postvar="")
 
 setValue ($a_value)
 
 getValue ()
 
 setValidationFailureMessage (string $a_msg)
 
 getValidationFailureMessage ()
 
 setValidationRegexp (string $a_value)
 
 getValidationRegexp ()
 
 setMaxLength (?int $a_maxlength)
 
 getMaxLength ()
 
 setSize (int $a_size)
 
 setInlineStyle (string $a_style)
 
 getInlineStyle ()
 
 setCssClass (string $a_class)
 
 getCssClass ()
 
 setValueByArray (array $a_values)
 
 getSize ()
 
 setSuffix (string $a_value)
 
 getSuffix ()
 
 setInputType (string $a_type)
 set input type More...
 
 getInputType ()
 
 setSubmitFormOnEnter (bool $a_val)
 
 getSubmitFormOnEnter ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 getDataSource ()
 
 setDataSource (string $href, ?string $a_delimiter=null)
 
 setDataSourceSubmitOnSelection (bool $a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl (string $a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 render (string $a_mode="")
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 setDisableHtmlAutoComplete (bool $autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
 getPostValueForComparison ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Protected Member Functions

 buildTagInput ()
 
- Protected Member Functions inherited from ilAnswerWizardInputGUI
 getTextInputLabel ($lng)
 
 getPointsInputLabel ($lng)
 
 getTemplate ()
 
 prepareFormOutput (float|string $input, bool $strip=false)
 
- Protected Member Functions inherited from ilFormPropertyGUI
 symbol ()
 
 setType (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 

Private Attributes

ILIAS DI UIServices $ui
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Attributes inherited from ilAnswerWizardInputGUI
 $values = []
 
 $allowMove = false
 
 $allowAddRemove = true
 
 $singleline = true
 
 $qstObject = null
 
 $minvalue = false
 
 $minvalueShouldBeGreater = false
 
ilTestLegacyFormsHelper $forms_helper
 
GlyphFactory $glyph_factory
 
Renderer $renderer
 
- Protected Attributes inherited from ilTextInputGUI
 $value = null
 
int $maxlength = 200
 
int $size = 40
 
string $validationRegexp = ""
 
string $validationFailureMessage = ''
 
string $suffix = ""
 
string $style_css = ""
 
string $css_class = ""
 
string $ajax_datasource = ""
 
string $ajax_datasource_delimiter = null
 
bool $ajax_datasource_commit = false
 
string $ajax_datasource_commit_url = ""
 
bool $submit_form_on_enter = false
 
bool $autocomplete_disabled = false
 
string $input_type = ""
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Detailed Description

Definition at line 27 of file class.ilAssLongmenuCorrectionsInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssLongmenuCorrectionsInputGUI::__construct (   $a_title = "",
  $a_postvar = "" 
)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilAnswerWizardInputGUI.

Definition at line 31 of file class.ilAssLongmenuCorrectionsInputGUI.php.

32 {
33 global $DIC;
34 $this->ui = $DIC->ui();
35
36 parent::__construct($a_title, $a_postvar);
37 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ buildTagInput()

ilAssLongmenuCorrectionsInputGUI::buildTagInput ( )
protected

Definition at line 72 of file class.ilAssLongmenuCorrectionsInputGUI.php.

73 {
74 $tagInput = new ilTagInputGUI('', $this->getPostVar() . '_tags');
75 $tagInput->setTypeAheadMinLength(1);
76
77 $tagInput->setOptions($this->values['answers_correct']);
78 $tagInput->setTypeAheadList($this->values['answers_all'][0]);
79
80 return $tagInput;
81 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ilFormPropertyGUI\getPostVar().

Referenced by insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkInput()

ilAssLongmenuCorrectionsInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilAnswerWizardInputGUI.

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

39 : bool
40 {
41 return true;
42 }

◆ insert()

ilAssLongmenuCorrectionsInputGUI::insert ( ilTemplate  $a_tpl)

Reimplemented from ilAnswerWizardInputGUI.

Definition at line 44 of file class.ilAssLongmenuCorrectionsInputGUI.php.

44 : void
45 {
46 // Get input
47 $inp = new ilTextWizardInputGUI('', '');
48 $inp->setValues(current($this->values['answers_all']));
49 $inp->setDisabled(true);
50 $message = $inp->render();
51
52 $page = $this->ui->factory()->modal()->lightboxTextPage($message, $this->lng->txt('answer_options'));
53 $modal = $this->ui->factory()->modal()->lightbox($page);
54 $button = $this->ui->factory()->button()->standard($this->lng->txt('show'), $modal->getShowSignal());
55
56 $tpl = new ilTemplate('tst.longmenu_corrections_input.html', true, true, 'components/ILIAS/TestQuestionPool');
57
58 $tpl->setVariable('ANSWERS_MODAL', $this->ui->renderer()->render($modal));
59 $tpl->setVariable('TAG_INPUT', $this->buildTagInput()->render());
60 $tpl->setVariable('NUM_ANSWERS', $this->values['answers_all_count']);
61 $tpl->setVariable('BTN_SHOW', $this->ui->renderer()->render($button));
62 $tpl->setVariable('TXT_ANSWERS', $this->lng->txt('answer_options'));
63 $tpl->setVariable('TXT_CORRECT_ANSWERS', $this->lng->txt('correct_answers') . ':');
64
65 $tpl->setVariable('POSTVAR', $this->getPostVar());
66
67 $a_tpl->setCurrentBlock("prop_generic");
68 $a_tpl->setVariable("PROP_GENERIC", $tpl->get());
69 $a_tpl->parseCurrentBlock();
70 }
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
special template class to simplify handling of ITX/PEAR
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
render(string $a_mode="")
This class represents a text wizard property in a property form.
$message
Definition: xapiexit.php:31

References $message, buildTagInput(), ilFormPropertyGUI\getPostVar(), ILIAS\Repository\lng(), ilTemplate\parseCurrentBlock(), ilTextInputGUI\render(), ilTemplate\setCurrentBlock(), HTML_Template_IT\setVariable(), and ILIAS\Repository\ui().

+ Here is the call graph for this function:

Field Documentation

◆ $ui

ILIAS DI UIServices ilAssLongmenuCorrectionsInputGUI::$ui
private

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


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