ims_caliper 0.9.3.15 → 1.0.0
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 +4 -4
- data/README.md +10 -5
- data/lib/caliper/{profiles/annotation_profile.rb → actions/annotation_actions.rb} +3 -41
- data/lib/caliper/{profiles/assessment_profile.rb → actions/assessment_actions.rb} +3 -19
- data/lib/caliper/actions/assessment_item_actions.rb +31 -0
- data/lib/caliper/{profiles/assignable_profile.rb → actions/assignable_actions.rb} +3 -28
- data/lib/caliper/{profiles/media_profile.rb → actions/media_actions.rb} +4 -29
- data/lib/caliper/{event/view_event.rb → actions/navigation_actions.rb} +5 -11
- data/lib/caliper/{validators/event_validator_context.rb → actions/outcome_actions.rb} +7 -15
- data/lib/caliper/{event/navigation_event.rb → actions/reading_actions.rb} +6 -14
- data/lib/caliper/actions/session_actions.rb +30 -0
- data/lib/caliper/context/context.rb +31 -0
- data/lib/caliper/entities/agent/organization.rb +4 -3
- data/lib/caliper/entities/agent/person.rb +4 -3
- data/lib/caliper/entities/agent/software_application.rb +4 -3
- data/lib/caliper/entities/annotation/annotation.rb +4 -12
- data/lib/caliper/entities/annotation/annotation_type.rb +32 -0
- data/lib/caliper/entities/annotation/bookmark_annotation.rb +3 -1
- data/lib/caliper/entities/annotation/highlight_annotation.rb +4 -4
- data/lib/caliper/entities/annotation/shared_annotation.rb +3 -1
- data/lib/caliper/entities/annotation/tag_annotation.rb +3 -1
- data/lib/caliper/entities/assessment/assessment.rb +1 -1
- data/lib/caliper/entities/assessment/assessment_item.rb +2 -0
- data/lib/caliper/entities/assignable/assignable_digital_resource.rb +3 -13
- data/lib/caliper/{event/session_event.rb → entities/assignable/assignable_digital_resource_type.rb} +7 -11
- data/lib/caliper/entities/assignable/attempt.rb +8 -9
- data/lib/caliper/entities/digital_resource.rb +5 -22
- data/lib/caliper/entities/digital_resource_type.rb +33 -0
- data/lib/caliper/entities/entity.rb +7 -37
- data/lib/caliper/entities/{learning_context.rb → entity_base.rb} +19 -15
- data/lib/caliper/entities/entity_type.rb +39 -0
- data/lib/caliper/entities/foaf/agent.rb +0 -2
- data/lib/caliper/entities/jsonable.rb +14 -3
- data/lib/caliper/entities/learning_objective.rb +4 -3
- data/lib/caliper/entities/lis/course_offering.rb +9 -6
- data/lib/caliper/entities/lis/course_section.rb +3 -1
- data/lib/caliper/entities/lis/group.rb +5 -3
- data/lib/caliper/entities/lis/membership.rb +5 -7
- data/lib/caliper/entities/media/audio_object.rb +2 -1
- data/lib/caliper/entities/media/image_object.rb +2 -1
- data/lib/caliper/entities/media/media_location.rb +2 -1
- data/lib/caliper/entities/media/media_object.rb +2 -9
- data/lib/caliper/entities/media/media_object_type.rb +31 -0
- data/lib/caliper/entities/media/video_object.rb +2 -1
- data/lib/caliper/entities/outcome/result.rb +23 -16
- data/lib/caliper/entities/reading/epub_chapter.rb +2 -1
- data/lib/caliper/entities/reading/epub_part.rb +2 -1
- data/lib/caliper/entities/reading/epub_sub_chapter.rb +2 -1
- data/lib/caliper/entities/reading/epub_volume.rb +2 -1
- data/lib/caliper/entities/reading/frame.rb +4 -3
- data/lib/caliper/entities/reading/web_page.rb +3 -2
- data/lib/caliper/entities/response/fillin_blank_response.rb +3 -3
- data/lib/caliper/entities/response/multiple_choice_response.rb +3 -3
- data/lib/caliper/entities/response/multiple_response_response.rb +3 -3
- data/lib/caliper/entities/response/response.rb +8 -10
- data/lib/caliper/entities/response/response_type.rb +5 -5
- data/lib/caliper/entities/response/select_type_response.rb +3 -3
- data/lib/caliper/entities/response/true_false_response.rb +2 -3
- data/lib/caliper/entities/session/session.rb +8 -7
- data/lib/caliper/{event → events}/annotation_event.rb +11 -3
- data/lib/caliper/{event → events}/assessment_event.rb +11 -8
- data/lib/caliper/{event → events}/assessment_item_event.rb +11 -8
- data/lib/caliper/{event → events}/assignable_event.rb +11 -8
- data/lib/caliper/{profiles/profile.rb → events/event.rb} +15 -15
- data/lib/caliper/events/event_context.rb +24 -0
- data/lib/caliper/events/event_type.rb +33 -0
- data/lib/caliper/{event → events}/jsonable.rb +2 -2
- data/lib/caliper/{event → events}/media_event.rb +11 -8
- data/lib/caliper/events/navigation_event.rb +47 -0
- data/lib/caliper/events/outcome_event.rb +44 -0
- data/lib/caliper/{event/outcome_event.rb → events/reading_event.rb} +13 -10
- data/lib/caliper/events/session_event.rb +42 -0
- data/lib/caliper/events/view_event.rb +44 -0
- data/lib/caliper/request/envelope.rb +4 -15
- data/lib/caliper/request/event_store_requestor.rb +1 -1
- data/lib/caliper/request/{envelope_jsonable.rb → jsonable.rb} +9 -11
- data/lib/caliper/sensor.rb +1 -1
- data/lib/caliper/version.rb +1 -1
- data/lib/caliper.rb +1 -1
- data/spec/lib/entities/agent/{student.json → person.json} +4 -3
- data/spec/lib/entities/agent/person_spec.rb +5 -6
- data/spec/lib/entities/assessment/assessment.json +23 -0
- data/spec/lib/entities/assessment/assessment_spec.rb +54 -0
- data/spec/lib/event_helper.rb +33 -41
- data/spec/lib/{event/annotation_event_bookmark_spec.rb → events/annotation_bookmarked_event_spec.rb} +36 -46
- data/spec/lib/{event/annotation_event_highlight_spec.rb → events/annotation_highlighted_event_spec.rb} +36 -46
- data/spec/lib/{event/annotation_event_shared_spec.rb → events/annotation_shared_event_spec.rb} +42 -52
- data/spec/lib/{event/annotation_event_tag_spec.rb → events/annotation_tagged_event_spec.rb} +36 -46
- data/spec/lib/{event → events}/assessment_item_completed_event_spec.rb +41 -65
- data/spec/lib/{event → events}/assessment_item_started_event_spec.rb +38 -56
- data/spec/lib/{event/assessment_event_spec.rb → events/assessment_started_event_spec.rb} +36 -51
- data/spec/lib/{event/assignable_event_spec.rb → events/assignable_activated_event_spec.rb} +37 -52
- data/spec/lib/{event/media_event_spec.rb → events/media_paused_video_event_spec.rb} +33 -43
- data/spec/lib/{event/navigated_event_spec.rb → events/navigation_navigated_to_event_spec.rb} +36 -45
- data/spec/lib/events/outcome_graded_event_spec.rb +163 -0
- data/spec/lib/{event/session_event_login_spec.rb → events/session_logged_in_event_spec.rb} +38 -46
- data/spec/lib/{event/session_event_logout_spec.rb → events/session_logged_out-event_spec.rb} +28 -37
- data/spec/lib/{event/session_event_timeout_spec.rb → events/session_timed_out_event_spec.rb} +24 -34
- data/spec/lib/{event/viewed_event_spec.rb → events/view_viewed_event_spec.rb} +33 -41
- data/spec/lib/request/{http_requestor_spec.rb → http_requestor_single_event_spec.rb} +46 -47
- data/spec/lib/request/http_requestor_single_minimal_event_spec.rb +84 -0
- data/spec/lib/sensor_spec.rb +1 -1
- metadata +77 -70
- data/lib/caliper/event/event.rb +0 -114
- data/lib/caliper/profiles/assessment_item_profile.rb +0 -48
- data/lib/caliper/profiles/reading_profile.rb +0 -56
- data/lib/caliper/profiles/session_profile.rb +0 -46
- data/lib/caliper/validators/error_message.rb +0 -63
- data/lib/caliper/validators/event_validator.rb +0 -57
- data/lib/caliper/validators/property_type_check.rb +0 -33
- data/lib/caliper/validators/session_login_event_validator.rb +0 -121
- data/lib/caliper/validators/session_logout_event_validator.rb +0 -120
- data/lib/caliper/validators/time_check.rb +0 -50
- data/spec/lib/entities/entity.json +0 -9
- data/spec/lib/entities/entity_spec.rb +0 -52
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8f8b82d69f8412b3be27a29ec5e9f3f8e144acd
|
4
|
+
data.tar.gz: d24cffc6b24c29129a31d48fe2f0d22670dc2c09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2821a168e5d3eb6b99ffe53fa0d3625ea77d7dca06c362a799589cdc90c41eddf467c68dbde78fa7f74f29c7c1c27f62d810835a0e15c8c5c94581bca0f1809d
|
7
|
+
data.tar.gz: bdaf13f3aa7de2f4402e0e7c688db8663601a1345f427b657c3159028c9ea013f3dd7fc656fdf6013b2feb7d2705c50455ce0c0bdc9d46802b2a508a5beb27e5
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
caliper-ruby
|
1
|
+
IMS Global caliper-ruby
|
2
2
|
===================
|
3
3
|
|
4
|
-
caliper-ruby is a Ruby client for [Caliper](http://www.imsglobal.org) that provides
|
4
|
+
caliper-ruby is a Ruby client for [Caliper](http://www.imsglobal.org/caliper) that provides an implementation of the Caliper SensorAPI™.
|
5
5
|
|
6
6
|
## development notes
|
7
7
|
To set up dev environment and run specs
|
@@ -19,6 +19,11 @@ To run specs, you need to clone caliper-common-fixtures at the same level as cal
|
|
19
19
|
|
20
20
|
gem build caliper.gemspec
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
https://
|
22
|
+
## Documentation
|
23
|
+
|
24
|
+
Documentation is available at [http://www.imsglobal.org/caliper](https://www.imsglobal.org/caliper).
|
25
|
+
|
26
|
+
©2015 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
27
|
+
Trademark Information - http://www.imsglobal.org/copyright.html
|
28
|
+
|
29
|
+
For license information contact, info@imsglobal.org and read the license file contained in the repository.
|
@@ -15,16 +15,12 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative './profile'
|
19
|
-
require_relative '../entities/digital_resource'
|
20
|
-
require_relative '../entities/annotation/annotation'
|
21
|
-
require_relative '../entities/reading/frame'
|
22
|
-
|
23
18
|
#
|
24
|
-
# Annotation
|
19
|
+
# Annotation actions.
|
25
20
|
#
|
21
|
+
|
26
22
|
module Caliper
|
27
|
-
module
|
23
|
+
module Actions
|
28
24
|
module AnnotationActions
|
29
25
|
ATTACHED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Attached"
|
30
26
|
BOOKMARKED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Bookmarked"
|
@@ -44,39 +40,5 @@ module Caliper
|
|
44
40
|
SUBSCRIBED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Subscribed"
|
45
41
|
TAGGED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Tagged"
|
46
42
|
end
|
47
|
-
|
48
|
-
class ReadingProfile < Profile
|
49
|
-
include AnnotationActions
|
50
|
-
attr_accessor :key, # String
|
51
|
-
:lookup # hash of ReadingActions
|
52
|
-
|
53
|
-
# whether object if of type DigitalResource
|
54
|
-
def validate_object (object)
|
55
|
-
if (object.is_a? AnnotationType::BOOKMARK_ANNOTATION)
|
56
|
-
## TODO check required properties
|
57
|
-
return object
|
58
|
-
elsif (object.is_a? AnnotationType::HIGHLIGHT_ANNOTATION)
|
59
|
-
## TODO check required properties
|
60
|
-
return object
|
61
|
-
elsif (object.is_a? AnnotationType::SHARED_ANNOTATION)
|
62
|
-
## TODO check required properties
|
63
|
-
return object
|
64
|
-
elsif (object.is_a? AnnotationType::TAG_ANNOTATION)
|
65
|
-
## TODO check required properties
|
66
|
-
return object
|
67
|
-
else
|
68
|
-
fail "Object must be of type Annotation"
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
# whether target is of type Frame
|
73
|
-
def validate_target(target)
|
74
|
-
if (target is_a? Frame)
|
75
|
-
return target
|
76
|
-
else
|
77
|
-
fail "Target must be of type Frame."
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
43
|
end
|
82
44
|
end
|
@@ -15,33 +15,17 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative './profile'
|
19
|
-
|
20
18
|
#
|
21
|
-
# Assessment
|
19
|
+
# Assessment actions.
|
22
20
|
#
|
21
|
+
|
23
22
|
module Caliper
|
24
|
-
module
|
23
|
+
module Actions
|
25
24
|
module AssessmentActions
|
26
25
|
PAUSED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Paused"
|
27
26
|
RESTARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Restarted"
|
28
27
|
STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
|
29
28
|
SUBMITTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Submitted"
|
30
29
|
end
|
31
|
-
|
32
|
-
class AssessmentProfile < Caliper::Profiles::Profile
|
33
|
-
|
34
|
-
attr_accessor :key, # String
|
35
|
-
:lookup # hash of AssessmentActions
|
36
|
-
|
37
|
-
# whether object if of type DigitalResource
|
38
|
-
def validate_object(object)
|
39
|
-
if (object.is_a? DigitalResource)
|
40
|
-
return object
|
41
|
-
else
|
42
|
-
fail 'Object must be of type DigitalResource'
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
30
|
end
|
47
31
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
##
|
2
|
+
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
+
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
+
# under one or more contributor license agreements. See the NOTICE
|
5
|
+
# file distributed with this work for additional information.
|
6
|
+
#
|
7
|
+
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
+
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
+
# Software Foundation, version 3 of the License.
|
10
|
+
#
|
11
|
+
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
+
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
+
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
+
|
18
|
+
#
|
19
|
+
# Assessment item actions.
|
20
|
+
#
|
21
|
+
|
22
|
+
module Caliper
|
23
|
+
module Actions
|
24
|
+
module AssessmentItemActions
|
25
|
+
COMPLETED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Completed"
|
26
|
+
REVIEWED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Reviewed"
|
27
|
+
SKIPPED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Skipped"
|
28
|
+
STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -15,13 +15,12 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative './profile'
|
19
|
-
|
20
18
|
#
|
21
|
-
# Assignable
|
19
|
+
# Assignable actions.
|
22
20
|
#
|
21
|
+
|
23
22
|
module Caliper
|
24
|
-
module
|
23
|
+
module Actions
|
25
24
|
module AssignableActions
|
26
25
|
ABANDONED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Abandoned"
|
27
26
|
ACTIVATED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Activated"
|
@@ -33,29 +32,5 @@ module Caliper
|
|
33
32
|
STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
|
34
33
|
SUBMITTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Submitted"
|
35
34
|
end
|
36
|
-
|
37
|
-
class AssignableProfile < Caliper::Profiles::Profile
|
38
|
-
|
39
|
-
attr_accessor :key, # String
|
40
|
-
:lookup # hash of AssignableActions
|
41
|
-
|
42
|
-
# whether object if of type DigitalResource
|
43
|
-
def validate_object(object)
|
44
|
-
if (object.is_a? DigitalResource)
|
45
|
-
return object
|
46
|
-
else
|
47
|
-
fail 'Object must e of type DigitalResource'
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
# whether target is of type Frame
|
52
|
-
def validate_target(target)
|
53
|
-
if (target is_a? frame)
|
54
|
-
return target
|
55
|
-
else
|
56
|
-
fail 'Target must be of type Frame'
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
35
|
end
|
61
36
|
end
|
@@ -15,13 +15,12 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative './profile'
|
19
|
-
|
20
18
|
#
|
21
|
-
# Media
|
19
|
+
# Media actions.
|
22
20
|
#
|
21
|
+
|
23
22
|
module Caliper
|
24
|
-
module
|
23
|
+
module Actions
|
25
24
|
module MediaActions
|
26
25
|
CHANGED_RESOLUTION = "http://purl.imsglobal.org/vocab/caliper/v1/action#ChangedResolution"
|
27
26
|
CHANGED_SIZE = "http://purl.imsglobal.org/vocab/caliper/v1/action#ChangedSize"
|
@@ -43,29 +42,5 @@ module Caliper
|
|
43
42
|
STARTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Started"
|
44
43
|
UNMUTED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Unmuted"
|
45
44
|
end
|
46
|
-
|
47
|
-
class MediaProfile < Caliper::Profiles::Profile
|
48
|
-
|
49
|
-
attr_accessor :key, # String
|
50
|
-
:lookup # hash of MediaActions
|
51
|
-
|
52
|
-
# whether object if of type DigitalResource
|
53
|
-
def validate_object(object)
|
54
|
-
if (object.is_a? DigitalResource)
|
55
|
-
return object
|
56
|
-
else
|
57
|
-
fail "Object must e of type DigitalResource"
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# whether target is of type Frame
|
62
|
-
def validate_target(target)
|
63
|
-
if (target is_a? frame)
|
64
|
-
return target
|
65
|
-
else
|
66
|
-
fail "Target must be of type Frame."
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
45
|
end
|
71
|
-
end
|
46
|
+
end
|
@@ -15,20 +15,14 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative './event'
|
19
|
-
|
20
18
|
#
|
21
|
-
#
|
19
|
+
# Profile actions.
|
22
20
|
#
|
23
|
-
module Caliper
|
24
|
-
module Event
|
25
|
-
class ViewEvent < Event
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
22
|
+
module Caliper
|
23
|
+
module Actions
|
24
|
+
module NavigationActions
|
25
|
+
NAVIGATED_TO = "http://purl.imsglobal.org/vocab/caliper/v1/action#NavigatedTo"
|
32
26
|
end
|
33
27
|
end
|
34
28
|
end
|
@@ -16,21 +16,13 @@
|
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
18
|
#
|
19
|
-
#
|
19
|
+
# Outcome actions.
|
20
20
|
#
|
21
|
-
module Caliper
|
22
|
-
module Validators
|
23
|
-
class EventValidatorContext
|
24
|
-
attr_accessor :validator
|
25
|
-
|
26
|
-
def initialize(validator)
|
27
|
-
@validator = validator
|
28
|
-
end
|
29
21
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
22
|
+
module Caliper
|
23
|
+
module Actions
|
24
|
+
module OutcomeActions
|
25
|
+
GRADED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Graded"
|
26
|
+
end
|
27
|
+
end
|
36
28
|
end
|
@@ -15,23 +15,15 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative './event'
|
19
|
-
|
20
18
|
#
|
21
|
-
#
|
19
|
+
# Reading actions.
|
22
20
|
#
|
23
|
-
module Caliper
|
24
|
-
module Event
|
25
|
-
class NavigationEvent < Event
|
26
21
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
@type = EventType::NAVIGATION
|
33
|
-
@navigatedFrom = nil
|
34
|
-
end
|
22
|
+
module Caliper
|
23
|
+
module Actions
|
24
|
+
module ReadingActions
|
25
|
+
SEARCHED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Searched"
|
26
|
+
VIEWED = "http://purl.imsglobal.org/vocab/caliper/v1/action#Viewed"
|
35
27
|
end
|
36
28
|
end
|
37
29
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
##
|
2
|
+
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
+
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
+
# under one or more contributor license agreements. See the NOTICE
|
5
|
+
# file distributed with this work for additional information.
|
6
|
+
#
|
7
|
+
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
+
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
+
# Software Foundation, version 3 of the License.
|
10
|
+
#
|
11
|
+
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
+
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
+
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
+
|
18
|
+
#
|
19
|
+
# Session actions.
|
20
|
+
#
|
21
|
+
|
22
|
+
module Caliper
|
23
|
+
module Actions
|
24
|
+
module SessionActions
|
25
|
+
LOGGED_IN = 'http://purl.imsglobal.org/vocab/caliper/v1/action#LoggedIn'
|
26
|
+
LOGGED_OUT = 'http://purl.imsglobal.org/vocab/caliper/v1/action#LoggedOut'
|
27
|
+
TIMED_OUT = 'http://purl.imsglobal.org/vocab/caliper/v1/action#TimedOut'
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
##
|
2
|
+
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
+
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
+
# under one or more contributor license agreements. See the NOTICE
|
5
|
+
# file distributed with this work for additional information.
|
6
|
+
#
|
7
|
+
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
+
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
+
# Software Foundation, version 3 of the License.
|
10
|
+
#
|
11
|
+
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
+
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
+
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
+
|
18
|
+
#
|
19
|
+
# JSON-LD context.
|
20
|
+
#
|
21
|
+
|
22
|
+
module Caliper
|
23
|
+
module Context
|
24
|
+
module Context
|
25
|
+
CONTEXT = "http://purl.imsglobal.org/ctx/caliper/v1/Context"
|
26
|
+
# ENTITY = "http://purl.imsglobal.org/ctx/caliper/v1/Entity"
|
27
|
+
# ENVELOPE = "http://purl.imsglobal.org/caliper/ctx/v1/Envelope"
|
28
|
+
# EVENT = "http://purl.imsglobal.org/ctx/caliper/v1/Event"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -15,7 +15,8 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative '../
|
18
|
+
require_relative '../entity_base'
|
19
|
+
require_relative '../entity_type'
|
19
20
|
require_relative '../w3c/organization'
|
20
21
|
|
21
22
|
#
|
@@ -24,7 +25,7 @@ require_relative '../w3c/organization'
|
|
24
25
|
module Caliper
|
25
26
|
module Entities
|
26
27
|
module Agent
|
27
|
-
class Organization <
|
28
|
+
class Organization < EntityBase
|
28
29
|
include Caliper::Entities::FOAF::Agent,
|
29
30
|
Caliper::Entities::W3C::Organization
|
30
31
|
|
@@ -32,7 +33,7 @@ module Caliper
|
|
32
33
|
|
33
34
|
def initialize
|
34
35
|
super
|
35
|
-
@type = EntityType::ORGANIZATION
|
36
|
+
@type = Caliper::Entities::EntityType::ORGANIZATION
|
36
37
|
end
|
37
38
|
end
|
38
39
|
end
|
@@ -15,7 +15,8 @@
|
|
15
15
|
# You should have received a copy of the GNU Lesser General Public License along
|
16
16
|
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
17
|
|
18
|
-
require_relative '../
|
18
|
+
require_relative '../entity_base'
|
19
|
+
require_relative '../entity_type'
|
19
20
|
require_relative '../foaf/agent.rb'
|
20
21
|
|
21
22
|
#
|
@@ -25,12 +26,12 @@ require_relative '../foaf/agent.rb'
|
|
25
26
|
module Caliper
|
26
27
|
module Entities
|
27
28
|
module Agent
|
28
|
-
class Person <
|
29
|
+
class Person < EntityBase
|
29
30
|
include Caliper::Entities::FOAF::Agent
|
30
31
|
|
31
32
|
def initialize
|
32
33
|
super
|
33
|
-
@type = EntityType::PERSON
|
34
|
+
@type = Caliper::Entities::EntityType::PERSON
|
34
35
|
end
|
35
36
|
end
|
36
37
|
end
|