Edit Classroom

This interface is used to modify the settings of an LMS classroom activity, including the name, schedule(start/end time), teacher, co-teacher, number of students on-stage, and settings for cloud recording, web live streaming/playback.

Note:

  • This interface only supports editing standard classrooms and does not support modifying settings for dual-teacher sub-classrooms。
  • You may only pass the parameters that need to be modified; you can provide one or more parameters. If no parameters are provided, an error Incomplete Parameters will be returned.
  • The parameters of screenMode (screen mode) and teachMode (teaching mode) are not needed. They will be assigned appropriate values based on the value of cameraHide (whether to hide the seat area).
    • If cameraHide=0 (seat area shown), then teachMode=1 (online classroom) and screenMode=1 (standard mode).
    • If cameraHide=1 (seat area hidden), then teachMode=2 (smart classroom), and screenMode=2 (large-screen mode).
  • This interface does not support modifying the publication status. To publish the classroom activity, please call the Release Activity Interface.
  • If cloud recording is enabled but web live streaming is not activated, the data will return the classroom web-live player address live_url, while the pulling stream address live_info will be empty.
  • If both cloud recording and web live streaming are enabled, three pulling stream addresses (RTMP, HLS, FLV) will be generated and bound to the classroom. The data will return the classroom web-live player address live_url and the pulling stream addresses live_info. If the web-live streaming is later canceled, the three pulling stream addresses will still exist and remain bound to the classroom.
  • If the classroom does not enable cloud recording, both the web-live player address live_url and the pulling stream addresses liveInfo in the data will be empty.
  • recordType, recordState, liveState, and openState constitute a complete set of parameters and cannot be partially passed; otherwise, an error will occur.
  • This interface does not support editing classrooms in draft status.

URL

https://root_url/lms/activity/updateClass

HTTP Request Methods

  • POST

coding Format

  • UTF-8

Request Data

Header Parameters

Key Required Type Description
X-EEO-SIGN Yes string Signature; see the rules here
X-EEO-UID Yes string Institution's SID
X-EEO-TS Yes string Timestamp

Body Parameters

