Enrollment Report

Enrollment Report

by Dan Bell -
Number of replies: 1

Is there a moodle report to list all courses a user is enrolled?

Average of ratings: -
In reply to Dan Bell

Re: Enrollment Report

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

I don't know about a "report."

However, if I wanted to know which course a student is enrolled in I would just click on the User, and look at their "Course details" area (an example is shown below.)

A more elaborate way is to write custom SQL.  For example, I wanted a list of students who were enrolled in 2 or more courses of mine, so I wrote this SQL.  Maybe this code will help you write your own.  You can also explore SQL shared in the ad-hoc contributed reports web page.


SELECT rj1.firstname,

       rj1.LastName,

       rj1.coursename,

       rj1.FinalGrade,

       rj1.CourseIDNum,

       rj2.count

FROM rjfinalgrades rj1

JOIN

  (SELECT studentid,

          count(studentid) AS COUNT

   FROM rjfinalgrades

   GROUP BY StudentID HAVING COUNT(studentID) > 1) rj2 ON rj1.StudentID = rj2.studentid

ORDER BY rj2.COUNT DESC, rj1.studentid,

                         rj1.courseidnum DESC

Attachment details.jpg