ILIAS  release_8 Revision v8.23
ilRandomTestData Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 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 26 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 36 of file class.ilRandomTestData.php.

37  {
38  $this->data = array('count' => $a_count, 'qpl' => $a_qpl);
39  }

Member Function Documentation

◆ __get()

ilRandomTestData::__get (   $property)

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

Referenced by ilRandomTestDataTest\test__get().

42  {
43  switch ($property) {
44  case 'count':
45  if ((strlen($this->data[$property]) == 0) || (!is_numeric($this->data[$property]))) {
46  return 0;
47  }
48  return $this->data[$property];
49  break;
50  case 'qpl':
51  return $this->data[$property];
52  break;
53  default:
54  return null;
55  break;
56  }
57  }
+ Here is the caller graph for this function:

◆ __set()

ilRandomTestData::__set (   $property,
  $value 
)

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

60  {
61  switch ($property) {
62  case 'count':
63  case 'qpl':
64  $this->data[$property] = $value;
65  break;
66  default:
67  break;
68  }
69  }

Field Documentation

◆ $data

ilRandomTestData::$data = array()
protected

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


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