Chỉnh sửa thông tin lớp học

Mục lục

To edit the class(lesson) information,SID, safekey, timeStamp, course ID, class name, class time, teacher account, teacher name, cloud disk directory ID, recording, live broadcasting, playback, co-teachert, teacher UID, co-teachert UID, etcSID, safeKey, ttimeStamp, courseId, classId are required. Fill in any of the other parameters that need to be modified (edit any of the three parameters: recording, live streaming, playback, and the other two parameters must be filled in,The other two parameters are required.Otherwise, it will not take effect.)To modify the status of the recording of the on-the-spot scene, the three parameters of class cloud recording, website live broadcast and webpage replay are required. Returns the success statement after execution, to change the number of stage calls Edit Students On The Stage In The Class

Notes:

  • Class name, class time, cloud disk resources and number of people on the stage cannot be changed within 20 minutes before class begins.
  • If the teacher changes the class during the class, the teacher will quit the class.
  • If recording is set for a class (live streaming is not set), more_data returns the live player address for the class, with the pull stream address empty.
  • More_data returns the live player address and pull stream address of the lecture if the lecture is recorded and streamed live.
  • If you edit or set other parameters and do not change any of the recording/live/call back parameters, return more_data as created.
  • The co-teacherts have been set up before the class, and cannot be replaced or deleted after the class begins;If no ta is set after class, ta can be added.

  • More parameter rules are available in Parameter Rules

URL #

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

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
classNameNoNullClass nameNull
beginTimeNoNullClass timebegin time value = Unix Epoch timeStamp
endTimeNoIf you fill out the beginTime, you must fill in endTimeBreak timeend time value = Unix Epoch timeStamp
teacherUidNoNullTeacher’s UIDThe returned UID from register users
folderIdNoDefault is the school’s top-level directory IDCloud driver directory IDNull
recordNoDefault is 0 ,All non-1 Numbers will be treated as 0Record the class(0 close,1 open)Null
recordSceneNoThe default value is 0. All numbers other than 1 will be treated as 0Record on-the-spot scene(0 deactivate,1 activate)Null
liveNoThe default is 0, and all non-1 Numbers will be treated as 0 forlive (0 shutoff, 1 open)Null
replayNoThe default is 0, and all non-1 Numbers will be treated as 0 forplayback (0 off, 1 on)Null
assistantUidNoChoose one in assistantUids and assistantUid to pass the parameter.Either not pass this parameter or pass UID. Please do not pass an empty parameter.co-teachert uidUser’s UID returned by calling registered user interface
assistantUidsNoChoose one in assistantUids and assistantUid to pass the parameter.Either not pass this parameter or pass UID array in JSON and Int. Please do not pass an empty parameter. Can pass just one co-teacher array.Co-teacher UID arrayUser’s UID returned by calling registered user interface
isAutoOnstageNo0=automatic,1=Don’t automatically,Don’t fill in,Do not fill, do not modify,Any number that’s not a 1, it’s treated as a 0Whether students enter the classroom automaticallyThere is no
classIntroduceNo0-1000 words, no distinction between Chinese and English, more than 1000 words will automatically cut into 1000 wordsClass introductionThere is no
watchByLoginNoNo or no, default values are usedOnly after logging into ClassIn account is allowed to watch, without logging in cannot watch,0=Did not open,1=openTwo or more items of course record, live and replay are not enabled, and this parameter is not used
allowUnloggedChatNoNo or no, default values are usedUnlogged users are allowed to participate in live chat and thumb up,0=Don’t allow,1=allowClass record and live are not enabled. This parameter is not used

Request data #

keyRequiredMore RestrictionsInstructionsDescription
more_dataarray[]Returns an array of Data information
 └ live_urlstringhttps://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164dLesson live player address
 └ live_infoarray[]Returns an array of Data information
  └ RTMPstring“rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd”Pull flow address
  └ HLSstringhttps://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cdPull flow address
  └ FLVstringhttps://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cdPull flow address
