Skip to content

Commit 05db975

Browse files
committed
SEBWIN-516: Added missing data mapping for raise hand feature and ensured that message panel is closed upon server confirmation.
1 parent 0da587e commit 05db975

File tree

6 files changed

+28
-0
lines changed

6 files changed

+28
-0
lines changed

SafeExamBrowser.Configuration/ConfigurationData/DataMapping/ProctoringDataMapper.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ internal override void Map(string key, object value, AppSettings settings)
1717
{
1818
switch (key)
1919
{
20+
case Keys.Proctoring.ForceRaiseHandMessage:
21+
MapForceRaiseHandMessage(settings, value);
22+
break;
2023
case Keys.Proctoring.JitsiMeet.AllowChat:
2124
MapJitsiMeetAllowChat(settings, value);
2225
break;
@@ -71,6 +74,9 @@ internal override void Map(string key, object value, AppSettings settings)
7174
case Keys.Proctoring.JitsiMeet.VideoMuted:
7275
MapJitsiMeetVideoMuted(settings, value);
7376
break;
77+
case Keys.Proctoring.ShowRaiseHand:
78+
MapShowRaiseHand(settings, value);
79+
break;
7480
case Keys.Proctoring.ShowTaskbarNotification:
7581
MapShowTaskbarNotification(settings, value);
7682
break;
@@ -128,6 +134,14 @@ internal override void Map(string key, object value, AppSettings settings)
128134
}
129135
}
130136

137+
private void MapForceRaiseHandMessage(AppSettings settings, object value)
138+
{
139+
if (value is bool force)
140+
{
141+
settings.Proctoring.ForceRaiseHandMessage = force;
142+
}
143+
}
144+
131145
private void MapJitsiMeetAllowChat(AppSettings settings, object value)
132146
{
133147
if (value is bool allow)
@@ -272,6 +286,14 @@ private void MapJitsiMeetVideoMuted(AppSettings settings, object value)
272286
}
273287
}
274288

289+
private void MapShowRaiseHand(AppSettings settings, object value)
290+
{
291+
if (value is bool show)
292+
{
293+
settings.Proctoring.ShowRaiseHandNotification = show;
294+
}
295+
}
296+
275297
private void MapShowTaskbarNotification(AppSettings settings, object value)
276298
{
277299
if (value is bool show)

SafeExamBrowser.Configuration/ConfigurationData/Keys.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ internal static class Certificates
225225

226226
internal static class Proctoring
227227
{
228+
internal const string ForceRaiseHandMessage = "raiseHandButtonAlwaysPromptMessage";
229+
internal const string ShowRaiseHand = "raiseHandButtonShow";
228230
internal const string ShowTaskbarNotification = "showProctoringViewButton";
229231
internal const string WindowVisibility = "remoteProctoringViewShow";
230232

SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/RaiseHandControl.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ private void ShowLowered()
117117
Icon.Content = IconResourceLoader.Load(LoweredIcon);
118118
Message.IsEnabled = true;
119119
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
120+
Popup.IsOpen = false;
120121
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
121122
}
122123

SafeExamBrowser.UserInterface.Desktop/Controls/Taskbar/RaiseHandControl.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ private void ShowLowered()
123123
Icon.Content = IconResourceLoader.Load(LoweredIcon);
124124
Message.IsEnabled = true;
125125
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
126+
Popup.IsOpen = false;
126127
}
127128

128129
private void ShowRaised()

SafeExamBrowser.UserInterface.Mobile/Controls/ActionCenter/RaiseHandControl.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ private void ShowLowered()
117117
Icon.Content = IconResourceLoader.Load(LoweredIcon);
118118
Message.IsEnabled = true;
119119
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
120+
Popup.IsOpen = false;
120121
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
121122
}
122123

SafeExamBrowser.UserInterface.Mobile/Controls/Taskbar/RaiseHandControl.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ private void ShowLowered()
124124
Icon.Content = IconResourceLoader.Load(LoweredIcon);
125125
Message.IsEnabled = true;
126126
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
127+
Popup.IsOpen = false;
127128
}
128129

129130
private void ShowRaised()

0 commit comments

Comments
 (0)