Fix buttons styling in exam page
authorBenjamin Auder <benjamin.auder@somewhere>
Sat, 27 Jan 2018 18:48:36 +0000 (19:48 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Sat, 27 Jan 2018 18:48:36 +0000 (19:48 +0100)
public/javascripts/assessment.js
public/stylesheets/assessment.css

index 1db80a0..05b4d58 100644 (file)
@@ -246,6 +246,8 @@ let V = new Vue({
                },
        },
        mounted: function() {
+               if (assessment.mode == "open")
+                       return; //no security needed in open mode
                window.addEventListener("keydown", e => {
                        // If F12 or ctrl+shift (ways to access devtools)
                        if (e.keyCode == 123 || (e.ctrlKey && e.shiftKey))
@@ -266,12 +268,9 @@ let V = new Vue({
                Object.defineProperty(div, "id", {
                        get: () => {
                                clearInterval(devtoolsLoop);
-                               if (assessment.mode != "open")
-                               {
-                                       if (this.stage == 2)
-                                               this.endAssessment();
-                                       document.location.href = "/nodevtools";
-                               }
+                               if (this.stage == 2)
+                                       this.endAssessment();
+                               document.location.href = "/nodevtools";
                        }
                });
        },
index 3187907..1511857 100644 (file)
@@ -9,7 +9,7 @@ a#rightButton {
        padding: 15px 0;
 }
 
-.question button {
+#assessment button {
        display: block;
        margin: 0 auto 15px auto;
 }