Hiding grades from students

Hiding grades from students

by Barry Rowlingson -
Number of replies: 1
I'm looking into the code with a view to adding an option where a quiz or assignment (or other gradable entity) could have the visibility of its grades suppressed for students until the teacher decides.

The teacher could flip a setting in the module for grade visibility, or maybe it could automatically come on when the deadline for the quiz/assignment has passed.

I think the way to do it is to modify the modules' "$module"_grades function to return the grades, the maxgrade, and the 'revealGrades' value (which would be an extra column in the database). Anything that then requests the grades from a module would be responsible for obeying this value when deciding whether or not to display the numbers. Teachers should be able to see the grades, students not unless its set to 'reveal'.

I think I understand enough of the moodle DB and code organisation, and PHP looks close enough to perl for me to hack this on. Anyone else had a play at this or want to help?

Baz
Average of ratings: -
In reply to Barry Rowlingson

Re: Hiding grades from students

by Barry Rowlingson -
Well, that didn't take me long! There's a few places in the code where students can see grades, so I had to change a few things. But now I have an extra option on the quiz settings that lets the teacher define whether to show or hide grades, and if the setting is 'Hide' then the pages with grade info for students say 'N/Avail' or 'Grade information is not available at this time'. If the teacher flips the setting, then voila, all the grades for that quiz are there. Pretty much as I was after!

I'll roll up some diffs (from the moodle-1.0.9 release) soon if anyone else wants to have a nose.

Baz