Classrooms

在课程中注册用户

PUT
在一个教室里的一门课程上注册一个用户。 如果课程是付费课程,用户需要一个有效的订阅许可。 用户必须是教室中的一个成员。

Path parameters

classroomHandlestringRequired

教室 _id.

courseHandlestringRequired

课程 _id.

Query parameters

retMemberLimitdoubleOptional
设置返回的教室中显示的学生数量, 默认值为 1000

Request

This endpoint expects an object.
userId
stringRequired

Response

This endpoint returns an object
_id
stringOptional
name
stringOptional
members
list of stringsOptional
ownerID
stringOptional
description
stringOptional
courses
list of objectsOptional
PUT
1curl -X PUT "https://koudashijie.com/api/classrooms/:classroomHandle/courses/:courseHandle/enrolled?retMemberLimit=1" \
2 -H "Content-Type: application/json" \
3 -u "<username>:<password>" \
4 -d '{
5 "userId": "string"
6}'
200
Updated
1{
2 "_id": "string",
3 "name": "string",
4 "members": [
5 "string"
6 ],
7 "ownerID": "string",
8 "description": "string",
9 "courses": [
10 {
11 "_id": "string",
12 "levels": [
13 {
14 "string": {}
15 }
16 ],
17 "enrolled": [
18 "string"
19 ],
20 "instance_id": "string"
21 }
22 ]
23}