Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Static Public Member Functions | List of all members
core_completion\progress Class Reference

Class used to return completion progress information. More...

Static Public Member Functions

static get_course_progress_percentage ($course, $userid=0)
 Returns the course percentage completed by a certain user, returns null if no completion data is available. More...
 

Detailed Description

Class used to return completion progress information.

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

Member Function Documentation

◆ get_course_progress_percentage()

static core_completion\progress::get_course_progress_percentage (   $course,
  $userid = 0 
)
static

Returns the course percentage completed by a certain user, returns null if no completion data is available.

Parameters
stdClass$courseMoodle course object
int$useridThe id of the user, 0 for the current user
Return values
null|floatThe percentage, or null if completion is not supported in the course, or there are no activities that support completion.

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