29 public function init(): void
33 $this->
user = $DIC->user();
39 parent::setNode($a_node);
50 $this->skill_node = $this->dom->create_element(
"Skills");
51 $this->skill_node = $this->node->append_child($this->skill_node);
54 public function setData(
string $a_skill_id): void
58 $this->skill_node->set_attribute(
"Id", $a_skill_id);
59 $this->skill_node->set_attribute(
"User",
$ilUser->getId());
64 if (is_object($this->skill_node)) {
65 return $this->skill_node->get_attribute(
"Id");
80 self::saveSkillUsage($a_page, $a_domdoc);
107 self::saveSkillUsage($a_page, $a_old_domdoc, $a_old_nr);
115 $skl_ids = self::collectSkills($a_page, $a_domdoc);
123 foreach ($skl_ids as $skl_id) {
124 if ((
int) $skl_id[
"inst_id"] <= 0) {
142 $nodes = $xpath->query(
'//Skills');
145 foreach ($nodes as
$node) {
146 $user = $node->getAttribute(
"User");
147 $id = $node->getAttribute(
"Id");
148 $inst_id = $node->getAttribute(
"InstId");
149 $skl_ids[$user .
":" .
$id .
":" . $inst_id] = array(
150 "user" => $user,
"id" =>
$id,
"inst_id" => $inst_id);
160 int $delete_lower_than_nr
164 $usage_repo = $DIC->copage()
169 $usage_repo->deleteHistoryUsagesLowerEqualThan(
171 $parent_type .
":pg",
173 $delete_lower_than_nr,
setNode(php4DOMElement $a_node)
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="-")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static deleteAllUsages(string $a_pc_type, string $a_usage_type, int $a_usage_id, int $a_usage_hist_nr=0, string $a_lang="-")
insertContent(ilPageContent $a_cont_obj, string $a_pos, int $a_mode=IL_INSERT_AFTER, string $a_pcid="", bool $remove_placeholder=true)
insert a content node before/after a sibling or as first child of a parent
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)
createPageContentNode(bool $a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
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)
php4DOMElement $skill_node