ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilRandomTestData Class Reference

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

+ Collaboration diagram for ilRandomTestData:

Public Member Functions

 __construct ($a_count="", $a_qpl="")
 Constructor. More...
 
 __get ($property)
 
 __set ($property, $value)
 

Protected Attributes

 $data = array()
 

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$

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

Constructor & Destructor Documentation

◆ __construct()

ilRandomTestData::__construct (   $a_count = "",
  $a_qpl = "" 
)

Constructor.

Parameters
string$a_countQuestion count
string$a_qplQuestionpool id

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

References array, and data.

22  {
23  $this->data = array('count' => $a_count, 'qpl' => $a_qpl);
24  }
Add some data
Create styles array
The data for the language used.

Member Function Documentation

◆ __get()

ilRandomTestData::__get (   $property)

Definition at line 26 of file class.ilRandomTestData.php.

References data.

27  {
28  switch ($property)
29  {
30  case 'count':
31  if ((strlen($this->data[$property]) == 0) || (!is_numeric($this->data[$property]))) return 0;
32  return $this->data[$property];
33  break;
34  case 'qpl':
35  return $this->data[$property];
36  break;
37  default:
38  return null;
39  break;
40  }
41  }
Add some data

◆ __set()

ilRandomTestData::__set (   $property,
  $value 
)

Definition at line 43 of file class.ilRandomTestData.php.

References data.

44  {
45  switch ($property)
46  {
47  case 'count':
48  case 'qpl':
49  $this->data[$property] = $value;
50  break;
51  default:
52  break;
53  }
54  }
Add some data

Field Documentation

◆ $data

ilRandomTestData::$data = array()
protected

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


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