Add Student to Multiple Lessons in Course

To add a student to multiple lessons in the course, SID, safeKey, timeStamp, course ID, student UID, class array(class ID) are required. The data returned includes the description of execution for each lesson.

Note: It is recommended that no more than 100 lessons be added at one time.

URL

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

HTTP Request Methods

  • POST

Coding format

  • UTF-8

Request Data

Key Required More Restrictions Instructions Description
SID Yes Null School ID It is available through the eeo.cn application
safeKey Yes Fixed 32-bit all lowercase characters School authentication security key safeKey=MD5(SECRET+timeStamp)
timeStamp Yes Null Imestamp used by safeKey Unix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970
courseId Yes Null Course ID Null
studentUid Yes Either studentAccount(Deprecated at 1st May) or studentAccount. If studentUid is passed to studentAccount at the same time, the studentUid parameter shall prevail Students in the UID Register the user UID returned by the user interface
classJson Yes Null Class ID Array Null
└ ID of class 1 Yes Null Class ID Null
└ ID of class 2 No Null Class ID Null
└ ······ No Null Class ID Null

Response Data

Key Type Sample Value Meaning
data array [] Returns an array of Data information
└ data return information 1 object Return message object
  └ errno number 1 Error code
  └ error string "Normal execution" Error list
└ data return message 2 object return message object
  └ errno number 1 Error code
  └ error string "Normal execution" Error list
└ ······ object return message object
  └ errno number ··· Error code
  └ error string ··· Error list
error_info object return message object
└ errno number 1 Error code
└ error string "Normal execution" Error list

Sample

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

SID=2339736&safeKey=dcbc0d041c043f3a4decabe6d24e61dd&timeStamp=1493712683&courseId=490583&studentUid=1001001&studentName=Jeck&classJson=[1395045,1395044,1395043]
  • 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=123456" \
        -d "studentUid=1001001" \
        -d "studentName=小红" \
        -d "classJson=[1212131,1212123]" \
        "https://api.eeo.cn/partner/api/course.api.php?action=addCourseClassStudent"
    

Response sample(The normal return json packet example)

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

Error Code Description

Error Code Description
1 Successful execution.
100 Incomplete or incorrect parameters.
102 No permission(Security verification failed.).
113 The mobile phone number has not been registered yet.
114 Server exception.
129 Course teachers cannot be set as students.
134 Illegal mobile phone number.
142 There is no information about the lesson in the course.
144 There is no such course in your institution.
145 The lesson is finished.
149 The course has been deleted.
153 The course is expired and cannot be edited.
155 Array data of students cannot be null.
157 The number of students in the lesson exceeds the limit.
158 Failed to add students to the lesson.
164 The course auditing student already exists.
166 The student already exists in the lesson.
212 The lesson has been deleted.
228 There is no such student in your institution.
332 Course teachers or co-teachers cannot be set as course students or course auditing students.
333 The course advisor cannot be set as a course student.
369 Do not support to operate this type of courses and lessons(public course).
400 The requested data is illegal.
466 The lesson was created in the ClassIn LMS and cannot be edited via API. Please edit in the ClassIn LMS.
886 The student's account has been deleted by the user.

results matching ""

    No results matching ""