Get data of students at risk of dropping out from the moodle database

Get data of students at risk of dropping out from the moodle database

JULIETA DIANA RIVERO གིས-
Number of replies: 5

Hi everyone! I'm working with the moodle analytics especifically with a model for Students at risk of dropping out (Moodle version 3.8)

Does someone know if there is a way I can get the list of students at risk of dropping out from the moodle database?

I've already tried querying the 'mdl_analytics_predictions' table but I can't get the id or any data of the students.

I hope you can help me with this, thanks!

Julieta.




དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to JULIETA DIANA RIVERO

Re: Get data of students at risk of dropping out from the moodle database

Dan Marsden གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Peer reviewers གི་པར Plugin developers གི་པར Plugins guardians གི་པར Testers གི་པར Translators གི་པར
you'll need something like this:

select ap.*, u.*
FROM {analytics_predictions} ap
JOIN {context} cx on cx.id = ap.contextid
JOIN {course} c on (c.id = cx.instanceid AND cx.contextlevel = 50)
JOIN {user_enrolments} ue on ue.id = ap.sampleid
JOIN {user} u on u.id = ue.userid

You should probably take a close look at what "context" is in Moodle:
https://docs.moodle.org/en/Context
In reply to Dan Marsden

Re: Get data of students at risk of dropping out from the moodle database

JULIETA DIANA RIVERO གིས-
That's exactly what I was looking for
and you're right, I'll read more about context.
Thanks a lot for your help!
In reply to JULIETA DIANA RIVERO

Re: Get data of students at risk of dropping out from the moodle database

Rick Jerz གིས-
Particularly helpful Moodlers གི་པར Testers གི་པར
Your post made me wonder about how you define "at risk?"
In reply to Rick Jerz

Re: Get data of students at risk of dropping out from the moodle database

Dan Marsden གིས-
Core developers གི་པར Particularly helpful Moodlers གི་པར Peer reviewers གི་པར Plugin developers གི་པར Plugins guardians གི་པར Testers གི་པར Translators གི་པར
It's a core report in moodles analytics machine learning tool:
https://docs.moodle.org/311/en/Students_at_risk_of_dropping_out