mil-ims-lti 1.1.5 → 1.1.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
  SHA1:
3
- metadata.gz: d0e7fd0b27926f659e84907e606c6b07cfd3e037
4
- data.tar.gz: 0d4c14c1aff274db63d64b2e232d41e28c54da3f
3
+ metadata.gz: a85009076fd5ae73b5bc1873633e2be81c5197aa
4
+ data.tar.gz: 5a29161a0be2ffb3eee4eadf8568f938d059412e
5
5
  SHA512:
6
- metadata.gz: 2319b59c2e8f72fcc9e0a014fb7ea71763b6e01b3ea131083a3503ebcda3028510f10fab95dc692f807e4d898a40e14196e5e90dd4b3d2de93a4524500484680
7
- data.tar.gz: 28d7d2ca6f9dff2e4f9658e4b725887710afd0e4bdb65647e4d62d56b4287f8318457fe38504a6d1fa77d1e588674ae25f151094651fda0b35b01eaaf845f55f
6
+ metadata.gz: 4c450c89b3c4f6b505c7ff2beb6cff471a9309e4e16b587d9f6fad0af2146799296bb4b00069dc49fe3bec0872803bfc04ae3621dc909084a92bdcf45630438f
7
+ data.tar.gz: fcf7ee391f1c99d3db34036658b765d7ca41b69ebaf271180bed98a366e5df0a310221b6fb85a41c7d6c5fdc0da386b1fbde070ad3f932979a5d420bb483bc6d
@@ -29,10 +29,11 @@ module IMS::LTI
29
29
  # # failed
30
30
  # end
31
31
  #
32
- # Graded outcome +outcome_graded+ is a flag to specify whether the submission should be graded by the teacher
33
- # It expects a 'true' or 'false' value graded by teacher or not, should set 'needs grading' in LMS if true.
32
+ # Needs Grading outcome +outcome_needs_grading+ is a flag to specify whether the submission should be
33
+ # needs_grading by the teacher It expects to be present or 'true' or 'false' value needs_grading by
34
+ # teacher or not, should set 'needs grading' in LMS if true or graded if false.
34
35
  #
35
- # provider.post_replace_result_with_data!(score,'graded' => 'true','url' => outcome_url)
36
+ # provider.post_replace_result_with_data!(score,'needs_grading' => 'true','url' => outcome_url)
36
37
  #
37
38
  # Can also be used in conjunction with outcome_url to show url to a students state for grading
38
39
  #
@@ -75,14 +76,14 @@ module IMS::LTI
75
76
  accepted_outcome_types.member?('url')
76
77
  end
77
78
 
78
- # check if the consumer accepts a graded as outcome data
79
- def accepts_outcome_graded?
80
- accepted_outcome_types.member?('graded')
79
+ # check if the consumer accepts a needs_grading as outcome data
80
+ def accepts_outcome_needs_grading?
81
+ accepted_outcome_types.member?('needs_grading')
81
82
  end
82
83
 
83
84
  # POSTs the given score to the Tool Consumer with a replaceResult and
84
85
  # adds the specified data. The data hash can have the keys "text", "cdata_text",
85
- # "url" or "graded" (Graded expects a true/false value)
86
+ # "url" or "needs_grading" (needs_grading expects a true/false value)
86
87
  #
87
88
  # If both cdata_text and text are sent, cdata_text will be used
88
89
  #
@@ -97,7 +98,7 @@ module IMS::LTI
97
98
  req.outcome_text = data['text']
98
99
  end
99
100
  req.outcome_url = data['url'] if data['url']
100
- req.outcome_graded = data['graded'] if data['graded']
101
+ req.outcome_needs_grading = data['needs_grading'] if data['needs_grading']
101
102
  req.post_replace_result!(score)
102
103
  end
103
104
 
@@ -107,10 +108,10 @@ module IMS::LTI
107
108
  include IMS::LTI::Extensions::ExtensionBase
108
109
  include Base
109
110
 
110
- OUTCOME_DATA_TYPES = %w{text url graded}
111
+ OUTCOME_DATA_TYPES = %w{text url needs_grading}
111
112
 
112
113
  # a list of the outcome data types accepted, currently only 'url',
113
- # 'text' and 'graded' are valid
114
+ # 'text' and 'needs_grading' are valid
114
115
  #
115
116
  # tc.outcome_data_values_accepted(['url', 'text'])
116
117
  # tc.outcome_data_valued_accepted("url,text")
@@ -137,11 +138,11 @@ module IMS::LTI
137
138
  include IMS::LTI::Extensions::ExtensionBase
138
139
  include Base
139
140
 
140
- attr_accessor :outcome_text, :outcome_url, :outcome_graded, :outcome_cdata_text
141
+ attr_accessor :outcome_text, :outcome_url, :outcome_needs_grading, :outcome_cdata_text
141
142
 
142
143
  def result_values(node)
143
144
  super
144
- if @outcome_text || @outcome_url || @outcome_graded || @outcome_cdata_text
145
+ if @outcome_text || @outcome_url || @outcome_needs_grading || @outcome_cdata_text
145
146
  node.resultData do |res_data|
146
147
  if @outcome_cdata_text
147
148
  res_data.text {
@@ -151,20 +152,20 @@ module IMS::LTI
151
152
  res_data.text @outcome_text
152
153
  end
153
154
  res_data.url @outcome_url if @outcome_url
154
- res_data.graded @outcome_graded if @outcome_graded
155
+ res_data.needs_grading @outcome_needs_grading if @outcome_needs_grading
155
156
  end
156
157
  end
157
158
  end
158
159
 
159
160
  def has_result_data?
160
- !!@outcome_text || !!@outcome_url || !!@outcome_graded || super
161
+ !!@outcome_text || !!@outcome_url || !!@outcome_needs_grading || super
161
162
  end
162
163
 
163
164
  def extention_process_xml(doc)
164
165
  super
165
166
  @outcome_text = doc.get_text('//resultRecord/result/resultData/text')
166
167
  @outcome_url = doc.get_text('//resultRecord/result/resultData/url')
167
- @outcome_graded = doc.get_text('//resultRecord/result/resultData/graded')
168
+ @outcome_needs_grading = doc.get_text('//resultRecord/result/resultData/needs_grading')
168
169
  end
169
170
  end
170
171
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mil-ims-lti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure