How to Get Cumulative Score for all Quiz attempts

How to Get Cumulative Score for all Quiz attempts

by Goodluck Emereuwa -
Number of replies: 4

Hello all,

I have a platform where users answer 10 quiz questions. Each question carries 1 mark.

Each user has 10 attempts maximum.

I want to be able to sum the scores of all 10 attempts to get a total score of 100.

So for instance, if a user scores 8 in each level, his cumulative score will become 8 x 10 = 80

Is there a plugin that can do that or can someone point me in the right direction on how to manipulate the code to achieve that?


Thanks

Average of ratings: -
In reply to Goodluck Emereuwa

Re: How to Get Cumulative Score for all Quiz attempts

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Goodluck,

Under 'Grade' in the quiz settings, you can set the 'Grading method' to 'Average grade'. This will give you the average (mean) grade of all attempts.

In reply to Dominique Bauer

Re: How to Get Cumulative Score for all Quiz attempts

by Goodluck Emereuwa -
Thanks Dominique,
However, I do not want the average of the attempts. I want a sum (total) of all the scores of all the attempts.
So, if attempts 1,2 and 3 have scores 6,5 and 10 respectively, the total score will be 6+5+10 = 21

Is there a way I can code it into the 'Grade Method' ?
In reply to Goodluck Emereuwa

Re: How to Get Cumulative Score for all Quiz attempts

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

Let me see if I understand.

Student #1 takes 10 attempts and gets 2/10 on every attempt, or a total of 20 points.

Student #2 takes 2 attempts and gets 10/10, or a total of 20 points.

You want their final grade to be the same, right?

Average of ratings: Useful (1)
In reply to Goodluck Emereuwa

Re: How to Get Cumulative Score for all Quiz attempts

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I am only a user and I would not know how to code this. Maybe a workaround would be enough, depending on your needs:

  • Click on the quiz
  • Click on 'Attempts: xx'
  • 'Download table data as': Microsoft Excel (.xlsx)
  • In Excel, add two columns, say M and N, with typical cell formulas:
    • Cell M2:  =IF(A2=A1;J2+M1;J2)
    • Cell N2:  =IF(A2=A3;"";A2)

where column A contains the name of the student, or you could use column E with the email address, and column J contains the grade for each attempt. You could then import these results back into Moodle.

Average of ratings: Useful (1)