Moodle 3.1 이상을 사용하고 있습니다. 나는 webservice를 사용하여 과정 내용을 얻으려고 노력하고있다. 나는 '레슨'활동으로 수업을 만들었습니다. 이제 webservice 'core_course_get_contents'를 사용하여 코스 내용을 가져 오려고하면 다음 응답을 얻습니다.webservice를 사용하여 코스 내용 얻기
[{"id":36,"name":" 0","visible":1,"summary":"","summaryformat":1,"modules":[{"id":18,"url":"http:\/\/localhost\/moodle\/mod\/lesson\/view.php?id=18","name":"Lesson1","instance":1,"visible":1,"modicon":"http:\/\/localhost\/moodle\/theme\/image.php\/mentornetz\/lesson\/1483338014\/icon","modname":"lesson","modplural":"Lessons","indent":0}]}]
그러나 응답에는 강의 세부 정보가 포함되어 있지 않습니다.
Moodle API 문서에 응답에 내 답변에 누락 된 세부 사항이 포함되어 있다고 나와 있습니다. 다음은
contents list of (
object {
type string //a file or a folder or external link
filename string //filename
filepath string //filepath
filesize int //filesize
fileurl string Optional //downloadable file url
content string Optional //Raw content, will be used when type is content
timecreated int //Time created
timemodified int //Time modified
sortorder int //Content sort order
userid int //User who added this content to moodle
author string //Content owner
license string //Content license
}
는
object {
cm object {
id int //The course module id
course int //The course id
module int //The module type id
name string //The activity name
modname string //The module component name (forum, assign, etc..)
instance int //The activity instance id
section int //The module section id
sectionnum int //The module section number
groupmode int //Group mode
groupingid int //Grouping id
completion int //If completion is enabled
idnumber string Optional //Module id number
added int Optional //Time added
score int Optional //Score
indent int Optional //Indentation
visible int Optional //If visible
visibleold int Optional //Visible old
completiongradeitemnumber int Optional //Completion grade item
completionview int Optional //Completion view setting
completionexpected int Optional //Completion time expected
showdescription int Optional //If the description is showed
availability string Optional //Availability settings
}
warnings Optional //list of warnings
list of (
//warning
object {
item string Optional //item
itemid int Optional //item id
warningcode string //the warning code can be used by the client app to implement specific behaviour
message string //untranslated english message to explain the warning
}
)}
가 어떻게 과정의 내용을 얻을 수있는 웹 서비스의 core_course_get_course_module에 대한 응답이다? 도와주세요.
글쎄, 그들의 API 문서에서 어떻게하는가? – arkascha
@arkascha 충분한 설명서가 없습니다. – user1690835
문서는'core_course_get_contents'가 그들의 URL을 포함한 코스 모듈을 전달한다고 말합니다. 다음 과정에서 특정 모듈에 대한 더 자세한 정보를 얻으려면 아마도'core_course_get_course_module'을 호출해야 할 것입니다. 나는 그것이 https://docs.moodle.org/dev/Web_service_API_functions의 문서에서 꽤 분명하다고 생각한다. – arkascha