Differences Between: [Versions 311 and 403] [Versions 400 and 403] [Versions 401 and 403]
Base class for unit tests for mod_assign.
Copyright: | 2018 Adrian Greeve <adrian@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 817 lines (35 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
Class: provider_test - X-Ref
Unit tests for mod/assign/classes/privacy/create_submission($assign, $user, $submissiontext, $attemptnumber = 0) X-Ref |
Convenience method for creating a submission. param: assign $assign The assign object param: stdClass $user The user object param: string $submissiontext Submission text param: integer $attemptnumber The attempt number return: object A submission object. |
create_instance($params = array() X-Ref |
Convenience function to create an instance of an assignment. param: array $params Array of parameters to pass to the generator return: assign The assign class. |
test_get_contexts_for_userid() X-Ref |
Test that getting the contexts for a user works. |
test_get_users_in_context() X-Ref |
Test returning a list of user IDs related to a context (assign). |
test_export_user_data_student() X-Ref |
Test that a student with multiple submissions and grades is returned with the correct data. |
test_export_user_data_teacher() X-Ref |
Tests the data returned for a teacher. |
test_delete_data_for_all_users_in_context() X-Ref |
A test for deleting all user data for a given context. |
test_delete_data_for_user() X-Ref |
A test for deleting all user data for one user. |
test_delete_data_for_users() X-Ref |
A test for deleting all user data for a bunch of users. |