Differences Between: [Versions 39 and 310]
Unit tests for the grade API at /lib/classes/grades_external.php
Copyright: | 2012 Andrew Davis |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 616 lines (25 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
core_grades_external_testcase:: (8 methods):
load_test_data()
test_get_grades()
get_activity()
get_activity_student_grade()
get_outcome()
get_outcome_student_grade()
test_update_grades()
test_create_gradecategory()
Class: core_grades_external_testcase - X-Ref
Grades functions unit testsload_test_data($assignmentname, $student1rawgrade, $student2rawgrade) X-Ref |
Load initial test information param: string $assignmentname Assignment name param: int $student1rawgrade Student 1 grade param: int $student2rawgrade Student 2 grade return: array Array of vars with test information |
test_get_grades() X-Ref |
Test get_grades() |
get_activity($grades, $cmid) X-Ref |
Get an activity param: array $grades Array of grades param: int $cmid Activity course module id return: strdClass Activity object |
get_activity_student_grade($grades, $cmid, $studentid) X-Ref |
Get a grade for an activity param: array $grades Array of grades param: int $cmid Activity course module id param: int $studentid Student it return: stdClass Activity Object |
get_outcome($grades, $cmid) X-Ref |
Get an ouctome param: array $grades Array of grades param: int $cmid Activity course module id return: stdClass Outcome object |
get_outcome_student_grade($grades, $cmid, $studentid) X-Ref |
Get a grade from an outcome param: array $grades Array of grades param: int $cmid Activity course module id param: int $studentid Student id return: stdClass Outcome object |
test_update_grades() X-Ref |
Test update_grades() |
test_create_gradecategory() X-Ref |
Test create_gradecategory. return: void |