|
const | MODULE = 'choice' |
| Module name.
|
|
◆ __construct()
mod_choice\manager::__construct |
( |
private cm_info cm_info | $cm, |
|
|
private stdClass stdClass | $instance ) |
Class constructor.
- Parameters
-
cm_info | $cm | course module info object |
stdClass | $instance | activity instance object. |
- Parameters
-
$cm | $cm the given course module info |
$instance | $instance activity instance object |
◆ count_all_users_answered()
mod_choice\manager::count_all_users_answered |
( |
| ) |
|
Return the current count of users who have answered this choice module, that the current user can see.
- Return values
-
int | the number of answers that the user can see |
◆ create_from_coursemodule()
static mod_choice\manager::create_from_coursemodule |
( |
stdClass|cm_info | $cm | ) |
|
|
static |
Create a manager instance from a course_modules record.
- Parameters
-
stdClass | cm_info | $cm | an activity record |
- Return values
-
◆ create_from_instance()
static mod_choice\manager::create_from_instance |
( |
stdClass | $instance | ) |
|
|
static |
Create a manager instance from an instance record.
- Parameters
-
stdClass | $instance | an activity record |
- Return values
-
◆ get_context()
mod_choice\manager::get_context |
( |
| ) |
|
Return the current context.
- Return values
-
◆ get_coursemodule()
mod_choice\manager::get_coursemodule |
( |
| ) |
|
Return the current cm_info.
- Return values
-
◆ get_instance()
mod_choice\manager::get_instance |
( |
| ) |
|
Return the current instance.
- Return values
-
stdClass | the instance record |
◆ has_answered()
mod_choice\manager::has_answered |
( |
| ) |
|
Check if the current user has answered the choice.
Note: this will count all answers, regardless of grouping.
- Return values
-
bool | true if the user has answered, false otherwise |
The documentation for this class was generated from the following file:
- mod/choice/classes/manager.php