Activity and Course completion reports for inactive students

Activity and Course completion reports for inactive students

by Edukacija.net mentor -
Number of replies: 12

Good day, all.

Is there an option to show activity and course completion reports for inactive students?

We have this situation: users have access to the course until certain date and we need to create a report after their access has expired (they might complete an activity last minute). However, completion reports only shows active users.

I tried with teacher and manager roles. Our Moodle version is 3.6.2.

Is there an option we are missing or we need to get into the code?

Thanks!

Average of ratings: Useful (1)
In reply to Edukacija.net mentor

Re: Activity and Course completion reports for inactive students

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I am not sure what you mean by "inactive" students. I assume that you mean those who have been "suspended."

In my Moodle, when I click on a student who has been suspended, I can still then go into Completion Report and see what they did. So it might be a difference between my Moodle and Yours. I am using Moodle 3.8.2, Boost theme. Maybe it is a theme issue.
In reply to Rick Jerz

Re: Activity and Course completion reports for inactive students

by Edukacija.net mentor -
Hi, Rick.
I mean both 'suspended' and 'not current' (their enrolment ended). 

For example, this is from Participants list:
participants

Enrloment for this user has ended:

And this is from Completion report:


When all users are either suspended or 'not current', then I receive a message:
There are no students on this course or group for whom completion information is displayed. (By default, completion information is displayed only for students, so if there are no students, you will see this error. Administrators can alter this option via the admin screens.)

Do you think you get thes users because of the Moodle version, or it might be because of some option?

Thanks!
In reply to Edukacija.net mentor

Re: Activity and Course completion reports for inactive students

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I am not the expert on this. However, what I see it that "Enrollment has ended." So it might have something to do with your enrollment technique. I never end a student's enrollment. Even if a student drops out of my course, I simply "suspend" them. But I am not sure. Maybe someone else will see something in what you have posted.
Average of ratings: Useful (1)
In reply to Rick Jerz

Re: Activity and Course completion reports for inactive students

by Edukacija.net mentor -
Unfortunatelly, the same is for suspended users. However, if it is visible to you, I suppose we should be able to get it too. Perhaps we will need to upgrade.

I would appreciate if anyone else know how to get these reports to share. Thanks!
In reply to Edukacija.net mentor

Re: Activity and Course completion reports for inactive students

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I am not sure where you are going to get to the Completion Report? And if you do not filter, do you see Cognita?

For me, I typically go to Participants, then click on the student of interest, and then pick the Complete Report from the side (see graphic.)

We might be talking about two different reports.  (Sorry if I have your needs confused.)




Attachment Complete Report.png
In reply to Rick Jerz

Re: Activity and Course completion reports for inactive students

by Edukacija.net mentor -
Yes, these are different reports. I meant Activity and Course completion reports that can be found on Course Management (see below). Those reports show all users in a table. We have hundreds of students and need to see their progress and completion success all at once, it is not an option to go one by one.



Average of ratings: Useful (1)
In reply to Edukacija.net mentor

Re: Activity and Course completion reports for inactive students

by Edukacija.net mentor -
If anyone is interested, we have solved the problem by modifying completionlib.php (https://github.com/moodle/moodle/blob/master/lib/completionlib.php)

There are two calls of the function get_enrolled_sql that returns all enrolled users. The last parameter of this function controls should only active users will be returned. By default, the function is called with true set as the last argument, and if you change it to false it will return both active and inactive users.

Be careful! Don't change php if you are not sure what you're doing and without a backup.
Average of ratings: Useful (9)
In reply to Edukacija.net mentor

Re: Activity and Course completion reports for inactive students

by Oguz Erkul -

It works! Thanks a lot smile 

In reply to Edukacija.net mentor

Re: Activity and Course completion reports for inactive students

by Gordon Mills -
We have just upgraded to 3.10 and this fix no longer works have you any idea why not?
In reply to Gordon Mills

Re: Activity and Course completion reports for inactive students

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Gordon,

This probably doesn't work anymore because you upgraded the code to Moodle 3.10 and you did a core modification on your previous instance. A few things come to mind:
==> Core code modification is never, ever a recommended course of action to solve an issue or feature request (as this makes upgrading particularly hard)

Have you considered a custom report builder to get the info from your course instead?
Average of ratings: Useful (1)
In reply to Joost Elshoff

Re: Activity and Course completion reports for inactive students

by David Keeler -
Could this be adapted to an ad-hoc report?
In reply to Edukacija.net mentor

Re: Activity and Course completion reports for inactive students

by Claudio Delpino -
Thanks !! Would be nice to make a PR that adds a course setting for this.