Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/notes/lib.php File Reference

Go to the source code of this file.

Enumerations

enum  NOTES_STATE_DRAFT
enum  NOTES_STATE_PUBLIC
enum  NOTES_STATE_SITE
enum  NOTES_SHOW_FULL
enum  NOTES_SHOW_HEAD
enum  NOTES_SHOW_BODY
enum  NOTES_SHOW_FOOT

Functions

 note_list ($courseid=0, $userid=0, $state= '', $author=0, $order='lastmodified DESC', $limitfrom=0, $limitnum=0)
 note_load ($note_id)
 note_save (&$note)
 note_delete ($noteid)
 note_get_state_name ($state)
 note_get_state_names ()
 note_print ($note, $detail=NOTES_SHOW_FULL)
 note_print_list ($notes, $detail=NOTES_SHOW_FULL)
 note_print_notes ($header, $addcourseid=0, $viewnotes=true, $courseid=0, $userid=0, $state= '', $author=0)
 note_delete_all ($courseid)
 note_page_type_list ($pagetype, $parentcontext, $currentcontext)

Enumeration Type Documentation

Definition at line 19 of file lib.php.

Definition at line 20 of file lib.php.

Constants for note parts (flags used by note_print and note_print_list).

Definition at line 17 of file lib.php.

Definition at line 18 of file lib.php.

Library of functions and constants for notes Constants for states.

Definition at line 10 of file lib.php.

Definition at line 11 of file lib.php.

Definition at line 12 of file lib.php.


Function Documentation

note_delete ( noteid)

Deletes a note object based on its id.

Parameters:
int$note_idid of the note to delete
Returns:
boolean true if the object was deleted; false otherwise

Definition at line 118 of file lib.php.

note_delete_all ( courseid)

Delete all notes about users in course-

Parameters:
int$courseid
Returns:
bool success

Definition at line 275 of file lib.php.

Here is the caller graph for this function:

note_get_state_name ( state)

Converts a state value to its corespondent name

Parameters:
string$statestate value to convert
Returns:
string corespondent state name

Definition at line 130 of file lib.php.

Here is the call graph for this function:

Returns an array of mappings from state values to state names

Returns:
array of mappings

Definition at line 148 of file lib.php.

Here is the caller graph for this function:

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.

Parameters:
int$courseidid of the course in which the notes were posted (0 means any)
int$useridid of the user to which the notes refer (0 means any)
string$statestate of the notes (i.e. draft, public, site) ('' means any)
int$authorid of the user who modified the note last time (0 means any)
string$orderan order to sort the results in
int$limitfromnumber of records to skip (offset)
int$limitnumnumber of records to fetch
Returns:
array of note objects

Definition at line 34 of file lib.php.

Here is the caller graph for this function:

note_load ( note_id)

Retrieves a note object based on its id.

Parameters:
int$note_idid of the note to retrieve
Returns:
note object

Definition at line 71 of file lib.php.

note_page_type_list ( pagetype,
parentcontext,
currentcontext 
)

Return a list of page types

Parameters:
string$pagetypecurrent page type
stdClass$parentcontextBlock's parent context
stdClass$currentcontextCurrent context of block

Definition at line 287 of file lib.php.

note_print ( note,
detail = NOTES_SHOW_FULL 
)

Prints a note object

Parameters:
note$notethe note object to print
int$detailOR-ed NOTES_SHOW_xyz flags that specify which note parts to print

Definition at line 162 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

note_print_list ( notes,
detail = NOTES_SHOW_FULL 
)

Prints a list of note objects

Parameters:
array$notesarray of note objects to print
int$detailOR-ed NOTES_SHOW_xyz flags that specify which note parts to print

Start printing of the note

Definition at line 222 of file lib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters:
string$headerHTML to print above the list
int$addcourseidid of the course for the add notes link (0 hide link)
boolean$viewnotestrue if the notes should be printed; false otherwise (print notesnotvisible string)
int$courseidid of the course in which the notes were posted (0 means any)
int$useridid of the user to which the notes refer (0 means any)
string$statestate of the notes (i.e. draft, public, site) ('' means any)
int$authorid of the user who modified the note last time (0 means any)

Definition at line 243 of file lib.php.

Here is the call graph for this function:

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.

Parameters:
note$noteobject to save
Returns:
boolean true if the object was saved; false otherwise

Definition at line 85 of file lib.php.

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations