ims_caliper 0.1.3 → 0.9.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 +5 -13
- data/.gitignore +3 -0
- data/LICENSE +156 -58
- data/NOTICE +42 -8
- data/README.md +2 -2
- data/lib/caliper/defaults.rb +21 -1
- data/lib/caliper/entities/agent/organization.rb +37 -0
- data/lib/caliper/entities/agent/person.rb +38 -0
- data/lib/caliper/entities/agent/software_application.rb +39 -0
- data/lib/caliper/entities/annotation/annotation.rb +21 -11
- data/lib/caliper/entities/annotation/bookmark_annotation.rb +19 -9
- data/lib/caliper/entities/annotation/highlight_annotation.rb +19 -8
- data/lib/caliper/entities/annotation/shared_annotation.rb +19 -9
- data/lib/caliper/entities/annotation/tag_annotation.rb +19 -9
- data/lib/caliper/entities/assessment/assessment.rb +19 -9
- data/lib/caliper/entities/assessment/assessment_item.rb +19 -8
- data/lib/caliper/entities/assignable/assignable_digital_resource.rb +19 -11
- data/lib/caliper/entities/assignable/attempt.rb +21 -8
- data/lib/caliper/entities/digital_resource.rb +29 -18
- data/lib/caliper/entities/entity.rb +27 -13
- data/lib/caliper/entities/foaf/agent.rb +22 -3
- data/lib/caliper/entities/generatable.rb +21 -2
- data/lib/caliper/entities/jsonable.rb +17 -5
- data/lib/caliper/entities/learning_context.rb +30 -9
- data/lib/caliper/entities/learning_objective.rb +19 -12
- data/lib/caliper/entities/lis/course_offering.rb +23 -13
- data/lib/caliper/entities/lis/course_section.rb +20 -13
- data/lib/caliper/entities/lis/group.rb +23 -13
- data/lib/caliper/entities/lis/membership.rb +22 -16
- data/lib/caliper/entities/lis/roles.rb +18 -6
- data/lib/caliper/entities/lis/status.rb +18 -6
- data/lib/caliper/entities/media/audio_object.rb +21 -7
- data/lib/caliper/entities/media/image_object.rb +21 -7
- data/lib/caliper/entities/media/media_location.rb +19 -4
- data/lib/caliper/entities/media/media_object.rb +19 -8
- data/lib/caliper/entities/media/video_object.rb +21 -7
- data/lib/caliper/entities/outcome/result.rb +23 -2
- data/lib/caliper/entities/reading/epub_chapter.rb +23 -7
- data/lib/caliper/entities/reading/epub_part.rb +24 -8
- data/lib/caliper/entities/reading/epub_sub_chapter.rb +22 -5
- data/lib/caliper/entities/reading/epub_volume.rb +20 -12
- data/lib/caliper/entities/reading/frame.rb +22 -6
- data/lib/caliper/entities/reading/web_page.rb +37 -0
- data/lib/caliper/entities/response/fillin_blank_response.rb +21 -3
- data/lib/caliper/entities/response/multiple_choice_response.rb +20 -3
- data/lib/caliper/entities/response/multiple_response_response.rb +20 -3
- data/lib/caliper/entities/response/response.rb +24 -3
- data/lib/caliper/entities/response/response_type.rb +20 -0
- data/lib/caliper/entities/response/select_type_response.rb +23 -5
- data/lib/caliper/entities/response/true_false_response.rb +20 -3
- data/lib/caliper/entities/schemadotorg/creative_work.rb +22 -2
- data/lib/caliper/entities/schemadotorg/software_application.rb +22 -2
- data/lib/caliper/entities/schemadotorg/thing.rb +19 -0
- data/lib/caliper/entities/schemadotorg/web_page.rb +22 -2
- data/lib/caliper/entities/session/session.rb +44 -0
- data/lib/caliper/entities/targetable.rb +19 -3
- data/lib/caliper/entities/w3c/membership.rb +32 -0
- data/lib/caliper/entities/w3c/organization.rb +30 -0
- data/lib/caliper/entity_envelope.rb +20 -7
- data/lib/caliper/event/annotation_event.rb +21 -6
- data/lib/caliper/event/assessment_event.rb +22 -2
- data/lib/caliper/event/assessment_item_event.rb +22 -2
- data/lib/caliper/event/assignable_event.rb +22 -2
- data/lib/caliper/event/event.rb +23 -1
- data/lib/caliper/event/jsonable.rb +18 -6
- data/lib/caliper/event/media_event.rb +22 -2
- data/lib/caliper/event/navigation_event.rb +22 -3
- data/lib/caliper/event/outcome_event.rb +22 -3
- data/lib/caliper/event/session_event.rb +21 -7
- data/lib/caliper/event/view_event.rb +22 -8
- data/lib/caliper/event_envelope.rb +20 -8
- data/lib/caliper/jsonable.rb +24 -7
- data/lib/caliper/options.rb +21 -2
- data/lib/caliper/profiles/annotation_profile.rb +21 -3
- data/lib/caliper/profiles/assessment_item_profile.rb +48 -0
- data/lib/caliper/profiles/assessment_profile.rb +22 -23
- data/lib/caliper/profiles/assignable_profile.rb +21 -4
- data/lib/caliper/profiles/media_profile.rb +20 -3
- data/lib/caliper/profiles/profile.rb +20 -24
- data/lib/caliper/profiles/reading_profile.rb +21 -4
- data/lib/caliper/profiles/session_profile.rb +20 -2
- data/lib/caliper/request/event_store_envelope.rb +20 -2
- data/lib/caliper/request/event_store_requestor.rb +21 -2
- data/lib/caliper/request/http_requestor.rb +28 -9
- data/lib/caliper/sensor.rb +21 -11
- data/lib/caliper/stats/atomic_wrapper.rb +21 -4
- data/lib/caliper/stats/statistic.rb +21 -1
- data/lib/caliper/stats/statistics.rb +20 -2
- data/lib/caliper/stats/statistics_map.rb +20 -0
- data/lib/caliper/validators/error_message.rb +20 -0
- data/lib/caliper/validators/event_validator.rb +20 -0
- data/lib/caliper/validators/event_validator_context.rb +21 -1
- data/lib/caliper/validators/property_type_check.rb +23 -4
- data/lib/caliper/validators/session_login_event_validator.rb +39 -21
- data/lib/caliper/validators/session_logout_event_validator.rb +31 -13
- data/lib/caliper/validators/time_check.rb +20 -0
- data/lib/caliper/version.rb +22 -3
- data/lib/caliper.rb +18 -1
- data/spec/lib/entities/{lis → agent}/person_spec.rb +26 -6
- data/spec/lib/entities/{lis → agent}/student.json +0 -0
- data/spec/lib/entities/entity_spec.rb +19 -4
- data/spec/lib/event/annotation_event_bookmark_spec.rb +23 -8
- data/spec/lib/event/annotation_event_highlight_spec.rb +23 -8
- data/spec/lib/event/annotation_event_shared_spec.rb +25 -10
- data/spec/lib/event/annotation_event_tag_spec.rb +23 -8
- data/spec/lib/event/assessment_event_spec.rb +22 -8
- data/spec/lib/event/assessment_item_completed_event_spec.rb +24 -10
- data/spec/lib/event/assessment_item_started_event_spec.rb +24 -10
- data/spec/lib/event/assignable_event_spec.rb +225 -0
- data/spec/lib/event/media_event_spec.rb +22 -7
- data/spec/lib/event/navigated_event_spec.rb +26 -11
- data/spec/lib/event/session_event_login_spec.rb +26 -12
- data/spec/lib/event/session_event_logout_spec.rb +25 -12
- data/spec/lib/event/session_event_timeout_spec.rb +25 -12
- data/spec/lib/event/viewed_event_spec.rb +23 -8
- data/spec/lib/event_helper.rb +25 -9
- data/spec/lib/sensor_spec.rb +43 -13
- data/spec/spec_helper.rb +18 -3
- metadata +19 -22
- data/.idea/caliper-ruby.iml +0 -156
- data/.idea/encodings.xml +0 -5
- data/.idea/misc.xml +0 -5
- data/.idea/modules.xml +0 -9
- data/.idea/scopes/scope_settings.xml +0 -5
- data/.idea/vcs.xml +0 -7
- data/lib/caliper/entities/lis/organization.rb +0 -25
- data/lib/caliper/entities/lis/person.rb +0 -25
- data/lib/caliper/entities/session.rb +0 -34
- data/lib/caliper/entities/software_application.rb +0 -28
- data/lib/caliper/entities/web_page.rb +0 -15
- data/spec/lib/request/http_request_spec.rb +0 -216
@@ -1,17 +1,28 @@
|
|
1
|
-
|
2
|
-
|
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.
|
3
6
|
#
|
4
|
-
#
|
5
|
-
#
|
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.
|
7
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.
|
8
14
|
#
|
9
|
-
#
|
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
|
+
require_relative './annotation'
|
19
|
+
|
20
|
+
#
|
21
|
+
# Shared Annotation entity.
|
10
22
|
#
|
11
23
|
module Caliper
|
12
24
|
module Entities
|
13
25
|
module Annotation
|
14
|
-
|
15
26
|
class SharedAnnotation < Annotation
|
16
27
|
attr_accessor :withAgents # list of Agent objects
|
17
28
|
|
@@ -20,8 +31,7 @@ module Caliper
|
|
20
31
|
@type = AnnotationType::SHARED_ANNOTATION
|
21
32
|
@withAgents = Array.new
|
22
33
|
end
|
23
|
-
|
24
34
|
end
|
25
35
|
end
|
26
36
|
end
|
27
|
-
end
|
37
|
+
end
|
@@ -1,17 +1,28 @@
|
|
1
|
-
|
2
|
-
|
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.
|
3
6
|
#
|
4
|
-
#
|
5
|
-
#
|
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.
|
7
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.
|
8
14
|
#
|
9
|
-
#
|
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
|
+
require_relative './annotation'
|
19
|
+
|
20
|
+
#
|
21
|
+
# Tag Annotation entity.
|
10
22
|
#
|
11
23
|
module Caliper
|
12
24
|
module Entities
|
13
25
|
module Annotation
|
14
|
-
|
15
26
|
class TagAnnotation < Annotation
|
16
27
|
attr_accessor :tags
|
17
28
|
|
@@ -20,8 +31,7 @@ module Caliper
|
|
20
31
|
@type = AnnotationType::TAG_ANNOTATION
|
21
32
|
@tags = Array.new
|
22
33
|
end
|
23
|
-
|
24
34
|
end
|
25
35
|
end
|
26
36
|
end
|
27
|
-
end
|
37
|
+
end
|
@@ -1,17 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#
|
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.
|
4
6
|
#
|
5
|
-
#
|
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.
|
7
10
|
#
|
8
|
-
#
|
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.
|
9
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/.
|
10
17
|
|
18
|
+
require_relative '../assignable/assignable_digital_resource'
|
19
|
+
|
20
|
+
#
|
21
|
+
# Assessment entity.
|
22
|
+
#
|
11
23
|
module Caliper
|
12
24
|
module Entities
|
13
25
|
module Assessment
|
14
|
-
|
15
26
|
class Assessment < Caliper::Entities::Assignable::AssignableDigitalResource
|
16
27
|
|
17
28
|
attr_accessor :assessmentItems
|
@@ -20,8 +31,7 @@ module Caliper
|
|
20
31
|
super
|
21
32
|
@type = Caliper::Entities::Assignable::AssignableDigitalResourceType::ASSESSMENT
|
22
33
|
end
|
23
|
-
|
24
34
|
end
|
25
35
|
end
|
26
36
|
end
|
27
|
-
end
|
37
|
+
end
|
@@ -1,16 +1,28 @@
|
|
1
|
-
|
2
|
-
|
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.
|
3
6
|
#
|
4
|
-
#
|
5
|
-
#
|
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.
|
6
10
|
#
|
7
|
-
#
|
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.
|
8
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
|
+
require_relative '../assignable/assignable_digital_resource'
|
9
19
|
|
20
|
+
#
|
21
|
+
# Assessment Item entity.
|
22
|
+
#
|
10
23
|
module Caliper
|
11
24
|
module Entities
|
12
25
|
module Assessment
|
13
|
-
|
14
26
|
class AssessmentItem < Caliper::Entities::Assignable::AssignableDigitalResource
|
15
27
|
|
16
28
|
attr_accessor :isTimeDependent
|
@@ -19,8 +31,7 @@ module Caliper
|
|
19
31
|
super
|
20
32
|
@type = Caliper::Entities::Assignable::AssignableDigitalResourceType::ASSESSMENT_ITEM
|
21
33
|
end
|
22
|
-
|
23
34
|
end
|
24
35
|
end
|
25
36
|
end
|
26
|
-
end
|
37
|
+
end
|
@@ -1,25 +1,34 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
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.
|
4
6
|
#
|
5
|
-
#
|
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.
|
7
10
|
#
|
8
|
-
#
|
9
|
-
#
|
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.
|
10
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
|
+
require_relative '../digital_resource'
|
11
19
|
|
20
|
+
#
|
21
|
+
# AssignableDigitalResource entity. AssignableDigitalResource's prototype is set to DigitalResource.
|
22
|
+
#
|
12
23
|
module Caliper
|
13
24
|
module Entities
|
14
25
|
module Assignable
|
15
|
-
|
16
26
|
module AssignableDigitalResourceType
|
17
27
|
ASSESSMENT = "http://purl.imsglobal.org/caliper/v1/Assessment"
|
18
28
|
ASSESSMENT_ITEM = "http://purl.imsglobal.org/caliper/v1/AssessmentItem"
|
19
29
|
end
|
20
30
|
|
21
31
|
class AssignableDigitalResource < DigitalResource
|
22
|
-
include Caliper::Entities::SchemaDotOrg::Thing
|
23
32
|
|
24
33
|
attr_accessor :dateToActivate,
|
25
34
|
:dateToShow,
|
@@ -40,8 +49,7 @@ module Caliper
|
|
40
49
|
@maxSubmits = nil
|
41
50
|
@maxScore = nil
|
42
51
|
end
|
43
|
-
|
44
52
|
end
|
45
53
|
end
|
46
54
|
end
|
47
|
-
end
|
55
|
+
end
|
@@ -1,17 +1,31 @@
|
|
1
|
-
|
2
|
-
|
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.
|
3
10
|
#
|
4
|
-
#
|
5
|
-
#
|
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.
|
6
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
|
+
require_relative '../entity'
|
19
|
+
require_relative '../generatable'
|
20
|
+
|
7
21
|
#
|
8
|
-
#
|
22
|
+
# Attempt entity on an Assignable.
|
9
23
|
#
|
10
24
|
module Caliper
|
11
25
|
module Entities
|
12
26
|
module Assignable
|
13
|
-
|
14
27
|
class Attempt < Entity
|
28
|
+
include Caliper::Entities::Generatable
|
15
29
|
|
16
30
|
attr_accessor :assignable,
|
17
31
|
:actor,
|
@@ -26,7 +40,6 @@ module Caliper
|
|
26
40
|
end
|
27
41
|
|
28
42
|
end
|
29
|
-
|
30
43
|
end
|
31
44
|
end
|
32
|
-
end
|
45
|
+
end
|
@@ -1,19 +1,30 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
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.
|
4
10
|
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
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.
|
8
14
|
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
|
12
|
-
|
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
|
+
require_relative './entity'
|
19
|
+
require_relative './schemadotorg/creative_work'
|
20
|
+
require_relative './targetable'
|
21
|
+
|
22
|
+
#
|
23
|
+
# Caliper representation of a CreativeWork. We add learning specific attributes, including a list of
|
24
|
+
# LearningObjective learning objectives and a list of String keywords. See https://schema.org/CreativeWork.
|
13
25
|
#
|
14
26
|
module Caliper
|
15
27
|
module Entities
|
16
|
-
|
17
28
|
module DigitalResourceType
|
18
29
|
ASSIGNABLE_DIGITAL_RESOURCE = "http://purl.imsglobal.org/caliper/v1/AssignableDigitalResource"
|
19
30
|
EPUB_CHAPTER = "http://www.idpf.org/epub/vocab/structure/#chapter"
|
@@ -28,14 +39,15 @@ module Caliper
|
|
28
39
|
end
|
29
40
|
|
30
41
|
class DigitalResource < Entity
|
31
|
-
include Caliper::Entities::
|
42
|
+
include Caliper::Entities::SchemaDotOrg::CreativeWork,
|
43
|
+
Caliper::Entities::Targetable
|
32
44
|
|
33
45
|
attr_accessor :objectType,
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
46
|
+
:alignedLearningObjective,
|
47
|
+
:keywords,
|
48
|
+
:isPartOf,
|
49
|
+
:datePublished,
|
50
|
+
:version
|
39
51
|
|
40
52
|
def initialize
|
41
53
|
super
|
@@ -47,7 +59,6 @@ module Caliper
|
|
47
59
|
@isPartOf = nil
|
48
60
|
@version = nil
|
49
61
|
end
|
50
|
-
|
51
62
|
end
|
52
63
|
end
|
53
64
|
end
|
@@ -1,11 +1,25 @@
|
|
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
|
+
|
1
18
|
require 'time'
|
2
19
|
require 'json'
|
20
|
+
require_relative './schemadotorg/thing'
|
3
21
|
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
|
-
#
|
22
|
+
|
9
23
|
#
|
10
24
|
# The base Caliper Entity. Analogous to a schema.org Thing.
|
11
25
|
#
|
@@ -14,26 +28,27 @@ module Caliper
|
|
14
28
|
module EntityType
|
15
29
|
AGENT = "http://purl.imsglobal.org/caliper/v1/Agent"
|
16
30
|
ATTEMPT = "http://purl.imsglobal.org/caliper/v1/Attempt"
|
31
|
+
COURSE_OFFERING = "http://purl.imsglobal.org/caliper/v1/lis/CourseOffering"
|
32
|
+
COURSE_SECTION = "http://purl.imsglobal.org/caliper/v1/lis/CourseSection"
|
17
33
|
DIGITAL_RESOURCE = "http://purl.imsglobal.org/caliper/v1/DigitalResource"
|
18
34
|
ENTITY = "http://purl.imsglobal.org/caliper/v1/Entity"
|
19
35
|
GENERATED = "http://purl.imsglobal.org/caliper/v1/Generated"
|
36
|
+
GROUP = "http://purl.imsglobal.org/caliper/v1/lis/Group"
|
20
37
|
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
38
|
MEMBERSHIP = "http://purl.imsglobal.org/caliper/v1/lis/Membership"
|
26
39
|
ORGANIZATION = "http://purl.imsglobal.org/caliper/v1/w3c/Organization"
|
40
|
+
PERSON = "http://purl.imsglobal.org/caliper/v1/lis/Person"
|
41
|
+
RESPONSE = "http://purl.imsglobal.org/caliper/v1/Response"
|
27
42
|
RESULT = "http://purl.imsglobal.org/caliper/v1/Result"
|
28
43
|
SESSION = "http://purl.imsglobal.org/caliper/v1/Session"
|
29
|
-
RESPONSE = "http://purl.imsglobal.org/caliper/v1/Response"
|
30
44
|
SOFTWARE_APPLICATION = "http://purl.imsglobal.org/caliper/v1/SoftwareApplication"
|
31
45
|
TARGET = "http://purl.imsglobal.org/caliper/v1/Target"
|
32
46
|
VIEW = "http://purl.imsglobal.org/caliper/v1/View"
|
33
47
|
end
|
34
48
|
|
35
49
|
class Entity
|
36
|
-
include Caliper::Entities::
|
50
|
+
include Caliper::Entities::SchemaDotOrg::Thing,
|
51
|
+
Caliper::Entities::Jsonable
|
37
52
|
|
38
53
|
attr_accessor :id,
|
39
54
|
:type,
|
@@ -52,7 +67,6 @@ module Caliper
|
|
52
67
|
@dateCreated = Time.now.utc.iso8601(3)
|
53
68
|
@dateModified = Time.now.utc.iso8601(3)
|
54
69
|
end
|
55
|
-
|
56
70
|
end
|
57
71
|
end
|
58
|
-
end
|
72
|
+
end
|
@@ -1,6 +1,25 @@
|
|
1
|
-
|
2
|
-
#
|
3
|
-
#
|
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
|
+
require_relative '../entity'
|
19
|
+
|
20
|
+
#
|
21
|
+
# An agent (eg. person, group, software or physical artifact). See http://xmlns.com/foaf/spec/#term_Agent.
|
22
|
+
#
|
4
23
|
module Caliper
|
5
24
|
module Entities
|
6
25
|
module FOAF
|
@@ -1,9 +1,28 @@
|
|
1
|
-
|
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
|
+
# The Generatable interface marks an object type that is created or generated as a result of an action.
|
2
20
|
# The interface allows Caliper to catch errors at compile time for instances of the marked class rather
|
3
21
|
# than at runtime if a marker annotation was defined instead.
|
22
|
+
#
|
4
23
|
module Caliper
|
5
24
|
module Entities
|
6
25
|
module Generatable
|
7
26
|
end
|
8
27
|
end
|
9
|
-
end
|
28
|
+
end
|
@@ -1,9 +1,22 @@
|
|
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
|
+
|
1
18
|
require 'json'
|
2
19
|
|
3
|
-
#
|
4
|
-
#
|
5
|
-
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
6
|
-
# @license For license information contact, info@imsglobal.org
|
7
20
|
#
|
8
21
|
# Module that supports ser-des for Caliper Entities/JSON
|
9
22
|
#
|
@@ -50,7 +63,6 @@ module Caliper
|
|
50
63
|
def eql?(other)
|
51
64
|
@id == other.id && @type == other.type && @name == other.name && @description == other.description && @dateCreated == other.dateCreated && @dateModified == other.dateModified
|
52
65
|
end
|
53
|
-
|
54
66
|
end
|
55
67
|
end
|
56
68
|
end
|
@@ -1,21 +1,42 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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/.
|
6
17
|
|
18
|
+
require_relative './entity'
|
19
|
+
require_relative './agent/software_application'
|
20
|
+
require_relative './w3c/organization'
|
21
|
+
require_relative './foaf/agent'
|
22
|
+
|
23
|
+
#
|
24
|
+
# Learning Context.
|
25
|
+
#
|
7
26
|
module Caliper
|
8
27
|
module Entities
|
9
28
|
class LearningContext < Entity
|
29
|
+
|
10
30
|
attr_accessor :ed_app, # SoftwareApplication educational app
|
11
|
-
:
|
31
|
+
:group, # W3C Organization
|
12
32
|
:agent # Agent the agent, since the Agent module is empty for now, use Entity type
|
33
|
+
|
13
34
|
def initialize
|
14
35
|
super
|
15
|
-
@ed_app = SoftwareApplication.new
|
16
|
-
@
|
36
|
+
@ed_app = Caliper::Entities::Agent::SoftwareApplication.new
|
37
|
+
@group = Caliper::Entities::W3c::Organization.new
|
17
38
|
@agent = Caliper::Entities::Entity.new
|
18
39
|
end
|
19
40
|
end
|
20
41
|
end
|
21
|
-
end
|
42
|
+
end
|
@@ -1,26 +1,33 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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.
|
6
10
|
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
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.
|
10
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
|
+
require_relative './entity'
|
19
|
+
|
11
20
|
#
|
12
|
-
# Learning Objective
|
21
|
+
# Learning Objective
|
13
22
|
#
|
14
23
|
module Caliper
|
15
24
|
module Entities
|
16
|
-
|
17
25
|
class LearningObjective < Entity
|
18
26
|
|
19
27
|
def initialize
|
20
28
|
super
|
21
29
|
@type = EntityType::LEARNING_OBJECTIVE
|
22
30
|
end
|
23
|
-
|
24
31
|
end
|
25
32
|
end
|
26
|
-
end
|
33
|
+
end
|