How to end a class?
In Flexible Classroom, the teacher clicks Leave Classroom to leave temporarily, which will not change the classroomroom state. To end the class, refer to the following steps:
-
The teacher calls
leaveClassroom
. The sample code is as follows:At this point, the classroom state includes the following:
-
If you want to actively close the classroom, call
RoomStore:updateClassState
to update the room state. The sample code is as follows: -
To end the class in the background, call RESTful API to set the classroom state to one of the following:
0
: Not started.1
: Started.2
: Ended. The class is over, but users can still join and stay during the extended time.3
: Closed. The classroom is closed after the extended class time. All users are forced out and cannot join again.