Class for building the user's activity completion details.
More...
|
static | get_instance (cm_info $cminfo, int $userid, bool $returndetails=true) |
| Generates an instance of this class.
|
|
|
| sort_completion_details (array $details) |
| Sort completion details in the order specified by the activity's custom completion implementation.
|
|
|
activity_custom_completion | $cmcompletion = null |
| Activity custom completion object.
|
|
cm_info | $cminfo = null |
| The course module information.
|
|
object | $completiondata = null |
| The completion data.
|
|
completion_info | $completioninfo = null |
| The completion info instance for this cm's course.
|
|
bool | $returndetails = true |
| Whether to return automatic completion details.
|
|
int | $userid = 0 |
| The user ID.
|
|
Class for building the user's activity completion details.
- Copyright
- 2021 Jun Pataleta jun@m.nosp@m.oodl.nosp@m.e.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_completion\cm_completion_details::__construct |
( |
completion_info | $completioninfo, |
|
|
cm_info | $cminfo, |
|
|
int | $userid, |
|
|
bool | $returndetails = true ) |
Constructor.
- Parameters
-
completion_info | $completioninfo | The completion info instance for this cm's course. |
cm_info | $cminfo | The course module information. |
int | $userid | The user ID. |
bool | $returndetails | Whether to return completion details or not. |
◆ get_details()
core_completion\cm_completion_details::get_details |
( |
| ) |
|
Fetches the completion details for a user.
- Return values
-
array | An array of completion details for a user containing the completion requirement's description and status. |
- Exceptions
-
◆ get_instance()
static core_completion\cm_completion_details::get_instance |
( |
cm_info | $cminfo, |
|
|
int | $userid, |
|
|
bool | $returndetails = true ) |
|
static |
Generates an instance of this class.
- Parameters
-
cm_info | $cminfo | The course module info instance. |
int | $userid | The user ID that we're fetching completion details for. |
bool | $returndetails | Whether to return completion details or not. |
- Return values
-
◆ get_overall_completion()
core_completion\cm_completion_details::get_overall_completion |
( |
| ) |
|
Fetches the overall completion state of this course module.
- Return values
-
int | The overall completion state for this course module. |
◆ get_timemodified()
core_completion\cm_completion_details::get_timemodified |
( |
| ) |
|
Completion state timemodified.
- Return values
-
◆ has_completion()
core_completion\cm_completion_details::has_completion |
( |
| ) |
|
Whether this activity module has completion enabled.
- Return values
-
◆ is_automatic()
core_completion\cm_completion_details::is_automatic |
( |
| ) |
|
Whether this activity module instance tracks completion automatically.
- Return values
-
◆ is_tracked_user()
core_completion\cm_completion_details::is_tracked_user |
( |
| ) |
|
Checks whether completion is being tracked for this user.
- Return values
-
◆ overridden_by()
core_completion\cm_completion_details::overridden_by |
( |
| ) |
|
Fetches the user ID that has overridden the completion state of this activity for the user.
- Return values
-
◆ show_manual_completion()
core_completion\cm_completion_details::show_manual_completion |
( |
| ) |
|
Determine whether to show the manual completion or not.
- Return values
-
◆ sort_completion_details()
core_completion\cm_completion_details::sort_completion_details |
( |
array | $details | ) |
|
|
protected |
Sort completion details in the order specified by the activity's custom completion implementation.
- Parameters
-
array | $details | The completion details to be sorted. |
- Return values
-
- Exceptions
-
The documentation for this class was generated from the following file:
- completion/classes/cm_completion_details.php