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
data/.idea/caliper-ruby.iml
DELETED
@@ -1,156 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="CompassSettings">
|
4
|
-
<option name="compassSupportEnabled" value="true" />
|
5
|
-
</component>
|
6
|
-
<component name="FacetManager">
|
7
|
-
<facet type="gem" name="Ruby Gem">
|
8
|
-
<configuration>
|
9
|
-
<option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
|
10
|
-
<option name="GEM_APP_TEST_PATH" value="" />
|
11
|
-
<option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
|
12
|
-
</configuration>
|
13
|
-
</facet>
|
14
|
-
</component>
|
15
|
-
<component name="ModuleRunConfigurationManager">
|
16
|
-
<configuration default="false" name="Run spec 'navigated_event_spec': caliper-ruby" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
17
|
-
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
18
|
-
<module name="caliper-ruby" />
|
19
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
20
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
21
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
22
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
23
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
24
|
-
<envs>
|
25
|
-
<env name="JRUBY_OPTS" value="-X+O" />
|
26
|
-
</envs>
|
27
|
-
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
28
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
29
|
-
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
30
|
-
<COVERAGE_PATTERN ENABLED="true">
|
31
|
-
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
32
|
-
</COVERAGE_PATTERN>
|
33
|
-
</EXTENSION>
|
34
|
-
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
35
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
36
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/lib/event/navigated_event_spec.rb" />
|
37
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
38
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
39
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
40
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
41
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
42
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
43
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
44
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
45
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
46
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
47
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
48
|
-
<RunnerSettings RunnerId="RubyRunner" />
|
49
|
-
<ConfigurationWrapper RunnerId="RubyRunner" />
|
50
|
-
<method />
|
51
|
-
</configuration>
|
52
|
-
<configuration default="false" name="Run spec 'assessment_item_completed_event_spec': caliper-ruby" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
53
|
-
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
54
|
-
<module name="caliper-ruby" />
|
55
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
56
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
57
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
58
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
59
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
60
|
-
<envs>
|
61
|
-
<env name="JRUBY_OPTS" value="-X+O" />
|
62
|
-
</envs>
|
63
|
-
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
64
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
65
|
-
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
66
|
-
<COVERAGE_PATTERN ENABLED="true">
|
67
|
-
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
68
|
-
</COVERAGE_PATTERN>
|
69
|
-
</EXTENSION>
|
70
|
-
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
71
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
72
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/lib/event/assessment_item_completed_event_spec.rb" />
|
73
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
74
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
75
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
76
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
77
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
78
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
79
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
80
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
81
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
82
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
83
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
84
|
-
<RunnerSettings RunnerId="RubyRunner" />
|
85
|
-
<ConfigurationWrapper RunnerId="RubyRunner" />
|
86
|
-
<method />
|
87
|
-
</configuration>
|
88
|
-
<configuration default="false" name="sensor" type="RubyRunConfigurationType" factoryName="Ruby" temporary="true">
|
89
|
-
<module name="caliper-ruby" />
|
90
|
-
<RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
91
|
-
<RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="$MODULE_DIR$/lib/caliper" />
|
92
|
-
<RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
|
93
|
-
<RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
|
94
|
-
<RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
|
95
|
-
<envs />
|
96
|
-
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
97
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
98
|
-
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
99
|
-
<COVERAGE_PATTERN ENABLED="true">
|
100
|
-
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
101
|
-
</COVERAGE_PATTERN>
|
102
|
-
</EXTENSION>
|
103
|
-
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
104
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="$MODULE_DIR$/lib/caliper/sensor.rb" />
|
105
|
-
<RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
|
106
|
-
<RunnerSettings RunnerId="RubyRunner" />
|
107
|
-
<ConfigurationWrapper RunnerId="RubyRunner" />
|
108
|
-
<method />
|
109
|
-
</configuration>
|
110
|
-
<configuration default="false" name="Run spec 'sensor_spec': caliper-ruby" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
|
111
|
-
<predefined_log_file id="RUBY_RSPEC" enabled="true" />
|
112
|
-
<module name="caliper-ruby" />
|
113
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
|
114
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
|
115
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
|
116
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
|
117
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
|
118
|
-
<envs>
|
119
|
-
<env name="JRUBY_OPTS" value="-X+O" />
|
120
|
-
</envs>
|
121
|
-
<EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
|
122
|
-
<EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
|
123
|
-
<EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
|
124
|
-
<COVERAGE_PATTERN ENABLED="true">
|
125
|
-
<PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
|
126
|
-
</COVERAGE_PATTERN>
|
127
|
-
</EXTENSION>
|
128
|
-
<EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
|
129
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
|
130
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/lib/sensor_spec.rb" />
|
131
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
|
132
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
|
133
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
|
134
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
|
135
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
|
136
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
|
137
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
|
138
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
|
139
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
|
140
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
|
141
|
-
<RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
|
142
|
-
<RunnerSettings RunnerId="RubyRunner" />
|
143
|
-
<ConfigurationWrapper RunnerId="RubyRunner" />
|
144
|
-
<method />
|
145
|
-
</configuration>
|
146
|
-
</component>
|
147
|
-
<component name="NewModuleRootManager">
|
148
|
-
<content url="file://$MODULE_DIR$" />
|
149
|
-
<orderEntry type="inheritedJdk" />
|
150
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
151
|
-
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.7.3, rbenv: 1.9.3-p547) [gem]" level="application" />
|
152
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 1.9.3-p547) [gem]" level="application" />
|
153
|
-
<orderEntry type="library" scope="PROVIDED" name="multi_json (v1.10.1, rbenv: 1.9.3-p547) [gem]" level="application" />
|
154
|
-
</component>
|
155
|
-
</module>
|
156
|
-
|
data/.idea/encodings.xml
DELETED
data/.idea/misc.xml
DELETED
data/.idea/modules.xml
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project version="4">
|
3
|
-
<component name="ProjectModuleManager">
|
4
|
-
<modules>
|
5
|
-
<module fileurl="file://$PROJECT_DIR$/.idea/caliper-ruby.iml" filepath="$PROJECT_DIR$/.idea/caliper-ruby.iml" />
|
6
|
-
</modules>
|
7
|
-
</component>
|
8
|
-
</project>
|
9
|
-
|
data/.idea/vcs.xml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require_relative '../../entities/foaf/agent'
|
2
|
-
require_relative '../../entities/entity'
|
3
|
-
|
4
|
-
module Caliper
|
5
|
-
module Entities
|
6
|
-
module LIS
|
7
|
-
module OrganizationType
|
8
|
-
COURSE_OFFERING = "http://purl.imsglobal.org/caliper/v1/lis/CourseOffering"
|
9
|
-
LIS_COURSE_SECTION = "http://purl.imsglobal.org/caliper/v1/lis/CourseSection"
|
10
|
-
GROUP = "http://purl.imsglobal.org/caliper/v1/lis/Group"
|
11
|
-
end
|
12
|
-
class Organization < Entity
|
13
|
-
include Caliper::Entities::FOAF::Agent
|
14
|
-
|
15
|
-
attr_accessor :membership,
|
16
|
-
:subOrganizationOf
|
17
|
-
|
18
|
-
def initialize
|
19
|
-
super
|
20
|
-
@type = EntityType::ORGANIZATION
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require_relative '../../entities/entity'
|
2
|
-
require_relative '../../entities/foaf/agent.rb'
|
3
|
-
require_relative '../../entities/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
|
-
module Caliper
|
10
|
-
module Entities
|
11
|
-
module LIS
|
12
|
-
# Represents Person.
|
13
|
-
# @extends Agent
|
14
|
-
class Person < Entity
|
15
|
-
include Caliper::Entities::FOAF::Agent, Caliper::Entities::Jsonable
|
16
|
-
|
17
|
-
def initialize
|
18
|
-
super
|
19
|
-
@type = EntityType::LIS_PERSON
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
require_relative 'entity'
|
2
|
-
require_relative 'generatable'
|
3
|
-
require_relative 'targetable'
|
4
|
-
require_relative './jsonable'
|
5
|
-
|
6
|
-
#
|
7
|
-
#
|
8
|
-
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
9
|
-
# @license For license information contact, info@imsglobal.org
|
10
|
-
#
|
11
|
-
#
|
12
|
-
# Session Entity
|
13
|
-
#
|
14
|
-
module Caliper
|
15
|
-
module Entities
|
16
|
-
|
17
|
-
class Session < Entity
|
18
|
-
include Generatable
|
19
|
-
include Targetable
|
20
|
-
include Caliper::Entities::Jsonable
|
21
|
-
|
22
|
-
attr_accessor :actor,
|
23
|
-
:startedAtTime,
|
24
|
-
:endedAtTime,
|
25
|
-
:duration
|
26
|
-
|
27
|
-
def initialize
|
28
|
-
super
|
29
|
-
@type = EntityType::SESSION
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
require "json"
|
2
|
-
require_relative '../entities/entity'
|
3
|
-
require_relative '../entities/foaf/agent'
|
4
|
-
require_relative '../entities/schemadotorg/software_application'
|
5
|
-
require_relative '../entities/lis/organization'
|
6
|
-
|
7
|
-
#
|
8
|
-
#
|
9
|
-
# @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
|
10
|
-
# @license For license information contact, info@imsglobal.org
|
11
|
-
#
|
12
|
-
#
|
13
|
-
# Software Application (from schema.org)
|
14
|
-
#
|
15
|
-
module Caliper
|
16
|
-
module Entities
|
17
|
-
class SoftwareApplication < Caliper::Entities::LIS::Organization
|
18
|
-
include Caliper::Entities::FOAF::Agent
|
19
|
-
include Caliper::Entities::SchemaDotOrg::SoftwareApplication
|
20
|
-
|
21
|
-
def initialize()
|
22
|
-
super
|
23
|
-
@type=EntityType::SOFTWARE_APPLICATION
|
24
|
-
end
|
25
|
-
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative "../entities/digital_resource"
|
2
|
-
require_relative "../entities/schemadotorg/web_page"
|
3
|
-
module Caliper
|
4
|
-
module Entities
|
5
|
-
|
6
|
-
class WebPage < DigitalResource
|
7
|
-
include Caliper::Entities::SchemaDotOrg::WebPage
|
8
|
-
|
9
|
-
def initialize()
|
10
|
-
super
|
11
|
-
@type = Caliper::Entities::DigitalResourceType::WEB_PAGE
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
@@ -1,216 +0,0 @@
|
|
1
|
-
require 'require_all'
|
2
|
-
require_all 'lib/caliper/entities/entity.rb'
|
3
|
-
require_all 'lib/caliper/entities/software_application.rb'
|
4
|
-
require_all 'lib/caliper/entities/lis/person.rb'
|
5
|
-
require_all 'lib/caliper/entities/lis/membership.rb'
|
6
|
-
require_all 'lib/caliper/entities/lis/roles.rb'
|
7
|
-
require_all 'lib/caliper/entities/lis/status.rb'
|
8
|
-
require_all 'lib/caliper/entities/lis/course_section.rb'
|
9
|
-
require_all 'lib/caliper/entities/lis/course_offering.rb'
|
10
|
-
require_all 'lib/caliper/entities/lis/group.rb'
|
11
|
-
require_all 'lib/caliper/entities/reading/epub_volume.rb'
|
12
|
-
require_all 'lib/caliper/entities/assessment/assessment.rb'
|
13
|
-
require_all 'lib/caliper/entities/assessment/assessment_item.rb'
|
14
|
-
require_all 'lib/caliper/entities/assignable/attempt.rb'
|
15
|
-
require_all 'lib/caliper/entities/assignable/assignable_digital_resource.rb'
|
16
|
-
require_all 'lib/caliper/entities/response/Response.rb'
|
17
|
-
require_all 'lib/caliper/entities/response/fillin_blank_response.rb'
|
18
|
-
require_all 'lib/caliper/event/assessment_item_event.rb'
|
19
|
-
require_all 'lib/caliper/profiles/assessment_profile.rb'
|
20
|
-
require_all 'lib/caliper/options.rb'
|
21
|
-
require_all 'lib/caliper/sensor.rb'
|
22
|
-
require_all 'lib/caliper/request/http_requestor.rb'
|
23
|
-
require 'json_spec'
|
24
|
-
|
25
|
-
module Caliper
|
26
|
-
module Event
|
27
|
-
|
28
|
-
describe AssessmentItemEvent do
|
29
|
-
|
30
|
-
it 'should ensure that a AssessmentItemEvent (Completed) is correctly created and serialized' do
|
31
|
-
|
32
|
-
# The Actor = Person/Student))
|
33
|
-
student = Caliper::Entities::LIS::Person.new
|
34
|
-
student.id = 'https://some-university.edu/user/554433'
|
35
|
-
membership1 = Caliper::Entities::LIS::Membership.new
|
36
|
-
membership1.id = "https://some-university.edu/membership/001"
|
37
|
-
membership1.member = "https://some-university.edu/user/554433"
|
38
|
-
membership1.organization = "https://some-university.edu/politicalScience/2015/american-revolution-101"
|
39
|
-
membership1.roles = [Caliper::Entities::LIS::Roles::LEARNER]
|
40
|
-
membership1.status = Caliper::Entities::LIS::Status::ACTIVE
|
41
|
-
membership1.dateCreated = "2015-08-01T06:00:00.000Z"
|
42
|
-
membership1.dateModified = nil;
|
43
|
-
membership2 = Caliper::Entities::LIS::Membership.new
|
44
|
-
membership2.id = "https://some-university.edu/membership/002"
|
45
|
-
membership2.member = "https://some-university.edu/user/554433"
|
46
|
-
membership2.organization = "https://some-university.edu/politicalScience/2015/american-revolution-101/section/001"
|
47
|
-
membership2.roles = [Caliper::Entities::LIS::Roles::LEARNER]
|
48
|
-
membership2.status = Caliper::Entities::LIS::Status::ACTIVE
|
49
|
-
membership2.dateCreated = "2015-08-01T06:00:00.000Z"
|
50
|
-
membership2.dateModified = nil
|
51
|
-
membership3 = Caliper::Entities::LIS::Membership.new
|
52
|
-
membership3.id = "https://some-university.edu/membership/003"
|
53
|
-
membership3.member = "https://some-university.edu/user/554433"
|
54
|
-
membership3.organization = "https://some-university.edu/politicalScience/2015/american-revolution-101/section/001/group/001"
|
55
|
-
membership3.roles = [Caliper::Entities::LIS::Roles::LEARNER]
|
56
|
-
membership3.status = Caliper::Entities::LIS::Status::ACTIVE
|
57
|
-
membership3.dateCreated = "2015-08-01T06:00:00.000Z"
|
58
|
-
membership3.dateModified = nil
|
59
|
-
student.hasMembership = [membership1, membership2, membership3]
|
60
|
-
student.dateCreated = '2015-08-01T06:00:00.000Z'
|
61
|
-
student.dateModified = '2015-09-02T11:30:00.000Z'
|
62
|
-
# puts "new student = #{student.to_json}"
|
63
|
-
|
64
|
-
# The Action
|
65
|
-
action = Caliper::Profiles::AssessmentItemActions::COMPLETED
|
66
|
-
|
67
|
-
# # The Object being interacted with by the Actor = Assessment)
|
68
|
-
# assessment = Caliper::Entities::Assessment::Assessment.new
|
69
|
-
# assessment.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1"
|
70
|
-
# assessment.name = "American Revolution - Key Figures Assessment"
|
71
|
-
# assessment.dateModified = '2015-09-02T11:30:00.000Z'
|
72
|
-
# assessment.dateCreated = '2015-08-01T06:00:00.000Z'
|
73
|
-
# assessment.datePublished = '2015-08-15T09:30:00.000Z'
|
74
|
-
# assessment.version = "1.0"
|
75
|
-
# assessment.dateToActivate = '2015-08-16T05:00:00.000Z'
|
76
|
-
# assessment.dateToShow = '2015-08-16T05:00:00.000Z'
|
77
|
-
# assessment.dateToStartOn = "2015-08-16T05:00:00.000Z"
|
78
|
-
# assessment.dateToSubmit = "2015-09-28T11:59:59.000Z"
|
79
|
-
# assessment.maxAttempts = 2
|
80
|
-
# assessment.maxSubmits = 2
|
81
|
-
# assessment.maxScore = 3.0
|
82
|
-
|
83
|
-
# # The Assessment has three items
|
84
|
-
assessmentItem1 = Caliper::Entities::Assessment::AssessmentItem.new
|
85
|
-
assessmentItem1.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1/item1"
|
86
|
-
assessmentItem1.name = "Assessment Item 1"
|
87
|
-
assessmentItem1.isPartOf = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1"#assessment.id
|
88
|
-
assessmentItem1.maxAttempts = 2
|
89
|
-
assessmentItem1.maxSubmits = 2
|
90
|
-
assessmentItem1.maxScore = 1.0
|
91
|
-
assessmentItem1.dateCreated = nil
|
92
|
-
assessmentItem1.dateModified = nil
|
93
|
-
assessmentItem1.version = "1.0"
|
94
|
-
assessmentItem1.isTimeDependent = false
|
95
|
-
|
96
|
-
# assessmentItem2 = Caliper::Entities::Assessment::AssessmentItem.new
|
97
|
-
# assessmentItem2.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1/item2"
|
98
|
-
# assessmentItem2.name = "Assessment Item 2"
|
99
|
-
# assessmentItem2.isPartOf = assessment.id
|
100
|
-
# assessmentItem2.maxAttempts = 2
|
101
|
-
# assessmentItem2.maxSubmits = 2
|
102
|
-
# assessmentItem2.maxScore = 1.0
|
103
|
-
# assessmentItem2.dateCreated = nil
|
104
|
-
# assessmentItem2.dateModified = nil
|
105
|
-
# assessmentItem2.version = "1.0"
|
106
|
-
# assessmentItem2.isTimeDependent = false
|
107
|
-
|
108
|
-
# assessmentItem3 = Caliper::Entities::Assessment::AssessmentItem.new
|
109
|
-
# assessmentItem3.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1/item3"
|
110
|
-
# assessmentItem3.name = "Assessment Item 3"
|
111
|
-
# assessmentItem3.isPartOf = assessment.id
|
112
|
-
# assessmentItem3.maxAttempts = 2
|
113
|
-
# assessmentItem3.maxSubmits = 2
|
114
|
-
# assessmentItem3.maxScore = 1.0
|
115
|
-
# assessmentItem3.dateCreated = nil
|
116
|
-
# assessmentItem3.dateModified = nil
|
117
|
-
# assessmentItem3.version = "1.0"
|
118
|
-
# assessmentItem3.isTimeDependent = false
|
119
|
-
|
120
|
-
# assessment.assessmentItems = [assessmentItem1, assessmentItem2, assessmentItem3]
|
121
|
-
|
122
|
-
# # The target object within the Event Object
|
123
|
-
# target = nil;
|
124
|
-
# # The attempt object = Attempt) within the Event Object
|
125
|
-
attempt = Caliper::Entities::Assignable::Attempt.new
|
126
|
-
attempt.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1/item1/attempt1"
|
127
|
-
attempt.actor = "https://some-university.edu/user/554433"
|
128
|
-
attempt.assignable = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1"
|
129
|
-
attempt.dateCreated = "2015-08-01T06:00:00.000Z"
|
130
|
-
attempt.dateModified = nil
|
131
|
-
attempt.count = 1
|
132
|
-
attempt.startedAtTime = "2015-09-15T10:15:00.000Z"
|
133
|
-
attempt.duration = nil
|
134
|
-
attempt.endedAtTime = nil
|
135
|
-
attempt.extensions = {}
|
136
|
-
attempt.name = nil
|
137
|
-
|
138
|
-
response = Caliper::Entities::Response::FillinBlankResponse.new
|
139
|
-
response.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1/item1/response1"
|
140
|
-
response.name = nil
|
141
|
-
response.description = nil
|
142
|
-
response.extensions = {}
|
143
|
-
response.dateCreated = "2015-08-01T06:00:00.000Z"
|
144
|
-
response.dateModified = nil
|
145
|
-
response.assignable = "https://some-university.edu/politicalScience/2015/american-revolution-101/assessment1"
|
146
|
-
response.actor = "https://some-university.edu/user/554433"
|
147
|
-
response.attempt = attempt
|
148
|
-
response.duration = nil
|
149
|
-
response.startedAtTime = "2015-09-15T10:15:00.000Z"
|
150
|
-
response.endedAtTime = nil
|
151
|
-
response.values = ["2 July 1776"]
|
152
|
-
|
153
|
-
# The Object (edApp)
|
154
|
-
edApp = Caliper::Entities::SoftwareApplication.new
|
155
|
-
edApp.id = 'https://com.sat/super-assessment-tool'
|
156
|
-
edApp.name = 'Super Assessment Tool'
|
157
|
-
edApp.hasMembership = []
|
158
|
-
edApp.dateCreated = '2015-08-01T06:00:00.000Z'
|
159
|
-
edApp.dateModified = nil
|
160
|
-
|
161
|
-
#LIS Course Offering
|
162
|
-
courseOffering = Caliper::Entities::LIS::CourseOffering.new
|
163
|
-
courseOffering.id = "https://some-university.edu/politicalScience/2015/american-revolution-101"
|
164
|
-
courseOffering.name = "Political Science 101: The American Revolution"
|
165
|
-
courseOffering.courseNumber = "POL101"
|
166
|
-
courseOffering.academicSession = "Fall-2015"
|
167
|
-
courseOffering.membership = []
|
168
|
-
courseOffering.subOrganizationOf = nil
|
169
|
-
courseOffering.dateCreated = '2015-08-01T06:00:00.000Z'
|
170
|
-
courseOffering.dateModified = '2015-09-02T11:30:00.000Z'
|
171
|
-
|
172
|
-
# The LIS Course Section for the Caliper Event
|
173
|
-
course = Caliper::Entities::LIS::CourseSection.new
|
174
|
-
course.id = 'https://some-university.edu/politicalScience/2015/american-revolution-101/section/001'
|
175
|
-
course.name = 'American Revolution 101'
|
176
|
-
course.courseNumber = "POL101"
|
177
|
-
course.academicSession = "Fall-2015"
|
178
|
-
course.category = nil
|
179
|
-
course.membership = [membership2]
|
180
|
-
course.subOrganizationOf = courseOffering
|
181
|
-
course.dateCreated = '2015-08-01T06:00:00.000Z'
|
182
|
-
course.dateModified = '2015-09-02T11:30:00.000Z'
|
183
|
-
|
184
|
-
# LIS Group
|
185
|
-
group = Caliper::Entities::LIS::Group.new
|
186
|
-
group.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/section/001/group/001"
|
187
|
-
group.name = "Discussion Group 001"
|
188
|
-
group.membership = [membership3]
|
189
|
-
group.subOrganizationOf = course
|
190
|
-
group.dateCreated = '2015-08-01T06:00:00.000Z'
|
191
|
-
group.dateModified = nil
|
192
|
-
|
193
|
-
# The Assessment Event
|
194
|
-
assessment_event = AssessmentItemEvent.new
|
195
|
-
assessment_event.actor = student
|
196
|
-
assessment_event.action = action
|
197
|
-
assessment_event.object = assessmentItem1
|
198
|
-
assessment_event.target = nil
|
199
|
-
assessment_event.generated = response
|
200
|
-
assessment_event.edApp = edApp
|
201
|
-
assessment_event.group = group
|
202
|
-
assessment_event.startedAtTime = '2015-09-15T10:15:00.000Z'
|
203
|
-
assessment_event.endedAtTime = nil
|
204
|
-
assessment_event.duration = nil
|
205
|
-
# puts "Event JSON = #{assessment_event.to_json}'"
|
206
|
-
|
207
|
-
options = Options.new
|
208
|
-
options. = '_-kJMcjiSymICwhUaHULbg' #@options['apiKey']
|
209
|
-
options.sensorId = 'D9DC57B5-3AAA-41D4-B73D-58AE828D9D85'# @options['sensorId']
|
210
|
-
sensor = Sensor.new options
|
211
|
-
sensor.send event
|
212
|
-
end
|
213
|
-
|
214
|
-
end
|
215
|
-
end
|
216
|
-
end
|