ims_caliper 0.1.1 → 0.1.2
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 +8 -8
- data/.gitignore +37 -0
- data/.idea/caliper-ruby.iml +98 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/misc.xml +5 -0
- data/.idea/modules.xml +9 -0
- data/.idea/scopes/scope_settings.xml +5 -0
- data/.idea/vcs.xml +7 -0
- data/Gemfile +12 -1
- data/Gemfile.lock +42 -1
- data/LICENSE +67 -0
- data/NOTICE +15 -0
- data/README.md +13 -5
- data/caliper.gemspec +2 -8
- data/lib/caliper/defaults.rb +4 -4
- data/lib/caliper/entities/annotation/annotation.rb +14 -4
- data/lib/caliper/entities/annotation/bookmark_annotation.rb +14 -4
- data/lib/caliper/entities/annotation/highlight_annotation.rb +14 -3
- data/lib/caliper/entities/annotation/shared_annotation.rb +12 -3
- data/lib/caliper/entities/annotation/tag_annotation.rb +13 -3
- data/lib/caliper/entities/assessment/assessment.rb +27 -0
- data/lib/caliper/entities/assessment/assessment_item.rb +26 -0
- data/lib/caliper/entities/assignable/assignable_digital_resource.rb +47 -0
- data/lib/caliper/entities/assignable/attempt.rb +32 -0
- data/lib/caliper/entities/digital_resource.rb +36 -35
- data/lib/caliper/entities/entity.rb +50 -36
- data/lib/caliper/entities/foaf/agent.rb +1 -1
- data/lib/caliper/entities/jsonable.rb +56 -0
- data/lib/caliper/entities/learning_objective.rb +26 -0
- data/lib/caliper/entities/lis/course_offering.rb +30 -0
- data/lib/caliper/entities/lis/course_section.rb +27 -15
- data/lib/caliper/entities/lis/group.rb +27 -0
- data/lib/caliper/entities/lis/membership.rb +32 -0
- data/lib/caliper/entities/lis/organization.rb +20 -17
- data/lib/caliper/entities/lis/person.rb +23 -10
- data/lib/caliper/entities/lis/roles.rb +77 -0
- data/lib/caliper/entities/lis/status.rb +19 -0
- data/lib/caliper/entities/media/audio_object.rb +21 -0
- data/lib/caliper/entities/media/image_object.rb +21 -0
- data/lib/caliper/entities/media/media_location.rb +23 -0
- data/lib/caliper/entities/media/media_object.rb +38 -0
- data/lib/caliper/entities/media/video_object.rb +21 -0
- data/lib/caliper/entities/reading/epub_volume.rb +15 -7
- data/lib/caliper/entities/reading/frame.rb +7 -15
- data/lib/caliper/entities/response/fillin_blank_response.rb +20 -0
- data/lib/caliper/entities/response/multiple_choice_response.rb +20 -0
- data/lib/caliper/entities/response/multiple_response_response.rb +20 -0
- data/lib/caliper/entities/response/response.rb +23 -0
- data/lib/caliper/entities/response/response_type.rb +13 -0
- data/lib/caliper/entities/response/select_type_response.rb +20 -0
- data/lib/caliper/entities/response/true_false_response.rb +21 -0
- data/lib/caliper/entities/schemadotorg/software_application.rb +8 -8
- data/lib/caliper/entities/session.rb +25 -17
- data/lib/caliper/entities/software_application.rb +16 -7
- data/lib/caliper/entities/web_page.rb +2 -0
- data/lib/caliper/entity_envelope.rb +21 -0
- data/lib/caliper/event/annotation_event.rb +10 -6
- data/lib/caliper/event/assessment_event.rb +19 -0
- data/lib/caliper/event/assessment_item_event.rb +19 -0
- data/lib/caliper/event/assignable_event.rb +19 -0
- data/lib/caliper/event/event.rb +70 -50
- data/lib/caliper/event/jsonable.rb +55 -0
- data/lib/caliper/event/navigation_event.rb +2 -7
- data/lib/caliper/event/outcome_event.rb +1 -1
- data/lib/caliper/event/session_event.rb +13 -14
- data/lib/caliper/event/view_event.rb +6 -7
- data/lib/caliper/event_envelope.rb +22 -0
- data/lib/caliper/jsonable.rb +53 -0
- data/lib/caliper/profiles/annotation_profile.rb +56 -53
- data/lib/caliper/profiles/assessment_profile.rb +48 -0
- data/lib/caliper/profiles/assignable_profile.rb +44 -0
- data/lib/caliper/profiles/media_profile.rb +54 -0
- data/lib/caliper/profiles/profile.rb +38 -38
- data/lib/caliper/profiles/reading_profile.rb +31 -28
- data/lib/caliper/profiles/session_profile.rb +17 -18
- data/lib/caliper/request/event_store_requestor.rb +26 -26
- data/lib/caliper/sensor.rb +46 -35
- data/lib/caliper/version.rb +1 -1
- data/spec/lib/entities/entity.json +9 -0
- data/spec/lib/entities/entity_spec.rb +37 -0
- data/spec/lib/entities/lis/person_spec.rb +37 -0
- data/spec/lib/entities/lis/student.json +11 -0
- data/spec/lib/event/annotation_event_bookmark_spec.rb +159 -0
- data/spec/lib/event/annotation_event_highlight_spec.rb +160 -0
- data/spec/lib/event/annotation_event_shared_spec.rb +172 -0
- data/spec/lib/event/annotation_event_tag_spec.rb +159 -0
- data/spec/lib/event/assessment_event_spec.rb +207 -0
- data/spec/lib/event/assessment_item_completed_event_spec.rb +223 -0
- data/spec/lib/event/assessment_item_started_event_spec.rb +207 -0
- data/spec/lib/event/media_event_spec.rb +157 -0
- data/spec/lib/event/navigated_event_spec.rb +160 -0
- data/spec/lib/event/session_event_login_spec.rb +160 -0
- data/spec/lib/event/session_event_logout_spec.rb +145 -0
- data/spec/lib/event/session_event_timeout_spec.rb +145 -0
- data/spec/lib/event/viewed_event_spec.rb +149 -0
- data/spec/lib/event_helper.rb +145 -0
- data/spec/lib/sensor_spec.rb +30 -0
- data/spec/spec_helper.rb +3 -2
- metadata +84 -61
- data/lib/caliper/client.rb +0 -33
- data/lib/caliper/consumer/base.rb +0 -46
- data/lib/caliper/consumer/queue.rb +0 -40
- data/lib/caliper/consumer/socket.rb +0 -132
- data/lib/caliper/entities/annotation/text_position_selector.rb +0 -14
- data/lib/caliper/entities/schemadotorg/audio_object.rb +0 -15
- data/lib/caliper/entities/schemadotorg/image_object.rb +0 -15
- data/lib/caliper/entities/schemadotorg/media_object.rb +0 -19
- data/lib/caliper/entities/schemadotorg/video_object.rb +0 -15
- data/lib/caliper/event/.shared.rb.swp +0 -0
- data/spec/lib/client_spec.rb +0 -35
- data/spec/lib/consumer/base_spec.rb +0 -28
- data/spec/lib/consumer/queue_spec.rb +0 -16
- data/spec/lib/event/annotation_spec.rb +0 -12
- data/spec/lib/event/bookmarked_spec.rb +0 -17
- data/spec/lib/event/commented_spec.rb +0 -19
- data/spec/lib/event/highlighted_spec.rb +0 -18
- data/spec/lib/event/navigation_spec.rb +0 -15
- data/spec/lib/event/shared_spec.rb +0 -18
- data/spec/lib/event/tagged_spec.rb +0 -17
- data/spec/lib/event/used_spec.rb +0 -15
- data/spec/lib/event/viewed_spec.rb +0 -15
- data/test/caliper/events/session_login_event_test.rb +0 -58
- data/test/caliper/events/session_logout_event_test.rb +0 -55
- data/test/caliper/events/session_timeout_event_test.rb +0 -55
- data/test/caliper/request/http_requestor_test.rb +0 -59
- data/test/caliper/test_event.rb +0 -53
- data/test/caliper/test_utils.rb +0 -198
- data/test/fixtures/caliper_session_login_event.json +0 -71
- data/test/fixtures/caliper_session_logout_event.json +0 -52
- data/test/fixtures/caliper_session_timeout_event.json +0 -52
- data/test/fixtures/event_store_payload.json +0 -85
@@ -1,16 +1,26 @@
|
|
1
1
|
require_relative 'annotation'
|
2
2
|
|
3
|
+
#
|
4
|
+
#
|
5
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
6
|
+
# @license For license information contact, info@imsglobal.org
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# Bookmark Annotation Entity
|
10
|
+
#
|
3
11
|
module Caliper
|
4
12
|
module Entities
|
5
13
|
module Annotation
|
6
|
-
class Bookmark < Annotation
|
7
|
-
attr_accessor :type,
|
8
|
-
:bookmark_notes
|
9
14
|
|
10
|
-
|
15
|
+
class BookmarkAnnotation < Annotation
|
16
|
+
attr_accessor :bookmarkNotes
|
17
|
+
|
18
|
+
def initialize
|
11
19
|
super
|
12
20
|
@type = AnnotationType::BOOKMARK_ANNOTATION
|
21
|
+
@bookmarkNotes = nil
|
13
22
|
end
|
23
|
+
|
14
24
|
end
|
15
25
|
end
|
16
26
|
end
|
@@ -1,17 +1,28 @@
|
|
1
1
|
require_relative 'annotation'
|
2
2
|
|
3
|
+
#
|
4
|
+
#
|
5
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
6
|
+
# @license For license information contact, info@imsglobal.org
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# Hilight Annotation Entity
|
10
|
+
#
|
3
11
|
module Caliper
|
4
12
|
module Entities
|
5
13
|
module Annotation
|
14
|
+
|
6
15
|
class HighlightAnnotation < Annotation
|
7
|
-
attr_accessor :
|
8
|
-
|
16
|
+
attr_accessor :selectionText,
|
17
|
+
:selection
|
9
18
|
|
10
19
|
def initialize()
|
11
20
|
super
|
12
21
|
@type = AnnotationType::HIGHLIGHT_ANNOTATION
|
13
|
-
@
|
22
|
+
@selectionText = nil
|
23
|
+
@selection = {}
|
14
24
|
end
|
25
|
+
|
15
26
|
end
|
16
27
|
end
|
17
28
|
end
|
@@ -1,17 +1,26 @@
|
|
1
1
|
require_relative 'annotation'
|
2
2
|
|
3
|
+
#
|
4
|
+
#
|
5
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
6
|
+
# @license For license information contact, info@imsglobal.org
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# Shared Annotation Entity
|
10
|
+
#
|
3
11
|
module Caliper
|
4
12
|
module Entities
|
5
13
|
module Annotation
|
14
|
+
|
6
15
|
class SharedAnnotation < Annotation
|
7
|
-
attr_accessor :
|
8
|
-
:type
|
16
|
+
attr_accessor :withAgents # list of Agent objects
|
9
17
|
|
10
18
|
def initialize()
|
11
19
|
super
|
12
20
|
@type = AnnotationType::SHARED_ANNOTATION
|
13
|
-
@
|
21
|
+
@withAgents = Array.new
|
14
22
|
end
|
23
|
+
|
15
24
|
end
|
16
25
|
end
|
17
26
|
end
|
@@ -1,16 +1,26 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'annotation'
|
2
2
|
|
3
|
+
#
|
4
|
+
#
|
5
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
6
|
+
# @license For license information contact, info@imsglobal.org
|
7
|
+
#
|
8
|
+
#
|
9
|
+
# Tag Annotation Entity
|
10
|
+
#
|
3
11
|
module Caliper
|
4
12
|
module Entities
|
5
13
|
module Annotation
|
14
|
+
|
6
15
|
class TagAnnotation < Annotation
|
7
|
-
attr_accessor :
|
8
|
-
:tags
|
16
|
+
attr_accessor :tags
|
9
17
|
|
10
18
|
def initialize()
|
11
19
|
super
|
12
20
|
@type = AnnotationType::TAG_ANNOTATION
|
21
|
+
@tags = Array.new
|
13
22
|
end
|
23
|
+
|
14
24
|
end
|
15
25
|
end
|
16
26
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../../entities/assignable/assignable_digital_resource'
|
2
|
+
|
3
|
+
#
|
4
|
+
#
|
5
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
6
|
+
# @license For license information contact, info@imsglobal.org
|
7
|
+
#
|
8
|
+
# Represents an Assessment
|
9
|
+
#
|
10
|
+
|
11
|
+
module Caliper
|
12
|
+
module Entities
|
13
|
+
module Assessment
|
14
|
+
|
15
|
+
class Assessment < Caliper::Entities::Assignable::AssignableDigitalResource
|
16
|
+
|
17
|
+
attr_accessor :assessmentItems
|
18
|
+
|
19
|
+
def initialize
|
20
|
+
super
|
21
|
+
@type = Caliper::Entities::Assignable::AssignableDigitalResourceType::ASSESSMENT
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_relative '../../entities/assignable/assignable_digital_resource'
|
2
|
+
|
3
|
+
#
|
4
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
5
|
+
# @license For license information contact, info@imsglobal.org
|
6
|
+
#
|
7
|
+
# Represents an Assessment Item.
|
8
|
+
#
|
9
|
+
|
10
|
+
module Caliper
|
11
|
+
module Entities
|
12
|
+
module Assessment
|
13
|
+
|
14
|
+
class AssessmentItem < Caliper::Entities::Assignable::AssignableDigitalResource
|
15
|
+
|
16
|
+
attr_accessor :isTimeDependent
|
17
|
+
|
18
|
+
def initialize
|
19
|
+
super
|
20
|
+
@type = Caliper::Entities::Assignable::AssignableDigitalResourceType::ASSESSMENT_ITEM
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require_relative '../../entities/digital_resource'
|
2
|
+
require_relative '../../entities/schemadotorg/thing'
|
3
|
+
|
4
|
+
#
|
5
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
6
|
+
# @license For license information contact, info@imsglobal.org
|
7
|
+
#
|
8
|
+
# Represents AssignableDigitalResource.
|
9
|
+
# AssignableDigitalResource's prototype set to DigitalResource
|
10
|
+
#
|
11
|
+
|
12
|
+
module Caliper
|
13
|
+
module Entities
|
14
|
+
module Assignable
|
15
|
+
|
16
|
+
module AssignableDigitalResourceType
|
17
|
+
ASSESSMENT = "http://purl.imsglobal.org/caliper/v1/Assessment"
|
18
|
+
ASSESSMENT_ITEM = "http://purl.imsglobal.org/caliper/v1/AssessmentItem"
|
19
|
+
end
|
20
|
+
|
21
|
+
class AssignableDigitalResource < DigitalResource
|
22
|
+
include Caliper::Entities::SchemaDotOrg::Thing
|
23
|
+
|
24
|
+
attr_accessor :dateToActivate,
|
25
|
+
:dateToShow,
|
26
|
+
:dateToStartOn,
|
27
|
+
:dateToSubmit,
|
28
|
+
:maxAttempts,
|
29
|
+
:maxSubmits,
|
30
|
+
:maxScore
|
31
|
+
|
32
|
+
def initialize
|
33
|
+
super
|
34
|
+
@type = DigitalResourceType::ASSIGNABLE_DIGITAL_RESOURCE
|
35
|
+
@dateToActivate = nil
|
36
|
+
@dateToShow = nil
|
37
|
+
@dateToStartOn = nil
|
38
|
+
@dateToSubmit = nil
|
39
|
+
@maxAttempts = nil
|
40
|
+
@maxSubmits = nil
|
41
|
+
@maxScore = nil
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative '../../entities/entity'
|
2
|
+
|
3
|
+
#
|
4
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
5
|
+
# @license For license information contact, info@imsglobal.org
|
6
|
+
#
|
7
|
+
#
|
8
|
+
# Represents an Attempt on an Assignable
|
9
|
+
#
|
10
|
+
module Caliper
|
11
|
+
module Entities
|
12
|
+
module Assignable
|
13
|
+
|
14
|
+
class Attempt < Entity
|
15
|
+
|
16
|
+
attr_accessor :assignable,
|
17
|
+
:actor,
|
18
|
+
:count,
|
19
|
+
:startedAtTime,
|
20
|
+
:endedAtTime,
|
21
|
+
:duration
|
22
|
+
|
23
|
+
def initialize
|
24
|
+
super
|
25
|
+
@type = EntityType::ATTEMPT
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -1,52 +1,53 @@
|
|
1
1
|
require "json"
|
2
2
|
require_relative 'entity'
|
3
3
|
|
4
|
+
#
|
5
|
+
#
|
6
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
7
|
+
# @license For license information contact, info@imsglobal.org
|
8
|
+
#
|
4
9
|
# Public: Caliper representation of a CreativeWork (https://schema.org/CreativeWork)
|
5
10
|
# We add learning specific attributes, including a list of
|
6
11
|
# LearningObjective learning objectives and a list of
|
7
12
|
# String keywords
|
8
13
|
#
|
9
|
-
# Examples
|
10
|
-
#
|
11
|
-
|
12
14
|
module Caliper
|
13
15
|
module Entities
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
16
|
+
|
17
|
+
module DigitalResourceType
|
18
|
+
ASSIGNABLE_DIGITAL_RESOURCE = "http://purl.imsglobal.org/caliper/v1/AssignableDigitalResource"
|
19
|
+
EPUB_CHAPTER = "http://www.idpf.org/epub/vocab/structure/#chapter"
|
20
|
+
EPUB_PART = "http://www.idpf.org/epub/vocab/structure/#part"
|
21
|
+
EPUB_SUB_CHAPTER = "http://www.idpf.org/epub/vocab/structure/#subchapter"
|
22
|
+
EPUB_VOLUME = "http://www.idpf.org/epub/vocab/structure/#volume"
|
23
|
+
FRAME = "http://purl.imsglobal.org/caliper/v1/Frame"
|
24
|
+
MEDIA_LOCATION = "http://purl.imsglobal.org/caliper/v1/MediaLocation"
|
25
|
+
MEDIA_OBJECT = "http://purl.imsglobal.org/caliper/v1/MediaObject"
|
26
|
+
READING = "http://www.idpf.org/epub/vocab/structure"
|
27
|
+
WEB_PAGE = "http://purl.imsglobal.org/caliper/v1/WebPage"
|
28
|
+
end
|
29
|
+
|
26
30
|
class DigitalResource < Entity
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
include Caliper::Entities::Jsonable
|
32
|
+
|
33
|
+
attr_accessor :objectType,
|
34
|
+
:alignedLearningObjective,
|
35
|
+
:keywords,
|
36
|
+
:isPartOf,
|
37
|
+
:datePublished,
|
38
|
+
:version
|
33
39
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
}.to_json(*a)
|
40
|
+
def initialize
|
41
|
+
super
|
42
|
+
@type = EntityType::DIGITAL_RESOURCE
|
43
|
+
@alignedLearningObjective = Array.new
|
44
|
+
@objectType = Array.new
|
45
|
+
@keywords = Array.new
|
46
|
+
@datePublished = nil
|
47
|
+
@isPartOf = nil
|
48
|
+
@version = nil
|
44
49
|
end
|
45
50
|
|
46
|
-
def initialize()
|
47
|
-
super
|
48
|
-
@type = EntityType::DIGITAL_RESOURCE
|
49
|
-
end
|
50
51
|
end
|
51
52
|
end
|
52
53
|
end
|
@@ -1,44 +1,58 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
require 'time'
|
2
|
+
require 'json'
|
3
|
+
require_relative './jsonable'
|
4
|
+
#
|
5
|
+
#
|
6
|
+
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
7
|
+
# @license For license information contact, info@imsglobal.org
|
8
|
+
#
|
9
|
+
#
|
10
|
+
# The base Caliper Entity. Analogous to a schema.org Thing.
|
11
|
+
#
|
6
12
|
module Caliper
|
7
13
|
module Entities
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
module EntityType
|
15
|
+
AGENT = "http://purl.imsglobal.org/caliper/v1/Agent"
|
16
|
+
ATTEMPT = "http://purl.imsglobal.org/caliper/v1/Attempt"
|
17
|
+
DIGITAL_RESOURCE = "http://purl.imsglobal.org/caliper/v1/DigitalResource"
|
18
|
+
ENTITY = "http://purl.imsglobal.org/caliper/v1/Entity"
|
19
|
+
GENERATED = "http://purl.imsglobal.org/caliper/v1/Generated"
|
20
|
+
LEARNING_OBJECTIVE = "http://purl.imsglobal.org/caliper/v1/LearningObjective"
|
21
|
+
LIS_PERSON = "http://purl.imsglobal.org/caliper/v1/lis/Person"
|
22
|
+
# LIS_ORGANIZATION = "http://purl.imsglobal.org/caliper/v1/lis/Organization"
|
23
|
+
COURSE_OFFERING = "http://purl.imsglobal.org/caliper/v1/lis/CourseOffering"
|
24
|
+
COURSE_SECTION = "http://purl.imsglobal.org/caliper/v1/lis/CourseSection"
|
25
|
+
MEMBERSHIP = "http://purl.imsglobal.org/caliper/v1/lis/Membership"
|
26
|
+
ORGANIZATION = "http://purl.imsglobal.org/caliper/v1/w3c/Organization"
|
27
|
+
RESULT = "http://purl.imsglobal.org/caliper/v1/Result"
|
28
|
+
SESSION = "http://purl.imsglobal.org/caliper/v1/Session"
|
29
|
+
RESPONSE = "http://purl.imsglobal.org/caliper/v1/Response"
|
30
|
+
SOFTWARE_APPLICATION = "http://purl.imsglobal.org/caliper/v1/SoftwareApplication"
|
31
|
+
TARGET = "http://purl.imsglobal.org/caliper/v1/Target"
|
32
|
+
VIEW = "http://purl.imsglobal.org/caliper/v1/View"
|
33
|
+
end
|
23
34
|
|
24
35
|
class Entity
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
36
|
+
include Caliper::Entities::Jsonable
|
37
|
+
|
38
|
+
attr_accessor :id,
|
39
|
+
:type,
|
40
|
+
:name,
|
41
|
+
:description,
|
42
|
+
:extensions,
|
43
|
+
:dateCreated,
|
44
|
+
:dateModified
|
45
|
+
|
46
|
+
def initialize()
|
47
|
+
@id = ""
|
48
|
+
@type = EntityType::ENTITY
|
49
|
+
@name = nil
|
50
|
+
@description = nil
|
51
|
+
@extensions = {}
|
52
|
+
@dateCreated = Time.now.utc.iso8601(3)
|
53
|
+
@dateModified = Time.now.utc.iso8601(3)
|
54
|
+
end
|
32
55
|
|
33
|
-
def initialize()
|
34
|
-
@id = ""
|
35
|
-
@type = EntityType::ENTITY
|
36
|
-
@name = ""
|
37
|
-
@description = ""
|
38
|
-
@properties = ""
|
39
|
-
@date_created = Time.now.utc
|
40
|
-
@date_modified = Time.now.utc
|
41
|
-
end
|
42
56
|
end
|
43
57
|
end
|
44
58
|
end
|