Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Class: mod_scorm_event_testcase  - X-Ref

Test class for various events related to Scorm.

setUp()   X-Ref
No description

test_attempt_deleted_event()   X-Ref
Tests for attempt deleted event


test_course_module_viewed_event()   X-Ref
Tests for course module viewed event.

There is no api involved so the best we can do is test legacy data by triggering event manually.

test_course_module_instance_list_viewed_event()   X-Ref
Tests for instance list viewed event.

There is no api involved so the best we can do is test legacy data by triggering event manually.

test_interactions_viewed_event()   X-Ref
Tests for interactions viewed.

There is no api involved so the best we can do is test legacy data by triggering event manually and test validations.

test_interactions_viewed_event_validations()   X-Ref
Tests for interactions viewed validations.


test_report_viewed_event()   X-Ref
No description

test_sco_launched_event()   X-Ref
No description

test_tracks_viewed_event()   X-Ref
Tests for tracks viewed event.

There is no api involved so the best we can do is test validations by triggering event manually.

test_tracks_viewed_event_validations()   X-Ref
Tests for tracks viewed event validations.


test_user_report_viewed_event()   X-Ref
Tests for userreport viewed event.

There is no api involved so the best we can do is test validations and legacy log by triggering event manually.

test_user_report_viewed_event_validations()   X-Ref
Tests for userreport viewed event validations.


get_scoreraw_submitted_event_provider()   X-Ref
dataProvider for test_scoreraw_submitted_event().


test_scoreraw_submitted_event($cmielement, $cmivalue)   X-Ref
Tests for score submitted event.

There is no api involved so the best we can do is test data by triggering event manually.

param: string $cmielement a valid CMI raw score element
param: string $cmivalue a valid CMI raw score value

get_scoreraw_submitted_event_validations()   X-Ref
dataProvider for test_scoreraw_submitted_event_validations().


test_scoreraw_submitted_event_validations($cmielement, $cmivalue, $failmessage, $excmessage)   X-Ref
Tests for score submitted event validations.

param: string $cmielement a valid CMI raw score element
param: string $cmivalue a valid CMI raw score value
param: string $failmessage the message used to fail the test in case of missing to violate a validation rule
param: string $excmessage the exception message when violating the validations rules

get_status_submitted_event_provider()   X-Ref
dataProvider for test_status_submitted_event().


test_status_submitted_event($cmielement, $cmivalue)   X-Ref
Tests for status submitted event.

There is no api involved so the best we can do is test data by triggering event manually.

param: string $cmielement a valid CMI status element
param: string $cmivalue a valid CMI status value

get_status_submitted_event_validations()   X-Ref
dataProvider for test_status_submitted_event_validations().


test_status_submitted_event_validations($cmielement, $cmivalue, $failmessage, $excmessage)   X-Ref
Tests for status submitted event validations.

param: string $cmielement a valid CMI status element
param: string $cmivalue a valid CMI status value
param: string $failmessage the message used to fail the test in case of missing to violate a validation rule
param: string $excmessage the exception message when violating the validations rules