How to total a column of ratings

How to total a column of ratings

by Virgil Ashruf -
Number of replies: 1

I'm building an activity where each entry will be rated. Per entry I have four ratings. Each rating is given by a different role and rated by any number of people. With rate1:avg I can show the average of all given ratings on a rating. Now I'm looking to get the average of averages on the entry.

rate:avg // gives the average of all given ratings on a field. I can't calculate with this.
rate:rating // gives the numerical value of the current users' rating. I can calculate with this.

What should I use to get the numerical value of the average of ratings so I can do this?

%%F[[entryid] ]:=average(||rate1:magic||+||rate2:magic||+||rate3:magic||+||rate4:magic||)%%


Average of ratings: -
In reply to Virgil Ashruf

Re: How to total a column of ratings

by Virgil Ashruf -

I actually went ahead and hacked the module a bit to enable this functionality. I will commit a change that will add:

  • new patterns
  • new replacements
  • extra numerical values for ratings.


I added a tracker issue here: https://tracker.moodle.org/browse/CONTRIB-7005

And committed my changes: https://github.com/itamart/moodle-mod_dataform/compare/master...eSrem:CONTRIB-7005