basically you use the MIN and MAX functions to design factors that give back zero once your grade drops below a certain threshold.
- total grade is 70% test grade and 30% presentation grade
- total grade should be negative if test score or presentation score are below 50
so after calculating our grade, we multiply it with our factors:
- floor(test) rounds it down to the next integer, so we don't have to deal with fractions
- then we subtract 49 from this number, so if the student had less than 50 points, we end up with zero
- then we take the minimum of what we end up with and 1, so the factor can never be more than 1
- then we take the maximum of what we end up with and 0, so the factor can never be less than 0
thus, we have a factor that is 0 if the score for test was less than 50, and 1 if it was more than 50 - we multiply the whole grade with that factor, so if the student had less than 50 for the test, the whole grade is zero.
this is very awkward and can get very complicated, however, as I just learned from this thread, apparently there are finally IF-statements for grade calculation in moodle in 3.6, which will make this a lot easier.
Thanks for that detailed explanation Stefan.