Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 130 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 classes

legacy_polyfill_test:: (3 methods):
  test_export_gradingform_instance_data()
  test_get_metadata()
  test_delete_gradingform_for_instances()

test_legacy_polyfill_gradingform_provider:: (3 methods):
  _export_gradingform_instance_data()
  _delete_gradingform_for_instances()
  _get_metadata()

test_gradingform_legacy_polyfill_mock_wrapper:: (1 method):
  get_return_value()


Class: legacy_polyfill_test  - X-Ref

Unit tests for the Grading API's privacy legacy_polyfill.

test_export_gradingform_instance_data()   X-Ref
Test that the core_grading\privacy\legacy_polyfill works and that the static _export_gradingform_instance_data can be called.


test_get_metadata()   X-Ref
Test for _get_metadata shim.


test_delete_gradingform_for_instances()   X-Ref
Test the _delete_gradingform_for_instances shim.


Class: test_legacy_polyfill_gradingform_provider  - X-Ref

Legacy polyfill test class for the gradingform_provider.

_export_gradingform_instance_data(\context $context, $instanceid, $subcontext)   X-Ref
Export user data relating to an instance ID.

param: \context $context Context to use with the export writer.
param: int $instanceid The instance ID to export data for.
param: array $subcontext The directory to export this data to.

_delete_gradingform_for_instances($instanceids)   X-Ref
Deletes all user data related to the provided instance IDs.

param: array  $instanceids The instance IDs to delete information from.

_get_metadata(\core_privacy\local\metadata\collection $collection)   X-Ref
Returns metadata about this plugin.

param: \core_privacy\local\metadata\collection $collection The initialised collection to add items to.
return: \core_privacy\local\metadata\collection     A listing of user data stored through this system.

Class: test_gradingform_legacy_polyfill_mock_wrapper  - X-Ref

Called inside the polyfill methods in the test polyfill provider, allowing us to ensure these are called with correct params.

get_return_value()   X-Ref
Get the return value for the specified item.