| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Source view] [Print] [Project Stats]
Library of functions and constants for notes
| File Size: | 265 lines (9 kb) |
| Included or required: | 4 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| note_list($courseid=0, $userid=0, $state = '', $author = 0, $order='lastmodified DESC', $limitfrom=0, $limitnum=0) X-Ref |
| Retrieves a list of note objects with specific atributes. param: int $courseid id of the course in which the notes were posted (0 means any) param: int $userid id of the user to which the notes refer (0 means any) param: string $state state of the notes (i.e. draft, public, site) ('' means any) param: int $author id of the user who modified the note last time (0 means any) param: string $order an order to sort the results in param: int $limitfrom number of records to skip (offset) param: int $limitnum number of records to fetch return: array of note objects |
| note_load($note_id) X-Ref |
| Retrieves a note object based on its id. param: int $note_id id of the note to retrieve return: note object |
| note_save(&$note) X-Ref |
| Saves a note object. The note object is passed by reference and its fields (i.e. id) might change during the save. param: note $note object to save return: boolean true if the object was saved; false otherwise |
| note_delete($noteid) X-Ref |
| Deletes a note object based on its id. param: int $note_id id of the note to delete return: boolean true if the object was deleted; false otherwise |
| note_get_state_name($state) X-Ref |
| Converts a state value to its corespondent name param: string $state state value to convert return: string corespondent state name |
| note_get_state_names() X-Ref |
| Returns an array of mappings from state values to state names return: array of mappings |
| note_print($note, $detail = NOTES_SHOW_FULL) X-Ref |
| Prints a note object param: note $note the note object to print param: int $detail OR-ed NOTES_SHOW_xyz flags that specify which note parts to print |
| note_print_list($notes, $detail = NOTES_SHOW_FULL) X-Ref |
| Prints a list of note objects param: array $notes array of note objects to print param: int $detail OR-ed NOTES_SHOW_xyz flags that specify which note parts to print |
| note_print_notes($header, $addcourseid = 0, $viewnotes = true, $courseid = 0, $userid = 0, $state = '', $author = 0) X-Ref |
| Retrieves and prints a list of note objects with specific atributes. param: string $header HTML to print above the list param: int $addcourseid id of the course for the add notes link (0 hide link) param: boolean $viewnotes true if the notes should be printed; false otherwise (print notesnotvisible string) param: int $courseid id of the course in which the notes were posted (0 means any) param: int $userid id of the user to which the notes refer (0 means any) param: string $state state of the notes (i.e. draft, public, site) ('' means any) param: int $author id of the user who modified the note last time (0 means any) |
| note_delete_all($courseid) X-Ref |
| Delete all notes about users in course- param: int $courseid return: bool success |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |