-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conference attendence per user is calculated in client to reduce network messages and enable future adjustment via BBB API. #56
- Loading branch information
Showing
37 changed files
with
283 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/main/kotlin/de/thm/mni/ii/classroom/controller/BBBApiController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,5 +11,6 @@ enum class ConferenceAction { | |
CREATE, | ||
CLOSE, | ||
PUBLISH, | ||
HIDE | ||
HIDE, | ||
USER_CHANGE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
package de.thm.mni.ii.classroom.event | ||
|
||
import de.thm.mni.ii.classroom.model.classroom.User | ||
import de.thm.mni.ii.classroom.model.classroom.UserDisplay | ||
|
||
data class UserEvent( | ||
val user: User, | ||
val inConference: Boolean = false, | ||
val conferenceId: String? = null, | ||
val user: UserDisplay, | ||
val userAction: UserAction | ||
) : ClassroomEvent(UserEvent::class.simpleName!!) | ||
|
||
enum class UserAction { | ||
JOIN, | ||
JOIN_CONFERENCE, | ||
LEAVE_CONFERENCE, | ||
VISIBILITY_CHANGE, | ||
LEAVE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 14 additions & 12 deletions
26
src/main/kotlin/de/thm/mni/ii/classroom/model/classroom/UserDisplay.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
package de.thm.mni.ii.classroom.model.classroom | ||
|
||
import de.thm.mni.ii.classroom.model.ClassroomDependent | ||
import com.fasterxml.jackson.annotation.JsonIgnore | ||
|
||
data class UserDisplay( | ||
override val classroomId: String, | ||
val userId: String, | ||
val fullName: String, | ||
val userRole: UserRole, | ||
var inConference: Boolean = false, | ||
var conferenceId: String? | ||
) : ClassroomDependent { | ||
constructor(user: User, conference: Conference?) : this( | ||
class UserDisplay( | ||
classroomId: String, | ||
userId: String, | ||
fullName: String, | ||
userRole: UserRole, | ||
var visible: Boolean, | ||
val conferences: List<ConferenceInfo> = listOf() | ||
) : User(classroomId, userId, fullName, userRole) { | ||
constructor(user: User, visible: Boolean) : this( | ||
user.classroomId, | ||
user.userId, | ||
user.fullName, | ||
user.userRole, | ||
conference?.visible ?: false, | ||
if (conference?.visible == true) conference.conferenceId else null | ||
visible | ||
) | ||
|
||
@JsonIgnore | ||
fun getUser(): User = this | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.