Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
|
Namespaces | |
namespace | core_notes\privacy |
| |
namespace | core_notes\reportbuilder\datasource |
| |
namespace | core_notes\reportbuilder\local\entities |
| |
Classes | |
class | core_notes\privacy\provider |
Implementation of the privacy subsystem plugin provider for core_notes. More... | |
class | core_notes\reportbuilder\datasource\notes |
class | core_notes\reportbuilder\local\entities\note |
class | core_notes_generator |
core_notes data generator class. More... | |
Functions | |
core_notes_myprofile_navigation (core_user\output\myprofile\tree $tree, $user, $iscurrentuser, $course) | |
Add nodes to myprofile page. | |
note_delete ($note) | |
Deletes a note object based on its id. | |
note_delete_all ($courseid) | |
Delete all notes about users in course-. | |
note_get_state_name ($state) | |
Converts a state value to its corespondent name. | |
note_get_state_names () | |
Returns an array of mappings from state values to state names. | |
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. | |
note_load ($noteid) | |
Retrieves a note object based on its id. | |
note_page_type_list ($pagetype, $parentcontext, $currentcontext) | |
Return a list of page types. | |
note_print ($note, $detail=NOTES_SHOW_FULL) | |
Prints a note object. | |
note_print_list ($notes, $detail=NOTES_SHOW_FULL) | |
Prints a list of note objects. | |
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. | |
note_save (&$note) | |
Saves a note object. | |
note_view ($context, $userid) | |
Trigger notes viewed event. | |
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) |