See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 39 and 401]
mod_h5pactivity grader tests
Copyright: | 2020 Ferran Recio <ferran@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 360 lines (13 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
grader_test:: (7 methods):
setupBeforeClass()
test_grade_item_delete()
test_grade_item_update()
grade_item_update_data()
test_update_grades()
update_grades_data()
generate_fake_attempt()
Class: grader_test - X-Ref
Grader tests class for mod_h5pactivity.setupBeforeClass() X-Ref |
Setup to ensure that fixtures are loaded. |
test_grade_item_delete() X-Ref |
Test for grade item delete. |
test_grade_item_update(int $newgrade, bool $reset, string $idnumber) X-Ref |
Test for grade item update. param: int $newgrade new activity grade param: bool $reset if has to reset grades param: string $idnumber the new idnumber |
grade_item_update_data() X-Ref |
Data provider for test_grade_item_update. return: array |
test_update_grades(int $newgrade, bool $all, int $completion, array $results) X-Ref |
Test for grade update. param: int $newgrade the new activity grade param: bool $all if has to be applied to all students or just to one param: int $completion 1 all student have the activity completed, 0 one have incompleted param: array $results expected results (user1 grade, user2 grade) |
update_grades_data() X-Ref |
Data provider for test_grade_item_update. return: array |
generate_fake_attempt(stdClass $activity, stdClass $user,int $rawscore, int $maxscore, int $completion = 1) X-Ref |
Create a fake attempt for a specific user. param: stdClass $activity activity instance record. param: stdClass $user user record param: int $rawscore score obtained param: int $maxscore attempt max score param: int $completion 1 for activity completed, 0 for not completed yet return: stdClass the attempt record |