ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPDNotesGUI Class Reference

Private Notes on PD. More...

+ Collaboration diagram for ilPDNotesGUI:

Public Member Functions

 ilPDNotesGUI ()
 Constructor.
executeCommand ()
 execute command
 displayHeader ()
 display header and locator
 view ()
 changeRelatedObject ()
 change related object
 setTabs ()
 Show subtabs.
 showPrivateNotes ()
 Show private notes.
 showPublicComments ()
 Show public comments.
 getMode ()
 Get current mode.

Data Fields

 $ilias
 $tpl
 $lng
const PUBLIC_COMMENTS = "publiccomments"
const PRIVATE_NOTES = "privatenotes"

Detailed Description

Private Notes on PD.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilPDNotesGUI.php 22215 2009-10-27 09:46:05Z akill

ilPDNotesGUI: ilNoteGUI, ilFeedbackGUI

Definition at line 36 of file class.ilPDNotesGUI.php.

Member Function Documentation

ilPDNotesGUI::changeRelatedObject ( )

change related object

Definition at line 232 of file class.ilPDNotesGUI.php.

References $_POST, and getMode().

{
global $ilUser;
$ilUser->writePref("pd_notes_rel_obj".$this->getMode(), $_POST["rel_obj"]);
$this->ctrl->redirect($this);
}

+ Here is the call graph for this function:

ilPDNotesGUI::displayHeader ( )

display header and locator

Definition at line 100 of file class.ilPDNotesGUI.php.

References ilUtil\getImagePath(), and ilUtil\infoPanel().

Referenced by executeCommand().

{
//$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.gif"),
// $this->lng->txt("personal_desktop"));
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.gif"),
"");
$this->tpl->setTitle($this->lng->txt("personal_desktop"));
// catch feedback message
// display infopanel if something happened
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

& ilPDNotesGUI::executeCommand ( )

execute command

Definition at line 70 of file class.ilPDNotesGUI.php.

References $cmd, displayHeader(), setTabs(), and view().

{
$next_class = $this->ctrl->getNextClass();
switch($next_class)
{
case "ilnotegui":
// scorm2004-start
$this->setTabs();
// scorm2004-end
$this->displayHeader();
$this->view(); // forwardCommand is invoked in view() method
break;
default:
// scorm2004-start
$this->setTabs();
// scorm2004-end
$cmd = $this->ctrl->getCmd("view");
$this->displayHeader();
$this->$cmd();
break;
}
$this->tpl->show(true);
return true;
}

+ Here is the call graph for this function:

ilPDNotesGUI::getMode ( )

Get current mode.

Definition at line 281 of file class.ilPDNotesGUI.php.

References PRIVATE_NOTES, and PUBLIC_COMMENTS.

Referenced by changeRelatedObject(), setTabs(), and view().

{
global $ilUser;
if ($ilUser->getPref("pd_notes_mode") == ilPDNotesGUI::PUBLIC_COMMENTS)
{
}
else
{
}
}

+ Here is the caller graph for this function:

ilPDNotesGUI::ilPDNotesGUI ( )

Constructor.

public

Definition at line 56 of file class.ilPDNotesGUI.php.

References $ilCtrl, $ilias, $lng, and $tpl.

{
global $ilias, $tpl, $lng, $ilCtrl;
// initiate variables
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->ctrl =& $ilCtrl;
}
ilPDNotesGUI::setTabs ( )

Show subtabs.

Definition at line 244 of file class.ilPDNotesGUI.php.

References $ilCtrl, getMode(), PRIVATE_NOTES, and PUBLIC_COMMENTS.

Referenced by executeCommand().

