Differences Between: [Versions 39 and 310]
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: | 815 lines (35 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
mod_assign_privacy_testcase:: (9 methods):
create_submission()
create_instance()
test_get_contexts_for_userid()
test_get_users_in_context()
test_export_user_data_student()
test_export_user_data_teacher()
test_delete_data_for_all_users_in_context()
test_delete_data_for_user()
test_delete_data_for_users()
Class: mod_assign_privacy_testcase - 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. |