29 $this->
user = $DIC->user();
38 parent::setNode($a_node);
39 $this->lhist_node = $a_node->first_child();
53 $this->lhist_node = $this->dom->create_element(
"LearningHistory");
54 $this->lhist_node = $this->node->append_child($this->lhist_node);
64 $this->lhist_node->set_attribute(
"From", $a_val);
74 return $this->lhist_node->get_attribute(
"From");
84 $this->lhist_node->set_attribute(
"To", $a_val);
94 return $this->lhist_node->get_attribute(
"To");
105 $children = $this->lhist_node->child_nodes();
106 for (
$i = 0;
$i < count($children);
$i++) {
107 $this->lhist_node->remove_child($children[
$i]);
110 foreach ($a_val as $key => $class) {
111 $prop_node = $this->dom->create_element(
"LearningHistoryProvider");
112 $prop_node = $this->lhist_node->append_child($prop_node);
113 $prop_node->set_attribute(
"Name", $class);
126 $children = $this->lhist_node->child_nodes();
127 for (
$i = 0;
$i < count($children);
$i++) {
128 $classes[] = $children[
$i]->get_attribute(
"Name");
142 public static function afterPageUpdate($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
173 return array(
"ed_insert_learning_history",
"pc_learning_history");
182 $ilPluginAdmin = $this->plugin_admin;
184 $start = strpos($a_html,
"{{{{{LearningHistory");
185 if (is_int($start)) {
186 $end = strpos($a_html,
"}}}}}", $start);
190 $param = substr($a_html, $start + 5, $end - $start - 5);
191 $param = str_replace(
' xmlns:xhtml="http://www.w3.org/1999/xhtml"',
"",
$param);
195 $classes = explode(
";",
$param[3]);
196 $classes = array_map(
function (
$i) {
201 $a_html = substr($a_html, 0, $start) .
203 substr($a_html, $end + 5);
205 if (strlen($a_html) > $start + 5) {
206 $start = strpos($a_html,
"{{{{{LearningHistory", $start + 5);
211 if (is_int($start)) {
212 $end = strpos($a_html,
"}}}}}", $start);
231 if ($a_mode ==
"preview" || $a_mode ==
"presentation" || $a_mode ==
"print") {
232 if ($this->
getPage()->getParentType() ==
"prtf") {
237 $tpl =
new ilTemplate(
"tpl.pc_lhist.html",
true,
true,
"Services/LearningHistory");
239 $hist_gui->setUserId($user_id);
240 $from_unix = ($from !=
"")
243 $to_unix = ($to !=
"")
246 $classes = (is_array($classes))
247 ? array_filter($classes,
function (
$i) {
251 if (count($classes) == 0) {
254 $tpl->setVariable(
"LHIST", $hist_gui->getEmbeddedHtml($from_unix, $to_unix, $classes, $a_mode));
258 return ilPCLearningHistoryGUI::getPlaceHolderPresentation();
getPresentation($from, $to, $classes, $a_mode)
Get presentation.
create(ilPageObject $a_pg_obj, string $a_hier_id, $a_pc_id="")
Create learning history node.
Learning history page content.
insertContent(&$a_cont_obj, $a_pos, $a_mode=IL_INSERT_AFTER, $a_pcid="", bool $remove_placeholder=true)
insert a content node before/after a sibling or as first child of a parent
static afterPageUpdate($a_page, DOMDocument $a_domdoc, $a_xml, $a_creation)
After page has been updated (or created)
setType($a_type)
Set Type.
static beforePageDelete($a_page)
Before page is being deleted.
static getLangVars()
Get lang vars needed for editing.
init()
Init page content component.
static afterPageHistoryEntry($a_page, DOMDocument $a_old_domdoc, $a_old_xml, $a_old_nr)
After page history entry has been created.
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
static _lookupOwner($a_id)
lookup object owner
createPageContentNode($a_set_this_node=true)
Create page content node (always use this method first when adding a new element) ...
setClasses($a_val)
Set classes.
setNode($a_node)
Set node.
modifyPageContentPostXsl($a_html, $a_mode, $a_abstract_only=false)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl