Merge branch 'feature-33981/testtool_text_kopieren_verhindern_erschweren'

This commit is contained in:
Andreas Österreicher
2024-02-09 11:11:41 +01:00
6 changed files with 96 additions and 3 deletions
+20
View File
@@ -426,6 +426,26 @@ if (isset($_POST['save']) && isset($_SESSION['prestudent_id']))
});';
?>
$(document).bind('cut copy paste', function(e)
{
if (document.querySelector('.frage'))
{
e.preventDefault();
}
});
$(document).on("keydown", function (e)
{
if (((e.ctrlKey || e.metaKey) && e.keyCode === 85) || e.keyCode === 123)
{
e.preventDefault();
}
});
$(document).on("contextmenu", function (e)
{
e.preventDefault();
});
// If Browser is any other than Mozilla Firefox and the test includes any MathML,
// show message to use Mozilla Firefox
var ua = navigator.userAgent;