Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Core APIs

From MoodleDocs
Revision as of 08:21, 3 January 2012 by Martin Dougiamas (talk | contribs)

Moodle has a number of core APIs that provide tools for Moodle scripts.

APIs used by all Moodle scripts

access

The Access control API gives you functions so you can determine what the current user is allow to do, and it allows modules to extend Moodle with new capabilities.

database

The Database access API allows you to read/write databases in a consistent and safe way.

file

The File management API controls file storage.

page

The Page definition API is how you contruct web pages from data.

renderer

The Page rendering API is what you use to turn the current page into HTML and send it to the user.

string

The Language strings API is how you get text strings to use in the user interface. It handles any language translations that might be available.


Other APIs

activity_completion

The Activity completion API is only used by activity modules, to indicate to the system how activities are completed.


backup / restore

The Backup API defines exactly how to convert course data into XML for backup purposes, and the Restore API describes how to convert it back the other way.

calendar

The Calendar API allows you to add and modify events in the calendar for user, groups, courses, or the whole site.

comment

The Comment API allows you to save and retrieve user comments, so that you can easily add commenting to any of your code.

conditional

The Conditional activities API is for

Events API - "event"

External functions API - "external"

Groups API - "group"

Gradebook API - "grade"

Message API - "message"

preferences

The User preferences API is a simple way to store and retrieve preferences for any user.

Portfolio API - "portfolio"

- "restore"

RSS API - "rss"

Role API - "role"

Tags API - "tag"

Time API - "time"

Web services API - "webservice"