ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRandomTestROInputGUI Class Reference

This class represents a random test input property in a property form. More...

+ Inheritance diagram for ilRandomTestROInputGUI:
+ Collaboration diagram for ilRandomTestROInputGUI:

Public Member Functions

 __construct ($a_title="", $a_postvar="")
 Constructor.
 setValue ($a_value)
 Set Value.
 setValueByArray ($a_values)
 setValues ($a_values)
 Set Values.
 getValues ()
 Get Values.
 checkInput ()
 Check input, strip slashes etc.
 insert (&$a_tpl)
 Insert property html.
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem.
 getSubItems ()
 Get Subitems.
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively
 checkSubItemsInput ()
 Check SubItems.
 getSubForm ()
 Get sub form html.
 getItemByPostVar ($a_post_var)
 Get item by post var.
- Public Member Functions inherited from ilFormPropertyGUI
executeCommand ()
 Execute command.
 getType ()
 Get Type.
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setPostVar ($a_postvar)
 Set Post Variable.
 getPostVar ()
 Get Post Variable.
 getFieldId ()
 Get Post Variable.
 setInfo ($a_info)
 Set Information Text.
 getInfo ()
 Get Information Text.
 setAlert ($a_alert)
 Set Alert Text.
 getAlert ()
 Get Alert Text.
 setRequired ($a_required)
 Set Required.
 getRequired ()
 Get Required.
 setDisabled ($a_disabled)
 Set Disabled.
 getDisabled ()
 Get Disabled.
 setParentForm ($a_parentform)
 Set Parent Form.
 getParentForm ()
 Get Parent Form.
 setParent ($a_val)
 Set Parent GUI object.
 getParent ()
 Get Parent GUI object.
 hideSubForm ()
 Sub form hidden on init?
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders)
 getHiddenTitle ()
 Get hidden title.
 serializeData ()
 serialize data
 unserializeData ($a_data)
 unserialize data
 writeToSession ()
 Write to session.
 clearFromSession ()
 Clear session value.
 readFromSession ()
 Read from session.
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties)
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi.
 getMulti ()
 Get Multi.
 setMultiValues (array $a_values)
 Set multi values.
 getMultiValues ()
 Get multi values.
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g.

Protected Attributes

 $values = array()
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 $title
 $postvar
 $info
 $alert
 $required = false
 $parentgui
 $parentform
 $hidden_title = ""
 $multi = false
 $multi_sortable = false
 $multi_addremove = true
 $multi_values

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.
 getMultiIconsHTML ()
 Get HTML for multiple value icons.

Detailed Description

This class represents a random test input property in a property form.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
Id:
class.ilRandomTestROInputGUI.php 44245 2013-08-17 11:15:45Z mbecker

Definition at line 11 of file class.ilRandomTestROInputGUI.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Reimplemented from ilFormPropertyGUI.

Definition at line 21 of file class.ilRandomTestROInputGUI.php.

References ilFormPropertyGUI\setRequired().

{
parent::__construct($a_title, $a_postvar);
$this->setRequired(true);
}

+ Here is the call graph for this function:

Member Function Documentation

ilRandomTestROInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Definition at line 65 of file class.ilRandomTestROInputGUI.php.

References ilSubEnabledFormPropertyGUI\checkSubItemsInput().

{
return $this->checkSubItemsInput();
}

+ Here is the call graph for this function:

ilRandomTestROInputGUI::getValues ( )

Get Values.

Returns
array Values

Definition at line 55 of file class.ilRandomTestROInputGUI.php.

References $values.

{
return $this->values;
}
ilRandomTestROInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 75 of file class.ilRandomTestROInputGUI.php.

References $lng, $tpl, ilFormPropertyGUI\getPostVar(), and ilUtil\prepareFormOutput().

{
global $lng;
$tpl = new ilTemplate("tpl.prop_randomtestroinput.html", true, true, "Modules/Test");
$i = 0;
foreach ($this->values as $value)
{
if ($value['num_of_q'] > 0)
{
$tpl->setCurrentBlock("num_of_q");
$tpl->setVariable("NUM_OF_Q", $value['num_of_q']);
$tpl->setVariable("TEXT_FROM", $lng->txt('questions_from'));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("row");
$class = ($i % 2 == 0) ? "even" : "odd";
if ($i == 0) $class .= " first";
if ($i == count($this->values)-1) $class .= " last";
$tpl->setVariable("ROW_CLASS", $class);
$tpl->setVariable("QPL_VALUE", ilUtil::prepareFormOutput($value['title']));
$tpl->setVariable("COUNT_VALUE", "(" . $value['count'] . " " . $lng->txt('assQuestions') . ")");
$tpl->parseCurrentBlock();
$i++;
}
$tpl->setVariable("ELEMENT_ID", $this->getPostVar());
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $tpl->get());
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilRandomTestROInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 32 of file class.ilRandomTestROInputGUI.php.

{
}
ilRandomTestROInputGUI::setValueByArray (   $a_values)

Definition at line 36 of file class.ilRandomTestROInputGUI.php.

{
}
ilRandomTestROInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

Definition at line 45 of file class.ilRandomTestROInputGUI.php.

{
$this->values = $a_values;
}

Field Documentation

ilRandomTestROInputGUI::$values = array()
protected

Definition at line 13 of file class.ilRandomTestROInputGUI.php.

Referenced by getValues().


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