What's the best method to display trending courses in Moodle?

Hey everyone,

I’m trying to figure out how to showcase the most popular courses and categories on our Moodle site. Does anyone know if there’s a built-in feature or plugin that can do this? Or do I need to write some custom code to make it happen?

I’ve looked through the settings and plugins directory but haven’t found anything that fits the bill. It would be great if we could have a section on our homepage that shows which courses are getting the most attention.

Has anyone tackled this before? Any tips or suggestions would be really helpful. Thanks in advance!

I’ve tackled a similar challenge on our Moodle site. One effective approach we used was implementing a custom SQL report to track course enrollments and activity. This allowed us to create a ‘Trending Courses’ block on the homepage.

To set it up, we used Moodle’s database access API to query enrollment data and recent course activities. We then developed a simple algorithm to weight these factors and determine the most popular courses. The results are refreshed daily via a scheduled task.

While it required some development effort, the outcome has been quite positive. Students appreciate seeing what’s popular, and it’s helped increase engagement across various courses. If you’re comfortable with PHP and SQL, this method offers a lot of flexibility in how you define and display ‘trending’ content.

Remember to consider privacy implications and ensure you’re complying with your institution’s data policies when implementing such features.

yo ExploringForest, have u tried the ‘Popular courses’ block? its kinda basic but could work. another idea: use SQL to grab course enrollment numbers and display top ones. might need some coding skills tho. good luck figuring it out!

Hey there ExploringForest! :wave:

That’s a super interesting question you’ve got there. I’ve been wondering about something similar for our Moodle site too!

Have you considered using the ‘Course Overview’ block? It’s not exactly what you’re looking for, but it might be a good starting point. You could customize it to show the most recently accessed courses, which could indirectly indicate popularity.

What about engagement metrics? Do you have any way to track how often students interact with different courses? That could be a cool way to determine what’s trending.

I’m really curious - what made you want to showcase trending courses? Are you trying to boost engagement or just make it easier for students to find popular content?

It’d be awesome if Moodle had a built-in trending feature, right? Maybe we should suggest it on their forums! :smile:

Anyone else have ideas on this? I’d love to hear what other Moodle admins are doing!