UserData::complete_course( int $course_id )
Complete course save in the user data
Description
See also
Parameters
- $course_id
-
(int) (Required)
Source
File: classes/UserData.php
public function complete_course( $course_id = 0 ) { if ( $course_id ) { $completed_courses = (array) $this->get( 'completed_courses' ); $completed_courses[ $course_id ]['is_course_complete'] = 1; $this->update( 'completed_courses', array_filter( $completed_courses ) ); } }
Changelog
Version | Description |
---|---|
DozentLMS 1.0.0 | Introduced. |