General developer forum

Possibility of rate an Activity

 
Picture of Dennis Hübner
Possibility of rate an Activity
 

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: -
Davo
Re: Possibility of rate an Activity
Group Core developersGroup Particularly helpful MoodlersGroup 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.


 
Average of ratings: -
Picture of Dennis Hübner
Re: Possibility of rate an Activity
 

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'.

 
Average of ratings: -
Picture of Carsten Kopschütz
Re: Possibility of rate an Activity
 

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)
Picture of Juan Carlos Mora
Re: Possibility of rate an Activity
 

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

 
Average of ratings: -
Picture of Paulo Marins
Re: Possibility of rate an Activity
 

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

 
Average of ratings: -