6include_once(
"Services/Notes/classes/class.ilNote.php");
 
   69        $this->
user = $DIC->user();
 
   70        $this->tabs = 
$DIC->tabs();
 
   71        $this->help = 
$DIC[
"ilHelp"];
 
   73        $this->access = 
$DIC->access();
 
   74        $this->toolbar = 
$DIC->toolbar();
 
   79        $ilTabs = 
$DIC->tabs();
 
   80        $ilHelp = 
$DIC[
"ilHelp"];
 
   82        $ilHelp->setScreenIdComponent(
"note");
 
   84        $lng->loadLanguageModule(
"notes");
 
   92        if (
$_GET[
"rel_obj"]) {
 
   94            $ilUser->writePref(
"pd_notes_mode", $mode);
 
   95            $ilUser->writePref(
"pd_notes_rel_obj" . $mode, 
$_GET[
"rel_obj"]);
 
   98        elseif ($_REQUEST[
"note_id"]) {
 
   99            $note = 
new ilNote($_REQUEST[
"note_id"]);
 
  100            $mode = ($note->getType() == 
IL_NOTE_PRIVATE) ? self::PRIVATE_NOTES : self::PUBLIC_COMMENTS;
 
  101            $obj = $note->getObject();
 
  102            $ilUser->writePref(
"pd_notes_mode", $mode);
 
  103            $ilUser->writePref(
"pd_notes_rel_obj" . $mode, $obj[
"rep_obj_id"]);
 
  112        $next_class = $this->ctrl->getNextClass();
 
  113        switch ($next_class) {
 
  126                $cmd = $this->ctrl->getCmd(
"view");
 
  131        $this->tpl->show(
true);
 
  142        $t = $this->lng->txt(
"notes");
 
  144            $t = $this->lng->txt(
"notes_and_comments");
 
  147            $t = $this->lng->txt(
"notes_comments");
 
  150        $this->tpl->setTitle(
$t);
 
  169        include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
 
  172        include_once(
"Services/Notes/classes/class.ilNote.php");
 
  178            $rel_objs = array_merge(array(0), $rel_objs);
 
  183            $lng->loadLanguageModule(
"notes");
 
  189        foreach ($rel_objs as 
$r) {
 
  191                $this->current_rel_obj = 
$r[
"rep_obj_id"];
 
  192                $current_ref_ids = 
$r[
"ref_ids"];
 
  194            if (
$r[
"rep_obj_id"] == 
$ilUser->getPref(
"pd_notes_rel_obj" . $this->getMode())) {
 
  195                $this->current_rel_obj = 
$r[
"rep_obj_id"];
 
  196                $current_ref_ids = 
$r[
"ref_ids"];
 
  200        if ($this->current_rel_obj > 0) {
 
  202                $this->current_rel_obj,
 
  212            $notes_gui->enablePrivateNotes(
true);
 
  213            $notes_gui->enablePublicNotes(
false);
 
  215            $notes_gui->enablePrivateNotes(
false);
 
  216            $notes_gui->enablePublicNotes(
true);
 
  219            if ($this->current_rel_obj > 0 &&
 
  220                sizeof($current_ref_ids) &&
 
  222                foreach ($current_ref_ids as $ref_id) {
 
  223                    if ($ilAccess->checkAccess(
"write", 
"", $ref_id)) {
 
  224                        $notes_gui->enablePublicNotesDeletion(
true);
 
  230        $notes_gui->enableHiding(
false);
 
  231        $notes_gui->enableTargets(
true);
 
  232        $notes_gui->enableMultiSelection(
true);
 
  233        $notes_gui->enableAnchorJump(
false);
 
  235        $next_class = $this->ctrl->getNextClass($this);
 
  237        if ($next_class == 
"ilnotegui") {
 
  238            $html = $this->ctrl->forwardCommand($notes_gui);
 
  241                $html = $notes_gui->getOnlyNotesHTML();
 
  243                $html = $notes_gui->getOnlyCommentsHTML();
 
  247        if (count($rel_objs) > 1 ||
 
  248            ($rel_objs[0][
"rep_obj_id"] > 0)) {
 
  249            $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
 
  251            foreach ($rel_objs as $obj) {
 
  252                if ($obj[
"rep_obj_id"] > 0) {
 
  254                    $type_str = (in_array(
$type, array(
"lm", 
"htlm", 
"sahs")))
 
  255                        ? 
$lng->txt(
"learning_module")
 
  259                    $caption = 
$lng->txt(
"personal_desktop");
 
  262                $options[$obj[
"rep_obj_id"]] = $caption;
 
  265            include_once 
"Services/Form/classes/class.ilSelectInputGUI.php";
 
  268            $rel->setValue($this->current_rel_obj);
 
  269            $ilToolbar->addStickyItem($rel);
 
  272            $btn->setCaption(
'change');
 
  273            $btn->setCommand(
'changeRelatedObject');
 
  274            $ilToolbar->addStickyItem($btn);
 
  277        $this->tpl->setContent(
$html);
 
  288        $this->ctrl->redirect($this);
 
  304                $ilCtrl->getLinkTarget($this, 
"showPrivateNotes"),
 
  314                "notes_public_comments",
 
  315                $ilCtrl->getLinkTarget($this, 
"showPublicComments"),
 
  346            $ilCtrl->redirect($this, 
"showPrivateNotes");
 
An exception for terminatinating execution or to throw for unit testing.
static _getRelatedObjectsOfUser($a_mode)
get all related objects for user
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
displayHeader()
display header and locator
__construct()
Constructor.
showPrivateNotes()
Show private notes.
executeCommand()
execute command
changeRelatedObject()
change related object
showPublicComments()
Show public comments.
getMode()
Get current mode.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static infoPanel($a_keep=true)