Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_completion\api Class Reference

Class containing completion API. More...

Static Public Member Functions

static mark_course_completions_activity_criteria ($userdata=null)
 Mark users who completed course based on activity criteria.
 
static update_completion_date_event ($cmid, $modulename, $instanceorid, $completionexpectedtime)
 Creates, updates or deletes an event for the expected completion date.
 

Public Attributes

string const COMPLETION_EVENT_TYPE_DATE_COMPLETION_EXPECTED = 'expectcompletionon'
 The completion expected on event.
 

Detailed Description

Class containing completion API.

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

Member Function Documentation

◆ mark_course_completions_activity_criteria()

static core_completion\api::mark_course_completions_activity_criteria ( $userdata = null)
static

Mark users who completed course based on activity criteria.

Parameters
array$userdataIf set only marks specified user in given course else checks all courses/users.
Return values
intCompletion record id if $userdata is set, 0 else.
Since
Moodle 4.0

◆ update_completion_date_event()

static core_completion\api::update_completion_date_event ( $cmid,
$modulename,
$instanceorid,
$completionexpectedtime )
static

Creates, updates or deletes an event for the expected completion date.

Parameters
int$cmidThe course module id
string$modulenameThe name of the module (eg. assign, quiz)
stdClass | int$instanceoridThe instance object or ID.
int | null$completionexpectedtimeThe time completion is expected, null if not set
Return values
bool

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