{
global $ilTabs, $ilUser, $ilCtrl;
$ilTabs->addSubTabTarget("private_notes",
$ilCtrl->getLinkTarget($this, "showPrivateNotes"), "", "", "",
$ilTabs->addSubTabTarget("notes_public_comments",
$ilCtrl->getLinkTarget($this, "showPublicComments"), "", "", "",
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPDNotesGUI::showPrivateNotes ( )

Show private notes.

Definition at line 259 of file class.ilPDNotesGUI.php.

References $ilCtrl, and PRIVATE_NOTES.

{
global $ilUser, $ilCtrl;
$ilUser->writePref("pd_notes_mode", ilPDNotesGUI::PRIVATE_NOTES);
$ilCtrl->redirect($this, "");
}
ilPDNotesGUI::showPublicComments ( )

Show public comments.

Definition at line 270 of file class.ilPDNotesGUI.php.

References $ilCtrl, and PUBLIC_COMMENTS.

{
global $ilUser, $ilCtrl;
$ilUser->writePref("pd_notes_mode", ilPDNotesGUI::PUBLIC_COMMENTS);
$ilCtrl->redirect($this, "");
}
ilPDNotesGUI::view ( )

Definition at line 117 of file class.ilPDNotesGUI.php.

References $lng, $type, ilNote\_getRelatedObjectsOfUser(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilNoteGUI\enablePrivateNotes(), getMode(), and PRIVATE_NOTES.

Referenced by executeCommand().

{
global $ilUser, $lng;
//$this->tpl->addBlockFile("ADM_CONTENT", "objects", "tpl.table.html")
include_once("Services/Notes/classes/class.ilNoteGUI.php");
// output related item selection (if more than one)
include_once("Services/Notes/classes/class.ilNote.php");
$first = true;
foreach ($rel_objs as $r)
{
if ($first) // take first one as default
{
$this->current_rel_obj = $r["rep_obj_id"];
}
if ($r["rep_obj_id"] == $ilUser->getPref("pd_notes_rel_obj".$this->getMode()))
{
$this->current_rel_obj = $r["rep_obj_id"];
}
$first = false;
}
if ($this->current_rel_obj > 0)
{
$notes_gui = new ilNoteGUI($this->current_rel_obj, 0,
ilObject::_lookupType($this->current_rel_obj),true);
}
else
{
$notes_gui = new ilNoteGUI(0, $ilUser->getId(), "pd");
}
{
$notes_gui->enablePrivateNotes(true);
$notes_gui->enablePublicNotes(false);
}
else
{
$notes_gui->enablePrivateNotes(false);
$notes_gui->enablePublicNotes(true);
}
$notes_gui->enableHiding(false);
$notes_gui->enableTargets(true);
$notes_gui->enableMultiSelection(true);
$notes_gui->enableAnchorJump(false);
$next_class = $this->ctrl->getNextClass($this);
if ($next_class == "ilnotegui")
{
$html = $this->ctrl->forwardCommand($notes_gui);
}
else
{
$html = $notes_gui->getNotesHTML();
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.pd_notes.html", "Services/Notes");
if (count($rel_objs) > 1 ||
($rel_objs[0]["rep_obj_id"] > 0))
{
// prepend personal dektop, if first object
if ($rel_objs[0]["rep_obj_id"] > 0 && $this->getMode() == ilPDNotesGUI::PRIVATE_NOTES)
{
$rel_objs = array_merge(array(0), $rel_objs);
}
foreach($rel_objs as $obj)
{
$this->tpl->setCurrentBlock("related_option");
$this->tpl->setVariable("VAL_RELATED",
$obj["rep_obj_id"]);
//echo "-".$obj["rep_obj_id"]."-".$obj["obj_type"]."-";
if ($obj["rep_obj_id"] > 0)
{
$type = ilObject::_lookupType($obj["rep_obj_id"]);
$type_str = (in_array($type, array("lm", "htlm", "sahs", "dbk")))
? $lng->txt("learning_resource")
: $lng->txt("obj_".$type);
$this->tpl->setVariable("TXT_RELATED", $type_str.": ".
ilObject::_lookupTitle($obj["rep_obj_id"]));
}
else
{
$this->tpl->setVariable("TXT_RELATED",
$lng->txt("personal_desktop"));
}
if ($obj["rep_obj_id"] == $this->current_rel_obj)
{
$this->tpl->setVariable("SEL", 'selected="selected"');
}
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("related_selection");
$this->tpl->setVariable("TXT_CHANGE", $lng->txt("change"));
$this->tpl->setVariable("TXT_RELATED_TO", $lng->txt("related_to"));
$this->tpl->setVariable("TXT_FILTER", $lng->txt("filter"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("adm_content");
// output notes
$this->tpl->setVariable("NOTES", $html);
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilPDNotesGUI::$ilias

Definition at line 44 of file class.ilPDNotesGUI.php.

Referenced by ilPDNotesGUI().

ilPDNotesGUI::$lng

Definition at line 46 of file class.ilPDNotesGUI.php.

Referenced by ilPDNotesGUI(), and view().

ilPDNotesGUI::$tpl

Definition at line 45 of file class.ilPDNotesGUI.php.

Referenced by ilPDNotesGUI().

const ilPDNotesGUI::PRIVATE_NOTES = "privatenotes"
const ilPDNotesGUI::PUBLIC_COMMENTS = "publiccomments"

Definition at line 48 of file class.ilPDNotesGUI.php.

Referenced by getMode(), setTabs(), and showPublicComments().


The documentation for this class was generated from the following file: