Teaching with Moodle

Final Grade of a Course - How to

Picture of Pablo Díaz
Final Grade of a Course - How to

Hello everyone,

I have a course with 14 topics and 1 quiz per topic (14 quizes), and at the end of the course there is a global quiz with questions on all topics.

I want the calculation of the total grade of the course to be as follows:

  • 40% corresponds to the average grade obtained in all 14 topic-quizes.
  • 60% corresponds to the grade obtained in the global quiz.

How can I do it? What formula should I write?

I tried

= sum (average (III.1, III.2, III.3, III.4, III.5, III.6 ]], III.7, III.8, III.9, III.10, III.11, III.12 , III.13, III.14) * 0.4 III.Final * 0.6)

But it does not accept it ..

Thanks in advance..


Average of ratings: -
Floyd Saner - Tail of the Dragon, U.S. 129, NC
Re: Final Grade of a Course - How to
Particularly helpful Moodlers


The best way to configure the grade book is by using weights instead of writing formulas. Since Moodle version 2.8, there is a flexible grade aggregation method named Natural. I configure many grade books and have found Natural aggregation to be the best way to implement any grading scheme.  Refer to https://docs.moodle.org/34/en/Grade_aggregation#Natural

In your case, I would create a grade Category: 'Topic Quizzes'.  Move all the topic quizzes into the Topic Quizzes category. You don't need a separate category for the Global Quiz since there is only one item.

Set the Topic Quizzes category weight to 40 and set the Global Quiz weight to 60.

Done! No formulas needed.


Average of ratings: Useful (1)
Picture of Joost Elshoff
Re: Final Grade of a Course - How to
Particularly helpful MoodlersTesters

Hi Pablo,

As already has been suggested, I'd use the Gradebook setup to get this to work. Here are the steps to follow to make this work.

In site administration > Grades > Grade category settings make sure to have the following aggregation methods enabled:

  • Mean of grades
  • Weighted mean of grades
  • Simple weighted mean of grades

In addition to the natural aggregation that was already discussed.

Then go to your course, open the Course settings menu and go to Gradebook setup. At the top of the gradebook setup table, there will be a folder icon and your course name. To the right of this, you'll find an Edit link with a menu. Edit the settings at this level to set up the proper aggregation method. I'd select Weighted mean of grades.

Then use the Add category button to add a grade category sub folder, to move the 14 topic quizzes to. Set the weight of this sub folder to 4,0.

Next, set the weight of the global quiz to 6,0.

This will result in the following:

The average grade of the 14 topic quizzes will be counted 4 times, the grade of the global quiz will be counted 6 times. 

4 * av grade Topic Quizzes + 6 * grade Global quiz / 10 = course grade


All in all, setting up the gradebook is quite a challenge, but I hope this will help you. In any case, refer to https://docs.moodle.org/34/en/Grader_report for all information on this very interesting topic.

Average of ratings: Useful (3)
Picture of Pablo Díaz
Re: Final Grade of a Course - How to

Done!! I followed the steps you told me:

1. I modified the Course folder aggregation method to "Weighted mean of grades", and max grade: 10.00

2. Then I created one subcategory: 

  • Category name: Topic Quizes
  • Aggregation: Mean of grades
  • Maximum grade: 10

I moved the 14 quizes inside that folder and set the weight to 4.0

3. I weighted the global quiz to 6.0. 

 That's it!! It was easier than I thought! 

Thank you for your help!

Average of ratings: -