| 
    Moodle APIs
    3.8
    
   Moodle 3.8.6 (Build: 20201109) 
   | 
 
Files | |
| file | externallib.php | 
| External notes API.  | |
| file | lib.php | 
| core_notes data generator.  | |
| file | lib.php | 
| Library of functions and constants for notes.  | |
| file | provider.php | 
| Privacy Subsystem implementation for core_notes.  | |
Namespaces | |
| core_notes\privacy | |
|    | |
Classes | |
| class | core_notes\privacy\provider | 
| Implementation of the privacy subsystem plugin provider for core_notes.  More... | |
| class | core_notes_external | 
| class | core_notes_generator | 
Functions | |
| core_notes_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) | |
| Add nodes to myprofile page.  More... | |
| note_delete ($note) | |
| Deletes a note object based on its id.  More... | |
| note_delete_all ($courseid) | |
| Delete all notes about users in course-.  More... | |
| note_get_state_name ($state) | |
| Converts a state value to its corespondent name.  More... | |
| note_get_state_names () | |
| Returns an array of mappings from state values to state names.  More... | |
| 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.  More... | |
| note_load ($noteid) | |
| Retrieves a note object based on its id.  More... | |
| note_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
| Return a list of page types.  More... | |
| note_print ($note, $detail=NOTES_SHOW_FULL) | |
| Prints a note object.  More... | |
| note_print_list ($notes, $detail=NOTES_SHOW_FULL) | |
| Prints a list of note objects.  More... | |
| 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.  More... | |
| note_save (&$note) | |
| Saves a note object.  More... | |
| note_view ($context, $userid) | |
| Trigger notes viewed event.  More... | |
Variables | |
| global | core_notes\privacy::$CFG | 
| const | NOTES_SHOW_BODY 0x01 | 
| const | NOTES_SHOW_FOOT 0x04 | 
| const | NOTES_SHOW_FULL 0x07 | 
| Constants for note parts (flags used by note_print and note_print_list).  | |
| const | NOTES_SHOW_HEAD 0x02 | 
| const | NOTES_STATE_DRAFT 'draft' | 
| Constants for states.  | |
| const | NOTES_STATE_PUBLIC 'public' | 
| const | NOTES_STATE_SITE 'site' | 
| core_notes_myprofile_navigation | ( | core_user\output\myprofile\tree | $tree, | 
| $user, | |||
| $iscurrentuser, | |||
| $course | |||
| ) | 
Add nodes to myprofile page.
| core_user\output\myprofile\tree | $tree | Tree object | 
| stdClass | $user | user object | 
| bool | $iscurrentuser | |
| stdClass | $course | Course object | 
| bool | 
| note_delete | ( | $note | ) | 
Deletes a note object based on its id.
| int | object | $note | id of the note to delete, or a note object which is to be deleted. | 
| boolean | true always | 
| note_delete_all | ( | $courseid | ) | 
Delete all notes about users in course-.
| int | $courseid | 
| bool | success | 
| note_get_state_name | ( | $state | ) | 
Converts a state value to its corespondent name.
| string | $state | state value to convert | 
| string | corespondent state name | 
| note_get_state_names | ( | ) | 
Returns an array of mappings from state values to state names.
| array | of mappings | 
| 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.
| 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 | 
| array | of note objects | 
| note_load | ( | $noteid | ) | 
Retrieves a note object based on its id.
| int | $noteid | ID of the note to retrieve | 
| stdClass | object | 
| note_page_type_list | ( | $pagetype, | |
| $parentcontext, | |||
| $currentcontext | |||
| ) | 
Return a list of page types.
| string | $pagetype | current page type | 
| stdClass | $parentcontext | Block's parent context | 
| stdClass | $currentcontext | Current context of block | 
| note_print | ( | $note, | |
$detail = NOTES_SHOW_FULL  | 
        |||
| ) | 
Prints a note object.
| note | $note | the note object to print | 
| int | $detail | OR-ed NOTES_SHOW_xyz flags that specify which note parts to print | 
| note_print_list | ( | $notes, | |
$detail = NOTES_SHOW_FULL  | 
        |||
| ) | 
Prints a list of note objects.
| array | $notes | array of note objects to print | 
| 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  | 
        |||
| ) | 
Retrieves and prints a list of note objects with specific atributes.
| 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) | 
| note_save | ( | & | $note | ) | 
Saves a note object.
The note object is passed by reference and its fields (i.e. id) might change during the save.
| stdClass | $note | object to save | 
| boolean | true if the object was saved; false otherwise | 
| note_view | ( | $context, | |
| $userid | |||
| ) | 
Trigger notes viewed event.
| stdClass | $context | context object | 
| int | $userid | user id (the user we are viewing the notes) |