Restore SEBPatch

This commit is contained in:
2025-06-01 11:56:28 +02:00
parent 8c656e3137
commit 00707825b4
1009 changed files with 5005 additions and 6502 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024 ETH Zürich, IT Services
* Copyright (c) 2025 ETH Zürich, IT Services
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,6 +21,9 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
case Keys.Proctoring.ForceRaiseHandMessage:
MapForceRaiseHandMessage(settings, value);
break;
case Keys.Proctoring.ScreenProctoring.CacheSize:
MapCacheSize(settings, value);
break;
case Keys.Proctoring.ScreenProctoring.ClientId:
MapClientId(settings, value);
break;
@@ -42,8 +45,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
case Keys.Proctoring.ScreenProctoring.ImageQuantization:
MapImageQuantization(settings, value);
break;
case Keys.Proctoring.ScreenProctoring.MaxInterval:
MapMaxInterval(settings, value);
case Keys.Proctoring.ScreenProctoring.IntervalMaximum:
MapIntervalMaximum(settings, value);
break;
case Keys.Proctoring.ScreenProctoring.IntervalMinimum:
MapIntervalMinimum(settings, value);
break;
case Keys.Proctoring.ScreenProctoring.MetaData.CaptureApplicationData:
MapCaptureApplicationData(settings, value);
@@ -54,9 +60,6 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
case Keys.Proctoring.ScreenProctoring.MetaData.CaptureWindowTitle:
MapCaptureWindowTitle(settings, value);
break;
case Keys.Proctoring.ScreenProctoring.MinInterval:
MapMinInterval(settings, value);
break;
case Keys.Proctoring.ScreenProctoring.ServiceUrl:
MapServiceUrl(settings, value);
break;
@@ -77,6 +80,14 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
}
}
private void MapCacheSize(AppSettings settings, object value)
{
if (value is int size)
{
settings.Proctoring.ScreenProctoring.CacheSize = size;
}
}
private void MapCaptureApplicationData(AppSettings settings, object value)
{
if (value is bool capture)
@@ -173,19 +184,19 @@ namespace SafeExamBrowser.Configuration.ConfigurationData.DataMapping
}
}
private void MapMaxInterval(AppSettings settings, object value)
private void MapIntervalMaximum(AppSettings settings, object value)
{
if (value is int interval)
{
settings.Proctoring.ScreenProctoring.MaxInterval = interval;
settings.Proctoring.ScreenProctoring.IntervalMaximum = interval;
}
}
private void MapMinInterval(AppSettings settings, object value)
private void MapIntervalMinimum(AppSettings settings, object value)
{
if (value is int interval)
{
settings.Proctoring.ScreenProctoring.MinInterval = interval;
settings.Proctoring.ScreenProctoring.IntervalMinimum = interval;
}
}