Blank Grades and Grade Access Restrictions

Blank Grades and Grade Access Restrictions

by Joshua Bragg -
Number of replies: 2

What is the expected behavior for grade access restrictions and blank grades?

We're running 2.9.1.  I had a teacher making a late version of a questionnaire assignment.  She wanted only students who didn't do the questionnaire (and therefore had a blank grade) to do the makeup version.  She didn't have activity completion turned on in her course so we decided to just a grade access condition instead.  We set the grade condition to allow access if the grade was <100 (the grade for completion).  Students with blank scores could not get access to the makeup assignment.  When I changed a blank score to a 50 for a student account, it did allow access.  

I realize I can use activity completion to accomplish this and I'll be doing that shortly for the teacher. However, I'm not sure if this is a bug or if this is the way it is supposed to work.  If its a bug, I'll happily file a bug report.  If this is the expected behavior then perhaps there should be another check box on grade restrictions for "grade is blank."

Average of ratings: -
In reply to Joshua Bragg

Re: Blank Grades and Grade Access Restrictions

by sam marshall -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi, thanks for pointing me at this on Twitter.

What you're seeing is expected behaviour. The grade restriction is basically:

If the user has a grade
AND (optionally) it is more than x
AND (optionally) is is less than x

In other words, if you just add the condition without ticking either tickbox, then it means 'user must have a grade'. If you also specify one or other of the percentages then it additionally means 'and the grade must be in this range'.

I think the docs page might need updating, what do you think? Not sure where this is covered in docs.

For the specific situation where you want it to appear if the user does not have a grade at all, this should be easy to achieve. Simply add a grade condition with no options set (so it means 'user has a grade') and set the dropdown to student 'must not' match the following.

For a more complicated situation like where you want it to appear if they don't have a grade OR if they have a grade but it's less than 50%, then set it as follows using the logical tree structure:

1) Add condition 'grade < 50%'
2) Add a restriction set
3) In the nested set, add a grade restriction with no boxes ticked
4) Change the nested set dropdown to 'must not'
5) Change the overall dropdown to 'any of' (OR)

I have not tested these, let me know if it still doesn't work. smile

--sam


Average of ratings: Useful (1)
In reply to sam marshall

Re: Blank Grades and Grade Access Restrictions

by Joshua Bragg -

Thanks Sam.  I'll see if I can put something in the documentation to make this clearer.  Much appreciated.