Để sửa đổi biệt danh của một học sinh trong nhóm, cần các tham số SID, safekey, timeStamp và courseID.
Mỗi khi tạo một khóa học tiêu chuẩn, hệ thống sẽ tự động tạo nhóm lớp (bạn có thể xem nhóm này trong ứng dụng ClassIn). Khi tạo nhóm lớp, hệ thống mặc định sử dụng tên người dùng để đặt tên cho các thành viên trong nhóm – gọi là biệt danh trong lớp.
API này sử dụng tên đã được đặt từ Trang quản lý của tất cả học sinh và người dự thính trong khóa học để sửa đổi biệt danh trong lớp của học sinh và người dự thính. Sau khi sửa đổi, học sinh tham gia các khóa học của trường trên ứng dụng ClassIn và trong lớp học của khóa học, tên được hiển thị là tên do trường quy định chứ không phải tên người dùng.
API này giúp giải quyết vấn đề sau khi học sinh đổi tên người dùng trên ứng dụng ClassIn tên trong khóa học sẽ bị thay đổi khiến giáo viên gặp khó khăn trong việc nhận diện danh tính học sinh.
Tình huống sử dụng được đề xuất: Sau khi tạo một khóa học và thêm học sinh/người dự thính vào khóa học, hãy gọi API này để sửa đổi biệt danh trong lớp của tất cả học sinh và người dự thính.
To modify the class nickname of a group member, you need to pass SID, safekey, timeStamp, and course ID.
Each time you create a standard course, the system automatically creates a class group (you can view this group in ClassIn IM). When creating a class group, the system uses the user’s name to set the name of the group members by default, which we call the class nickname.
Interface function description: This interface uses the names of all students and auditors under the course and the names of students under the institution to modify the class nicknames of students and auditors in the group . After the modification, the names displayed by students in the IM class group of the client and in the classroom under the course are all student names, not user nicknames.
This interface solves the problem that after students change their user nicknames in the ClassIn app client, teachers often cannot match their nicknames in the group and in the classroom.
Recommended usage scenario: After creating a course and adding students/auditors to the course, call this interface to modify the class nicknames of all students and auditors in the course.
URL #
https://root_url/partner/api/course.api.php?action=modifyGroupMemberNickname
HTTP Request Methods #
- POST
Coding format #
- UTF-8
Request data #
Key | Bắt buộc | Yêu cầu thêm | Mô tả | Hướng dẫn |
---|---|---|---|---|
SID | Bắt buộc | — | ID của trường | Xem dữ liệu này tại Trang quản lý classin.com trong mục API |
safeKey | Bắt buộc | Fixed 32-bit all lowercase characters | Khóa bảo mật xác thực trường học | safeKey=MD5(SECRET+timeStamp) |
timeStamp | Bắt buộc | — | Theo Unix Epoch timestamp & có hiệu lực trong vòng 20 phút | Thờ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 |
courseId | Bắt buộc | — | ID Khóa học | — |
Response data #
Key | Định dạng | Phản hồi | Ý nghĩa |
---|---|---|---|
error_info | object | Return message object | |
└ errno | number | 1 | Mã lỗi |
└ error | string | “Program normal execution” | Chi tiết lỗi |
Sample #
- HTTP request
POST /partner/api/course.api.php?action=modifyGroupMemberNickname HTTP/1.1
Host: www.eeo.cn
Content-Type: application/x-www-form-urlencoded
Cache-Control: no-cache
SID=2339736&safeKey=f834fff59eb3bc8a2ff26a3cb59155f0&timeStamp=1492792399&courseId=35286
- Shell cURL analog request instruction
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
-d "SID=1234567" \
-d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
-d "timeStamp=1484719085" \
-d "courseId=561294" \
"https://root_url/partner/api/course.api.php?action=modifyGroupMemberNickname"
Response sample(The normal return json
packet example) #
{
"error_info": {
"errno": 1,
"error": "程序正常执行"
}
}
Error Code Description #
Error Code | Description |
---|---|
1 | Thành công |
100 | Parameters sai định dạng hoặc không hoàn chỉnh |
102 | Không có quyền thao tác (Xác thực bảo mật thất bại) |
104 | Thao tác thất bại |
144 | Không có thông tin của khóa học này trong trường |
147 | Không có thông tin của khóa học này |
149 | Khóa học này đã bị xóa |
153 | Khóa học này đã kết thúc |
842 | Điều chỉnh biệt danh của một số thành viên thất bại |
843 | Failed to modify the nicknames of all members of the lesson. |