Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
lib.php File Reference

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

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'