Moodle 3.8 Database question for Activity Completion

Moodle 3.8 Database question for Activity Completion

by Peter Koel -
Number of replies: 7

Hello All,

  I am trying to create an Activity completion report in PowerBi similar to the Activity completion report you can generate within a class. What database file(s) store activities and the corresponding completion status?

Cheer!,

Peter

Average of ratings: -
In reply to Peter Koel

Re: Moodle 3.8 Database question for Activity Completion

by Peter Koel -
Hello,

After further research, I have found the course id and the id of the activity. The course id is in the mdl_course and the activity is in mdl_url as I am tracking a URL activity. Do I now have to search the log file for the 'viewed' action in the event list for the course id and component = mod_url?

Cheers,

Peter
In reply to Peter Koel

Re: Moodle 3.8 Database question for Activity Completion

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's much, much more complicated than that.

This might help.... https://docs.moodle.org/dev/Database_Schema
In reply to Howard Miller

Re: Moodle 3.8 Database question for Activity Completion

by Peter Koel -
Hello Howard,

Thank you for the quick reply and link. My activity completion criteria, is that the link be viewed. It is for this reason i was searching for the viewed action in the log (however if they look at it multiple times it throws my count off.). When an activity is marked as completed how is that represented in the Moodle DB or is it a dynamically determined values based on recorded events?

Sincerely,

Peter
In reply to Peter Koel

Re: Moodle 3.8 Database question for Activity Completion

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Completion events are recorded in the table course_completion_crit_compl
In reply to Howard Miller

Re: Moodle 3.8 Database question for Activity Completion

by Peter Koel -
Thank you. My table is blank, yet the Activity completion report shows activities as being completed. Looking at your schema link above, I see the URL table (Where I found the URL for my URL Activity) is linked to the course table; but that is as far as I get. Is there a flowchart that identifies the steps that are followed to determine if an Activity is completed?

I appreciate your assistance,

Peter
In reply to Peter Koel

Re: Moodle 3.8 Database question for Activity Completion

by Peter Koel -

Hello,

Here is my ERD thus far:

testI do not know how to link the URL to the Course_Module_Completion table. I believe the the activity completion is in there. Am I close?


Cheers,

Peter

In reply to Peter Koel

Re: Moodle 3.8 Database question for Activity Completion

by Peter Koel -
Hello,

Since my Activity Completion criteria is set to 'Complete when student views link': Should I just monitor for the event in the log file, rather then determine activity completion?

Sincerely,

Peter