6 include_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();
76 $lng = $DIC->language();
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,
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_resource")
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->addInputItem($rel);
271 $ilToolbar->addFormButton(
$lng->txt(
"change"),
"changeRelatedObject");
274 $this->tpl->setContent(
$html);
285 $this->ctrl->redirect($this);
301 $ilCtrl->getLinkTarget($this,
"showPrivateNotes"),
311 "notes_public_comments",
312 $ilCtrl->getLinkTarget($this,
"showPublicComments"),
343 $ilCtrl->redirect($this,
"showPrivateNotes");
executeCommand()
execute command
showPublicComments()
Show public comments.
static _lookupTitle($a_id)
lookup object title
changeRelatedObject()
change related object
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
__construct()
Constructor.
static infoPanel($a_keep=true)
static _getRelatedObjectsOfUser($a_mode)
get all related objects for user
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
displayHeader()
display header and locator
getMode()
Get current mode.
enablePrivateNotes($a_enable=true)
enable private notes
showPrivateNotes()
Show private notes.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options