See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401] [Versions 401 and 402] [Versions 401 and 403]
Database module external API
Copyright: | 2015 Juan Leyva <juan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 1187 lines (49 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
mod_data_external:: (34 methods):
get_databases_by_courses_parameters()
get_databases_by_courses()
get_databases_by_courses_returns()
validate_database()
view_database_parameters()
view_database()
view_database_returns()
get_data_access_information_parameters()
get_data_access_information()
get_data_access_information_returns()
get_entries_parameters()
get_entries()
get_entries_returns()
get_entry_parameters()
get_entry()
get_entry_returns()
get_fields_parameters()
get_fields()
get_fields_returns()
search_entries_parameters()
search_entries()
search_entries_returns()
approve_entry_parameters()
approve_entry()
approve_entry_returns()
delete_entry_parameters()
delete_entry()
delete_entry_returns()
add_entry_parameters()
add_entry()
add_entry_returns()
update_entry_parameters()
update_entry()
update_entry_returns()
Class: mod_data_external - X-Ref
Database module external functionsget_databases_by_courses_parameters() X-Ref |
Describes the parameters for get_databases_by_courses. return: external_function_parameters |
get_databases_by_courses($courseids = array() X-Ref |
Returns a list of databases in a provided list of courses, if no list is provided all databases that the user can view will be returned. param: array $courseids the course ids return: array the database details |
get_databases_by_courses_returns() X-Ref |
Describes the get_databases_by_courses return value. return: external_single_structure |
validate_database($databaseid) X-Ref |
Utility function for validating a database. param: int $databaseid database instance id return: array array containing the database object, course, context and course module objects |
view_database_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
view_database($databaseid) X-Ref |
Simulate the data/view.php web interface page: trigger events, completion, etc... param: int $databaseid the data instance id return: array of warnings and status result |
view_database_returns() X-Ref |
Returns description of method result value return: external_description |
get_data_access_information_parameters() X-Ref |
Returns description of method parameters. return: external_function_parameters |
get_data_access_information($databaseid, $groupid = 0) X-Ref |
Return access information for a given database. param: int $databaseid the database instance id param: int $groupid (optional) group id, 0 means that the function will determine the user group return: array of warnings and access information |
get_data_access_information_returns() X-Ref |
Returns description of method result value. return: external_description |
get_entries_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
get_entries($databaseid, $groupid = 0, $returncontents = false, $sort = null, $order = null,$page = 0, $perpage = 0) X-Ref |
Return access information for a given feedback param: int $databaseid the data instance id param: int $groupid (optional) group id, 0 means that the function will determine the user group param: bool $returncontents Whether to return the entries contents or not param: str $sort sort by this field param: int $order the direction of the sorting param: int $page page of records to return param: int $perpage number of records to return per page return: array of warnings and the entries |
get_entries_returns() X-Ref |
Returns description of method result value return: external_description |
get_entry_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
get_entry($entryid, $returncontents = false) X-Ref |
Return one entry record from the database, including contents optionally. param: int $entryid the record entry id id param: bool $returncontents whether to return the entries contents or not return: array of warnings and the entries |
get_entry_returns() X-Ref |
Returns description of method result value return: external_description |
get_fields_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
get_fields($databaseid) X-Ref |
Return the list of configured fields for the given database. param: int $databaseid the database id return: array of warnings and the fields |
get_fields_returns() X-Ref |
Returns description of method result value return: external_description |
search_entries_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
search_entries($databaseid, $groupid = 0, $returncontents = false, $search = '', $advsearch = [],$sort = null, $order = null, $page = 0, $perpage = 0) X-Ref |
Return access information for a given feedback param: int $databaseid the data instance id param: int $groupid (optional) group id, 0 means that the function will determine the user group param: bool $returncontents whether to return contents or not param: str $search search text param: array $advsearch advanced search data param: str $sort sort by this field param: int $order the direction of the sorting param: int $page page of records to return param: int $perpage number of records to return per page return: array of warnings and the entries |
search_entries_returns() X-Ref |
Returns description of method result value return: external_description |
approve_entry_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
approve_entry($entryid, $approve = true) X-Ref |
Approves or unapproves an entry. param: int $entryid the record entry id id param: bool $approve whether to approve (true) or unapprove the entry return: array of warnings and the entries |
approve_entry_returns() X-Ref |
Returns description of method result value return: external_description |
delete_entry_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
delete_entry($entryid) X-Ref |
Deletes an entry. param: int $entryid the record entry id return: array of warnings success status |
delete_entry_returns() X-Ref |
Returns description of method result value return: external_description |
add_entry_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
add_entry($databaseid, $groupid, $data) X-Ref |
Adds a new entry to a database param: int $databaseid the data instance id param: int $groupid (optional) group id, 0 means that the function will determine the user group param: array $data the fields data to be created return: array of warnings and status result |
add_entry_returns() X-Ref |
Returns description of method result value return: external_description |
update_entry_parameters() X-Ref |
Returns description of method parameters return: external_function_parameters |
update_entry($entryid, $data) X-Ref |
Updates an existing entry. param: int $entryid the data instance id param: array $data the fields data to be created return: array of warnings and status result |
update_entry_returns() X-Ref |
Returns description of method result value return: external_description |