grades of un-enrolled users

grades of un-enrolled users

by michael michael -
Number of replies: 6

Hi,

is there any way to get the grades of the users after un-enrolled them,

like i want to make a grade report for all the users who attend any course in our Moodle site,and include in this report the users who already attend the courses and finish it, also the  users still enrolled.

if there are any plugins can do that,

Average of ratings: -
In reply to michael michael

Re: grades of un-enrolled users

by Davo Smith -
Core developers колдонуучунун сүрөтү Particularly helpful Moodlers колдонуучунун сүрөтү Peer reviewers колдонуучунун сүрөтү Plugin developers колдонуучунун сүрөтү

As you're asking in the developer forum, I'm assuming you're happy with a solution that involves writing some code.

When a user is unenrolled, all their grades are copied into the mdl_grades_history table (from where they are restored if the user re-enrols). It should be fairly easy to write an SQL query that pull the relevant details from there.

Off the top of my head, I'm not aware of a Moodle feature or plugin that lets you directly access the mdl_grades_history table.

Average of ratings:Useful (1)
In reply to Davo Smith

Re: grades of un-enrolled users

by michael michael -

Sounds gr8,

 

But can you help me more and explain to me how we create this query? Direct in the database tables?

cuz I'm not a developer, but helping our developer, how we can solve this issue.


In reply to Davo Smith

Re: grades of un-enrolled users

by Luis de Vasconcelos -
Particularly helpful Moodlers колдонуучунун сүрөтү

Very useful! Thanks Davo.

When a student enrols in a course does Moodle always check the mdl_grade_grades_history table to see if the student previously had any grades in that course (i.e. was previously enrolled in the course)?

Do those grades ever get deleted from the _history table after the student has been unenrolled from the course for a certain period? Example, does cron ever "cleanup" that _history table?

In reply to Luis de Vasconcelos

Re: grades of un-enrolled users

by Luis de Vasconcelos -
Particularly helpful Moodlers колдонуучунун сүрөтү

Ok, https://docs.moodle.org/32/en/Unenrolment#Unenrolment_and_grade_history sort of answers my first question. But what happens to the grades if the teacher/admin does not select the 'Recover user's old grades if possible' option when re-enrolling the student? Do the grades ever get "cleaned up" (deleted)?

In reply to michael michael

Re: grades of un-enrolled users

by Darko Miletić -

You can use this plugin to create custom reports

https://moodle.org/plugins/view.php?plugin=block_configurable_reports