Skip to content

Commit

Permalink
SEBWIN-516: Added missing data mapping for raise hand feature and ens…
Browse files Browse the repository at this point in the history
…ured that message panel is closed upon server confirmation.
  • Loading branch information
dbuechel committed Oct 21, 2021
1 parent 0da587e commit 05db975
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ internal override void Map(string key, object value, AppSettings settings)
{
switch (key)
{
case Keys.Proctoring.ForceRaiseHandMessage:
MapForceRaiseHandMessage(settings, value);
break;
case Keys.Proctoring.JitsiMeet.AllowChat:
MapJitsiMeetAllowChat(settings, value);
break;
Expand Down Expand Up @@ -71,6 +74,9 @@ internal override void Map(string key, object value, AppSettings settings)
case Keys.Proctoring.JitsiMeet.VideoMuted:
MapJitsiMeetVideoMuted(settings, value);
break;
case Keys.Proctoring.ShowRaiseHand:
MapShowRaiseHand(settings, value);
break;
case Keys.Proctoring.ShowTaskbarNotification:
MapShowTaskbarNotification(settings, value);
break;
Expand Down Expand Up @@ -128,6 +134,14 @@ internal override void Map(string key, object value, AppSettings settings)
}
}

private void MapForceRaiseHandMessage(AppSettings settings, object value)
{
if (value is bool force)
{
settings.Proctoring.ForceRaiseHandMessage = force;
}
}

private void MapJitsiMeetAllowChat(AppSettings settings, object value)
{
if (value is bool allow)
Expand Down Expand Up @@ -272,6 +286,14 @@ private void MapJitsiMeetVideoMuted(AppSettings settings, object value)
}
}

private void MapShowRaiseHand(AppSettings settings, object value)
{
if (value is bool show)
{
settings.Proctoring.ShowRaiseHandNotification = show;
}
}

private void MapShowTaskbarNotification(AppSettings settings, object value)
{
if (value is bool show)
Expand Down
2 changes: 2 additions & 0 deletions SafeExamBrowser.Configuration/ConfigurationData/Keys.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,8 @@ internal static class Certificates

internal static class Proctoring
{
internal const string ForceRaiseHandMessage = "raiseHandButtonAlwaysPromptMessage";
internal const string ShowRaiseHand = "raiseHandButtonShow";
internal const string ShowTaskbarNotification = "showProctoringViewButton";
internal const string WindowVisibility = "remoteProctoringViewShow";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private void ShowLowered()
Icon.Content = IconResourceLoader.Load(LoweredIcon);
Message.IsEnabled = true;
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
Popup.IsOpen = false;
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ private void ShowLowered()
Icon.Content = IconResourceLoader.Load(LoweredIcon);
Message.IsEnabled = true;
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
Popup.IsOpen = false;
}

private void ShowRaised()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ private void ShowLowered()
Icon.Content = IconResourceLoader.Load(LoweredIcon);
Message.IsEnabled = true;
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
Popup.IsOpen = false;
Text.Text = text.Get(TextKey.Notification_ProctoringHandLowered);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ private void ShowLowered()
Icon.Content = IconResourceLoader.Load(LoweredIcon);
Message.IsEnabled = true;
NotificationButton.ToolTip = text.Get(TextKey.Notification_ProctoringHandLowered);
Popup.IsOpen = false;
}

private void ShowRaised()
Expand Down

0 comments on commit 05db975

Please sign in to comment.