See Release Notes
Long Term Support Release
Base class for unit tests for mod_assign.
Copyright: | 2018 Andrew Nicols <andrew@nicols.co.uk> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 136 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 6 times |
Includes or requires: | 1 file mod/assign/tests/fixtures/testable_assign.php |
create_instance($course, $params = [], $options = []) X-Ref |
Convenience function to create a testable instance of an assignment. param: array $params Array of parameters to pass to the generator return: testable_assign Testable wrapper around the assign class. |
add_submission($student, $assign, $onlinetext = null, $changeuser = true) X-Ref |
Add a user submission to the assignment. param: \stdClass $student The user to submit for param: \assign $assign The assignment to submit to param: string $onlinetext The text tobe submitted param: bool $changeuser Whether to switch user to the user being submitted as. |
submit_for_grading($student, $assign, $data = [], $changeuser = true) X-Ref |
Submit the assignemnt for grading. param: \stdClass $student The user to submit for param: \assign $assign The assignment to submit to param: array $data Additional data to set param: bool $changeuser Whether to switch user to the user being submitted as. |
mark_submission($teacher, $assign, $student, $grade = 50.0, $data = [], $attempt = 0) X-Ref |
Mark the submission. param: \stdClass $teacher The user to mark as param: \assign $assign The assignment to mark param: \stdClass $student The user to grade param: array $data Additional data to set param: bool $changeuser Whether to switch user to the user being submitted as. |