ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilSurveySkillThresholds Class Reference

Skill tresholds for 360 surveys. More...

+ Collaboration diagram for ilSurveySkillThresholds:

Public Member Functions

 __construct (ilObjSurvey $a_survey)
 Constructor.
 read ()
 Read.
 getThresholds ()
 Get thresholds.
 writeThreshold ($a_base_skill_id, $a_tref_id, $a_level_id, $a_threshold)
 Write threshold.

Detailed Description

Skill tresholds for 360 surveys.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 12 of file class.ilSurveySkillThresholds.php.

Constructor & Destructor Documentation

ilSurveySkillThresholds::__construct ( ilObjSurvey  $a_survey)

Constructor.

Parameters
@return

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

References read().

{
$this->survey = $a_survey;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilSurveySkillThresholds::getThresholds ( )

Get thresholds.

Parameters
@return

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

{
return $this->threshold;
}
ilSurveySkillThresholds::read ( )

Read.

Parameters
@return

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

Referenced by __construct().

{
global $ilDB;
$set = $ilDB->query("SELECT * FROM svy_skill_threshold ".
" WHERE survey_id = ".$ilDB->quote($this->survey->getId(), "integer")
);
while ($rec = $ilDB->fetchAssoc($set))
{
$this->threshold[$rec['level_id']][$rec['tref_id']] =
$rec['threshold'];
}
}

+ Here is the caller graph for this function:

ilSurveySkillThresholds::writeThreshold (   $a_base_skill_id,
  $a_tref_id,
  $a_level_id,
  $a_threshold 
)

Write threshold.

Parameters
@return

Definition at line 64 of file class.ilSurveySkillThresholds.php.

{
global $ilDB;
$ilDB->replace("svy_skill_threshold",
array("survey_id" => array("integer", $this->survey->getId()),
"base_skill_id" => array("integer", (int) $a_base_skill_id),
"tref_id" => array("integer", (int) $a_tref_id),
"level_id" => array("integer", (int) $a_level_id)
),
array("threshold" => array("integer", (int) $a_threshold))
);
}

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