quiz_proctor_engine 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 159c86a077323d72457bca8016c0be931e7b8a6e
|
4
|
+
data.tar.gz: 766e001bce19b34d08f72a11d3f11026d89d8dc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b68c79e60b879e008715274e7b077bef11e92dc7f62deddb1617c0e53c4e9fdec1527bcf489a3b51bc74bbaf2c5c7201cbf7ff56989269f2908c68b1b280a94
|
7
|
+
data.tar.gz: 36fe5c182502b4933abf9bb84365fbd71160b4d65573395f008d4f4eb00c760dbc64532bab2be7d37a3f6590f8f52d1a0f45f666475329f7f9b5f2fe819c3bfc
|
data/Rakefile
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Copyright (C) 2017 Atomic Jolt
|
2
|
+
|
3
|
+
# This program is free software: you can redistribute it and/or modify
|
4
|
+
# it under the terms of the GNU Affero General Public License as published by
|
5
|
+
# the Free Software Foundation, either version 3 of the License, or
|
6
|
+
# (at your option) any later version.
|
7
|
+
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
# GNU Affero General Public License for more details.
|
12
|
+
|
13
|
+
# You should have received a copy of the GNU Affero General Public License
|
14
|
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
|
+
|
16
|
+
module Concerns::CatchProctoredExams
|
17
|
+
extend ActiveSupport::Concern
|
18
|
+
included do
|
19
|
+
before_action :redirect_if_isolated
|
20
|
+
before_action :isolate_exams
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def redirect_if_isolated
|
26
|
+
if @current_user && params[:controller] != "proctored_exams" && session[:isolate_exams]
|
27
|
+
session[:isolate_exams] = false
|
28
|
+
redirect_to proctored_exams_path
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def isolate_exams
|
33
|
+
if !@current_user && params[:controller] == "proctored_exams"
|
34
|
+
session[:isolate_exams] = true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quiz_proctor_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dittonjs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -34,6 +34,7 @@ extra_rdoc_files: []
|
|
34
34
|
files:
|
35
35
|
- LICENSE
|
36
36
|
- Rakefile
|
37
|
+
- app/controllers/concerns/catch_proctored_exams.rb
|
37
38
|
- app/controllers/concerns/proctor_quizzes.rb
|
38
39
|
- app/controllers/concerns/validate_signature.rb
|
39
40
|
- app/controllers/concerns/whitelist.rb
|