3 declare(strict_types=1);
24 protected \ilDBInterface
$db;
33 if ($this->db->sequenceExists(
'skl_self_eval')) {
34 $this->db->dropSequence(
'skl_self_eval');
37 if ($this->db->tableExists(
'skl_self_eval')) {
38 $this->db->dropTable(
'skl_self_eval');
41 if ($this->db->tableExists(
'skl_self_eval_level')) {
42 $this->db->dropTable(
'skl_self_eval_level');
48 if (!$this->db->tableColumnExists(
'skl_user_skill_level',
'trigger_user_id')) {
49 $this->db->addTableColumn(
50 'skl_user_skill_level',
64 if (!$this->db->tableColumnExists(
'skl_user_has_level',
'trigger_user_id')) {
65 $this->db->addTableColumn(
93 "title" => [
"text",
"Default"],
94 "description" => [
"text",
""]
97 "type" => [
"text",
"skee"],
98 "title" => [
"text",
"Skill Tree"]
105 $set = $this->db->queryF(
106 "SELECT * FROM object_data " .
107 " WHERE type = %s AND title = %s",
108 [
"string",
"string"],
111 $rec = $this->db->fetchAssoc($set);
116 "skl_tree_id" => [
"integer", $rec[
"obj_id"]]
119 "skl_tree_id" => [
"integer", 1]
126 if (!$this->db->tableColumnExists(
"skl_profile",
"skill_tree_id")) {
127 $this->db->addTableColumn(
"skl_profile",
"skill_tree_id", array(
138 $set = $this->db->queryF(
139 "SELECT * FROM object_data " .
140 " WHERE type = %s AND title = %s",
141 [
"string",
"string"],
144 $rec = $this->db->fetchAssoc($set);
149 "skill_tree_id" => [
"integer", $rec[
"obj_id"]]
152 "skill_tree_id" => [
"integer", 0]
159 if (!$this->db->tableColumnExists(
"skl_profile",
"image_id")) {
160 $this->db->addTableColumn(
"skl_profile",
"image_id", array(
170 if (!$this->db->tableExists(
"skl_profile_completion")) {
183 "type" =>
"timestamp",
192 $this->db->createTable(
"skl_profile_completion", $fields);
193 $this->db->addPrimaryKey(
"skl_profile_completion", [
"profile_id",
"user_id",
"date"]);
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...