42
the world’s open source learning platform

Mastering Moodle Web Services development

Embed Size (px)

Citation preview

the world’s open sourcelearning platform

●●

●●●●

●●●●●

●●●

Badge information (database)Id,name,description,timecreated,timemodified,usercreated,usermodified,issuername,issuerurl,issuercontact,expiredate,expireperiod,type,courseid,message,messagesubject,attachment,notification,status,nextcron

Issued badges information (database)id,badgeid,userid,uniquehash,dateissued,dateexpire,visible,issuernotified

curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_badges_get_user_badges&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e

curl 'http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json' --data 'wsfunction=core_badges_get_user_badges&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e | python -m “json.tool”

You can test also in the browser (not recommended for real sites, only for localhost):http://localhost/m/stable_master/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_badges_get_user_badges&wstoken=a70d553bbaf6d9b260a9e5c701b3c46e

●●●

Thank you

Community: moodle.orgCommercial: moodle.com

@moodle

the world’s open source learning platform