ims-lti 2.0.0.beta.23 → 2.0.0.beta.24
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: a141b93c1db01859d53a90b291a16a30d3e4246b
|
4
|
+
data.tar.gz: c4ee32017b85bb0515bb3e6c959f3a6ce71f83bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdf42e04d1d73ea680d707836616074947a0029fcced366f9615aa5344eb9c4b4719ba67cca7810295cb68f6ec6b313b8b0188ded3d1a65317fc998c87b7d8b7
|
7
|
+
data.tar.gz: 80305bf0f10e63501dbbf75c992951b533f3049230ada4db87193135e1b61270b80d9c65a615b08efe37a5b7282aa4183ab4b815560883ce4ecd89f3fc0fe7c4
|
@@ -11,8 +11,10 @@ module IMS::LTI::Models
|
|
11
11
|
window: 'http://purl.imsglobal.org/vocab/lti/v2/lti#window'
|
12
12
|
}
|
13
13
|
|
14
|
-
|
15
|
-
add_attribute :
|
14
|
+
add_attribute :display_height, json_key: 'displayHeight'
|
15
|
+
add_attribute :display_width, json_key: 'displayWidth'
|
16
|
+
add_attribute :window_target, json_key: 'windowTarget'
|
17
|
+
add_attribute :presentation_document_target, json_key: 'presentationDocumentTarget'
|
16
18
|
|
17
19
|
end
|
18
20
|
end
|
@@ -1,11 +1,12 @@
|
|
1
1
|
module IMS::LTI::Models::ContentItems
|
2
2
|
class ContentItem < IMS::LTI::Models::LTIModel
|
3
3
|
|
4
|
-
add_attributes :
|
4
|
+
add_attributes :text, :title, :url
|
5
|
+
add_attribute :media_type, json_key: 'mediaType'
|
5
6
|
add_attribute :type, json_key: '@type'
|
6
7
|
add_attribute :id, json_key: '@id'
|
7
8
|
add_attribute :icon, relation: 'IMS::LTI::Models::Image'
|
8
|
-
add_attribute :placement_advice, relation: 'IMS::LTI::Models::ContentItemPlacement'
|
9
|
+
add_attribute :placement_advice, json_key:'placementAdvice', relation: 'IMS::LTI::Models::ContentItemPlacement'
|
9
10
|
add_attribute :thumbnail, relation: 'IMS::LTI::Models::Image'
|
10
11
|
|
11
12
|
TYPE = "ContentItem"
|
@@ -63,7 +63,7 @@ module IMS::LTI::Models
|
|
63
63
|
serialization_attrs_for(:relation).each do |attr|
|
64
64
|
val = attributes[attr.to_s]
|
65
65
|
if val && val.is_a?(Array)
|
66
|
-
json_hash[json_key(attr)] = val.map {|v| v.as_json }
|
66
|
+
json_hash[json_key(attr)] = val.map { |v| v.as_json }
|
67
67
|
elsif val
|
68
68
|
json_hash[json_key(attr)] = val.as_json
|
69
69
|
end
|
@@ -177,10 +177,13 @@ module IMS::LTI::Models
|
|
177
177
|
end
|
178
178
|
|
179
179
|
def self.serialization_options()
|
180
|
+
@serialization_options ||= {}
|
180
181
|
if name == "IMS::LTI::Models::LTIModel"
|
181
|
-
@serialization_options
|
182
|
+
@serialization_options
|
182
183
|
else
|
183
|
-
superclass.send(:serialization_options)
|
184
|
+
opts = superclass.send(:serialization_options) || {}
|
185
|
+
keys = opts.keys | @serialization_options.keys
|
186
|
+
keys.each_with_object({}) {|k, h| h[k] = (opts[k] || {}).merge(@serialization_options[k] || {})}
|
184
187
|
end
|
185
188
|
end
|
186
189
|
|