28 public function init(): void
32 $this->
user = $DIC->user();
44 public function setData(
string $a_skill_id): void
46 $ilUser = $this->user;
47 $this->getChildNode()->setAttribute(
"Id", $a_skill_id);
48 $this->getChildNode()->setAttribute(
"User", $ilUser->getId());
53 if (is_object($this->getChildNode())) {
54 return $this->getChildNode()->getAttribute(
"Id");
64 DOMDocument $a_domdoc,
69 self::saveSkillUsage($a_page, $a_domdoc);
80 $a_page->getParentType() .
":pg",
92 DOMDocument $a_old_domdoc,
96 self::saveSkillUsage($a_page, $a_old_domdoc, $a_old_nr);
101 DOMDocument $a_domdoc,
104 $skl_ids = self::collectSkills($a_page, $a_domdoc);
112 foreach ($skl_ids as $skl_id) {
113 if ((
int) $skl_id[
"inst_id"] <= 0) {
128 DOMDocument $a_domdoc
130 $xpath = new DOMXPath($a_domdoc);
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,
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static deleteHistoryLowerEqualThan(string $parent_type, int $page_id, string $lang, int $delete_lower_than_nr)
Overwrite in derived classes, if old history entries are being deleted.
static saveSkillUsage(ilPageObject $a_page, DOMDocument $a_domdoc, int $a_old_nr=0)
setData(string $a_skill_id)
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
static collectSkills(ilPageObject $a_page, DOMDocument $a_domdoc)
static afterPageUpdate(ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
After page has been updated (or created)
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 beforePageDelete(ilPageObject $a_page)
Before page is being deleted.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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="-")
static deleteAllUsages(string $a_pc_type, string $a_usage_type, int $a_usage_id, int $a_usage_hist_nr=0, string $a_lang="-")
Content object of ilPageObject (see ILIAS DTD).
createInitialChildNode(string $hier_id, string $pc_id, string $child, array $child_attributes=[])
setType(string $a_type)
Set Type.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)