Xóa học sinh/người dự thính khỏi khóa học

Mục lục

Để xóa học sinh/người dự thính ra khỏi một khóa học, bạn cần truyền tham số SID, safekey, timeStamp,courseID, định danh vài trò học sinh hay người dự thính và UID của tài khoản cần xóa.

To delete a student/audit (single) under a course, you need SID, safekey, timeStamp, the course ID of the course, the identification of the student or auditor, and the UID of the student to be deleted. Returns the instructions after execution.

URL

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

HTTP Request Methods #

  • POST

Encoding format #

  • UTF-8

Request Parameters #

KeyBắt buộcYêu cầu thêmMô tảHướng dẫn
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ộcID của khóa học
identityBắt buộcXác định vài trò của tài khoản (1=học sinh, 2=người dự thính)
studentUidBắt buộcUID của người dùngUID hệ thống trả về khi đăng ký tài khoản thành công

Response Parameters #

KeyĐịnh dạngPhản hồiÝ nghĩa
error_infoobject Return information object
└ errnonumber1Mã lỗi
└ errorstring“The program is running normally”Chi tiết lỗi

Example #

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

SID=1002289&safeKey=ee982747b6b6333cdc40644b06b7c57d&timeStamp=1493030859&courseId=1431&identity=1&studentUid=1001001
  • Shell cURL simulates request instructions
curl -H "Content-Type: application/x-www-form-urlencoded" -X "POST" \
      -d "SID=1234567" \
      -d "safeKey=0f7781b3033527a8cc2b1abbf45a5fd2" \
      -d "timeStamp=1484719085" \
      -d "courseId=442447" \
      -d "identity=1" \
      -d "studentUid=1001001" \
      "https://root_url/partner/api/course.api.php?action=delCourseStudent"

jsonResponse example ( sample of the data packet returned under normal circumstances ) #

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

Error code description #

Error CodeMô tả
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)
104Lỗi server
106Không có dữ liệu tồn tại
114Lỗi server
144Không có khóa học này trong trường
147Không có thông tin về khóa học này
149Khóa học đã bị xóa
153Khóa học đã kết thúc và không thể chỉnh sửa được
162Không có thành viên này trong khóa học
369Lớp học công khai không hỗ trợ điều chỉnh
400Dữ liệu được yêu cầu không hợp lệ