diff --git a/app/models/contest-attempt.js b/app/models/contest-attempt.js index 6509eda..d90c254 100644 --- a/app/models/contest-attempt.js +++ b/app/models/contest-attempt.js @@ -28,6 +28,12 @@ export default Model.extend({ windowResizeTimePenaltyMinutes: Ember.computed('monitorerData', function() { return this.monitorerData && this.monitorerData['window-resizes-penalty'] || 0 }), + windowMoveCount: Ember.computed('monitorerData', function() { + return this.monitorerData && this.monitorerData['window-move-count'] || 0 + }), + windowMoveTimePenaltyMinutes: Ember.computed('monitorerData', function() { + return this.monitorerData && this.monitorerData['window-moves-penalty'] || 0 + }), noFaceCount: Ember.computed('monitorerData', function() { return this.monitorerData && this.monitorerData['no-face-count'] || 0 }), diff --git a/app/models/contest.js b/app/models/contest.js index f8ad85f..f850ebb 100644 --- a/app/models/contest.js +++ b/app/models/contest.js @@ -63,6 +63,7 @@ export default Model.extend({ allowPaste: DS.attr(), disallowTabSwitch: DS.attr(), disallowWindowResize: DS.attr(), + disallowWindowMove: DS.attr(), disallowNoFace: DS.attr(), disallowMultipleFaces: DS.attr(), disallowNoise: DS.attr(), @@ -70,8 +71,10 @@ export default Model.extend({ allowedTabSwitchesNumber: DS.attr(), allowedNoFacesNumber: DS.attr(), allowedMultipleFacesNumber: DS.attr(), + allowedWindowMovesNumber: DS.attr(), tabSwitchPenalty: DS.attr(), noFacePenalty: DS.attr(), multipleFacesPenalty: DS.attr(), - windowResizePenalty: DS.attr() + windowResizePenalty: DS.attr(), + windowMovePenalty: DS.attr() }); diff --git a/app/pods/components/full-screen-contest-view/template.hbs b/app/pods/components/full-screen-contest-view/template.hbs index 2b401c4..d082463 100644 --- a/app/pods/components/full-screen-contest-view/template.hbs +++ b/app/pods/components/full-screen-contest-view/template.hbs @@ -175,6 +175,14 @@ {{contest.windowResizePenalty}} minutes deducted. {{/if}} +
  • + {{#if monitorer.faultMessages.windowMove}} + You moved browser window {{attempt.windowMoveCount}} {{if (eq attempt.windowMoveCount 1) 'time' 'times'}}. + {{#if (gPt attempt.windowMoveCount contest.allowedWindowMovesNumber)}} + {{contest.windowMovePenalty}} minutes deducted. + {{/if }} + {{/if}} +
  • {{#if monitorer.faultMessages.noise}} Noise detected. @@ -191,6 +199,10 @@ Total Window Resizes: {{attempt.windowResizeCount}} | {{attempt.windowResizeTimePenaltyMinutes}} mins deducted {{/if}}
    + {{#if contest.disallowWindowMove}} + Total Window Moves: {{attempt.windowMoveCount}} | {{attempt.windowMoveTimePenaltyMinutes}} mins deducted + {{/if}} +
    {{#if contest.disallowNoFace}} Total Face Undetected: {{attempt.noFaceCount}} | {{attempt.noFaceTimePenaltyMinutes}} mins deducted {{/if}} diff --git a/app/pods/components/intermediate-contest-view/template.hbs b/app/pods/components/intermediate-contest-view/template.hbs index 9206669..ba85095 100644 --- a/app/pods/components/intermediate-contest-view/template.hbs +++ b/app/pods/components/intermediate-contest-view/template.hbs @@ -105,6 +105,12 @@
  • • Resize the browser window
  • {{/if}} + {{#if contest.disallowWindowMove}} + Browser Window Movement is prohibited on this contest. You will face a penalty of 10 mins every 10 secs in case you :- + + {{/if}} {{#if contest.disallowNoFace}} Face detection is enabled on this contest. You will face a penalty of 10 mins every 5 secs after 3 faults in case :-