ILIAS  trunk Revision v11.0_alpha-1866-gfa368f7776e
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\TestQuestionPool\Skills\TestQuestionPoolSkillDBRepository Class Reference
+ Collaboration diagram for ILIAS\TestQuestionPool\Skills\TestQuestionPoolSkillDBRepository:

Public Member Functions

 __construct (?\ilDBInterface $db=null)
 
 removeForSkill (int $skill_node_id, bool $is_reference)
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\TestQuestionPool\Skills\TestQuestionPoolSkillDBRepository::__construct ( ?\ilDBInterface  $db = null)

Definition at line 30 of file class.TestQuestionPoolSkillDBRepository.php.

References ILIAS\TestQuestionPool\Skills\TestQuestionPoolSkillDBRepository\$db, and $DIC.

32  {
33  global $DIC;
34 
35  $this->db = ($db) ?: $DIC->database();
36  }
global $DIC
Definition: shib_login.php:22

Member Function Documentation

◆ removeForSkill()

ILIAS\TestQuestionPool\Skills\TestQuestionPoolSkillDBRepository::removeForSkill ( int  $skill_node_id,
bool  $is_reference 
)

Definition at line 38 of file class.TestQuestionPoolSkillDBRepository.php.

38  : void
39  {
40  if (!$is_reference) {
41  $this->db->manipulate("DELETE FROM qpl_qst_skl_assigns " .
42  " WHERE skill_base_fi = " . $this->db->quote($skill_node_id, "integer"));
43  $this->db->manipulate("DELETE FROM qpl_qst_skl_sol_expr " .
44  " WHERE skill_base_fi = " . $this->db->quote($skill_node_id, "integer"));
45  } else {
46  $this->db->manipulate("DELETE FROM qpl_qst_skl_assigns " .
47  " WHERE skill_tref_fi = " . $this->db->quote($skill_node_id, "integer"));
48  $this->db->manipulate("DELETE FROM qpl_qst_skl_sol_expr " .
49  " WHERE skill_tref_fi = " . $this->db->quote($skill_node_id, "integer"));
50  }
51  }

Field Documentation

◆ $db

ilDBInterface ILIAS\TestQuestionPool\Skills\TestQuestionPoolSkillDBRepository::$db
protected

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