6include_once(
"Services/Notes/classes/class.ilNote.php");
 
   41                $ilHelp->setScreenIdComponent(
"note");
 
   43                $lng->loadLanguageModule(
"notes");
 
   55                        $ilUser->writePref(
"pd_notes_mode", $mode);
 
   56                        $ilUser->writePref(
"pd_notes_rel_obj".$mode, 
$_GET[
"rel_obj"]);
 
   59                else if($_REQUEST[
"note_id"])
 
   61                        $note = 
new ilNote($_REQUEST[
"note_id"]);
 
   62                        $mode = ($note->getType() == 
IL_NOTE_PRIVATE) ? self::PRIVATE_NOTES : self::PUBLIC_COMMENTS;
 
   63                        $obj = $note->getObject();
 
   64                        $ilUser->writePref(
"pd_notes_mode", $mode);
 
   65                        $ilUser->writePref(
"pd_notes_rel_obj".$mode, $obj[
"rep_obj_id"]);
 
   74                $next_class = $this->ctrl->getNextClass();
 
   89                                $cmd = $this->ctrl->getCmd(
"view");
 
   94                $this->tpl->show(
true);
 
  105                $t = $this->lng->txt(
"notes");
 
  106                if (!$this->
ilias->getSetting(
"disable_notes") && !$ilSetting->get(
"disable_comments"))
 
  108                        $t = $this->lng->txt(
"notes_and_comments");
 
  110                if ($this->
ilias->getSetting(
"disable_notes"))
 
  112                        $t = $this->lng->txt(
"notes_comments");
 
  115                $this->tpl->setTitle(
$t);
 
  131                include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
 
  134                include_once(
"Services/Notes/classes/class.ilNote.php");
 
  142                        $rel_objs = array_merge(array(0), $rel_objs);
 
  148                        $lng->loadLanguageModule(
"notes");
 
  154                foreach ($rel_objs as 
$r)
 
  158                                $this->current_rel_obj = 
$r[
"rep_obj_id"];                              
 
  159                                $current_ref_ids = 
$r[
"ref_ids"];                               
 
  161                        if (
$r[
"rep_obj_id"] == 
$ilUser->getPref(
"pd_notes_rel_obj".$this->getMode()))
 
  163                                $this->current_rel_obj = 
$r[
"rep_obj_id"];
 
  164                                $current_ref_ids = 
$r[
"ref_ids"];               
 
  168                if ($this->current_rel_obj > 0)
 
  170                        $notes_gui = 
new ilNoteGUI($this->current_rel_obj, 0,
 
  180                        $notes_gui->enablePrivateNotes(
true);
 
  181                        $notes_gui->enablePublicNotes(
false);
 
  185                        $notes_gui->enablePrivateNotes(
false);
 
  186                        $notes_gui->enablePublicNotes(
true);
 
  189                        if ($this->current_rel_obj > 0 && 
 
  190                                sizeof($current_ref_ids) &&
 
  193                                foreach($current_ref_ids as 
$ref_id)
 
  195                                        if($ilAccess->checkAccess(
"write", 
"", 
$ref_id))
 
  197                                                $notes_gui->enablePublicNotesDeletion(
true);
 
  203                $notes_gui->enableHiding(
false);
 
  204                $notes_gui->enableTargets(
true);
 
  205                $notes_gui->enableMultiSelection(
true);
 
  206                $notes_gui->enableAnchorJump(
false);
 
  208                $next_class = $this->ctrl->getNextClass($this);
 
  210                if ($next_class == 
"ilnotegui")
 
  212                        $html = $this->ctrl->forwardCommand($notes_gui);
 
  218                                $html = $notes_gui->getOnlyNotesHTML();
 
  222                                $html = $notes_gui->getOnlyCommentsHTML();
 
  226                if (count($rel_objs) > 1 ||
 
  227                        ($rel_objs[0][
"rep_obj_id"] > 0))
 
  229                        $ilToolbar->setFormAction($this->ctrl->getFormAction($this));
 
  231                        foreach($rel_objs as $obj)
 
  233                                if ($obj[
"rep_obj_id"] > 0)
 
  236                                        $type_str = (in_array($type, array(
"lm", 
"htlm", 
"sahs")))
 
  237                                                ? 
$lng->txt(
"learning_resource")
 
  238                                                : 
$lng->txt(
"obj_".$type);
 
  243                                        $caption = 
$lng->txt(
"personal_desktop");
 
  246                                $options[$obj[
"rep_obj_id"]] = $caption;                                
 
  249                        include_once 
"Services/Form/classes/class.ilSelectInputGUI.php";
 
  252                        $rel->setValue($this->current_rel_obj);                 
 
  253                        $ilToolbar->addInputItem($rel);
 
  255                        $ilToolbar->addFormButton(
$lng->txt(
"change"), 
"changeRelatedObject");                  
 
  258                $this->tpl->setContent(
$html);  
 
  269                $this->ctrl->redirect($this);
 
  282                        $ilTabs->addTarget(
"private_notes",
 
  283                                $ilCtrl->getLinkTarget($this, 
"showPrivateNotes"), 
"", 
"", 
"",
 
  289                        $ilTabs->addTarget(
"notes_public_comments",
 
  290                                $ilCtrl->getLinkTarget($this, 
"showPublicComments"), 
"", 
"", 
"",
 
  315                        $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)
redirection script todo: (a better solution should control the processing via a xml file)
if(!is_array($argv)) $options