qalam_lti_provider_engine 2.0.2 → 2.0.6

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
  SHA256:
3
- metadata.gz: 2d5de793be201a93e83c1e1540f792bfd92cc5412cf76b1a48e0c9b93f0efd56
4
- data.tar.gz: f7ca5132f3369db5534fa30149250c18195e6a54b7ef4b10d33799a702564c5a
3
+ metadata.gz: 3f8241935a752778f3aaf18a334c18e0ca34f38942f1f08bbdcc937f77c9913e
4
+ data.tar.gz: 7a5ed02a9a13c728c8ffe34c1fd66e2c8b07b66da5541f3b55742886aa5e3879
5
5
  SHA512:
6
- metadata.gz: 34799dbb9d21db9fb35114d28043bcc99fe7d411ead2998c4a71b7f07d4a8c27bddd1eb68eeae3c8d4df828afb6bc9a2bcc9f87b8d68b3e6f10b603851fc46fa
7
- data.tar.gz: 16295217e008e909dae41d9978c9f2a40ccdd8aea729205df1afe98fa16673f70b817a03a7b60a0abf92e4ad80e2bd591ea867c38234a25550d07bff33dff32a
6
+ metadata.gz: 738e91d04b9c70e04d10d575b2b8a497cf0fa064dd6cb0d39aadcc8226d6c13d1de35528edcb4b308a942466e0c0c37ac751f76c3f3e91f644a1b315d80c7972
7
+ data.tar.gz: b0aa71ce229a8dcb0a631029fd2fd15899b4c2daa3dc32d2c52f6777acd79ab7507aa2efc1749a3abded690a1e1c8ab75ff711dcca086b2aa740f68e74a7b57c
@@ -55,6 +55,82 @@ module LtiProvider
55
55
  tc.canvas_user_navigation!(LtiProvider::XmlConfig.user_navigation.symbolize_keys)
56
56
  end
57
57
 
58
+ ### QALAM ###
59
+
60
+ if LtiProvider::XmlConfig.course_home_sub_navigation
61
+ tc.canvas_course_home_sub_navigation!(LtiProvider::XmlConfig.course_home_sub_navigation.symbolize_keys)
62
+ end
63
+
64
+ if LtiProvider::XmlConfig.course_settings_sub_navigation
65
+ tc.canvas_course_settings_sub_navigation!(LtiProvider::XmlConfig.course_settings_sub_navigation.symbolize_keys)
66
+ end
67
+
68
+ if LtiProvider::XmlConfig.global_navigation
69
+ tc.canvas_global_navigation!(LtiProvider::XmlConfig.global_navigation.symbolize_keys)
70
+ end
71
+
72
+ if LtiProvider::XmlConfig.module_menu
73
+ tc.canvas_module_menu!(LtiProvider::XmlConfig.module_menu.symbolize_keys)
74
+ end
75
+
76
+ if LtiProvider::XmlConfig.module_index_menu
77
+ tc.canvas_module_index_menu!(LtiProvider::XmlConfig.module_index_menu.symbolize_keys)
78
+ end
79
+
80
+ if LtiProvider::XmlConfig.module_group_menu
81
+ tc.canvas_module_group_menu!(LtiProvider::XmlConfig.module_group_menu.symbolize_keys)
82
+ end
83
+
84
+ if LtiProvider::XmlConfig.quiz_menu
85
+ tc.canvas_quiz_menu!(LtiProvider::XmlConfig.quiz_menu.symbolize_keys)
86
+ end
87
+
88
+ if LtiProvider::XmlConfig.quiz_index_menu
89
+ tc.canvas_quiz_index_menu!(LtiProvider::XmlConfig.quiz_index_menu.symbolize_keys)
90
+ end
91
+
92
+ if LtiProvider::XmlConfig.assignment_menu
93
+ tc.canvas_assignment_menu!(LtiProvider::XmlConfig.assignment_menu.symbolize_keys)
94
+ end
95
+
96
+ if LtiProvider::XmlConfig.assignment_index_menu
97
+ tc.canvas_assignment_index_menu!(LtiProvider::XmlConfig.assignment_index_menu.symbolize_keys)
98
+ end
99
+
100
+ if LtiProvider::XmlConfig.assignment_group_menu
101
+ tc.canvas_assignment_group_menu!(LtiProvider::XmlConfig.assignment_group_menu.symbolize_keys)
102
+ end
103
+
104
+ if LtiProvider::XmlConfig.discussion_topic_menu
105
+ tc.canvas_discussion_topic_menu!(LtiProvider::XmlConfig.discussion_topic_menu.symbolize_keys)
106
+ end
107
+
108
+ if LtiProvider::XmlConfig.discussion_topic_index_menu
109
+ tc.canvas_discussion_topic_index_menu!(LtiProvider::XmlConfig.discussion_topic_index_menu.symbolize_keys)
110
+ end
111
+
112
+ if LtiProvider::XmlConfig.wiki_page_menu
113
+ tc.canvas_wiki_page_menu!(LtiProvider::XmlConfig.wiki_page_menu.symbolize_keys)
114
+ end
115
+
116
+ if LtiProvider::XmlConfig.wiki_index_menu
117
+ tc.canvas_wiki_index_menu!(LtiProvider::XmlConfig.wiki_index_menu.symbolize_keys)
118
+ end
119
+
120
+ if LtiProvider::XmlConfig.file_menu
121
+ tc.canvas_file_menu!(LtiProvider::XmlConfig.file_menu.symbolize_keys)
122
+ end
123
+
124
+ if LtiProvider::XmlConfig.file_index_menu
125
+ tc.canvas_file_index_menu!(LtiProvider::XmlConfig.file_index_menu.symbolize_keys)
126
+ end
127
+
128
+ if LtiProvider::XmlConfig.editor_button
129
+ tc.canvas_editor_button!(LtiProvider::XmlConfig.editor_button.symbolize_keys)
130
+ end
131
+
132
+ ### END ###
133
+
58
134
  if LtiProvider::XmlConfig.environments
