LD_REST_Quiz_Statistics_Controller_V2
Class LearnDash REST API Quiz Statistics Controller.
Description #
Source #
File: includes/rest-api/v2/class-ld-rest-quiz-statistics-controller.php
Changelog #
Version | Description |
---|---|
3.3.0 | Introduced. |
Methods #
- __construct — Constructor.
- build_params — Fetches expected parameters from request and sets the properties based on their values; else default will be assigned.
- can_access_stats — Permission callback for quiz-statistics endpoint.
- can_access_stats_questions — Permission callback for quiz-statistics endpoint.
- current
- fetch_stat_refs — Fetch the stat refs records for current request.
- find — Find the statistics record in memory.
- get_collection_params_statistics — Retrieves the query params for the posts collection.
- get_collection_params_statistics_questions — Retrieves the query params for the posts collection.
- get_count — Get correct/incorrect count for a particular statistics_ref_id.
- get_item — Retrieve a single item from statistics based on ID.
- get_items — Retrieve list of quiz statistics.
- get_questions — Retrieve list of questions for a particular stat ref ID.
- get_rest_base — Get the REST URL setting.
- get_statistics_mode_from_list — Get WpProQuiz_Model_Statistic object from list of a particular stat.
- get_stats_questions_schema — Retrieves the Stats schema, conforming to JSON Schema.
- get_stats_schema — Retrieves the Stats schema, conforming to JSON Schema.
- get_user_quiz_details — Get user's quiz details from usermeta.
- getQuizId — Get quiz id for current statistics.
- is_qs_endpoint — Check if the current endpoint is quiz statistics endpoint.
- join_quiz_master_and_postmeta — Join query for fetching statistics for which quiz_setting is enabled.
- key
- make_answer_obj — Build the answer type object and returns it.
- next
- post_callback_ops — Perform operations after the callback is executed.
- pre_callback_ops — Set the current request object in property.
- prepare_date_response — Checks the post_date_gmt or modified_gmt and prepare any post or modified date for single post output.
- register_routes — Register API routes.
- reset_state — Reset current state of an object and store current state in a global variable.
- restore_state — Restore the previously stored state of an object from global variable.
- rewind
- routes — Return the route information in form of an array.
- stat_response_object — Prepare the single statistics object for API response.
- statistic_question_response_embed_links — Add the embed links to quiz statistic question response item.
- statistic_response_embed_links — Add the embed links to quiz statistic response item.
- statistics_ref_duration_where — If before date and/or after date are passed, add conditions in where clause.
- statistics_ref_quiz_where — If quiz id is passed explicitly via request, filter the results.
- statistics_ref_users_where — Filter the where clause of the query to fetch statistics refs based on user IDs.
- statistics_ref_where — Filter the where clause of the query to fetch statistics refs.
- users_for_stats — User IDs for fetching statistics.
- valid