Module course_stats Copy item path Source AverageMetric A generic result representing an average metric over a time period.
The average value (e.g. average time in seconds) may be absent if no data is available. CohortActivity Represents cohort activity metrics for both weekly and daily cohorts.
For daily cohorts, offset
will be populated (and activity_period
may be computed from it);
for weekly cohorts, offset
will be None
and activity_period
indicates the week start. CountResult A generic result representing a count metric over a time period.
When the time period is not applicable (for overall totals), period
will be None
. avg_time_to_first_submission_history Get average time from course start to first exercise submission with specified time granularity. course_completions_history Get course completion counts with specified time granularity. course_completions_history_all_language_versions Get completion counts for all language versions of a course with specified time granularity. course_completions_history_by_instance Get course completion counts with specified time granularity, grouped by course instance. first_exercise_submissions_history Get first exercise submission counts with specified time granularity. first_exercise_submissions_history_by_instance Get first exercise submission counts with specified time granularity, grouped by course instance. get_cohort_activity_history Get cohort activity statistics with specified time granularity. get_total_users_completed_all_language_versions_of_a_course Total unique users who have completed the course in all language versions get_total_users_completed_course Total unique users who have completed the course. get_total_users_completed_course_by_instance Total unique users who have completed the course, grouped by course instance. get_total_users_returned_at_least_one_exercise Total unique users who have returned at least one exercise. get_total_users_returned_at_least_one_exercise_by_instance Total unique users who have returned at least one exercise, grouped by course instance. get_total_users_started_all_language_versions_of_a_course Total unique users who have started the course in all language versions get_total_users_started_course Total unique users in the course settings table. get_total_users_started_course_by_instance Total unique users in the course settings table, grouped by course instance. get_user_ids_to_exclude_from_course_language_group_stats ๐ Gets user IDs to exclude from course language group statistics.
Uses a single query to get all roles and filters out MaterialViewer roles. get_user_ids_to_exclude_from_course_stats ๐ Gets user IDs to exclude from course statistics for a single course.
Excludes users with any role other than MaterialViewer in the course, its organization, or globally. unique_users_starting_history Get unique users starting counts with specified time granularity. unique_users_starting_history_all_language_versions Get unique users starting counts for all language versions with specified time granularity. unique_users_starting_history_by_instance Get unique users starting counts with specified time granularity, grouped by course instance. users_returning_exercises_history Get users returning exercises counts with specified time granularity. users_returning_exercises_history_by_instance Get users returning exercises counts with specified time granularity, grouped by course instance.