key Required Type Description Rules Description
courseId Yes integer Class (Course) ID ID of the class to which the activity belongs
activityId Yes integer Classroom Activity ID
unitId No integer Unit ID To modify the unit that the classroom belong to
name No string Classroom Activity Name
teacherUid No integer Teacher UID To change the teacher
startTime No integer Activity Start Time
endTime No integer Activity End Time
assistantUids No array[integer] Co-Teacher UID Array Defaults to none if not provided; UID can be obtained from the user registration interface
cameraHide No integer Whether to hide the seat area 0 = No (show seat area), 1 = Yes (hide seat area). Not provided means do not change the settings; incorrect values result in Incomplete Parameters. When cameraHide=1, isAutoOnstage will always be set to 0 (i.e., the API will ignore the value of isAutoOnstage).
isAutoOnstage No integer whether to allow auto onstage for Students 0 = No(not auto onstage), 1 = Yes(auto onstage). Not provided means do not change the settigns; incorrect values result in Incomplete Parameters.
seatNum No integer Number of people on stage Includes the teacher. For example, passing 1 means 1v0 (only the teacher's camera is displayed). Passing a number less than the configured maximum will be executed normally; passing a number greater than the configured maximum will reset to the maximum number of students allowed.
isHd No integer Whether HD is enabled 0 = Non-HD, 1 = HD, 2 = Full HD. Not provided means do not change the settings; incorrect values result in Incomplete Parameters. Currently only supports HD and Full HD for 1v1 or 1v6.
isDc No integer In dual-camera mode, whether to enable the secondary camera 0 = Off, 3 = Enable Full HD Secondary Camera. Not provided means do not change the settings; incorrect values result in Incomplete Parameters. If isDc equals 3 and seatNum is not 2 (not 1v1), it returns This setting does not support dual camera. If isDc=3 and seatNum=2, isHd will be set to 2 (the API will ignore the value of isHd).
recordType No integer Type of cloud recording 0 = Record classroom, 1 = Record the teacher camera, 2 = Record Both. Not provided means do not change the settings; incorrect values result in Incomplete Parameters.
recordState No integer Whether to enable cloud recording 0 = Off(do not record), 1 = On(record). Not provided means do not change this settings; incorrect values result in Incomplete Parameters. When recording is enabled, ClassIn will record the classroom, which can be used for web live streaming or replay. If web live streaming or replay is required, recording must be enabled; otherwise, web live streaming or replay cannot be started.
liveState No integer Whether to enable web live streaming 0 = Off, 1 = On. Not provided means do not change this settings; incorrect values result in Incomplete Parameters. If web live streaming is required, recording must be enabled.
openState No integer Whether to enable the web replay 0 = Off, 1 = On. Not provided means do not change this settings; incorrect values result in Incomplete Parameters. If web replay is required, recording must be enabled.
isAllowCheck No integer Whether to allow viewing each other's learning reports and scores 0 = Not allowed, 1 = Allow. Not provided means do not change this settings; incorrect values result in Incomplete Parameters.

Response Data

Parameter Name Type Example Value Description
code integer 1 Error code
msg string "Execution successful" Error message
data array [] Response array
 └ object Response object
  └ activityId integer 25096094 Activity ID
  └ name string "API Edited Classroom" Classroom name

Sample

  • HTTP request
POST /lms/activity/updateClass HTTP/1.1
Host: root_url
X-EEO-SIGN: a972505b54568015e9ecdc65d1dfbe4e
X-EEO-UID: 409864
X-EEO-TS: 1722938191
Content-Type: application/json
Content-Length: 298

{
    "courseId": 414193,
    "unitId": 26020897,
    "activityId": 25096094,
    "name": "API Edited Classroom",
    "teacherUid": 409864,
    "startTime": 1723010791,
    "endTime": 1723016791,
    "publishFlag": 2,
    "liveState": 1,
    "openState": 1,
    "recordState": 1,
    "recordType": 0
}
  • Shell cURL analog request instruction
curl -X POST \
     -H 'Host: root_url' \
     -H 'X-EEO-SIGN: a972505b54568015e9ecdc65d1dfbe4e' \
     -H 'X-EEO-UID: 409864' \
     -H 'X-EEO-TS: 1722938191' \
     -H 'Content-Type: application/json' \
     -d '{"courseId": 414193, "unitId": 26020897, "activityId": 25096094, "name": "API Edited Classroom", "teacherUid": 409864, "startTime": 1723010791, "endTime": 1723016791, "publishFlag": 2, "liveState": 1, "openState": 1, "recordState": 1, "recordType": 0}' \
     'https://root_url/lms/activity/updateClass'

Response Sample(The normal return json packet example)

{
    "code": 1,
    "msg": "Execution successful",
    "data": {
        "activityId": 25096094,
        "name": "API Edited Classroom"
    }
}

Error Code Descriptions

Error Code Description
100 Classroom parameter error
121 The teacher does not exist in your institution; please add the teacher to your institution first
124 Cannot change the start time within one minute before the classroom activity starts
136 The teacher does not exist in your institution; please add the teacher to your institution first
140 It is an ongoing classroom activity; cannot be edited or deleted
142 No information for this classroom activity under the course
143 No information for this classroom activity
144 No such class in your institution
145 This classroom activity has already ended and cannot be edited
147 No information for this class
153 This class has been dissolved and cannot be operated
165 A single classroom activity must be at least 15 minutes and cannot exceed 24 hours
172 Students in the class cannot be added as teachers
173 Auditors in the class cannot be added as teachers
212 This classroom activity has been deleted
219 Teacher does not exist
221 Failed to modify settings for web-live and playback
222 Failed to modify the settings of the classroom activity
226 Unrecorded classroom activity cannot modify the settings of web live streaming and playback
269 Information of classroom activity is incorrect; please delete and recreate
318 Co-teachers are not teachers of your institution
319 Class students cannot be added as co-teachers
320 Class auditors cannot be added as co-teachers
322 Teacher of classroom activity cannot be added as co-teachers
324 Failed to add co-teacher to the teacher list
325 Transfer students cannot be added as teachers
326 Failed to add co-teacher to the teacher list
328 Co-teachers cannot be added as teachers
350 Cannot modify name, start time, authorized resources, number of people on stage, etc., within 20 minutes before the classroom activity starts
368 Current number of students on stage does not support HD
385 End time of classroom activity has passed; cannot modify teacher or co-teacher
387 Teacher has been disabled
388 Co-teacher has been disabled
450 Quantity exceeds the limit
451 Failed to add cover and description of the web live streaming
454 Start and end time of classroom activity overlap with system maintenance time
767 In the current version of the school account, the end time for classroom activities cannot exceed the account's service period
769 You are using teacher version or teacher trial version; head teacher is not the same person
800 Teacher is in the process of being disabled
804 Co-teacher is in the process of being disabled
808 This setting does not support dual camera
863 Duration of classroom activity does not comply with the rules
875 Cannot modify name, start time, aythorized resources, number of people onstage, classroom mode, etc., within 5 minutes before the classroom activity starts
884 Teacher account has been canceled
885 Co-teacher account has been canceled
21304 The institution does not support setting subjects
21305 Subject does not exist
21317 Number of co-teachers exceeds limit
21319 Teacher has been deleted
101001001 Parameter error
101002005 Signature exception
101002006 Timestamp expired
101002008 Timestamp does not exist
121601005 Web live streaming is not supported
121601006 On-the-spot scene recording is not supported
121601008 Co-teacher is not supported
121601009 Web playback is not supported
121601010 Classroom recording is not supported
121601020 Parameter error
121601020 Business parameter error
121601021 Class does not belong to your institution
121601022 It is not a standard class
121601023 This class has been dissolved and cannot be operated
121601030 Missing required parameters

results matching ""

    No results matching ""