Nested 'If' statements or alternative gradebook calculations

Nested 'If' statements or alternative gradebook calculations

by Hal MacLean -
Number of replies: 1

Running Moodle 3.8+

I have a scenario where there are five quizzes in a course, and all have a pass mark of 75. The users are allowed to 'fail' one of those, but as long as they get at least 60 in that failure they will be considered as ok to move forwards. If they get less than 60 in one or more then they fail the entire course.

Quizzes are in categories - one per quiz - and the quizzes are tagged as '001', '002', etc. The grade calculation per category are currently like this (note the double brackets moodle calculations requires converts the text in here, so I've left them out around the item ID numbers):

=if(001>=60,001+0,0)

If the student scores below 60 then the category records that as zero... we currently total up the categories in the usual manner.

What I am looking for is a way to evaluate whether more than one quiz is showing less than 60 out of the five, and if so to record the entire course as a fail. If one is below 75 then check if it is below 60. If it is, fail the course, if not, pass the course and issue a certificate.

Something like this:

IF(COUNTIF(001,002,003,004,005,">=60")>3,SUM(001+002+003+004+005),0)

I can do this in a spreadhseet using 'countif' and 'if' statements, but I think the way I am doing it is a little too intense for Moodle; it appears to reject countif in this format.

Any ideas how to achieve this? I am open to any alternative gradebook setups, and not at all 'wedded' to the idea of custom calculations!

In reply to Hal MacLean

Re: Nested 'If' statements or alternative gradebook calculations

by Hal MacLean -

I have had a response to this here... the answer was to use grade categories and add a few manual grade items, with custom calculations. Whilst it is a little complex in the math, it's also quite straightforward once you get your head around the equations!

Thanks due to Dominique for his really very good response.