我正在尝试收集与 Moodle 课程(课程 + 课程)相关的所有信息
Eg : var domainname = 'http://<server URL>/moodle';
var token = 'df337369637c692303d903f8cacf1eb0';
var functionname = 'core_course_get_courses';
var serverurl = domainname + '/webservice/rest/server.php' ;
var data = {
wstoken: token,
wsfunction: functionname,
moodlewsrestformat: 'json'
} var response = $.ajax(
{ type: 'GET',
data: data,
url: serverurl
}
);
输出看起来像
{"id":2,"shortname":"IV Support Queries","categoryid":1,"categorysortorder":10001,"fullname":"IV Support Queries","displayname":"IV Support Queries","idnumber":"","summary":"<p>IV Support Queries Desc<br \/><\/p>","summaryformat":1,"format":"topics","showgrades":1,"newsitems":5,"startdate":1479168000,"numsections":5,"maxbytes":0,"showreports":0,"visible":1,"hiddensections":1,"groupmode":0,"groupmodeforce":0,"defaultgroupingid":0,"timecreated":1479127227,"timemodified":1479198758,"enablecompletion":0,"completionnotify":0,"lang":"","forcetheme":"","courseformatoptions":[{"name":"numsections","value":5},{"name":"hiddensections","value":1},{"name":"coursedisplay","value":1}]}
我想要在 course 下创建的课程详细信息。如何通过 Api 获取信息。谢谢