ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSurveySkillThresholds Class Reference

Skill tresholds for 360 surveys. More...

+ Collaboration diagram for ilSurveySkillThresholds:

Public Member Functions

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

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

◆ __construct()

ilSurveySkillThresholds::__construct ( ilObjSurvey  $a_survey)

Constructor.

Parameters

return

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

22 {
23 $this->survey = $a_survey;
24 $this->read();
25 }

References read().

+ Here is the call graph for this function:

Member Function Documentation

◆ getThresholds()

ilSurveySkillThresholds::getThresholds ( )

Get thresholds.

Parameters

return

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

54 {
55 return $this->threshold;
56 }

◆ read()

ilSurveySkillThresholds::read ( )

Read.

Parameters

return

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

34 {
35 global $ilDB;
36
37 $set = $ilDB->query("SELECT * FROM svy_skill_threshold ".
38 " WHERE survey_id = ".$ilDB->quote($this->survey->getId(), "integer")
39 );
40 while ($rec = $ilDB->fetchAssoc($set))
41 {
42 $this->threshold[$rec['level_id']][$rec['tref_id']] =
43 $rec['threshold'];
44 }
45 }
global $ilDB

References $ilDB.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ writeThreshold()

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.

65 {
66 global $ilDB;
67
68 $ilDB->replace("svy_skill_threshold",
69 array("survey_id" => array("integer", $this->survey->getId()),
70 "base_skill_id" => array("integer", (int) $a_base_skill_id),
71 "tref_id" => array("integer", (int) $a_tref_id),
72 "level_id" => array("integer", (int) $a_level_id)
73 ),
74 array("threshold" => array("integer", (int) $a_threshold))
75 );
76 }

References $ilDB.


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