72 $next_class = $this->ctrl->getNextClass();
88 $cmd = $this->ctrl->getCmd(
"view");
93 $this->tpl->show(
true);
106 $this->tpl->setTitle($this->lng->txt(
"personal_desktop"));
119 global $ilUser,
$lng;
122 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
125 include_once(
"Services/Notes/classes/class.ilNote.php");
128 foreach ($rel_objs as $r)
132 $this->current_rel_obj = $r[
"rep_obj_id"];
134 if ($r[
"rep_obj_id"] == $ilUser->getPref(
"pd_notes_rel_obj".$this->getMode()))
136 $this->current_rel_obj = $r[
"rep_obj_id"];
140 if ($this->current_rel_obj > 0)
142 $notes_gui =
new ilNoteGUI($this->current_rel_obj, 0,
147 $notes_gui =
new ilNoteGUI(0, $ilUser->getId(),
"pd");
153 $notes_gui->enablePublicNotes(
false);
157 $notes_gui->enablePrivateNotes(
false);
158 $notes_gui->enablePublicNotes(
true);
160 $notes_gui->enableHiding(
false);
161 $notes_gui->enableTargets(
true);
162 $notes_gui->enableMultiSelection(
true);
163 $notes_gui->enableAnchorJump(
false);
165 $next_class = $this->ctrl->getNextClass($this);
167 if ($next_class ==
"ilnotegui")
169 $html = $this->ctrl->forwardCommand($notes_gui);
173 $html = $notes_gui->getNotesHTML();
176 $this->tpl->addBlockFile(
"ADM_CONTENT",
"adm_content",
"tpl.pd_notes.html",
"Services/Notes");
178 if (count($rel_objs) > 1 ||
179 ($rel_objs[0][
"rep_obj_id"] > 0))
184 $rel_objs = array_merge(array(0), $rel_objs);
187 foreach($rel_objs as $obj)
189 $this->tpl->setCurrentBlock(
"related_option");
190 $this->tpl->setVariable(
"VAL_RELATED",
193 if ($obj[
"rep_obj_id"] > 0)
196 $type_str = (in_array($type, array(
"lm",
"htlm",
"sahs",
"dbk")))
197 ? $lng->txt(
"learning_resource")
198 : $lng->txt(
"obj_".$type);
199 $this->tpl->setVariable(
"TXT_RELATED", $type_str.
": ".
204 $this->tpl->setVariable(
"TXT_RELATED",
205 $lng->txt(
"personal_desktop"));
207 if ($obj[
"rep_obj_id"] == $this->current_rel_obj)
209 $this->tpl->setVariable(
"SEL",
'selected="selected"');
211 $this->tpl->parseCurrentBlock();
214 $this->tpl->setCurrentBlock(
"related_selection");
215 $this->tpl->setVariable(
"TXT_CHANGE", $lng->txt(
"change"));
216 $this->tpl->setVariable(
"TXT_RELATED_TO", $lng->txt(
"related_to"));
217 $this->tpl->setVariable(
"TXT_FILTER", $lng->txt(
"filter"));
218 $this->tpl->setVariable(
"FORMACTION", $this->ctrl->getFormAction($this));
219 $this->tpl->parseCurrentBlock();
222 $this->tpl->setCurrentBlock(
"adm_content");
224 $this->tpl->setVariable(
"NOTES", $html);
225 $this->tpl->parseCurrentBlock();
236 $ilUser->writePref(
"pd_notes_rel_obj".$this->
getMode(),
$_POST[
"rel_obj"]);
237 $this->ctrl->redirect($this);
246 global $ilTabs, $ilUser,
$ilCtrl;
248 $ilTabs->addSubTabTarget(
"private_notes",
249 $ilCtrl->getLinkTarget($this,
"showPrivateNotes"),
"",
"",
"",
251 $ilTabs->addSubTabTarget(
"notes_public_comments",
252 $ilCtrl->getLinkTarget($this,
"showPublicComments"),
"",
"",
"",
264 $ilCtrl->redirect($this,
"");
275 $ilCtrl->redirect($this,
"");