ims-lti 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Changelog +3 -0
- data/lib/ims/lti/extensions/outcome_data.rb +23 -6
- data/lib/ims/lti/outcome_request.rb +15 -0
- data/lib/ims/lti/tool_provider.rb +2 -2
- metadata +21 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 224820ab40ce08a13bfda880f3107740a2b46cd31f672719b72d1d8e8cf3cc50
|
4
|
+
data.tar.gz: b0c4c73930312bd6a27c7d6c8ea74b9dd33d83fd8cf8d240db14ea2b3e27e29f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d787b098d9fe7b9dba586cf77eff9d3a76cb31697685f29d5cd9f8add1d2950a8ac55385d1419a27559e688f1629f11ce33e394bb24191e447d6876a3b692fd
|
7
|
+
data.tar.gz: 4f0b4d72b52cd2ad3b936da67d64709734194c6dd321f4883b91131a8625e33193b40ed804d3ea1d633bf254fb3c9656829d04450ad26ca250899dfaf43799de
|
data/Changelog
CHANGED
@@ -67,6 +67,11 @@ module IMS::LTI
|
|
67
67
|
accepted_outcome_types.member?("url")
|
68
68
|
end
|
69
69
|
|
70
|
+
# check if the consumer accepts a submitted at date as outcome data
|
71
|
+
def accepts_submitted_at?
|
72
|
+
accepted_outcome_types.member?("submitted_at")
|
73
|
+
end
|
74
|
+
|
70
75
|
def accepts_outcome_lti_launch_url?
|
71
76
|
accepted_outcome_types.member?("lti_launch_url")
|
72
77
|
end
|
@@ -76,7 +81,7 @@ module IMS::LTI
|
|
76
81
|
end
|
77
82
|
|
78
83
|
# POSTs the given score to the Tool Consumer with a replaceResult and
|
79
|
-
# adds the specified data. The data hash can have the keys "text", "cdata_text", "url", or "lti_launch_url"
|
84
|
+
# adds the specified data. The data hash can have the keys "text", "cdata_text", "url", "submitted_at" or "lti_launch_url"
|
80
85
|
#
|
81
86
|
# If both cdata_text and text are sent, cdata_text will be used
|
82
87
|
#
|
@@ -93,7 +98,7 @@ module IMS::LTI
|
|
93
98
|
|
94
99
|
# POSTs the given score to the Tool Consumer with a replaceResult and
|
95
100
|
# adds the specified data. The options hash can have the keys
|
96
|
-
# :text, :cdata_text, :url, :lti_launch_url, :score, or :total_score
|
101
|
+
# :text, :cdata_text, :url, :submitted_at, :lti_launch_url, :score, or :total_score
|
97
102
|
#
|
98
103
|
# If both cdata_text and text are sent, cdata_text will be used
|
99
104
|
# If both total_score and score are sent, total_score will be used
|
@@ -110,6 +115,7 @@ module IMS::LTI
|
|
110
115
|
req.outcome_cdata_text = opts[:cdata_text]
|
111
116
|
req.outcome_text = opts[:text]
|
112
117
|
req.outcome_url = opts[:url]
|
118
|
+
req.submitted_at = opts[:submitted_at]
|
113
119
|
req.outcome_lti_launch_url = opts[:lti_launch_url]
|
114
120
|
req.total_score = opts[:total_score]
|
115
121
|
req.post_replace_result!(opts[:score])
|
@@ -120,9 +126,9 @@ module IMS::LTI
|
|
120
126
|
include IMS::LTI::Extensions::ExtensionBase
|
121
127
|
include Base
|
122
128
|
|
123
|
-
OUTCOME_DATA_TYPES = %w{text url lti_launch_url}
|
129
|
+
OUTCOME_DATA_TYPES = %w{text url lti_launch_url submitted_at}
|
124
130
|
|
125
|
-
# a list of the outcome data types accepted, currently only 'url' and
|
131
|
+
# a list of the outcome data types accepted, currently only 'url', 'submitted_at' and
|
126
132
|
# 'text' are valid
|
127
133
|
#
|
128
134
|
# tc.outcome_data_values_accepted(['url', 'text'])
|
@@ -150,7 +156,7 @@ module IMS::LTI
|
|
150
156
|
include IMS::LTI::Extensions::ExtensionBase
|
151
157
|
include Base
|
152
158
|
|
153
|
-
attr_accessor :outcome_text, :outcome_url, :outcome_lti_launch_url, :outcome_cdata_text, :total_score
|
159
|
+
attr_accessor :outcome_text, :outcome_url, :submitted_at, :outcome_lti_launch_url, :outcome_cdata_text, :total_score
|
154
160
|
|
155
161
|
def result_values(node)
|
156
162
|
super
|
@@ -178,6 +184,13 @@ module IMS::LTI
|
|
178
184
|
end
|
179
185
|
end
|
180
186
|
|
187
|
+
def details(node)
|
188
|
+
super
|
189
|
+
return unless has_details_data?
|
190
|
+
|
191
|
+
node.submittedAt submitted_at
|
192
|
+
end
|
193
|
+
|
181
194
|
def score
|
182
195
|
total_score ? nil : @score
|
183
196
|
end
|
@@ -186,6 +199,10 @@ module IMS::LTI
|
|
186
199
|
!!outcome_text || !!outcome_url || !!outcome_lti_launch_url || !!outcome_cdata_text || !!total_score || super
|
187
200
|
end
|
188
201
|
|
202
|
+
def has_details_data?
|
203
|
+
!!submitted_at
|
204
|
+
end
|
205
|
+
|
189
206
|
def extention_process_xml(doc)
|
190
207
|
super
|
191
208
|
@outcome_text = doc.get_text("//resultRecord/result/resultData/text")
|
@@ -196,4 +213,4 @@ module IMS::LTI
|
|
196
213
|
|
197
214
|
end
|
198
215
|
end
|
199
|
-
end
|
216
|
+
end
|
@@ -168,6 +168,7 @@ module IMS::LTI
|
|
168
168
|
end
|
169
169
|
results(record)
|
170
170
|
end
|
171
|
+
submission_details(request)
|
171
172
|
end
|
172
173
|
end
|
173
174
|
end
|
@@ -182,6 +183,10 @@ module IMS::LTI
|
|
182
183
|
!!score
|
183
184
|
end
|
184
185
|
|
186
|
+
def has_details_data?
|
187
|
+
false
|
188
|
+
end
|
189
|
+
|
185
190
|
def results(node)
|
186
191
|
return unless has_result_data?
|
187
192
|
|
@@ -190,6 +195,16 @@ module IMS::LTI
|
|
190
195
|
end
|
191
196
|
end
|
192
197
|
|
198
|
+
def submission_details(request)
|
199
|
+
return unless has_details_data?
|
200
|
+
request.submissionDetails do |record|
|
201
|
+
details(record)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
def details(record)
|
206
|
+
end
|
207
|
+
|
193
208
|
def result_values(node)
|
194
209
|
if score
|
195
210
|
node.resultScore do |res_score|
|
@@ -135,9 +135,9 @@ module IMS::LTI
|
|
135
135
|
:consumer_secret => @consumer_secret,
|
136
136
|
:lis_outcome_service_url => lis_outcome_service_url,
|
137
137
|
:lis_result_sourcedid =>lis_result_sourcedid)
|
138
|
-
|
138
|
+
|
139
139
|
extend_outcome_request(@outcome_requests.last)
|
140
140
|
end
|
141
|
-
|
141
|
+
|
142
142
|
end
|
143
143
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ims-lti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Instructure
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '1.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '4.0'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
29
|
+
version: '1.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '4.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: oauth
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -48,16 +54,22 @@ dependencies:
|
|
48
54
|
name: rspec
|
49
55
|
requirement: !ruby/object:Gem::Requirement
|
50
56
|
requirements:
|
51
|
-
- - "
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.0'
|
60
|
+
- - ">"
|
52
61
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
62
|
+
version: '3.0'
|
54
63
|
type: :development
|
55
64
|
prerelease: false
|
56
65
|
version_requirements: !ruby/object:Gem::Requirement
|
57
66
|
requirements:
|
58
|
-
- - "
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.0'
|
70
|
+
- - ">"
|
59
71
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
72
|
+
version: '3.0'
|
61
73
|
description:
|
62
74
|
email:
|
63
75
|
executables: []
|
@@ -103,10 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
115
|
- !ruby/object:Gem::Version
|
104
116
|
version: '0'
|
105
117
|
requirements: []
|
106
|
-
|
107
|
-
rubygems_version: 2.5.1
|
118
|
+
rubygems_version: 3.1.2
|
108
119
|
signing_key:
|
109
120
|
specification_version: 4
|
110
121
|
summary: Ruby library for creating IMS LTI tool providers and consumers
|
111
122
|
test_files: []
|
112
|
-
has_rdoc:
|