ILIAS  Release_4_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.
 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)

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

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type.

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 20844 2009-08-02 12:49:49Z hschottm

Definition at line 31 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 41 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 85 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 75 of file class.ilRandomTestROInputGUI.php.

References $values.

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

Insert property html.

Returns
int Size

Definition at line 95 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 52 of file class.ilRandomTestROInputGUI.php.

{
}
ilRandomTestROInputGUI::setValueByArray (   $a_values)

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

{
}
ilRandomTestROInputGUI::setValues (   $a_values)

Set Values.

Parameters
array$a_valueValue

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

Referenced by ilObjTestGUI\randomQuestionsObject().

{
$this->values = $a_values;
}

+ Here is the caller graph for this function:

Field Documentation

ilRandomTestROInputGUI::$values = array()
protected

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

Referenced by getValues().


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