|
|
(164 intermediate revisions by 19 users not shown) |
Line 1: |
Line 1: |
| This page is to decide on a STANDARD list of CORE web service functions that we should support in Moodle (by XMLRPC, REST and SOAP) as an API for those writing code to work against Moodle.
| | {{Template:Migrated|newDocId=/docs/apis/subsystems/external/}} |
| | |
| Please add new functions if there's functionality you want that isn't covered (we can refactor/whittle at the end).
| |
| | |
| ==add user==
| |
| I think we should require all data needed for a successful "first login" to Moodle without popping him out the profile page to fill in all missing required data. This may require extra inputs such as city, description ... (unsure of the full list depending of Moodle version ?).
| |
| Also password should be "required" if authentication method is "internal" .
| |
| | |
| INPUT:
| |
| firstname
| |
| lastname
| |
| email
| |
| idnumber
| |
| login
| |
| authentication method (optional , default= manual ?)
| |
| | |
| | |
| | |
| OPERATION:
| |
| Adds a new user to the user database
| |
| | |
| OUTPUT:
| |
| id or false
| |
| | |
| ==delete user==
| |
| INPUT:
| |
| idnumber or
| |
| email or
| |
| id or
| |
| login
| |
| | |
| OPERATION:
| |
| User is marked as deleted
| |
| All it's role assignments are destroyed
| |
| OUTPUT:
| |
| true/false
| |
| | |
| ==add course==
| |
| INPUT:
| |
| name
| |
| shortname
| |
| format (default topics)
| |
| idnumber
| |
| | |
| OPERATION:
| |
| Adds a new course to the course table
| |
| | |
| OUTPUT:
| |
| id or false
| |
| | |
| | |
| ==delete course==
| |
| INPUT:
| |
| name OR
| |
| shortname OR
| |
| idnumber OR
| |
| id
| |
| | |
| OPERATION:
| |
| Deletes a course from the course table
| |
| What about associated ressources, roles ...
| |
| | |
| OUTPUT:
| |
| true or false
| |
| | |
| ==enrol student to course==
| |
| INPUT:
| |
| course unique Id (Moodle's ID or idnumber or shortname)
| |
| student unique id (Moodle's ID or idnumber or login or email)
| |
| | |
| OPERATION:
| |
| Assign student role to course
| |
| | |
| OUTPUT:
| |
| true or false
| |
| | |
| | |
| | |
| ==unenrol student from course==
| |
| INPUT:
| |
| course unique Id (Moodle's ID or idnumber or shortname)
| |
| student unique id (Moodle's ID or idnumber or login or email)
| |
| | |
| OPERATION:
| |
| remove student role from course
| |
| | |
| OUTPUT:
| |
| true or false
| |
| | |
| | |
| ==assign role to course==
| |
| INPUT:
| |
| course unique Id (Moodle's ID or idnumber or shortname)
| |
| user unique id (Moodle's ID or idnumber or login or email)
| |
| role id (teacher, non editing teacher, student (?) ...)
| |
| | |
| OPERATION:
| |
| assign given user a "standard" role to given course
| |
| | |
| OUTPUT:
| |
| true or false
| |
| | |
| | |
| ==remove role from course==
| |
| INPUT:
| |
| course unique Id (Moodle's ID or idnumber or shortname)
| |
| user unique id (Moodle's ID or idnumber or login or email)
| |
| role id (teacher, non editing teacher, student (?) ...)
| |
| | |
| OPERATION:
| |
| remove given user's "standard" role from given course
| |
| | |
| OUTPUT:
| |
| true or false
| |
| | |
| | |
| ==get my courses==
| |
| | |
| INPUT:
| |
| user unique id (Moodle's ID or idnumber or login or email)
| |
| | |
| OPERATION:
| |
| return a "list" of course's id in which given user move given user has some role assigned
| |
| | |
| OUTPUT:
| |
| "array" of (course id, course shortname, course fullname, role id, role name, course url)
| |
| or false in case of error (bad user id)
| |
| | |
| ==get last changes in my courses==
| |
| | |
| INPUT:
| |
| user unique id (Moodle's ID or idnumber or login or email)
| |
| course unique Id (Moodle's ID or shortname) - optional (default = all my courses)
| |
| timestamp - optional (default = time of last connexion in every course)
| |
| | |
| OPERATION:
| |
| return a "list" of changes (resource added/modified, new activities, etc.) for courses in which given user has some role assigned - since timestamp or last connexion in given course
| |
| | |
| OUTPUT:
| |
| "array" of (course id, role id, url of the resource/activity, time of change)
| |
| or false in case of error (bad user/course id)
| |