Edit Course

To edit the course, SID, safeKey, timeStamp, course ID are required. The rest parameters are optional and you only need to pass the field you want to edit. The request will return the instruction for you to refer to.

Notes:

  1. You can set a headteacher, also named Course Advisor/Main Teacher in the School Dashboard, when creating the course. The headteacher can edit the course in the ClassIn app, such as create/edit/delete lessons and course students in the IM group. The operation in the ClassIn app by headteachers will not be synchronized to your school's system. For example, the headteacher created a new lesson in the IM group. The data of the newly added lesson will not be synchronized to your system.
  2. You cannot remove the headteacher once set. The API only supports to change the headteacher. When passing an empty value for mainTeacherUid, it means you did not pass a value and did not modify the parameter.

URL

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

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 Timestamp 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
folderId No Null New resource folder ID Null
courseName No Null New course name Null
expiryTime No Expired time passes empty, does not modify;Pass 0, change to never expire;If the timestamp is not 0, the validity period is the time passed.If an expiry date is set, the expiry date can only be passed within 1 year of the current time Expiration time Unix Epoch timeStamp
mainTeacherUid No If no parameter passed it means no changes. The teacher in charge the UID Register the user UID returned by the user interface
subjectId No Not passing any value or passing values that do not comply with the rule is determined as 0. This parameter is only valid for courses created in the School Dashboard for primary and secondary schools. Course subject 1: Chinese; 2: Maths; 3: English; 4: Physics; 5: Chemistry; 6: Biology; 7: Politics; 8: History; 9: Geography; 10: Ideological and Moral Education; 11: Music; 12: PE; 13: Arts; 14: General Technology; 15: IT; 16: Science; 99: Others
stamp No 1 join,2 not to join,the default is 1 The original head teacher whether to join the teacher list Null
Filedata No Binary stream Upload a picture of the course cover Null
courseIntroduce No 0-400 characters, more than 400 will automatically intercept 400 words Course introduction Null Remark:The first four parameters are required,The rest of the optional,Change which parameter to pass which parameter,Parameters that are not modified are not transmitted,If mainTeacherAccount is passed and stamp is not passed, the default original head teacher joins the teacher list.
classroomSettingId No Default is 0 Classroom setting ID Classroom setting ID search method: log into the background of eeo.cn, find the institutional setting and classroom setting, and the classroom setting ID will be displayed for each set of classroom Settings;After selecting this set of Settings, all classrooms under the course will be displayed according to this setting.
Classroom Settings include: a. classroom skin, b. switch Settings (toolbar below the head, chat window, student-side roster, after-class evaluation, classroom toolbox, cloud disk, etc.), c. parameter Settings (class countdown, classroom chat interval, etc.)

Response data

key Type Sample value meaning
error_info object Return message object
└ errno number 1 Error code
└ error string "Program normal execution" Error list

Sample

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

SID=2339736&safeKey=f834fff59eb3bc8a2ff26a3cb59155f0&timeStamp=1492792399&courseId=352861&folderId=22419&courseName=Today+is+a+good+day&expiryTime=&mainTeacherUid=1001001&Filedata=@~/photo.jpg&courseIntroduce=ClassIn,真正专业的在线教室&classroomSettingId=235
  • 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=352861" \
       -d "folderId=22419" \
       -d "courseName=Today is a good day" \
       -d "expiryTime=1484811085" \
       -d "mainTeacherUid=1001001" \
       -d "stamp=2" \
       -d "Filedata=@~/photo.jpg" \
       -d "courseIntroduce=ClassIn,真正专业的在线教室" \
       -d "classroomSettingId=235" \
       "https://api.eeo.cn/partner/api/course.api.php?action=editCourse"

Response sample(The normal return json packet example)

{
  "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.).
103 Failed to upload the image to the server.
104 Operation failed(unknown error).
114 Server exception.
144 There is no such course in the institution.
147 No information about the course.
149 The course has been deleted.
151 The expiration time should be at least 1 day later.
152 The expiration time cannot be earlier than the end time of the last lesson.
153 The course has expired.
154 The expiration time should be the time point within one year.
160 The institution does not have the directory/folder in its cloud disk.
260 Failed to add a course advisor(mainTeacher).
310 The new course advisor does not exist.
311 A course student cannot be set as course advisor.
312 Course auditing students cannot be set as course advisor.
314 The former course advisor has unfinished lessons and cannot be replaced.
331 The format of course advisor's account is incorrect.
334 The course advisor is not the teacher of this institution.
369 The course/lesson type(public course) cannot be edited.
371 The classroom setting does not exist.
373 The classroom setting does not belong to your institution.
389 The course advisor has been deactivated.
400 The requested data is not valid.
805 The course advisor is stopped using.
883 The account of course advisor has been deleted by the user.

results matching ""

    No results matching ""