Quiz external functions.
More...
|
since | $status = 'finished' |
|
since | $userid = 0 |
|
since | : '5.0' |
|
since | mdl: '<a class="el" href="https: )] public static function get_user_attempts_parameters() { return new external_function_parameters ( [ 'quizid' => new external_value(PARAM_INT |
|
since | reason: 'The old API for fetching attempts doesn\'t return true states for NOT_STARTED and SUBMITTED attempts' |
|
since | since: '5.0' |
|
|
static | validate_quiz ($quizid) |
| Utility function for validating a quiz.
|
|
Quiz external functions.
- Copyright
- 2016 Juan Leyva juan@.nosp@m.mood.nosp@m.le.co.nosp@m.m
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- Since
- Moodle 3.1
◆ get_quizzes_by_courses()
static mod_quiz_external::get_quizzes_by_courses |
( |
| $courseids = [] | ) |
|
|
static |
Returns a list of quizzes in a provided list of courses, if no list is provided all quizzes that the user can view will be returned.
- Parameters
-
array | $courseids | Array of course ids |
- Return values
-
- Since
- Moodle 3.1
◆ get_quizzes_by_courses_parameters()
static mod_quiz_external::get_quizzes_by_courses_parameters |
( |
| ) |
|
|
static |
Describes the parameters for get_quizzes_by_courses.
- Return values
-
- Since
- Moodle 3.1
◆ get_quizzes_by_courses_returns()
static mod_quiz_external::get_quizzes_by_courses_returns |
( |
| ) |
|
|
static |
Describes the get_quizzes_by_courses return value.
- Return values
-
- Since
- Moodle 3.1
◆ validate_quiz()
static mod_quiz_external::validate_quiz |
( |
| $quizid | ) |
|
|
staticprotected |
Utility function for validating a quiz.
- Parameters
-
int | $quizid | quiz instance id |
- Return values
-
array | array containing the quiz, course, context and course module objects |
- Since
- Moodle 3.1
◆ view_quiz()
static mod_quiz_external::view_quiz |
( |
| $quizid | ) |
|
|
static |
Trigger the course module viewed event and update the module completion status.
- Parameters
-
int | $quizid | quiz instance id |
- Return values
-
array | of warnings and status result |
- Since
- Moodle 3.1
◆ view_quiz_parameters()
static mod_quiz_external::view_quiz_parameters |
( |
| ) |
|
|
static |
Describes the parameters for view_quiz.
- Return values
-
- Since
- Moodle 3.1
◆ view_quiz_returns()
static mod_quiz_external::view_quiz_returns |
( |
| ) |
|
|
static |
Describes the view_quiz return value.
- Return values
-
- Since
- Moodle 3.1
The documentation for this class was generated from the following file:
- mod/quiz/classes/external.php