From f8ffcd173a929ef55a944ec522df8ff208586118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Wed, 12 May 2021 16:15:49 +0200 Subject: [PATCH] SEBWIN-449: Ensured participant leaves meeting on proctoring reconfiguration instruction. --- .../ProctoringController.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/SafeExamBrowser.Proctoring/ProctoringController.cs b/SafeExamBrowser.Proctoring/ProctoringController.cs index f9b5e8df..63ddf825 100644 --- a/SafeExamBrowser.Proctoring/ProctoringController.cs +++ b/SafeExamBrowser.Proctoring/ProctoringController.cs @@ -184,13 +184,18 @@ namespace SafeExamBrowser.Proctoring private void StopProctoring() { - if (window != default(IProctoringWindow)) + if (control != default(ProctoringControl) && window != default(IProctoringWindow)) { - window.Close(); - window = default(IProctoringWindow); - fileSystem.Delete(filePath); + control.Dispatcher.Invoke(() => + { + control.ExecuteScriptAsync("api.executeCommand('hangup'); api.dispose();"); + window.Close(); + control = default(ProctoringControl); + window = default(IProctoringWindow); + fileSystem.Delete(filePath); - logger.Info("Stopped proctoring."); + logger.Info("Stopped proctoring."); + }); } }