ILIAS  Release_3_10_x_branch Revision 61812
 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

Data Fields

 $ilias
 $tpl
 $lng

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 16740 2008-05-31 08:46:48Z akill

ilPDNotesGUI: ilNoteGUI, ilFeedbackGUI

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

Member Function Documentation

ilPDNotesGUI::changeRelatedObject ( )

change related object

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

{
$this->ctrl->setParameter($this, "rel_obj", $_POST["rel_obj"]);
$this->ctrl->redirect($this);
}
ilPDNotesGUI::displayHeader ( )

display header and locator

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

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

Referenced by executeCommand().

{
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.gif"),
$this->lng->txt("personal_desktop"));
$this->tpl->setTitle($this->lng->txt("personal_desktop"));
// set locator
/*
$this->tpl->setVariable("TXT_LOCATOR", $this->lng->txt("locator"));
$this->tpl->touchBlock("locator_separator");
$this->tpl->touchBlock("locator_item");
//$this->tpl->setCurrentBlock("locator_item");
//$this->tpl->setVariable("ITEM", $this->lng->txt("personal_desktop"));
//$this->tpl->setVariable("LINK_ITEM",
// $this->ctrl->getLinkTargetByClass("ilpersonaldesktopgui"));
//$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("locator_item");
$this->tpl->setVariable("ITEM", $this->lng->txt("private_notes"));
$this->tpl->setVariable("LINK_ITEM",
$this->ctrl->getLinkTargetByClass("ilpdnotesgui"));
$this->tpl->parseCurrentBlock();
*/
// 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 69 of file class.ilPDNotesGUI.php.

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

{
$next_class = $this->ctrl->getNextClass();
switch($next_class)
{
case "ilnotegui":
$this->displayHeader();
$this->view(); // forwardCommand is invoked in view() method
break;
default:
$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::ilPDNotesGUI ( )

Constructor.

public

Definition at line 53 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;
$this->ctrl->saveParameter($this, "rel_obj");
}
ilPDNotesGUI::view ( )

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

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

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");
if ($_GET["rel_obj"] > 0)
{
$notes_gui = new ilNoteGUI($_GET["rel_obj"], 0,
ilObject::_lookupType($_GET["rel_obj"]),true);
}
else
{
$notes_gui = new ilNoteGUI(0, $ilUser->getId(), "pd");
}
$notes_gui->enablePrivateNotes();
$notes_gui->enablePublicNotes(false);
$notes_gui->enableHiding(false);
$notes_gui->enableTargets(true);
$notes_gui->enableMultiSelection(true);
$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)
{
$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"] == $_GET["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("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().


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