Restore SEBPatch

This commit is contained in:
2025-06-01 11:44:20 +02:00
commit 8c656e3137
1297 changed files with 142172 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/*
* Copyright (c) 2024 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Settings.Proctoring
{
/// <summary>
/// Defines all possible image formats for the screen proctoring.
/// </summary>
public enum ImageFormat
{
/// <summary>
/// An image with the Windows Bitmap format.
/// </summary>
Bmp,
/// <summary>
/// An image with the Graphics Interchange Format format.
/// </summary>
Gif,
/// <summary>
/// An image with the Joint Photographic Experts Group format.
/// </summary>
Jpg,
/// <summary>
/// An image with the Portable Network Graphics format.
/// </summary>
Png
}
}

View File

@@ -0,0 +1,51 @@
/*
* Copyright (c) 2024 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
namespace SafeExamBrowser.Settings.Proctoring
{
/// <summary>
/// Defines all possible image quantization algorithms for the screen proctoring.
/// </summary>
public enum ImageQuantization
{
/// <summary>
/// Reduces an image to a black and white image with 1 bit per pixel.
/// </summary>
BlackAndWhite1bpp,
/// <summary>
/// Reduces an image to a colored image with 8 bits per pixel (256 colors).
/// </summary>
Color8bpp,
/// <summary>
/// Reduces an image to a colored image with 16 bits per pixel (5 bits per color and the remaining bit unused, thus 32'768 colors).
/// </summary>
Color16bpp,
/// <summary>
/// Reduces an image to a colored image with 24 bits per pixel (16'777'216 colors).
/// </summary>
Color24bpp,
/// <summary>
/// Reduces an image to a grayscale image with 2 bits per pixel (4 shades).
/// </summary>
Grayscale2bpp,
/// <summary>
/// Reduces an image to a grayscale image with 4 bits per pixel (16 shades).
/// </summary>
Grayscale4bpp,
/// <summary>
/// Reduces an image to a grayscale image with 8 bits per pixel (256 shades).
/// </summary>
Grayscale8bpp
}
}

View File

@@ -0,0 +1,34 @@
/*
* Copyright (c) 2024 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using System;
namespace SafeExamBrowser.Settings.Proctoring
{
/// <summary>
/// All settings related to the metadata capturing of the screen proctoring.
/// </summary>
[Serializable]
public class MetaDataSettings
{
/// <summary>
/// Determines whether data of the active application shall be captured and transmitted.
/// </summary>
public bool CaptureApplicationData { get; set; }
/// <summary>
/// Determines whether data of the browser application shall be captured and transmitted.
/// </summary>
public bool CaptureBrowserData { get; set; }
/// <summary>
/// Determines whether the title of the currently active window shall be captured and transmitted.
/// </summary>
public bool CaptureWindowTitle { get; set; }
}
}

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 2024 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using System;
namespace SafeExamBrowser.Settings.Proctoring
{
/// <summary>
/// Defines all settings related to remote proctoring.
/// </summary>
[Serializable]
public class ProctoringSettings
{
/// <summary>
/// Determines whether the entire remote proctoring feature is enabled.
/// </summary>
public bool Enabled { get; set; }
/// <summary>
/// Determines whether the message input for the raise hand notification will be forced.
/// </summary>
public bool ForceRaiseHandMessage { get; set; }
/// <summary>
/// All settings for the screen proctoring.
/// </summary>
public ScreenProctoringSettings ScreenProctoring { get; set; }
/// <summary>
/// Determines whether the raise hand notification will be shown in the shell.
/// </summary>
public bool ShowRaiseHandNotification { get; set; }
/// <summary>
/// Determines whether the proctoring notification will be shown in the taskbar.
/// </summary>
public bool ShowTaskbarNotification { get; set; }
public ProctoringSettings()
{
ScreenProctoring = new ScreenProctoringSettings();
}
}
}

View File

@@ -0,0 +1,79 @@
/*
* Copyright (c) 2024 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
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
using System;
namespace SafeExamBrowser.Settings.Proctoring
{
/// <summary>
/// All settings for the screen proctoring.
/// </summary>
[Serializable]
public class ScreenProctoringSettings
{
/// <summary>
/// The client identifier used for authentication with the screen proctoring service.
/// </summary>
public string ClientId { get; set; }
/// <summary>
/// The client secret used for authentication with the screen proctoring service.
/// </summary>
public string ClientSecret { get; set; }
/// <summary>
/// Determines whether the screen proctoring is enabled.
/// </summary>
public bool Enabled { get; set; }
/// <summary>
/// The identifier of the group to which the user belongs.
/// </summary>
public string GroupId { get; set; }
/// <summary>
/// Defines the factor to be used for downscaling of the screen shots.
/// </summary>
public double ImageDownscaling { get; set; }
/// <summary>
/// Defines the image format to be used for the screen shots.
/// </summary>
public ImageFormat ImageFormat { get; set; }
/// <summary>
/// Defines the algorithm to be used for quantization of the screen shots.
/// </summary>
public ImageQuantization ImageQuantization { get; set; }
/// <summary>
/// The maximum time interval in milliseconds between screen shot transmissions.
/// </summary>
public int MaxInterval { get; set; }
/// <summary>
/// All settings related to the metadata capturing of the screen proctoring.
/// </summary>
public MetaDataSettings MetaData { get; set; }
/// <summary>
/// The minimum time interval in milliseconds between screen shot transmissions.
/// </summary>
public int MinInterval { get; set; }
/// <summary>
/// The URL of the screen proctoring service.
/// </summary>
public string ServiceUrl { get; set; }
public ScreenProctoringSettings()
{
MetaData = new MetaDataSettings();
}
}
}