Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
|
Topics | |
external | |
test | |
Namespaces | |
namespace | core_notes\privacy |
Privacy Subsystem implementation for core_notes. | |
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 |
Notes datasource. More... | |
class | core_notes\reportbuilder\local\entities\note |
Note entity. 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. | |
Variables | |
global | core_notes\privacy::$CFG |
global | core_notes\reportbuilder\datasource::$CFG |
global | core_notes\reportbuilder\local\entities::$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' |
Library of functions and constants for notes. | |
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) |
const NOTES_STATE_DRAFT 'draft' |
Library of functions and constants for notes.