2016-04-22 66 views
0

我有一個應用程序,我需要從Moodle獲取記錄。Moodle:網絡服務調用,以獲得課程

我正在接受包含以下API調用的課程和類別。 core_course_get_courses core_course_get_categories

但沒能找到合適的參數(或者可能是我的執行是錯誤的),用於mod_assign_get_assignments

我試過如下

http://moodle/webservice/rest/server.php?wsfunction=mod_assign_get_assignments&moodlewsrestformat=json&wstoken=token&courseids[0]=27 

任何人都可以有任何想法我怎麼能從課程中獲得作業?

請幫

回答

0

繼使用,如果WebService的用戶登記tothat具體課程來獲取課程下記錄的Moodle

http://moodle/webservice/rest/server.php?wsfunction=mod_assign_get_assignments&moodlewsrestformat=json&wsfunction=core_course_get_contents&moodlewsrestformat=json&courseid= 
+0

這隻適用方法,否則返回{「課程」:[] ,「警告」:[{「item」:「course」,「itemid」:3,「warningcode」:「2」,「message」:「用戶沒有註冊或沒有請求的能力」}]}} –