Chỉnh sửa phân nhóm học tập

Mục lục

URL #

https://root_url/partner/api/course.api.php?action=editCourseGroup

HTTP Request Methods #

  • POST

Coding Format #

  • UTF-8

Request Parameters #

KeyBắt buộcYêu cầu khácHướng dẫnMô tả
SIDBắt buộcID của trườngXem dữ liệu này tại Trang quản lý classin.com trong mục API
safeKeyBắt buộcFixed 32 all lowercase charactersKhóa bảo mật xác thực trường họcsafeKey=MD5(SECRET+timeStamp)
timeStampBắt buộcTheo Unix Epoch timestamp & có hiệu lực trong vòng 20 phútThời gian UNIX Epoch là số giây đã trôi qua kể từ 00:00:00 (giờ chuẩn quốc tế) vào ngày 1 tháng 1 năm 1970
courseIdBắt buộcCourse ID
groupIdBắt buộcGroup ID
groupListBắt buộcjson string1. Các trường studentUid và isLeader là bắt buộc phải có dữ liệu. Mỗi nhóm có và chỉ có một trưởng nhóm (isLeader thể hiện đó có phải là trưởng nhóm hay không 1=có; 0=không)
2. Thành viên nhóm không thể lặp lại
[ [{ “studentUid”: 1000152, “isLeader”: 1}, {“studentUid”: 1000109, “isLeader”: 0}], [{“studentUid”: 1000101, “isLeader”: 1}, {“studentUid” : 1000100,”isLeader”: 0}]]
groupNameBắt buộc1-20 characters, regardless of Chinese or English. If the character exceeds 20, it will be automatically truncated to 20 characters.Tên phân nhóm

Response Data #

KeyĐịnh dạngPhản hồiÝ nghĩa
error_infoobject Return message object
└ errnonumber1Error code
└ errorstring“Program normal execution”Error list

Sample #

  • HTTP Request
POST /partner/api/course.api.php?action=editCourseGroup HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache


SID=1234567&safeKey=3276433ab0216d9aec2621431cc12248&timeStamp=1494407873&courseId=176465&groupId=139&groupName=课程分组&groupList=[[{"studentUid": 1000152, "isLeader": 1 }, { "studentUid": 1000109, "isLeader": 0}],[{"studentUid": 1000101,"isLeader": 1}, {"studentUid": 1000100,"isLeader": 0}]]
  • Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
       -d "SID=1234567" \
       -d "safeKey=b4bbe6c28f6d6d6536742c2fe0ab41bf" \
       -d "timeStamp=1637132493" \
       -d "courseId=176465" \
       -d "groupId=139" \
       -d "groupName=课程分组" \
       -d 'groupList= [[{"studentUid": 1000152, "isLeader": 1 }, { "studentUid": 1000109, "isLeader": 0}],[{"studentUid": 1000101,"isLeader": 1}, {"studentUid": 1000100,"isLeader": 0}]]'\
       "https://root_url/partner/api/course.api.php?action=editCourseGroup"

Response Sample(The normal return json packet example) #

{
"error_info": {
    "errno": 1,
    "error": "程序正常执行"}
}

Notes #


Description of groupList parameter
[
[{
"studentUid": 1000152,
"isLeader": 1

},
{"studentUid": 1000109,
"isLeader": 0

}],
[{
"studentUid": 1000101,
"isLeader": 1

},
{"studentUid": 1000100,
"isLeader": 0

}]
]    
1. Paramter of studentUid and isLeader are required, there should be a leader for each team.   (isLeader indicates the team leader.  1=Yes 0=No)    
2. Team members can not be duplicated

Error Code Description #

Error CodeDescription
1Thành công
100Parameters sai định dạng hoặc không hoàn chỉnh
102Không có quyền thao tác (Xác thực bảo mật thất bại)
104Thao tác không thành công (lỗi không xác định)
890Thiết lập phân nhóm thất bại
893Thao tác thất bại. Phân nhóm không tồn tại