59
135
  tc.set_ext_param(platform, :environments, LtiProvider::XmlConfig.environments.symbolize_keys)
60
136
  end
@@ -1,4 +1,4 @@
1
1
  <p>
2
2
  It appears your browser is blocking cookies. You can try
3
- <%= link_to "launching the tool in a new window", consume_launch_url(nonce: params[:nonce], url: params[:url]), target: '_blank' %>.
3
+ <%= link_to "launching the tool in a new window", consume_launch_url(nonce: params[:nonce]), target: '_blank' %>.
4
4
  </p>
@@ -7,10 +7,29 @@ default: &default
7
7
  privacy_level: 'public'
8
8
 
9
9
  # url defaults to lti_launch_url, but can be overridden in each of these
10
- course_navigation:
10
+ account_navigation:
11
11
  text: 'Dummy'
12
12
  visibility: 'admins'
13
- # account_navigation and user_navigation are also available with similar options
13
+ url: 'ssd'
14
+ enabled: true
15
+ default: 'enabled'
16
+ windowTarget: '_self'
17
+ custom_fields:
18
+ key1: 'value1'
19
+ labels:
20
+ en: 'Attendance'
21
+ ar: 'الحضور'
22
+ # course_navigation and user_navigation are also available with similar options
23
+
24
+ editor_button:
25
+ enabled: true
26
+ icon_url: ''
27
+ selection_width: ''
28
+ selection_height: ''
29
+ labels:
30
+ en: ''
31
+ ar: ''
32
+
14
33
 
15
34
  development:
16
35
  <<: *default
@@ -53,6 +53,28 @@ module LtiProvider
53
53
  session[:user_roles]
54
54
  end
55
55
 
56
+ ### QALAM ###
57
+ def launch_tool
58
+ session[:launch_tool]
59
+ end
60
+
61
+ def student_launch?
62
+ user_roles.split(',').include? 'urn:lti:role:ims/lis/Learner'
63
+ end
64
+
65
+ def teacher_launch?
66
+ user_roles.split(',').include? 'urn:lti:role:ims/lis/Instructor'
67
+ end
68
+
69
+ def account_admin_launch?
70
+ user_roles.split(',').include? 'urn:lti:instrole:ims/lis/Administrator'
71
+ end
72
+
73
+ def root_admin_launch?
74
+ user_roles.split(',').include? 'urn:lti:sysrole:ims/lis/SysAdmin'
75
+ end
76
+ ### END ###
77
+
56
78
  def not_acceptable
57
79
  render plain: "Unable to process request", status: 406
58
80
  end
@@ -1,3 +1,3 @@
1
1
  module LtiProvider
2
- VERSION = "2.0.2"
2
+ VERSION = "2.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qalam_lti_provider_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dave Donahue
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-07-26 00:00:00.000000000 Z
14
+ date: 2021-08-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: '4.2'
23
23
  - - "<"
24
24
  - !ruby/object:Gem::Version
25
- version: '5.3'
25
+ version: '6.1'
26
26
  type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
@@ -32,21 +32,21 @@ dependencies:
32
32
  version: '4.2'
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
- version: '5.3'
35
+ version: '6.1'
36
36
  - !ruby/object:Gem::Dependency
37
- name: ims-lti
37
+ name: qalam_ims_lti
38
38
  requirement: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - "~>"
40
+ - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: '1.2'
42
+ version: '0'
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
- - - "~>"
47
+ - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: '1.2'
49
+ version: '0'
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: sqlite3
52
52
  requirement: !ruby/object:Gem::Requirement