6 include_once(
"Services/Notes/classes/class.ilNote.php");
 
   41                 $ilHelp->setScreenIdComponent(
"note");
 
   53                         $ilUser->writePref(
"pd_notes_mode", $mode);
 
   54                         $ilUser->writePref(
"pd_notes_rel_obj".$mode, 
$_GET[
"rel_obj"]);
 
   60                         $mode = ($note->getType() == 
IL_NOTE_PRIVATE) ? self::PRIVATE_NOTES : self::PUBLIC_COMMENTS;
 
   61                         $obj = $note->getObject();
 
   62                         $ilUser->writePref(
"pd_notes_mode", $mode);
 
   63                         $ilUser->writePref(
"pd_notes_rel_obj".$mode, $obj[
"rep_obj_id"]);
 
   72                 $next_class = $this->ctrl->getNextClass();
 
   88                                 $cmd = $this->ctrl->getCmd(
"view");
 
   93                 $this->tpl->show(
true);
 
  106                 $this->tpl->setTitle($this->lng->txt(
"notes"));
 
  122                 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
 
  125                 include_once(
"Services/Notes/classes/class.ilNote.php");
 
  133                         $rel_objs = array_merge(array(0), $rel_objs);
 
  139                         $lng->loadLanguageModule(
"notes");
 
  145                 foreach ($rel_objs as $r)
 
  149                                 $this->current_rel_obj = $r[
"rep_obj_id"];
 
  151                         if ($r[
"rep_obj_id"] == $ilUser->getPref(
"pd_notes_rel_obj".$this->getMode()))
 
  153                                 $this->current_rel_obj = $r[
"rep_obj_id"];
 
  157                 if ($this->current_rel_obj > 0)
 
  159                         $notes_gui = 
new ilNoteGUI($this->current_rel_obj, 0,
 
  164                         $notes_gui = 
new ilNoteGUI(0, $ilUser->getId(), 
"pd");
 
  170                         $notes_gui->enablePublicNotes(
false);
 
  174                         $notes_gui->enablePrivateNotes(
false);
 
  175                         $notes_gui->enablePublicNotes(
true);
 
  177                 $notes_gui->enableHiding(
false);
 
  178                 $notes_gui->enableTargets(
true);
 
  179                 $notes_gui->enableMultiSelection(
true);
 
  180                 $notes_gui->enableAnchorJump(
false);
 
  182                 $next_class = $this->ctrl->getNextClass($this);
 
  184                 if ($next_class == 
"ilnotegui")
 
  186                         $html = $this->ctrl->forwardCommand($notes_gui);
 
  190                         $html = $notes_gui->getNotesHTML();
 
  193                 $this->tpl->addBlockFile(
"ADM_CONTENT", 
"adm_content", 
"tpl.pd_notes.html", 
"Services/Notes");
 
  195                 if (count($rel_objs) > 1 ||
 
  196                         ($rel_objs[0][
"rep_obj_id"] > 0))
 
  198                         foreach($rel_objs as $obj)
 
  200                                 $this->tpl->setCurrentBlock(
"related_option");
 
  201                                 $this->tpl->setVariable(
"VAL_RELATED",
 
  204                                 if ($obj[
"rep_obj_id"] > 0)
 
  207                                         $type_str = (in_array($type, array(
"lm", 
"htlm", 
"sahs", 
"dbk")))
 
  208                                                 ? $lng->txt(
"learning_resource")
 
  209                                                 : $lng->txt(
"obj_".$type);
 
  210                                         $this->tpl->setVariable(
"TXT_RELATED", $type_str.
": ".
 
  215                                         $this->tpl->setVariable(
"TXT_RELATED",
 
  216                                                 $lng->txt(
"personal_desktop"));
 
  218                                 if ($obj[
"rep_obj_id"] == $this->current_rel_obj)
 
  220                                         $this->tpl->setVariable(
"SEL", 
'selected="selected"');
 
  222                                 $this->tpl->parseCurrentBlock();
 
  225                         $this->tpl->setCurrentBlock(
"related_selection");
 
  226                         $this->tpl->setVariable(
"TXT_CHANGE", $lng->txt(
"change"));
 
  227                         $this->tpl->setVariable(
"TXT_RELATED_TO", $lng->txt(
"related_to"));
 
  228                         $this->tpl->setVariable(
"TXT_FILTER", $lng->txt(
"filter"));
 
  229                         $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
 
  230                         $this->tpl->parseCurrentBlock();
 
  233                 $this->tpl->setCurrentBlock(
"adm_content");
 
  235                 $this->tpl->setVariable(
"NOTES", $html);
 
  236                 $this->tpl->parseCurrentBlock();
 
  247                 $ilUser->writePref(
"pd_notes_rel_obj".$this->
getMode(), 
$_POST[
"rel_obj"]);                             
 
  248                 $this->ctrl->redirect($this);
 
  259                 $ilTabs->addTarget(
"private_notes",
 
  260                         $ilCtrl->getLinkTarget($this, 
"showPrivateNotes"), 
"", 
"", 
"",
 
  262                 if(!$ilSetting->get(
"disable_comments"))
 
  264                         $ilTabs->addTarget(
"notes_public_comments",
 
  265                                 $ilCtrl->getLinkTarget($this, 
"showPublicComments"), 
"", 
"", 
"",
 
  278                 $ilCtrl->redirect($this, 
"");
 
  288                 if($ilSetting->get(
"disable_comments"))
 
  290                         $ilCtrl->redirect($this, 
"showPrivateNotes");
 
  294                 $ilCtrl->redirect($this, 
"");
 
  305                         !$ilSetting->get(
"disable_comments"))