@@ -17,6 +17,7 @@ export class UI {
1717 private _loginScreen : LoginScreenUI | null = null ;
1818 private _examModeScreen : ExamModeUI | null = null ;
1919 private _isLockScreen : boolean = false ;
20+ private _examModeDisabled : boolean = false ; // Used to disable exam mode in case of admin override
2021 private _wallpaper : WallpaperUI ;
2122 private _calendar : CalendarUI ;
2223 private _logo : HTMLImageElement ;
@@ -81,6 +82,14 @@ export class UI {
8182 return this . _isLockScreen ;
8283 }
8384
85+ /**
86+ * Override the exam mode and show the regular login screen. Useful for admins who need to debug.
87+ */
88+ public overrideExamMode ( ) : void {
89+ this . _examModeDisabled = true ;
90+ this . checkForExamMode ( ) ;
91+ }
92+
8493 public setDebugInfo ( info : string ) : void {
8594 this . _infoBars . setDebugInfo ( info ) ;
8695 }
@@ -129,7 +138,7 @@ export class UI {
129138 return now >= beginExamModeAt && now < endAt ;
130139 } ) ;
131140
132- if ( ongoingExams . length > 0 ) {
141+ if ( ! this . _examModeDisabled && ongoingExams . length > 0 ) {
133142 // Only set exam mode if the exam that is starting soon is not already in the list of exam ids displayed in exam mode
134143 if ( ! this . _examModeScreen ?. examMode || ! ongoingExams . some ( ( exam ) => this . _examModeScreen ?. examIds . includes ( exam . id ) ) ) {
135144 console . log ( "Activating exam mode login UI" ) ;
0 commit comments