ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

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

References read().

22  {
23  $this->survey = $a_survey;
24  $this->read();
25  }
+ Here is the call graph for this function:

Member Function Documentation

◆ getThresholds()

ilSurveySkillThresholds::getThresholds ( )

Get thresholds.

Parameters

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

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

◆ read()

ilSurveySkillThresholds::read ( )

Read.

Parameters

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

References $ilDB.

Referenced by __construct().

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
+ 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

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

References $ilDB, and array.

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  }
Create styles array
The data for the language used.
global $ilDB

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