Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00033 require_once "./include/inc.header.php";
00034 require_once "./classes/class.ilObjNote.php";
00035 require_once "./classes/class.ilObjNoteFolder.php";
00036
00037 $myNote = new ilObjNote($_GET["id"], false);
00038 $myNoteFolder = new ilObjNoteFolder($ilias->account->getId());
00039
00040 if ($_GET["cmd"] == "edit")
00041 {
00042 $myNotes = $myNoteFolder->viewNote($_GET["id"]);
00043
00044 $tpl->setVariable("LOTITLE", $myNote->getTitle());
00045 $tpl->setVariable("NOTETEXT", $myNotes->text);
00046 $tpl->setVariable("LOID", $myNotes->lo_id);
00047 if($myNotes->important =='y') $tpl->setVariable("IMPORTANT_CHECKED", "checked");
00048 if($myNotes->good =='y') $tpl->setVariable("GOOD_CHECKED", "checked");
00049 if($myNotes->bad =='y') $tpl->setVariable("BAD_CHECKED", "checked");
00050 if($myNotes->question =='y') $tpl->setVariable("QUESTION_CHECKED", "checked");
00051 $tpl->setVariable("FORMACTION", "notes.php?cmd=update&id=".$_GET["id"]);
00052 }
00053 else
00054 $tpl->setVariable("FORMACTION", "notes.php?cmd=save");
00055
00056
00057 $tpl->addBlockFile("CONTENT", "content", "tpl.note_new.html");
00058 $tpl->addBlockFile("BUTTONS", "buttons", "tpl.buttons.html");
00059
00060 $tpl->setCurrentBlock("btn_row");
00061 $tpl->parseCurrentBlock();
00062 $tpl->setVariable("TXT_LOID", "Learning Object ID");
00063 $tpl->setVariable("TXT_LOTITLE", "Learning Object Title");
00064 $tpl->setVariable("TXT_NOTETEXT", "Notiztext");
00065 $tpl->setVariable("TXT_SAVE", $lng->txt("save"));
00066
00067 $tpl->parseCurrentBlock();
00068
00069 $tpl->show();
00070
00071 ?>