error_infoobjectReturn message object
└ errnonumber1Error code
└ errorstring“Normal execution”Error list

Sample #

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

SID=2339736&safeKey=58ce17711abea665f40f67d550ce96fb&timeStamp=1493364941&courseId=490583&classId=1395039&className=chinese&beginTime=1493434330&endTime=1493444330&teacherAccount=18503160003&folderId=&record=1&live=1&replay=1
  • 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=442447" \
     -d "classId=23644"  \
     -d "className=测试课程" \
     -d "beginTime=1484739085" \
     -d "endTime=1484739085" \
     -d "teacherUid=1001001" \
     -d "folderId=1" \
     -d "record=1" \
     -d "live=1" \
     -d "replay=1" \
     -d "assistantUids=[1001002,1001003]" \
     "https://api.eeo.cn/partner/api/course.api.php?action=editCourseClass"

Response sample(The normal return json packet example) #

{
  "more_data": {
        "live_url": "https://api.eeo.cn/live.php?lessonKey=0fdc12bc3558164d",
        "live_info": {
            "RTMP": "rtmp://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
            "HLS": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.m3u8?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd",
            "FLV": "https://liveplay.eeo.cn/eeolive/576f5a8c97d9-183291632119a96.flv?txSecret=f4bfe1afcf2592de61c11af9e0954c00&txTime=7d8d37cd"
        }
    },
  "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.
119The lesson end time must be later than the lesson start time.
120The lesson must start at least one minute after the current time.
136There is no such teacher in your institution. Please add the teacher to your institution first.
140The lesson is still ongoing and cannot be edited or deleted.
142The lesson does not exist in the course.
143No information for this lesson.
144There is no such course in your institution.
145This lesson is finished and cannot be deleted.
160Your institution does not have this directory/folder in its cloud disk.
165The lesson duration shall not be less than 15 minutes and not more than 24 hours.
172Course students cannot be set as teachers when creating lessons.
173Course auditing students cannot be set as teachers when creating lessons.
212The lesson has been deleted.
268The lesson start time exceeds the valid range(The start time must be within 3 years).
282The lesson modified successfully. The recording parameter is incorrect. Thus the recording function is not activated.
283The lesson modified successfully, but failed to modify the recording function. Classroom recording cannot be activated within 20 minutes before the lesson starts.
284The lesson modified successfully. There is problems with the video service, and the recording function is not activated.
318The co-teacher is not a teacher of your institution.
319Course students cannot be set as co-teachers.
320Course auditing students cannot be set as co-teachers.
321Transfer students cannot be set as co-teachers.
322Lesson teachers can’t be set as co-teachers.
323Co-teachers failed to purchase lessons.
324The lesson teacher failed to be added to the teacher list.
325Transfer students cannot be set as teachers.
326The co-teacher failed to be added to the teacher list.
327The co-teacher failed to withdraw from the lesson.
328The co-teacher in the lesson cannot be added as the teacher in the same lesson.
330The format of co-teacher’s account is incorrect(This error code was removed in April 2022.).
350The lesson name, start time, cloud disk resources and number of students on the stage cannot be modified within 20 minutes before the lesson starts.
369The course/lesson of this type(public course) cannot be operated.
372Failed to modify the function of students auto on stage.
385After the end time of the lesson, you can’t modify the teacher or co-teachert.
387The teacher is deactivated.
388The co-teacher is deactivated.
400The requested data is not valid.
454The start and end time of a lesson overlaps with the system maintenance time.
466The lesson was created in the ClassIn LMS and cannot be edited via API. Please edit the lesson in the ClassIn LMS.
800The teacher is suspended.
804The co-teacher is suspended.
825The lesson was edited successfully, and the setting of the lesson introduction failed.
880Failed to modify teaching mode.
884The teacher’s account has been deleted by the user.
885The co-teacher’s account has been deleted by the user.
21316The data of co-teachers are duplicated.
21317The number of co-teachers exceeds the limit.