28 public function init(): void
32 $this->
user = $DIC->user();
44 public function setData(
string $a_skill_id): void
48 $this->
getChildNode()->setAttribute(
"User", $ilUser->getId());
69 self::saveSkillUsage($a_page, $a_domdoc);
96 self::saveSkillUsage($a_page, $a_old_domdoc, $a_old_nr);
104 $skl_ids = self::collectSkills($a_page, $a_domdoc);
112 foreach ($skl_ids as $skl_id) {
113 if ((
int) $skl_id[
"inst_id"] <= 0) {
131 $nodes = $xpath->query(
'//Skills');
134 foreach ($nodes as $node) {
135 $user = $node->getAttribute(
"User");
136 $id = $node->getAttribute(
"Id");
137 $inst_id = $node->getAttribute(
"InstId");
138 $skl_ids[$user .
":" .
$id .
":" . $inst_id] = array(
139 "user" => $user,
"id" =>
$id,
"inst_id" => $inst_id);
149 int $delete_lower_than_nr
153 $usage_repo = $DIC->copage()
158 $usage_repo->deleteHistoryUsagesLowerEqualThan(
160 $parent_type .
":pg",
162 $delete_lower_than_nr,
setType(string $a_type)
Set Type.
static afterPageUpdate(ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
After page has been updated (or created)
static saveUsage(string $a_pc_type, int $a_pc_id, string $a_usage_type, int $a_usage_id, int $a_usage_hist_nr=0, string $a_lang="-")
Content object of ilPageObject (see ILIAS DTD).
static deleteAllUsages(string $a_pc_type, string $a_usage_type, int $a_usage_id, int $a_usage_hist_nr=0, string $a_lang="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
static deleteHistoryLowerEqualThan(string $parent_type, int $page_id, string $lang, int $delete_lower_than_nr)
setData(string $a_skill_id)
static beforePageDelete(ilPageObject $a_page)
Before page is being deleted.
static saveSkillUsage(ilPageObject $a_page, DOMDocument $a_domdoc, int $a_old_nr=0)
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
static afterPageHistoryEntry(ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr)
After page history entry has been created.
static collectSkills(ilPageObject $a_page, DOMDocument $a_domdoc)
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])