Setting a default 'Grade to pass'?

Re: Setting a default 'Grade to pass'?

by Brad Knox -
Number of replies: 0

***Disclaimer - I am not a programmer, I can barely spell PHP***

Based on Peter's clue about changing line 187 in \lib\grade\grade_item.php from the default: public $gradepass = 0;  to: "something else" I had some success.

I found that setting a default of '10' to match the quiz default of '10' worked well as our Students must get 100% of questions correct to pass. (if your requirement is a pass mark of 80% then set to '8' etc)

I started poking around, looking for a way to make "Grade to pass" = "Maximum points" and I think I found it:

line 91 of \grade\edit\tree\item.php has a default of:

$item->gradepass       = format_float($item->gradepass, $decimalpoints);

I changed 'gradepass' (underlined one above) to 'grademax' and voila! All default passing grades = maximum points!

$item->gradepass       = format_float($item->grademax, $decimalpoints);

I created a few Assignment activities to check, setting maximum points to different values and they flowed through to the passing grade for the activities.


I hope that helps, but don't forget to read my disclaimer at the top!