/** * Get html for public and/or private notes * * @param bool $a_content_object * @param bool $a_enable_private_notes * @param bool $a_enable_public_notes * @param bool $a_enable_notes_deletion * @return string */ function getNotesHTML($a_content_object = null, $a_enable_private_notes = true, $a_enable_public_notes = false, $a_enable_notes_deletion = false, $a_callback = null) { global $ilCtrl; include_once "Services/Notes/classes/class.ilNoteGUI.php"; // scorm 2004 page gui if (!$a_content_object) { $notes_gui = new ilNoteGUI($this->notes_parent_id, (int) $this->obj->getId(), "pg"); $a_enable_private_notes = true; $a_enable_public_notes = true; $a_enable_notes_deletion = false; } else { $notes_gui = new ilNoteGUI($a_content_object->getParentId(), $a_content_object->getId(), $a_content_object->getParentType()); } if ($a_enable_private_notes) { $notes_gui->enablePrivateNotes(); } if ($a_enable_public_notes) { $notes_gui->enablePublicNotes(); if ((bool) $a_enable_notes_deletion) { $notes_gui->enablePublicNotesDeletion(true); } } if ($a_callback) { $notes_gui->addObserver($a_callback); } $next_class = $this->ctrl->getNextClass($this); if ($next_class == "ilnotegui") { $html = $this->ctrl->forwardCommand($notes_gui); } else { $html = $notes_gui->getNotesHTML(); } return $html; }