Module: PupilfirstXapi::Statements
- Defined in:
- lib/pupilfirst_xapi/statements.rb,
lib/pupilfirst_xapi/statements/video_ended.rb,
lib/pupilfirst_xapi/statements/survey_ended.rb,
lib/pupilfirst_xapi/statements/video_started.rb,
lib/pupilfirst_xapi/statements/survey_started.rb,
lib/pupilfirst_xapi/statements/course_completed.rb,
lib/pupilfirst_xapi/statements/target_completed.rb,
lib/pupilfirst_xapi/statements/course_registered.rb,
lib/pupilfirst_xapi/statements/question_answered.rb,
lib/pupilfirst_xapi/statements/capability_result_viewed.rb
Defined Under Namespace
Classes: CapabilityResultViewed, CourseCompleted, CourseRegistered, QuestionAnswered, SurveyEnded, SurveyStarted, TargetCompleted, VideoEnded, VideoStarted
Constant Summary
collapse
- EVENTS =
{
:course_completed => CourseCompleted,
:student_added => CourseRegistered,
:submission_graded => TargetCompleted,
:submission_automatically_verified => TargetCompleted,
:video_started => VideoStarted,
:video_ended => VideoEnded,
:survey_started => SurveyStarted,
:survey_ended => SurveyEnded,
:capability_result_viewed => CapabilityResultViewed,
:question_answered => QuestionAnswered
}
Class Method Summary
collapse
Class Method Details
.builder_for(event) ⇒ Object
17
18
19
|
# File 'lib/pupilfirst_xapi/statements.rb', line 17
def self.builder_for(event)
EVENTS.fetch(event)
end
|
.subscribe(&block) ⇒ Object
13
14
15
|
# File 'lib/pupilfirst_xapi/statements.rb', line 13
def self.subscribe(&block)
EVENTS.each_key{|key| block.call(key)}
end
|