27 public function init(): void
31 $this->
user = $DIC->user();
42 $lhist_node = $this->dom_doc->createElement(
"LearningHistory");
43 $lhist_node = $this->
getDomNode()->appendChild($lhist_node);
46 public function setFrom(
string $a_val): void
53 return (
string) $this->
getChildNode()->getAttribute(
"From");
56 public function setTo(
string $a_val): void
63 return (
string) $this->
getChildNode()->getAttribute(
"To");
70 foreach ($children as $iValue) {
74 foreach ($a_val as $key => $class) {
75 $prop_node = $this->dom_doc->createElement(
"LearningHistoryProvider");
76 $prop_node = $this->
getChildNode()->appendChild($prop_node);
77 $prop_node->setAttribute(
"Name", $class);
86 foreach ($children as $iValue) {
87 $classes[] = $iValue->getAttribute(
"Name");
125 return array(
"ed_insert_learning_history",
"pc_learning_history");
131 bool $a_abstract_only =
false 133 $start = strpos($a_output,
"{{{{{LearningHistory");
135 if (is_int($start)) {
136 $end = strpos($a_output,
"}}}}}", $start);
140 $param = substr($a_output, $start + 5, $end - $start - 5);
141 $param = str_replace(
' xmlns:xhtml="http://www.w3.org/1999/xhtml"',
"",
$param);
145 $classes = explode(
";",
$param[3]);
146 $classes =
array_map(
static function ($i) {
151 $a_output = substr($a_output, 0, $start) .
153 substr($a_output, $end + 5);
155 if (strlen($a_output) > $start + 5) {
156 $start = strpos($a_output,
"{{{{{LearningHistory", $start + 5);
161 if (is_int($start)) {
162 $end = strpos($a_output,
"}}}}}", $start);
181 if ($a_mode ===
"preview" || $a_mode ===
"presentation" || $a_mode ===
"print") {
182 if ($this->
getPage()->getParentType() ===
"prtf") {
187 $tpl =
new ilTemplate(
"tpl.pc_lhist.html",
true,
true,
"components/ILIAS/LearningHistory");
190 $from_unix = ($from !=
"")
193 $to_unix = ($to !=
"")
196 $classes = (is_array($classes))
197 ? array_filter($classes,
static function ($i):
bool {
201 if (count($classes) === 0) {
204 $tpl->setVariable(
"LHIST", $hist_gui->getEmbeddedHTML($from_unix, $to_unix, $classes, $a_mode));
static beforePageDelete(ilPageObject $a_page)
setType(string $a_type)
Set Type.
getPresentation(string $from, string $to, array $classes, string $a_mode)
Get presentation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
Content object of ilPageObject (see ILIAS DTD).
static getLangVars()
Get lang vars needed for editing.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
create(ilPageObject $a_pg_obj, string $a_hier_id, string $a_pc_id="")
Create learning history node.
static getPlaceholderPresentation()
static afterPageHistoryEntry(ilPageObject $a_page, DOMDocument $a_old_domdoc, string $a_old_xml, int $a_old_nr)
After page history entry has been created.
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
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
static afterPageUpdate(ilPageObject $a_page, DOMDocument $a_domdoc, string $a_xml, bool $a_creation)
createPageContentNode(bool $a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
modifyPageContentPostXsl(string $a_output, string $a_mode, bool $a_abstract_only=false)