Chỉnh sửa khóa học

Mục lục

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.


  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.


HTTP Request Methods #

  • POST

Coding format #

  • UTF-8

Request Data #

KeyRequiredMore RestrictionsInstructionsDescription
SIDYesNullSchool IDIt is available through the application
safeKeyYesFixed 32-bit all lowercase charactersSchool authentication security keysafeKey=MD5(SECRET+timeStamp)
timeStampYesNullTimestamp used by safeKeyUnix Epoch timeStamp is the number of seconds passed by 00:00 (world standard time) on January 1, 1970
courseIdYesNullCourse IDNull
folderIdNoNullNew resource folder IDNull
courseNameNoNullNew course nameNull
expiryTimeNoExpired 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 timeExpiration timeUnix Epoch timeStamp
mainTeacherUidNoIf no parameter passed it means no changes.The teacher in charge the UIDRegister the user UID returned by the user interface
subjectIdNoNot 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 subject1: 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
stampNo1 join,2 not to join,the default is 1The original head teacher whether to join the teacher listNull
FiledataNoBinary streamUpload a picture of the course coverNull
courseIntroduceNo0-400 characters, more than 400 will automatically intercept 400 wordsCourse introductionNull 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.
classroomSettingIdNoDefault is 0Classroom setting IDClassroom setting ID search method: log into the background of, 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 #

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

Sample #

  • HTTP request
POST /partner/api/course.api.php?action=editCourse HTTP/1.1
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=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" \

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