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

Formula Question Unit. More...

+ Collaboration diagram for assFormulaQuestionUnit:

Public Member Functions

 __construct ()
 
 initFormArray (array $data)
 
 setBaseunitTitle ($baseunit_title)
 
 getBaseunitTitle ()
 
 setId ($id)
 
 getId ()
 
 setUnit ($unit)
 
 getUnit ()
 
 setSequence ($sequence)
 
 getSequence ()
 
 setFactor ($factor)
 
 getFactor ()
 
 setBaseUnit ($baseunit)
 
 getBaseUnit ()
 
 setCategory ($category)
 
 getCategory ()
 

Static Public Member Functions

static lookupUnitFactor ($a_unit_id)
 

Private Attributes

 $unit = ''
 
 $factor = 0.0
 
 $baseunit = 0
 
 $baseunit_title = ''
 
 $id = 0
 
 $category = 0
 
 $sequence = 0
 

Detailed Description

Formula Question Unit.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
Id
class.assFormulaQuestionUnit.php 404 2009-04-27 04:56:49Z hschottm

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

Constructor & Destructor Documentation

◆ __construct()

assFormulaQuestionUnit::__construct ( )

Definition at line 24 of file class.assFormulaQuestionUnit.php.

25  {
26  }

Member Function Documentation

◆ getBaseUnit()

assFormulaQuestionUnit::getBaseUnit ( )

Definition at line 110 of file class.assFormulaQuestionUnit.php.

References $baseunit, and $id.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

111  {
112  if (is_numeric($this->baseunit) && $this->baseunit > 0)
113  {
114  return $this->baseunit;
115  }
116  else
117  {
118  return $this->id;
119  }
120  }
+ Here is the caller graph for this function:

◆ getBaseunitTitle()

assFormulaQuestionUnit::getBaseunitTitle ( )
Returns
string

Definition at line 53 of file class.assFormulaQuestionUnit.php.

References $baseunit_title.

◆ getCategory()

assFormulaQuestionUnit::getCategory ( )

Definition at line 127 of file class.assFormulaQuestionUnit.php.

References $category, $lng, $unit, and getUnit().

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

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

◆ getFactor()

assFormulaQuestionUnit::getFactor ( )

Definition at line 93 of file class.assFormulaQuestionUnit.php.

References $factor.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

+ Here is the caller graph for this function:

◆ getId()

assFormulaQuestionUnit::getId ( )

Definition at line 63 of file class.assFormulaQuestionUnit.php.

References $id.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit(), and ilUnitConfigurationGUI\showUnitCreationForm().

+ Here is the caller graph for this function:

◆ getSequence()

assFormulaQuestionUnit::getSequence ( )

Definition at line 83 of file class.assFormulaQuestionUnit.php.

References $sequence.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

+ Here is the caller graph for this function:

◆ getUnit()

assFormulaQuestionUnit::getUnit ( )

Definition at line 73 of file class.assFormulaQuestionUnit.php.

References $unit.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit(), and getCategory().

+ Here is the caller graph for this function:

◆ initFormArray()

assFormulaQuestionUnit::initFormArray ( array  $data)
Parameters
array$data

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

32  {
33  $this->id = $data['unit_id'];
34  $this->unit = $data['unit'];
35  $this->factor = $data['factor'];
36  $this->baseunit = $data['baseunit_fi'];
37  $this->baseunit_title = $data['baseunit_title'];
38  $this->category = $data['category'];
39  $this->sequence = $data['sequence'];
40  }

◆ lookupUnitFactor()

static assFormulaQuestionUnit::lookupUnitFactor (   $a_unit_id)
static
Parameters
integer$a_unit_id
Returns
mixed

Definition at line 151 of file class.assFormulaQuestionUnit.php.

References $ilDB, $res, $row, and array.

Referenced by assFormulaQuestion\getBestSolution().

152  {
153  global $ilDB;
154 
155  $res = $ilDB->queryF('SELECT factor FROM il_qpl_qst_fq_unit WHERE unit_id = %s',
156  array('integer'), array($a_unit_id));
157 
158  $row = $ilDB->fetchAssoc($res);
159 
160  return $row['factor'];
161  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the caller graph for this function:

◆ setBaseUnit()

assFormulaQuestionUnit::setBaseUnit (   $baseunit)

Definition at line 98 of file class.assFormulaQuestionUnit.php.

References $baseunit.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

99  {
100  if (is_numeric($baseunit) && $baseunit > 0)
101  {
102  $this->baseunit = $baseunit;
103  }
104  else
105  {
106  $this->baseunit = null;
107  }
108  }
+ Here is the caller graph for this function:

◆ setBaseunitTitle()

assFormulaQuestionUnit::setBaseunitTitle (   $baseunit_title)
Parameters
string$baseunit_title

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

References $baseunit_title.

46  {
47  $this->baseunit_title = $baseunit_title;
48  }

◆ setCategory()

assFormulaQuestionUnit::setCategory (   $category)

Definition at line 122 of file class.assFormulaQuestionUnit.php.

References $category.

123  {
124  $this->category = $category;
125  }

◆ setFactor()

assFormulaQuestionUnit::setFactor (   $factor)

Definition at line 88 of file class.assFormulaQuestionUnit.php.

References $factor.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

89  {
90  $this->factor = $factor;
91  }
+ Here is the caller graph for this function:

◆ setId()

assFormulaQuestionUnit::setId (   $id)

Definition at line 58 of file class.assFormulaQuestionUnit.php.

References $id.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

59  {
60  $this->id = $id;
61  }
+ Here is the caller graph for this function:

◆ setSequence()

assFormulaQuestionUnit::setSequence (   $sequence)

Definition at line 78 of file class.assFormulaQuestionUnit.php.

References $sequence.

Referenced by ilUnitConfigurationRepository\checkDeleteUnit().

79  {
80  $this->sequence = $sequence;
81  }
+ Here is the caller graph for this function:

◆ setUnit()

assFormulaQuestionUnit::setUnit (   $unit)

Definition at line 68 of file class.assFormulaQuestionUnit.php.

References $unit.

69  {
70  $this->unit = $unit;
71  }

Field Documentation

◆ $baseunit

assFormulaQuestionUnit::$baseunit = 0
private

Definition at line 15 of file class.assFormulaQuestionUnit.php.

Referenced by getBaseUnit(), and setBaseUnit().

◆ $baseunit_title

assFormulaQuestionUnit::$baseunit_title = ''
private

Definition at line 16 of file class.assFormulaQuestionUnit.php.

Referenced by getBaseunitTitle(), and setBaseunitTitle().

◆ $category

assFormulaQuestionUnit::$category = 0
private

Definition at line 18 of file class.assFormulaQuestionUnit.php.

Referenced by getCategory(), and setCategory().

◆ $factor

assFormulaQuestionUnit::$factor = 0.0
private

Definition at line 14 of file class.assFormulaQuestionUnit.php.

Referenced by getFactor(), and setFactor().

◆ $id

assFormulaQuestionUnit::$id = 0
private

Definition at line 17 of file class.assFormulaQuestionUnit.php.

Referenced by getBaseUnit(), getId(), and setId().

◆ $sequence

assFormulaQuestionUnit::$sequence = 0
private

Definition at line 19 of file class.assFormulaQuestionUnit.php.

Referenced by getSequence(), and setSequence().

◆ $unit

assFormulaQuestionUnit::$unit = ''
private

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

Referenced by getCategory(), getUnit(), and setUnit().


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