Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

External notes API

Copyright: 2011 Jerome Mouneyrac
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 723 lines (29 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class


Class: core_notes_external  - X-Ref

Notes external functions

create_notes_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_notes($notes = array()   X-Ref
Create notes about some users
Note: code should be matching the /notes/edit.php checks
and the /user/addnote.php checks. (they are similar cheks)

param: array $notes  An array of notes to create.
return: array (success infos and fail infos)

create_notes_returns()   X-Ref
Returns description of method result value

return: external_description

delete_notes_parameters()   X-Ref
Returns description of delete_notes parameters

return: external_function_parameters

delete_notes($notes = array()   X-Ref
Delete notes about users.
Note: code should be matching the /notes/delete.php checks.

param: array $notes An array of ids for the notes to delete.
return: null

delete_notes_returns()   X-Ref
Returns description of delete_notes result value.

return: external_description

get_notes_parameters()   X-Ref
Returns description of get_notes parameters.

return: external_function_parameters

get_notes($notes)   X-Ref
Get notes about users.

param: array $notes An array of ids for the notes to retrieve.
return: null

get_notes_returns()   X-Ref
Returns description of get_notes result value.

return: external_description

update_notes_parameters()   X-Ref
Returns description of update_notes parameters.

return: external_function_parameters

update_notes($notes = array()   X-Ref
Update notes about users.

param: array $notes An array of ids for the notes to update.
return: array fail infos.

update_notes_returns()   X-Ref
Returns description of update_notes result value.

return: external_description

get_course_notes_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

create_note_list($courseid, $context, $userid, $state, $author = 0)   X-Ref
Create a notes list

param: int $courseid ID of the Course
param: stdClass $context context object
param: int $userid ID of the User
param: int $state
param: int $author
return: array of notes

get_course_notes($courseid, $userid = 0)   X-Ref
Get a list of course notes

param: int $courseid ID of the Course
param: int $userid ID of the User
return: array of site, course and personal notes and warnings

get_note_structure()   X-Ref
Returns array of note structure

return: external_description

get_course_notes_returns()   X-Ref
Returns description of method result value

return: external_description

view_notes_parameters()   X-Ref
Returns description of method parameters

return: external_function_parameters

view_notes($courseid, $userid = 0)   X-Ref
Simulates the web interface view of notes/index.php: trigger events

param: int $courseid id of the course
param: int $userid id of the user
return: array of warnings and status result

view_notes_returns()   X-Ref
Returns description of method result value

return: external_description