ims-lti 1.2.9 → 2.0.0.beta.1
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.txt +0 -0
- data/LICENSE.txt +22 -0
- data/README.md +15 -116
- data/lib/ims/lti/converters/time_json_converter.rb +13 -0
- data/lib/ims/lti/converters.rb +5 -0
- data/lib/ims/lti/models/base_url_choice.rb +15 -0
- data/lib/ims/lti/models/base_url_selector.rb +5 -0
- data/lib/ims/lti/models/contact.rb +5 -0
- data/lib/ims/lti/models/icon_endpoint.rb +5 -0
- data/lib/ims/lti/models/icon_info.rb +6 -0
- data/lib/ims/lti/models/localized_name.rb +11 -0
- data/lib/ims/lti/models/localized_text.rb +11 -0
- data/lib/ims/lti/models/lti_model.rb +169 -0
- data/lib/ims/lti/models/message_handler.rb +6 -0
- data/lib/ims/lti/models/messages/basic_lti_launch_request.rb +8 -0
- data/lib/ims/lti/models/messages/message.rb +43 -0
- data/lib/ims/lti/models/messages/registration_request.rb +17 -0
- data/lib/ims/lti/models/messages.rb +6 -0
- data/lib/ims/lti/models/parameter.rb +5 -0
- data/lib/ims/lti/models/product_family.rb +8 -0
- data/lib/ims/lti/models/product_info.rb +19 -0
- data/lib/ims/lti/models/product_instance.rb +10 -0
- data/lib/ims/lti/models/resource_handler.rb +18 -0
- data/lib/ims/lti/models/resource_type.rb +6 -0
- data/lib/ims/lti/models/rest_service.rb +14 -0
- data/lib/ims/lti/models/rest_service_profile.rb +7 -0
- data/lib/ims/lti/models/security_contract.rb +9 -0
- data/lib/ims/lti/models/service_owner.rb +8 -0
- data/lib/ims/lti/models/service_provider.rb +11 -0
- data/lib/ims/lti/models/tool_consumer_profile.rb +20 -0
- data/lib/ims/lti/models/tool_profile.rb +22 -0
- data/lib/ims/lti/models/tool_proxy.rb +11 -0
- data/lib/ims/lti/models/vendor.rb +28 -0
- data/lib/ims/lti/models.rb +29 -0
- data/lib/ims/lti/services/message_service.rb +40 -0
- data/lib/ims/lti/services.rb +5 -0
- data/lib/ims/lti/version.rb +1 -1
- data/lib/ims/lti.rb +6 -64
- data/lib/ims.rb +3 -1
- metadata +57 -50
- data/Changelog +0 -76
- data/LICENSE +0 -18
- data/lib/ims/lti/deprecated_role_checks.rb +0 -52
- data/lib/ims/lti/extensions/canvas.rb +0 -122
- data/lib/ims/lti/extensions/content.rb +0 -258
- data/lib/ims/lti/extensions/outcome_data.rb +0 -240
- data/lib/ims/lti/extensions.rb +0 -45
- data/lib/ims/lti/launch_params.rb +0 -166
- data/lib/ims/lti/outcome_request.rb +0 -225
- data/lib/ims/lti/outcome_response.rb +0 -166
- data/lib/ims/lti/request_validator.rb +0 -56
- data/lib/ims/lti/role_checks.rb +0 -101
- data/lib/ims/lti/tool_base.rb +0 -29
- data/lib/ims/lti/tool_config.rb +0 -231
- data/lib/ims/lti/tool_consumer.rb +0 -86
- data/lib/ims/lti/tool_provider.rb +0 -145
@@ -0,0 +1,20 @@
|
|
1
|
+
module IMS::LTI::Models
|
2
|
+
class ToolConsumerProfile < LTIModel
|
3
|
+
|
4
|
+
CONTEXT = "http://purl.imsglobal.org/ctx/lti/v2/ToolConsumerProfile"
|
5
|
+
TYPE = "ToolConsumerProfile"
|
6
|
+
|
7
|
+
add_attributes :lti_version, :guid, :capability_offered
|
8
|
+
add_attribute :id, json_key:'@id'
|
9
|
+
add_attribute :type, json_key:'@type'
|
10
|
+
add_attribute :context, json_key:'@context'
|
11
|
+
add_attribute :product_instance, relation:'IMS::LTI::Models::ProductInstance'
|
12
|
+
add_attribute :service_offered, relation: 'IMS::LTI::Models::RestService'
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
@context = [CONTEXT]
|
16
|
+
@type = TYPE
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module IMS::LTI::Models
|
2
|
+
class ToolProfile < LTIModel
|
3
|
+
add_attributes :lti_version
|
4
|
+
add_attribute :id, json_key: '@id'
|
5
|
+
add_attribute :product_instance, relation:'IMS::LTI::Models::ProductInstance'
|
6
|
+
add_attribute :base_url_choice, relation: 'IMS::LTI::Models::BaseUrlChoice'
|
7
|
+
add_attribute :resource_handler, relation:'IMS::LTI::Models::ResourceHandler'
|
8
|
+
add_attribute :message, relation:'IMS::LTI::Models::MessageHandler'
|
9
|
+
add_attribute :service_offered, relation:'IMS::LTI::Models::RestService'
|
10
|
+
|
11
|
+
|
12
|
+
def base_message_url
|
13
|
+
if base_url_choice
|
14
|
+
choice = base_url_choice.find { |choice| choice.default_message_url != '' }
|
15
|
+
choice.default_message_url
|
16
|
+
else
|
17
|
+
''
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module IMS::LTI::Models
|
2
|
+
class ToolProxy < LTIModel
|
3
|
+
add_attributes :lti_version, :tool_proxy_guid, :custom, :custom_url, :enabled_capability
|
4
|
+
add_attribute :context, json_key:'@context'
|
5
|
+
add_attribute :type, json_key:'@type'
|
6
|
+
add_attribute :id, json_key:'@id'
|
7
|
+
add_attribute :tool_consumer_profile
|
8
|
+
add_attribute :tool_profile, relation:'IMS::LTI::Models::ToolProfile'
|
9
|
+
add_attribute :security_contract, relation:'IMS::LTI::Models::SecurityContract'
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module IMS::LTI::Models
|
2
|
+
class Vendor < LTIModel
|
3
|
+
|
4
|
+
add_attributes :code, :website
|
5
|
+
add_attribute :id, json_key:'@id'
|
6
|
+
add_attribute :contact, relation:'IMS::LTI::Models::Contact'
|
7
|
+
add_attribute :vendor_name, relation:'IMS::LTI::Models::LocalizedName'
|
8
|
+
add_attribute :description, relation:'IMS::LTI::Models::LocalizedText'
|
9
|
+
add_attribute :timestamp, json_converter: 'IMS::LTI::Converters::TimeJSONConverter'
|
10
|
+
|
11
|
+
def create_vendor_name(name, key = 'vendor.name')
|
12
|
+
@vendor_name = LocalizedName.new(name, key)
|
13
|
+
end
|
14
|
+
|
15
|
+
def create_description(name, key = 'vendor.description')
|
16
|
+
@description = LocalizedText.new(name, key)
|
17
|
+
end
|
18
|
+
|
19
|
+
def default_name
|
20
|
+
vendor_name && vendor_name.default_value
|
21
|
+
end
|
22
|
+
|
23
|
+
def default_description
|
24
|
+
description && description.default_value
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module IMS::LTI
|
2
|
+
module Models
|
3
|
+
require_relative 'models/lti_model'
|
4
|
+
require_relative 'models/contact'
|
5
|
+
require_relative 'models/localized_name'
|
6
|
+
require_relative 'models/localized_text'
|
7
|
+
require_relative 'models/product_family'
|
8
|
+
require_relative 'models/product_info'
|
9
|
+
require_relative 'models/product_instance'
|
10
|
+
require_relative 'models/rest_service'
|
11
|
+
require_relative 'models/service_owner'
|
12
|
+
require_relative 'models/service_provider'
|
13
|
+
require_relative 'models/tool_consumer_profile'
|
14
|
+
require_relative 'models/vendor'
|
15
|
+
require_relative 'models/messages'
|
16
|
+
require_relative 'models/tool_proxy'
|
17
|
+
require_relative 'models/tool_profile'
|
18
|
+
require_relative 'models/resource_handler'
|
19
|
+
require_relative 'models/resource_type'
|
20
|
+
require_relative 'models/message_handler'
|
21
|
+
require_relative 'models/parameter'
|
22
|
+
require_relative 'models/icon_info'
|
23
|
+
require_relative 'models/icon_endpoint'
|
24
|
+
require_relative 'models/security_contract'
|
25
|
+
require_relative 'models/rest_service_profile'
|
26
|
+
require_relative 'models/base_url_choice'
|
27
|
+
require_relative 'models/base_url_selector'
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module IMS::LTI::Services
|
2
|
+
class MessageService
|
3
|
+
|
4
|
+
def initialize(key, secret)
|
5
|
+
@key = key
|
6
|
+
@secret = secret
|
7
|
+
end
|
8
|
+
|
9
|
+
def signed_request(url, message)
|
10
|
+
uri = URI.parse(url)
|
11
|
+
oauth_consumer = OAuth::Consumer.new(@key, @secret, {
|
12
|
+
:site => "#{uri.scheme}://#{uri.host}",
|
13
|
+
:scheme => :body
|
14
|
+
})
|
15
|
+
request = oauth_consumer.create_signed_request(:post, uri.request_uri, nil, {}, message.post_params)
|
16
|
+
|
17
|
+
request
|
18
|
+
end
|
19
|
+
|
20
|
+
def signed_params(url, message)
|
21
|
+
signed_request = signed_request(url, message)
|
22
|
+
|
23
|
+
params = {}
|
24
|
+
CGI.parse(signed_request.body).each do |key, value|
|
25
|
+
params[key] = value.first
|
26
|
+
end
|
27
|
+
params
|
28
|
+
end
|
29
|
+
|
30
|
+
def valid_signature?(url, params)
|
31
|
+
request = {
|
32
|
+
'method' => 'POST',
|
33
|
+
'uri' => url,
|
34
|
+
'parameters' => params
|
35
|
+
}
|
36
|
+
|
37
|
+
OAuth::Signature.build(request, :consumer_secret => @secret).verify()
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/ims/lti/version.rb
CHANGED
data/lib/ims/lti.rb
CHANGED
@@ -1,69 +1,11 @@
|
|
1
|
-
require '
|
2
|
-
require 'builder'
|
3
|
-
require "rexml/document"
|
4
|
-
require 'cgi'
|
1
|
+
require 'json'
|
5
2
|
require 'securerandom'
|
3
|
+
require 'oauth'
|
6
4
|
|
7
|
-
module IMS
|
8
|
-
|
9
|
-
# :main:IMS::LTI
|
10
|
-
# LTI is a standard defined by IMS for creating eduction Tool Consumers/Providers.
|
11
|
-
# LTI documentation: http://www.imsglobal.org/lti/index.html
|
12
|
-
#
|
13
|
-
# When creating these tools you will work primarily with the ToolProvider and
|
14
|
-
# ToolConsumer classes.
|
15
|
-
#
|
16
|
-
# For validating OAuth request be sure to require the necessary proxy request
|
17
|
-
# object. See IMS::LTI::RequestValidator#valid_request? for more documentation.
|
18
|
-
#
|
19
|
-
# == Installation
|
20
|
-
# This is packaged as the `ims-lti` rubygem, so you can just add the dependency to
|
21
|
-
# your Gemfile or install the gem on your system:
|
22
|
-
#
|
23
|
-
# gem install ims-lti
|
24
|
-
#
|
25
|
-
# To require the library in your project:
|
26
|
-
#
|
27
|
-
# require 'ims/lti'
|
5
|
+
module IMS
|
28
6
|
module LTI
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
class InvalidLTIConfigError < StandardError
|
34
|
-
end
|
35
|
-
|
36
|
-
class XMLParseError < StandardError
|
37
|
-
end
|
38
|
-
|
39
|
-
# POST a signed oauth request with the given key/secret/data
|
40
|
-
def self.post_service_request(key, secret, url, content_type, body)
|
41
|
-
raise IMS::LTI::InvalidLTIConfigError, "" unless key && secret
|
42
|
-
|
43
|
-
consumer = OAuth::Consumer.new(key, secret)
|
44
|
-
token = OAuth::AccessToken.new(consumer)
|
45
|
-
token.post(
|
46
|
-
url,
|
47
|
-
body,
|
48
|
-
'Content-Type' => content_type
|
49
|
-
)
|
50
|
-
end
|
51
|
-
|
52
|
-
# Generates a unique identifier
|
53
|
-
def self.generate_identifier
|
54
|
-
SecureRandom.uuid
|
55
|
-
end
|
7
|
+
require_relative 'lti/models'
|
8
|
+
require_relative 'lti/converters'
|
9
|
+
require_relative 'lti/services'
|
56
10
|
end
|
57
11
|
end
|
58
|
-
|
59
|
-
require 'ims/lti/extensions'
|
60
|
-
require 'ims/lti/launch_params'
|
61
|
-
require 'ims/lti/request_validator'
|
62
|
-
require 'ims/lti/tool_base'
|
63
|
-
require 'ims/lti/deprecated_role_checks'
|
64
|
-
require 'ims/lti/role_checks'
|
65
|
-
require 'ims/lti/tool_provider'
|
66
|
-
require 'ims/lti/tool_consumer'
|
67
|
-
require 'ims/lti/outcome_request'
|
68
|
-
require 'ims/lti/outcome_response'
|
69
|
-
require 'ims/lti/tool_config'
|
data/lib/ims.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,51 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ims-lti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0.beta.1
|
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: 2014-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: json-ld
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.0'
|
20
|
-
- - "<"
|
17
|
+
- - "~>"
|
21
18
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
19
|
+
version: 1.1.4
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
|
-
- - "
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '1.0'
|
30
|
-
- - "<"
|
24
|
+
- - "~>"
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
26
|
+
version: 1.1.4
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: oauth
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
|
-
- - "
|
31
|
+
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.4.
|
33
|
+
version: 0.4.7
|
40
34
|
type: :runtime
|
41
35
|
prerelease: false
|
42
36
|
version_requirements: !ruby/object:Gem::Requirement
|
43
37
|
requirements:
|
44
|
-
- - "
|
38
|
+
- - "~>"
|
45
39
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.4.
|
40
|
+
version: 0.4.7
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
42
|
+
name: rake
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
50
44
|
requirements:
|
51
45
|
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
|
-
type: :
|
48
|
+
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
51
|
requirements:
|
@@ -62,48 +56,60 @@ dependencies:
|
|
62
56
|
name: rspec
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
|
-
- - "
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '3.0'
|
68
|
-
- - ">"
|
59
|
+
- - ">="
|
69
60
|
- !ruby/object:Gem::Version
|
70
|
-
version: '
|
61
|
+
version: '0'
|
71
62
|
type: :development
|
72
63
|
prerelease: false
|
73
64
|
version_requirements: !ruby/object:Gem::Requirement
|
74
65
|
requirements:
|
75
|
-
- - "
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '3.0'
|
78
|
-
- - ">"
|
66
|
+
- - ">="
|
79
67
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
68
|
+
version: '0'
|
81
69
|
description:
|
82
70
|
email:
|
83
71
|
executables: []
|
84
72
|
extensions: []
|
85
|
-
extra_rdoc_files:
|
86
|
-
- LICENSE
|
73
|
+
extra_rdoc_files: []
|
87
74
|
files:
|
88
|
-
- Changelog
|
89
|
-
- LICENSE
|
75
|
+
- Changelog.txt
|
76
|
+
- LICENSE.txt
|
90
77
|
- README.md
|
91
78
|
- lib/ims.rb
|
92
79
|
- lib/ims/lti.rb
|
93
|
-
- lib/ims/lti/
|
94
|
-
- lib/ims/lti/
|
95
|
-
- lib/ims/lti/
|
96
|
-
- lib/ims/lti/
|
97
|
-
- lib/ims/lti/
|
98
|
-
- lib/ims/lti/
|
99
|
-
- lib/ims/lti/
|
100
|
-
- lib/ims/lti/
|
101
|
-
- lib/ims/lti/
|
102
|
-
- lib/ims/lti/
|
103
|
-
- lib/ims/lti/
|
104
|
-
- lib/ims/lti/
|
105
|
-
- lib/ims/lti/
|
106
|
-
- lib/ims/lti/
|
80
|
+
- lib/ims/lti/converters.rb
|
81
|
+
- lib/ims/lti/converters/time_json_converter.rb
|
82
|
+
- lib/ims/lti/models.rb
|
83
|
+
- lib/ims/lti/models/base_url_choice.rb
|
84
|
+
- lib/ims/lti/models/base_url_selector.rb
|
85
|
+
- lib/ims/lti/models/contact.rb
|
86
|
+
- lib/ims/lti/models/icon_endpoint.rb
|
87
|
+
- lib/ims/lti/models/icon_info.rb
|
88
|
+
- lib/ims/lti/models/localized_name.rb
|
89
|
+
- lib/ims/lti/models/localized_text.rb
|
90
|
+
- lib/ims/lti/models/lti_model.rb
|
91
|
+
- lib/ims/lti/models/message_handler.rb
|
92
|
+
- lib/ims/lti/models/messages.rb
|
93
|
+
- lib/ims/lti/models/messages/basic_lti_launch_request.rb
|
94
|
+
- lib/ims/lti/models/messages/message.rb
|
95
|
+
- lib/ims/lti/models/messages/registration_request.rb
|
96
|
+
- lib/ims/lti/models/parameter.rb
|
97
|
+
- lib/ims/lti/models/product_family.rb
|
98
|
+
- lib/ims/lti/models/product_info.rb
|
99
|
+
- lib/ims/lti/models/product_instance.rb
|
100
|
+
- lib/ims/lti/models/resource_handler.rb
|
101
|
+
- lib/ims/lti/models/resource_type.rb
|
102
|
+
- lib/ims/lti/models/rest_service.rb
|
103
|
+
- lib/ims/lti/models/rest_service_profile.rb
|
104
|
+
- lib/ims/lti/models/security_contract.rb
|
105
|
+
- lib/ims/lti/models/service_owner.rb
|
106
|
+
- lib/ims/lti/models/service_provider.rb
|
107
|
+
- lib/ims/lti/models/tool_consumer_profile.rb
|
108
|
+
- lib/ims/lti/models/tool_profile.rb
|
109
|
+
- lib/ims/lti/models/tool_proxy.rb
|
110
|
+
- lib/ims/lti/models/vendor.rb
|
111
|
+
- lib/ims/lti/services.rb
|
112
|
+
- lib/ims/lti/services/message_service.rb
|
107
113
|
- lib/ims/lti/version.rb
|
108
114
|
homepage: http://github.com/instructure/ims-lti
|
109
115
|
licenses:
|
@@ -120,11 +126,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
120
126
|
version: '0'
|
121
127
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
128
|
requirements:
|
123
|
-
- - "
|
129
|
+
- - ">"
|
124
130
|
- !ruby/object:Gem::Version
|
125
|
-
version:
|
131
|
+
version: 1.3.1
|
126
132
|
requirements: []
|
127
|
-
|
133
|
+
rubyforge_project:
|
134
|
+
rubygems_version: 2.2.2
|
128
135
|
signing_key:
|
129
136
|
specification_version: 4
|
130
137
|
summary: Ruby library for creating IMS LTI tool providers and consumers
|
data/Changelog
DELETED
@@ -1,76 +0,0 @@
|
|
1
|
-
2023-05-30 Version 1.2.9
|
2
|
-
* Loosen version requirement for OAuth gem
|
3
|
-
|
4
|
-
2023-01-03 Version 1.2.8
|
5
|
-
* Add Ruby 3.0 support by requiring rexml
|
6
|
-
* Fix URI encoding bug for queries with an ampersand `&`
|
7
|
-
|
8
|
-
2022-12-13 Version 1.2.7
|
9
|
-
* Fix content return parameter encoding
|
10
|
-
|
11
|
-
2022-04-26 Version 1.2.6
|
12
|
-
* Add support for prioritizeNonToolGrade
|
13
|
-
* Add support for needsAdditionalReview
|
14
|
-
|
15
|
-
2020-02-03 Version 1.2.4
|
16
|
-
* Add support for submittedAt date
|
17
|
-
|
18
|
-
2020-02-03 Version 1.2.3 -- yanked
|
19
|
-
|
20
|
-
2017-06-19 Version 1.2.2
|
21
|
-
* Explicitly require 'oauth' gem and specify version range
|
22
|
-
|
23
|
-
2017-04-13 Version 1.2.1
|
24
|
-
* Remove date field from gemspec
|
25
|
-
|
26
|
-
2017-03-08 Version 1.2.0
|
27
|
-
* Don't downcase roles
|
28
|
-
|
29
|
-
2016-10-05 Version 1.1.13
|
30
|
-
* Fix Oauth::Unauthorized initialization bug
|
31
|
-
* Relax oauth dependency
|
32
|
-
|
33
|
-
2016-06-16 Version 1.1.12
|
34
|
-
* Add support for detecting observer role
|
35
|
-
|
36
|
-
2015-02-20 Version 1.1.8
|
37
|
-
* Replace usage of the 'uuid' gem with SecureRandom
|
38
|
-
* Update the outcome extension doc example
|
39
|
-
|
40
|
-
2015-01-09 Version 1.1.7
|
41
|
-
* Add support for new outcome extension resultTotalScore
|
42
|
-
|
43
|
-
2013-04-24 Version 1.1.3
|
44
|
-
|
45
|
-
* Corrected lti_version launch parameter
|
46
|
-
|
47
|
-
2012-09-05 Version 1.1.2
|
48
|
-
|
49
|
-
* Added better role checking and convenience methods
|
50
|
-
|
51
|
-
2012-09-04 Version 1.1.1
|
52
|
-
|
53
|
-
* Added cdata value for outcome data extension
|
54
|
-
|
55
|
-
2012-08-14 Version 1.1.0
|
56
|
-
|
57
|
-
* Added framework for LTI extensions
|
58
|
-
* Added LTI outcome data extension
|
59
|
-
* Fix tests reliant on random ordering
|
60
|
-
* Add rails 3 note to readme install docs
|
61
|
-
* Create Changelog
|
62
|
-
|
63
|
-
|
64
|
-
2012-03-14 Version 1.0.2
|
65
|
-
|
66
|
-
* Refactor OAuth validation into its own module
|
67
|
-
|
68
|
-
|
69
|
-
2012-03-13 Version 1.0.1
|
70
|
-
|
71
|
-
* Add gem dependencies to gemspec
|
72
|
-
|
73
|
-
|
74
|
-
2012-03-11 Version 1.0.0
|
75
|
-
|
76
|
-
* Publish fully functional and operational IMS LTI library
|
data/LICENSE
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 Instructure
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
4
|
-
this software and associated documentation files (the "Software"), to deal in
|
5
|
-
the Software without restriction, including without limitation the rights to use,
|
6
|
-
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
|
7
|
-
Software, and to permit persons to whom the Software is furnished to do so,
|
8
|
-
subject to the following conditions:
|
9
|
-
|
10
|
-
The above copyright notice and this permission notice shall be included in all
|
11
|
-
copies or substantial portions of the Software.
|
12
|
-
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
17
|
-
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
18
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# These are here for backwards-compatibility
|
2
|
-
# But they are deprecated and the new ones in
|
3
|
-
# role_checks.rb should be used
|
4
|
-
module IMS::LTI
|
5
|
-
module DeprecatedRoleChecks
|
6
|
-
# Check whether the Launch Parameters have a role
|
7
|
-
def has_role?(role)
|
8
|
-
role = role.downcase
|
9
|
-
@roles && @roles.any?{|r| r.downcase.index(role)}
|
10
|
-
end
|
11
|
-
|
12
|
-
# Convenience method for checking if the user has 'learner' or 'student' role
|
13
|
-
def student?
|
14
|
-
has_role?('learner') || has_role?('student')
|
15
|
-
end
|
16
|
-
|
17
|
-
# Convenience method for checking if the user has 'instructor' or 'faculty' or 'staff' role
|
18
|
-
def instructor?
|
19
|
-
has_role?('instructor') || has_role?('faculty') || has_role?('staff')
|
20
|
-
end
|
21
|
-
|
22
|
-
# Convenience method for checking if the user has 'contentdeveloper' role
|
23
|
-
def content_developer?
|
24
|
-
has_role?('ContentDeveloper')
|
25
|
-
end
|
26
|
-
|
27
|
-
# Convenience method for checking if the user has 'Member' role
|
28
|
-
def member?
|
29
|
-
has_role?('Member')
|
30
|
-
end
|
31
|
-
|
32
|
-
# Convenience method for checking if the user has 'Manager' role
|
33
|
-
def manager?
|
34
|
-
has_role?('Manager')
|
35
|
-
end
|
36
|
-
|
37
|
-
# Convenience method for checking if the user has 'Mentor' role
|
38
|
-
def mentor?
|
39
|
-
has_role?('Mentor')
|
40
|
-
end
|
41
|
-
|
42
|
-
# Convenience method for checking if the user has 'administrator' role
|
43
|
-
def admin?
|
44
|
-
has_role?('administrator')
|
45
|
-
end
|
46
|
-
|
47
|
-
# Convenience method for checking if the user has 'TeachingAssistant' role
|
48
|
-
def ta?
|
49
|
-
has_role?('TeachingAssistant')
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|