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

Mục lục

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



HTTP Request Methods #

  • POST

Coding format #

  • UTF-8

Request data #

keyRequiredMore RestrictionsInstructionsDescription
SIDYesNullSchool IDIt is available through the eeo.cn application
safeKeyYesFixed 32-bit all lowercase charactersSchool authentication security keysafeKey=MD5(SECRET+timeStamp)
timeStampYesNullimestamp used by safeKeyUnix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970
courseIdYesNullCourse IDNull

Response data #

keyTypeSample valuemeaning
error_infoobjectReturn message object
└ errnonumber1Error code
└ errorstring“Normal execution”Error list

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

  • 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" \

Response sample(The normal return json packet example) #

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

Error Code Description #

Error CodeDescription
1Successful execution.
100Incomplete or incorrect parameters.
102No permission(Security verification failed.).
104Operation failed(unknown error).
114Server exception.
144There is no such course in your institution.
147No information about this course.
149The course has been deleted.
153The course has expired.
369The course/lesson of this type(public course) cannot be operated.
394The course has an ongoing lesson. Thus cannot be ended.