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");
173 return array(
"ed_insert_learning_history",
"pc_learning_history");
185 $ilPluginAdmin = $this->plugin_admin;
187 $start = strpos($a_html,
"{{{{{LearningHistory");
194 $param = str_replace(
' xmlns:xhtml="http://www.w3.org/1999/xhtml"',
"", $param);
195 $param = explode(
"#", $param);
198 $classes = explode(
";", $param[3]);
199 $classes = array_map(
function (
$i) {
204 $a_html = substr($a_html, 0,
$start) .
206 substr($a_html,
$end + 5);
208 if (strlen($a_html) >
$start + 5) {
209 $start = strpos($a_html,
"{{{{{LearningHistory",
$start + 5);
234 if ($a_mode ==
"preview" || $a_mode ==
"presentation" || $a_mode ==
"print") {
235 if ($this->
getPage()->getParentType() ==
"prtf") {
240 $tpl =
new ilTemplate(
"tpl.pc_lhist.html",
true,
true,
"Services/LearningHistory");
242 $hist_gui->setUserId($user_id);
243 $from_unix = (
$from !=
"")
246 $to_unix = ($to !=
"")
249 $classes = (is_array($classes))
250 ? array_filter($classes,
function (
$i) {
254 if (count($classes) == 0) {
257 $tpl->setVariable(
"LHIST", $hist_gui->getEmbeddedHtml($from_unix, $to_unix, $classes, $a_mode));
261 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.
Learning history main GUI class.
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.
special template class to simplify handling of ITX/PEAR
modifyPageContentPostXsl($a_html, $a_mode)
Modify page content after xsl.
static _lookupOwner($a_id)
lookup object owner
insertContent(&$a_cont_obj, $a_pos, $a_mode=IL_INSERT_AFTER, $a_pcid="")
insert a content node before/after a sibling or as first child of a parent
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.