Go to the source code of this file.
Enumerations |
| enum | NOTES_STATE_DRAFT |
| enum | NOTES_STATE_PUBLIC |
| enum | NOTES_STATE_SITE |
| enum | NOTES_SHOW_FULL |
| enum | NOTES_SHOW_HEAD |
| enum | NOTES_SHOW_BODY |
| enum | NOTES_SHOW_FOOT |
Functions |
| | note_list ($courseid=0, $userid=0, $state= '', $author=0, $order='lastmodified DESC', $limitfrom=0, $limitnum=0) |
| | note_load ($note_id) |
| | note_save (&$note) |
| | note_delete ($noteid) |
| | note_get_state_name ($state) |
| | note_get_state_names () |
| | note_print ($note, $detail=NOTES_SHOW_FULL) |
| | note_print_list ($notes, $detail=NOTES_SHOW_FULL) |
| | note_print_notes ($header, $addcourseid=0, $viewnotes=true, $courseid=0, $userid=0, $state= '', $author=0) |
| | note_delete_all ($courseid) |
| | note_page_type_list ($pagetype, $parentcontext, $currentcontext) |
Enumeration Type Documentation
Constants for note parts (flags used by note_print and note_print_list).
Definition at line 17 of file lib.php.
Library of functions and constants for notes Constants for states.
Definition at line 10 of file lib.php.
Function Documentation
Deletes a note object based on its id.
- Parameters:
-
| int | $note_id | id of the note to delete |
- Returns:
- boolean true if the object was deleted; false otherwise
Definition at line 118 of file lib.php.
Delete all notes about users in course-
- Parameters:
-
- Returns:
- bool success
Definition at line 275 of file lib.php.
Converts a state value to its corespondent name
- Parameters:
-
| string | $state | state value to convert |
- Returns:
- string corespondent state name
Definition at line 130 of file lib.php.
Returns an array of mappings from state values to state names
- Returns:
- array of mappings
Definition at line 148 of file lib.php.
| note_list |
( |
$ |
courseid = 0, |
|
|
$ |
userid = 0, |
|
|
$ |
state = '', |
|
|
$ |
author = 0, |
|
|
$ |
order = 'lastmodified DESC', |
|
|
$ |
limitfrom = 0, |
|
|
$ |
limitnum = 0 |
|
) |
| |
Retrieves a list of note objects with specific atributes.
- Parameters:
-
| int | $courseid | id of the course in which the notes were posted (0 means any) |
| int | $userid | id of the user to which the notes refer (0 means any) |
| string | $state | state of the notes (i.e. draft, public, site) ('' means any) |
| int | $author | id of the user who modified the note last time (0 means any) |
| string | $order | an order to sort the results in |
| int | $limitfrom | number of records to skip (offset) |
| int | $limitnum | number of records to fetch |
- Returns:
- array of note objects
Definition at line 34 of file lib.php.
Retrieves a note object based on its id.
- Parameters:
-
| int | $note_id | id of the note to retrieve |
- Returns:
- note object
Definition at line 71 of file lib.php.
Return a list of page types
- Parameters:
-
| string | $pagetype | current page type |
| stdClass | $parentcontext | Block's parent context |
| stdClass | $currentcontext | Current context of block |
Definition at line 287 of file lib.php.
Prints a note object
- Parameters:
-
| note | $note | the note object to print |
| int | $detail | OR-ed NOTES_SHOW_xyz flags that specify which note parts to print |
Definition at line 162 of file lib.php.
Prints a list of note objects
- Parameters:
-
| array | $notes | array of note objects to print |
| int | $detail | OR-ed NOTES_SHOW_xyz flags that specify which note parts to print |
Start printing of the note
Definition at line 222 of file lib.php.
| note_print_notes |
( |
$ |
header, |
|
|
$ |
addcourseid = 0, |
|
|
$ |
viewnotes = true, |
|
|
$ |
courseid = 0, |
|
|
$ |
userid = 0, |
|
|
$ |
state = '', |
|
|
$ |
author = 0 |
|
) |
| |
Retrieves and prints a list of note objects with specific atributes.
- Parameters:
-
| string | $header | HTML to print above the list |
| int | $addcourseid | id of the course for the add notes link (0 hide link) |
| boolean | $viewnotes | true if the notes should be printed; false otherwise (print notesnotvisible string) |
| int | $courseid | id of the course in which the notes were posted (0 means any) |
| int | $userid | id of the user to which the notes refer (0 means any) |
| string | $state | state of the notes (i.e. draft, public, site) ('' means any) |
| int | $author | id of the user who modified the note last time (0 means any) |
Definition at line 243 of file lib.php.
Saves a note object. The note object is passed by reference and its fields (i.e. id) might change during the save.
- Parameters:
-
- Returns:
- boolean true if the object was saved; false otherwise
Definition at line 85 of file lib.php.