Inheritance diagram for ilObjNote:
Collaboration diagram for ilObjNote:Public Member Functions | |
| ilObjNote ($a_id=0, $a_call_by_reference=false) | |
| Constructor public. | |
| viewObject ($a_note_id) | |
| get content of note | |
| createObject ($lo_title, $note_text) | |
| create a note object (entry) in object_data | |
| saveNote ($obj_id, $ref_lo, $lo_title, $text, $rate) | |
| save note object | |
| updateNote ($obj_id, $note_text, $rate) | |
| edit () | |
| owner () | |
Data Fields | |
| $ilias | |
Definition at line 39 of file class.ilObjNote.php.
| ilObjNote::createObject | ( | $ | lo_title, | |
| $ | note_text | |||
| ) |
create a note object (entry) in object_data
| string | title of learning object, i.e | |
| string | short description of note |
Definition at line 81 of file class.ilObjNote.php.
References $rbacadmin, $rbacsystem, ilObject::create(), ilObject::getId(), ilObject::setDescription(), ilObject::setTitle(), and ilObject::setType().
{
global $rbacadmin, $rbacsystem; // not used (see below)
$this->setType("note");
$this->setTitle($lo_title);
$this->setDescription($note_text);
parent::create();
$note_id = $this->getId();
return $note_id;
}
Here is the call graph for this function:| ilObjNote::edit | ( | ) |
Definition at line 127 of file class.ilObjNote.php.
{
}
| ilObjNote::ilObjNote | ( | $ | a_id = 0, |
|
| $ | a_call_by_reference = false | |||
| ) |
Constructor public.
| integer | reference_id or object_id | |
| boolean | treat the id as reference_id (true) or object_id (false) |
Definition at line 49 of file class.ilObjNote.php.
References $ilias, and ilObject::ilObject().
{
global $ilias;
$this->ilias =& $ilias;
$this->type = "note";
$this->ilObject($a_id,$a_call_by_reference);
}
Here is the call graph for this function:| ilObjNote::owner | ( | ) |
Definition at line 131 of file class.ilObjNote.php.
{
}
| ilObjNote::saveNote | ( | $ | obj_id, | |
| $ | ref_lo, | |||
| $ | lo_title, | |||
| $ | text, | |||
| $ | rate | |||
| ) |
save note object
| integer | id of note object | |
| integer | id of referenced LO | |
| string | text public |
Definition at line 102 of file class.ilObjNote.php.
References ilObject::$create_date, $query, and $res.
{
$create_date = date("Y-m-d G:i:s");
$query = "INSERT INTO note_data (note_id, lo_id, text, create_date, important, good, question, bad)".
" VALUES ('".$obj_id."','".$ref_lo."','".$text."','".$create_date."','".$rate["important"]."','".$rate["good"]."','".$rate["question"]."','".$rate["bad"]."')";
$res = $this->ilias->db->query($query);
}
| ilObjNote::updateNote | ( | $ | obj_id, | |
| $ | note_text, | |||
| $ | rate | |||
| ) |
Definition at line 112 of file class.ilObjNote.php.
References ilObject::$create_date, $obj_id, $q, ilObject::setDescription(), ilObject::setTitle(), and ilObject::update().
{
$create_date = date("Y-m-d G:i:s"); // not used
//update table note_data
$q = "UPDATE note_data SET text='".$note_text."', question='".$rate["question"]."', ".
"important='".$rate["important"]."', good='".$rate["good"]."', ".
"bad='".$rate["bad"]."' WHERE note_id='".$obj_id."'";
$this->ilias->db->query($q);
//update table object_data
$this->setTitle($note_text);
$this->setDescription($note_text);
$this->update();
}
Here is the call graph for this function:| ilObjNote::viewObject | ( | $ | a_note_id | ) |
get content of note
| integer | a_note_id |
Definition at line 65 of file class.ilObjNote.php.
| ilObjNote::$ilias |
Reimplemented from ilObject.
Definition at line 41 of file class.ilObjNote.php.
Referenced by ilObjNote().
1.7.1