quiz_proctor_engine 1.0.1 → 1.1.0
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: 9fcfacb4142d7ae94aa452d12a421ff4b7315bab
|
4
|
+
data.tar.gz: 62d9fccbe88dd939892ebadb8dc5f8219c075288
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 197372384432ec2e90c131bb5de1144435b52e50063a32cfb26f24aa652d50c1aa861a11cb488bab6980bfbcebcfc339e5493fc465105a0ac4654f54ab93ef03
|
7
|
+
data.tar.gz: 91ca88407371c3eeb34f0a9c60ba678c225af7ce3292d4b33629c0b80c37252ab110c0d61ad0cfc70ce5bfc1c3ef00394c8efe0e80fcde113fdf046c978fcf3f
|
@@ -0,0 +1,29 @@
|
|
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::BypassAccessCode
|
17
|
+
extend ActiveSupport::Concern
|
18
|
+
included do
|
19
|
+
before_action :bypass_access_code
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def bypass_access_code
|
25
|
+
if session[:is_proctored]
|
26
|
+
params[:access_code] = session[:proctor_access_code]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -37,13 +37,14 @@ class ProctoredExamsController < ApplicationController
|
|
37
37
|
headers: headers,
|
38
38
|
# verify: false,
|
39
39
|
)
|
40
|
-
|
41
40
|
if quiz.parsed_response["error"].present?
|
42
41
|
flash[:error] = quiz.parsed_response["error"]
|
43
42
|
redirect_to proctored_exams_path
|
44
43
|
else
|
44
|
+
quiz = quiz.parsed_response
|
45
45
|
session[:is_proctored] = true
|
46
|
-
|
46
|
+
session[:proctor_access_code] = quiz["proctor_access_code"]
|
47
|
+
redirect_to course_quiz_take_path quiz["quiz"]["course_id"], quiz["quiz"]["exam_id"]
|
47
48
|
end
|
48
49
|
end
|
49
50
|
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.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dittonjs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-16 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/bypass_access_code.rb
|
37
38
|
- app/controllers/concerns/catch_proctored_exams.rb
|
38
39
|
- app/controllers/concerns/proctor_quizzes.rb
|
39
40
|
- app/controllers/concerns/validate_signature.rb
|