diff --git a/cis/testtool/frage.php b/cis/testtool/frage.php index 9f6cd4fb7..0aa37b299 100644 --- a/cis/testtool/frage.php +++ b/cis/testtool/frage.php @@ -148,6 +148,30 @@ echo ' alert(t("testtool/alleFragenBeantwortet")."'"?>); return true; } + + $(document).ready(function () { + $(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(); + }); + + }); //]]> @@ -598,7 +622,7 @@ if($frage->frage_id!='') $display_well = $frage->nummer == 0 ? '' : 'well'; // don't style frage 0 because this is always the introduction to gebiet echo ' -
+
'. $frage->text. '
diff --git a/cis/testtool/gebietfertig.php b/cis/testtool/gebietfertig.php index d8f9982d0..cf0a86ae2 100644 --- a/cis/testtool/gebietfertig.php +++ b/cis/testtool/gebietfertig.php @@ -50,9 +50,22 @@ $p = new phrasen($sprache_user); - + +




t('testtool/zeitAbgelaufen');?>

diff --git a/cis/testtool/login.php b/cis/testtool/login.php index 0ff84f4a0..df28e7345 100644 --- a/cis/testtool/login.php +++ b/cis/testtool/login.php @@ -434,6 +434,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; diff --git a/cis/testtool/menu.php b/cis/testtool/menu.php index 11fbc61d5..7c8b12b9d 100644 --- a/cis/testtool/menu.php +++ b/cis/testtool/menu.php @@ -414,7 +414,17 @@ else + +




t('testtool/prueflingGesperrt');?>

diff --git a/cis/testtool/topbar.php b/cis/testtool/topbar.php index 8432d4f41..7ca218ede 100644 --- a/cis/testtool/topbar.php +++ b/cis/testtool/topbar.php @@ -71,6 +71,18 @@ function changeSprache(sprache) parent.menu.location.href = parent.menu.location.pathname + '?sprache_user=' + sprache; // refreshes menu.php parent.content.location.href = parent.content.location.pathname + '?' + content_params; // refreshes login.php or frage.php } + + $(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(); + });