Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_h5pactivity\local\grader Class Reference

Class for handling H5P activity grading. More...

Public Member Functions

 __construct (stdClass $instance, string $idnumber='')
 Class contructor.
 
 grade_item_delete ()
 Delete grade item for given mod_h5pactivity instance.
 
 grade_item_update ($grades=null)
 Creates or updates grade item for the given mod_h5pactivity instance.
 
 update_grades (int $userid=0)
 Update grades in the gradebook.
 

Detailed Description

Class for handling H5P activity grading.

Since
Moodle 3.9
License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

mod_h5pactivity\local\grader::__construct ( stdClass $instance,
string $idnumber = '' )

Class contructor.

Parameters
stdClass$instanceH5Pactivity instance object
string$idnumbercourse_modules idnumber

Member Function Documentation

◆ grade_item_delete()

mod_h5pactivity\local\grader::grade_item_delete ( )

Delete grade item for given mod_h5pactivity instance.

Return values
intReturns GRADE_UPDATE_OK, GRADE_UPDATE_FAILED, GRADE_UPDATE_MULTIPLE or GRADE_UPDATE_ITEM_LOCKED

◆ grade_item_update()

mod_h5pactivity\local\grader::grade_item_update ( $grades = null)

Creates or updates grade item for the given mod_h5pactivity instance.

Parameters
mixed$gradesoptional array/object of grade(s); 'reset' means reset grades in gradebook
Return values
int0 if ok, error code otherwise

◆ update_grades()

mod_h5pactivity\local\grader::update_grades ( int $userid = 0)

Update grades in the gradebook.

Parameters
int$useridUpdate grade of specific user only, 0 means all participants.

The documentation for this class was generated from the following file: