Xóa lớp học

Mục lục

To delete a lesson, you need to pass required parameters, SID, safeKey, timeStamp, course ID and lesson Id. The API responses with error code and the description that you can refer to.

Notes: If you delete the lesson created with courseUniqueIdentity, the courseUniqueIdentity would also be deleted.



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
classIdYesNullClass 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=delCourseClass 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=7fe917c22f3afd6ebadd329cfab7d403" \
      -d "timeStamp=1492933564" \
      -d "courseId=14181" \
      -d "classId=23611" \

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.
140The lesson is still ongoing and cannot be edited or deleted.
142The lesson does not exist in the course.
143No information about the lesson.
144There is no such course in your institution.
145This lesson is finished and cannot be deleted.
212This lesson has been deleted.
369The course/lesson of this type(public course) cannot be operated.
466The lesson was created in the ClassIn LMS and cannot be edited via API. Please edit the lesson in the ClassIn LMS.
823The lesson is deleted successfully. Failed to delete the courseUniqueIdentity.