Kết thúc khóa học

Mục lục

Để kết thúc khóa học, cần truyền các tham số SID, safekey, timeStamp, course ID.

Ghi chú:

Nếu không có lớp học nào thuộc khóa học, khóa học sẽ kết thúc. Nếu khóa học có các lớp chưa bắt đầu, các lớp chưa bắt đầu sẽ bị xóa & khóa học sẽ kết thúc, vì vậy hãy cân nhắc khi sử dụng API này.

To end the course, you need to provide SID, safekey, timeStamp, course ID, and return the instructions after execution.

Note:

If there is no class under the course, you can finish the course. If there are classes under the course that have not yet started, the classes that have not started will be deleted and the course will end. Please use this feature carefully.

URL

https://api.eeo.cn/partner/api/course.api.php?action=endCourse

HTTP Request Methods #

  • POST

Coding format #

  • UTF-8

Request data #

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-bit 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

Response data #

KeyĐịnh dạngPhản hồiÝ nghĩa
error_infoobject Return message object
└ errnonumber1Mã lỗi
└ errorstring“Normal execution”Thông tin lỗi

Sample #

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

SID=1002289&safeKey=9c5cceb65abc66f7d5f5ac5ff212a1ba&timeStamp=1492925596&courseId=1418
  • 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=352855" \
     "https://api.eeo.cn/partner/api/course.api.php?action=endCourse"

Response sample(The normal return json packet example) #

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

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)
104Tải lên hình ảnh thất bại
114Thao tác thất bại
144Không có khóa học này trong trường
147Không có thông tin về khóa học
149Khóa học đã bị xóa
153Khóa học đã kết thúc
369Lớp học công khai không hỗ trợ điều chỉnh
394Không thể kết thúc khóa học vì có lớp học đang diễn ra