ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

assFormulaQuestionUnit::__construct ( )

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

{
}

Member Function Documentation

assFormulaQuestionUnit::getBaseUnit ( )

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

References $baseunit, and $id.

{
if (is_numeric($this->baseunit) && $this->baseunit > 0)
{
}
else
{
return $this->id;
}
}
assFormulaQuestionUnit::getBaseunitTitle ( )
Returns
string

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

References $baseunit_title.

{
}
assFormulaQuestionUnit::getCategory ( )

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

References $category.

{
}
assFormulaQuestionUnit::getFactor ( )

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

References $factor.

{
return $this->factor;
}
assFormulaQuestionUnit::getId ( )

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

References $id.

{
return $this->id;
}
assFormulaQuestionUnit::getSequence ( )

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

References $sequence.

{
}
assFormulaQuestionUnit::getUnit ( )

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

References $unit.

{
return $this->unit;
}
assFormulaQuestionUnit::initFormArray ( array  $data)
Parameters
array$data

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

{
$this->id = $data['unit_id'];
$this->unit = $data['unit'];
$this->factor = $data['factor'];
$this->baseunit = $data['baseunit_fi'];
$this->baseunit_title = $data['baseunit_title'];
$this->category = $data['category'];
$this->sequence = $data['sequence'];
}
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, and $row.

Referenced by assFormulaQuestion\getBestSolution().

{
global $ilDB;
$res = $ilDB->queryF('SELECT factor FROM il_qpl_qst_fq_unit WHERE unit_id = %s',
array('integer'), array($a_unit_id));
$row = $ilDB->fetchAssoc($res);
return $row['factor'];
}

+ Here is the caller graph for this function:

assFormulaQuestionUnit::setBaseUnit (   $baseunit)

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

References $baseunit.

{
if (is_numeric($baseunit) && $baseunit > 0)
{
$this->baseunit = $baseunit;
}
else
{
$this->baseunit = null;
}
}
assFormulaQuestionUnit::setBaseunitTitle (   $baseunit_title)
Parameters
string$baseunit_title

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

References $baseunit_title.

{
$this->baseunit_title = $baseunit_title;
}
assFormulaQuestionUnit::setCategory (   $category)

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

References $category.

{
$this->category = $category;
}
assFormulaQuestionUnit::setFactor (   $factor)

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

References $factor.

{
$this->factor = $factor;
}
assFormulaQuestionUnit::setId (   $id)

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

References $id.

{
$this->id = $id;
}
assFormulaQuestionUnit::setSequence (   $sequence)

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

References $sequence.

{
$this->sequence = $sequence;
}
assFormulaQuestionUnit::setUnit (   $unit)

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

References $unit.

{
$this->unit = $unit;
}

Field Documentation

assFormulaQuestionUnit::$baseunit = 0
private

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

Referenced by getBaseUnit(), and setBaseUnit().

assFormulaQuestionUnit::$baseunit_title = ''
private

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

Referenced by getBaseunitTitle(), and setBaseunitTitle().

assFormulaQuestionUnit::$category = 0
private

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

Referenced by getCategory(), and setCategory().

assFormulaQuestionUnit::$factor = 0.0
private

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

Referenced by getFactor(), and setFactor().

assFormulaQuestionUnit::$id = 0
private

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

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

assFormulaQuestionUnit::$sequence = 0
private

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

Referenced by getSequence(), and setSequence().

assFormulaQuestionUnit::$unit = ''
private

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

Referenced by getUnit(), and setUnit().


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