H5P activity grader class.
Copyright: | 2020 Ferran Recio <ferran@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 214 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
grader:: (6 methods):
__construct()
grade_item_delete()
grade_item_update()
update_grades()
get_user_grades_for_gradebook()
get_user_grades_for_deletion()
__construct(stdClass $instance, string $idnumber = '') X-Ref |
Class contructor. param: stdClass $instance H5Pactivity instance object param: string $idnumber course_modules idnumber |
grade_item_delete() X-Ref |
Delete grade item for given mod_h5pactivity instance. return: int Returns GRADE_UPDATE_OK, GRADE_UPDATE_FAILED, GRADE_UPDATE_MULTIPLE or GRADE_UPDATE_ITEM_LOCKED |
grade_item_update($grades = null) X-Ref |
Creates or updates grade item for the given mod_h5pactivity instance. param: mixed $grades optional array/object of grade(s); 'reset' means reset grades in gradebook return: int 0 if ok, error code otherwise |
update_grades(int $userid = 0) X-Ref |
Update grades in the gradebook. param: int $userid Update grade of specific user only, 0 means all participants. |
get_user_grades_for_gradebook(int $userid = 0) X-Ref |
Get an updated list of user grades and feedback for the gradebook. param: int $userid int or 0 for all users return: array of grade data formated for the gradebook api |
get_user_grades_for_deletion(int $userid = 0) X-Ref |
Get an deletion list of user grades and feedback for the gradebook. This method is used to delete all autmatic gradings when grading method is set to manual. param: int $userid int or 0 for all users return: array of grade data formated for the gradebook api |