Possibility of rate an Activity

Possibility of rate an Activity

by Dennis Hübner -
Number of replies: 5

Hi folks,


I am new to moodle as a developer, but have used it for years at my university as a student. So I'm familiar with the fronted, but never seen the backend or code. 

Now I need to develop a solution for rating Activity content.  Is there a way to write a plugin to make that possible, or do I need to extend the Activity-Code to achieve rating an activity with something like stars, or thumbs up/down?


Searching the web for something existing didn't get any results for a plugin or solution like that.

My PHP knowledge is a little rusty, coded years ago with it, but I know some OOP languages very well, so PHP should be no problem. My problem is to understand the moodle architecture to code something like the rating-thing. Never done that before. Would appreciate some help from the community smile


Regards,

Dennis



Average of ratings: -
In reply to Dennis Hübner

Re: Possibility of rate an Activity

by Davo Smith -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I would suggest you could start by refactoring the Rate a course block.

If you add the block to a course page, then set it to be available on every page within the course, then it should appear alongside each activity.


In reply to Davo Smith

Re: Possibility of rate an Activity

by Dennis Hübner -

Thank you for that quick response. Good plugin to start with, struggled a bit to get it to work on Moodle 3.0, some deprecated methods were used, but now it 'works'.

In reply to Dennis Hübner

Re: Possibility of rate an Activity

by Carsten Kopschütz -

Hello,

can you share the customized version with the community? I would also like to use the plugin with the version 3.0.

Average of ratings: Useful (1)
In reply to Dennis Hübner

Re: Possibility of rate an Activity

by Juan Carlos Mora -

i have the same problem, i need to rate the unit or content. So you have any solutions ?

In reply to Dennis Hübner

Re: Possibility of rate an Activity

by Paulo Marins -

Have anyone solved this problem? If yes, can you share the code?