ims-lti 1.2.4 → 1.2.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: 224820ab40ce08a13bfda880f3107740a2b46cd31f672719b72d1d8e8cf3cc50
4
- data.tar.gz: b0c4c73930312bd6a27c7d6c8ea74b9dd33d83fd8cf8d240db14ea2b3e27e29f
3
+ metadata.gz: a7fb650dcdd9fad408934d47de72f8f2e11a55605d10f23ee04944976c900cd4
4
+ data.tar.gz: 2835e4925ea33ebd4f4aac6ea8c0b47d3696a67ae548addd6f1aad5adf4f12ef
5
5
  SHA512:
6
- metadata.gz: 4d787b098d9fe7b9dba586cf77eff9d3a76cb31697685f29d5cd9f8add1d2950a8ac55385d1419a27559e688f1629f11ce33e394bb24191e447d6876a3b692fd
7
- data.tar.gz: 4f0b4d72b52cd2ad3b936da67d64709734194c6dd321f4883b91131a8625e33193b40ed804d3ea1d633bf254fb3c9656829d04450ad26ca250899dfaf43799de
6
+ metadata.gz: 98469e50f9bb313fc90facdc65c309ec286e3b71b410226d390ffa0d25b6b78ed4c1d3ca7bfec31baf27c8f949a7c83f8525dc66c313968eb8af333dd514637d
7
+ data.tar.gz: 8ab0abecf8f0f7038f91f006a1a82ddf7a3717f5532a7bfa52ba9ae2a0379fd260e6f07cdb5074cfd283ed33a4a8b692b79c99fd487aad40394586052b32733b
data/Changelog CHANGED
@@ -1,4 +1,4 @@
1
- 2020-02-03 Version 1.2.3
1
+ 2020-02-03 Version 1.2.4
2
2
  * Add support for submittedAt date
3
3
 
4
4
  2017-03-08 Version 1.2.0
@@ -69,7 +69,8 @@ module IMS::LTI
69
69
 
70
70
  # check if the consumer accepts a submitted at date as outcome data
71
71
  def accepts_submitted_at?
72
- accepted_outcome_types.member?("submitted_at")
72
+ accepted_outcome_types.member?("submitted_at") ||
73
+ @ext_params["ext_outcome_submission_submitted_at_accepted"] == "true"
73
74
  end
74
75
 
75
76
  def accepts_outcome_lti_launch_url?
@@ -80,8 +81,19 @@ module IMS::LTI
80
81
  !!@ext_params["outcome_result_total_score_accepted"]
81
82
  end
82
83
 
84
+ def accepts_needs_additional_review?
85
+ @ext_params["ext_outcome_submission_needs_additional_review_accepted"] == "true"
86
+ end
87
+
88
+ def accepts_prioritize_non_tool_grade?
89
+ @ext_params["ext_outcome_submission_prioritize_non_tool_grade_accepted"] == "true"
90
+ end
91
+
83
92
  # POSTs the given score to the Tool Consumer with a replaceResult and
84
- # adds the specified data. The data hash can have the keys "text", "cdata_text", "url", "submitted_at" or "lti_launch_url"
93
+ # adds the specified data.
94
+ #
95
+ # The data hash can have the keys "text", "cdata_text", "url", "submitted_at"
96
+ # "needs_additional_review", "prioritize_non_tool_grade", or "lti_launch_url"
85
97
  #
86
98
  # If both cdata_text and text are sent, cdata_text will be used
87
99
  #
@@ -98,7 +110,8 @@ module IMS::LTI
98
110
 
99
111
  # POSTs the given score to the Tool Consumer with a replaceResult and
100
112
  # adds the specified data. The options hash can have the keys
101
- # :text, :cdata_text, :url, :submitted_at, :lti_launch_url, :score, or :total_score
113
+ # :text, :cdata_text, :url, :submitted_at, :lti_launch_url, :score,
114
+ # :needs_additional_review, or :total_score
102
115
  #
103
116
  # If both cdata_text and text are sent, cdata_text will be used
104
117
  # If both total_score and score are sent, total_score will be used
@@ -116,6 +129,8 @@ module IMS::LTI
116
129
  req.outcome_text = opts[:text]
117
130
  req.outcome_url = opts[:url]
118
131
  req.submitted_at = opts[:submitted_at]
132
+ req.needs_additional_review = opts[:needs_additional_review]
133
+ req.prioritize_non_tool_grade = opts[:prioritize_non_tool_grade]
119
134
  req.outcome_lti_launch_url = opts[:lti_launch_url]
120
135
  req.total_score = opts[:total_score]
121
136
  req.post_replace_result!(opts[:score])
@@ -156,7 +171,14 @@ module IMS::LTI
156
171
  include IMS::LTI::Extensions::ExtensionBase
157
172
  include Base
158
173
 
159
- attr_accessor :outcome_text, :outcome_url, :submitted_at, :outcome_lti_launch_url, :outcome_cdata_text, :total_score
174
+ attr_accessor :outcome_text,
175
+ :outcome_url,
176
+ :submitted_at,
177
+ :outcome_lti_launch_url,
178
+ :outcome_cdata_text,
179
+ :total_score,
180
+ :needs_additional_review,
181
+ :prioritize_non_tool_grade
160
182
 
161
183
  def result_values(node)
162
184
  super
@@ -188,7 +210,9 @@ module IMS::LTI
188
210
  super
189
211
  return unless has_details_data?
190
212
 
191
- node.submittedAt submitted_at
213
+ node.submittedAt submitted_at if submitted_at
214
+ node.needsAdditionalReview if needs_additional_review
215
+ node.prioritizeNonToolGrade if prioritize_non_tool_grade
192
216
  end
193
217
 
194
218
  def score
@@ -200,7 +224,7 @@ module IMS::LTI
200
224
  end
201
225
 
202
226
  def has_details_data?
203
- !!submitted_at
227
+ !!submitted_at || !!needs_additional_review || !!prioritize_non_tool_grade
204
228
  end
205
229
 
206
230
  def extention_process_xml(doc)
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
4
+ version: 1.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-07 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  - !ruby/object:Gem::Version
116
116
  version: '0'
117
117
  requirements: []
118
- rubygems_version: 3.1.2
118
+ rubygems_version: 3.1.6
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Ruby library for creating IMS LTI tool providers and consumers