In which tables can I find the activity completion informations?

In which tables can I find the activity completion informations?

by Gábor Zahemszky -
Number of replies: 6

Hello,

we have Moodle 3.11 with both the mod_survey and the mod_questionnare plugin installed. I'd like to write my own SQL-query about the surveys / questionnaries, but didn't find that simple information: where are the activity completion information store in the DB.

Can anybody help me?

Thanks,

Gábor

Average of ratings: -
In reply to Gábor Zahemszky

Re: In which tables can I find the activity completion informations?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Typically, the Moodle database tables are listed in alphabetical order when viewed with programs such as phpMyAdmin. Completion seems to be a little different due to being a "course" item, so look in these five tables
  1. mdl_course_completions
  2. mdl_course_completion_aggr_methd
  3. mdl_course_completion_criteria
  4. mdl_course_completion_crit_compl
  5. mdl_course_completions_defaults
In reply to Gábor Zahemszky

Re: In which tables can I find the activity completion informations?

by Randy Thornton -
Picture of Documentation writers
Activity level completions are stored in the mdl_course_modules_completion table. You can see how to use that in queries using this example on the Ad-hoc contributed reports page: https://docs.moodle.org/400/en/ad-hoc_contributed_reports#User_activity_completions_with_dates
Average of ratings: Useful (2)
In reply to Randy Thornton

Re: In which tables can I find the activity completion informations?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Thanks Randy,
I quit reading at the wrong place and missed the two modules tables. My attention span is ... hmm, what was I going to say? ;)
In reply to AL Rachels

Re: In which tables can I find the activity completion informations?

by Randy Thornton -
Picture of Documentation writers
No worries, I know that feeling. Several years ago I spent a lot of time figuring out the activity completions. It drove me a little crazy for while ;)
In reply to Randy Thornton

Tárgy: Re: In which tables can I find the activity completion informations?

by Gábor Zahemszky -
Thanks, Randy!
I was interested in these table names, but the examples are very useful, too!