Gradebook

 
 
Picture of Bob Puffer
Thinking about clearing all "Overridden" flags
Group Particularly helpful Moodlers
These overridden flags are an incredible pain in the button-clicking finger. Maybe a plugin that allows clearing all category and course total overridden flags? Ideas?
Picture of Andy Cravens
Re: Thinking about clearing all "Overridden" flags
 
I routinely do a mass reset of the overridden flags by using SQL. Check this post and see if this is what you need.


http://moodle.org/mod/forum/discuss.php?d=128532#p565472
Picture of Andy Cravens
Re: Thinking about clearing all "Overridden" flags
 
I just now had a chance to sit down and re-read your post. The SQL in the referenced post isn't exactly what you need but I can edit it to work. I'll look at it when I get out of this meeting.
Picture of Bob Puffer
Re: Thinking about clearing all "Overridden" flags
Group Particularly helpful Moodlers
So... I decided to see about a plugin that would remove grades overrides for course and category totals. Really wasn't that hard. Here it is, if anyone finds it useful. Unzip from your moodle directory, it'll add a folder to grade/reports and a language file to lang/en_utf8.

Run Site admin->notifications so you get the permissions set and you're good to go. Will give you another report link under the gradebook->view tab.
St Petersburg, Russia
Re: Thinking about clearing all "Overridden" flags
Group Particularly helpful Moodlers
Bob,

How does this relate to Helen Foster's post here :

"Regarding bulk removal of overridden flags, you'll be pleased to hear we're hoping to add the LSU's grade item and student grades quick edit feature to the grader report (MDL-18229) as part of our Stage 2 gradebook improvements (see Development:Gradebook improvements)."

and this tracker item that she refers to :

Add grade item and student grades quick edit feature to the grader report

Please forgive my obtuseness -- I'm wondering whether I should pre-emptively worry about this issue smile

Mark
Picture of Bob Puffer
Re: Thinking about clearing all "Overridden" flags
Group Particularly helpful Moodlers
Well... there is some relationship between LSU's Quickedit feature and removing overrides in that the Quickedit feature allows you to remove them but also removes the finalgrade value in so doing. The (rather simple, feeble) fix I've put forth here only removes the overrides on category and course total grades (in the event they've been "usually-accidentally" overridden) and forces a recalculation of all the totals (very minimal overhead, actually).
DebNRiley
Re: Thinking about clearing all "Overridden" flags
 
Bob - I have also had challenges with all the clicking involved in overriding grades. Curious if you could describe the situation in which you need to do this?

My situation is this:
If a student has not yet completed an assignment and it is getting close to the assignment I like to enter a "0" for their grade so they can see the "negative" affect not completing the assignment will have on their grade total. But when you manually enter the grade the "overriden" flag is checked and even if the student completes the assignment (like an autograded quiz for example) the new grade will not be entered. So I can see if I did this it would be nice to "undo" all the overrides for that category but not necessarily all the overrides in the entire course as I may have overriden other grades for other reasons and do not want to clear them all out.

What challenges have you encountered and why might you want to clear them all out.

Thanks for your work on this.
Picture of Bob Puffer
Re: Thinking about clearing all "Overridden" flags
Group Particularly helpful Moodlers
I don't want to clear them all out -- just clear out overridden course and category totals which frequently occur when the "grader" (read: teacher's assistant) tabs through a bunch of columns inputting points, gets to the bottom of the last column in a category or the last column in the course and continues inputting grades (ostensibly from the next category). Now they're inputting numbers into the category total or course total column and a simple <ENTER> is sufficient to force them to override requiring painful, manual deletion, one-by-one.

If someone wants overridden flags cleared altogether, they should be looking for a different hack.
Picture of Ron Taylor
Re: Thinking about clearing all "Overridden" flags
 
Will this work for me?

I don't use totals, but want to clear the override for all assignments. We input a lot of 'historical' data in gradebook, which locks the assignment. We now need to make changes to the assignment to update student grades, but gradebook is very slow, so we want to do it in assignment marking view.


Picture of Andrey Shtifanov
Re: Thinking about clearing all "Overridden" flags
 

Thanks for your plugin, but it do not work in our Moodle installation (v. 1.9.10).  I am correct your script (index.php) and now plugin work fine.

include_once('../../../config.php');
require_once($CFG->libdir . '/gradelib.php');
require_once $CFG->dirroot.'/grade/lib.php';
require_once $CFG->dirroot.'/grade/report/lib.php';

$courseid = required_param('id', PARAM_INT); // course id

if (!$course = get_record('course', 'id', $courseid)) {
print_error('nocourseid');
}

$context = get_context_instance(CONTEXT_COURSE, $course->id);

require_capability('gradereport/removeoverrides:view', $context);

// default return url
$returnurl = $_SERVER['HTTP_REFERER'];

// Update all overridden flags for any item with 'course' or 'category' as the itemtype for this course
$sql = "UPDATE {$CFG->prefix}grade_grades g, {$CFG->prefix}grade_items i
SET g.overridden = 0
WHERE i.courseid = $courseid AND i.id = g.itemid";

// $info = get_records_sql($sql);
$db->Execute($sql);

grade_force_full_regrading($courseid);

redirect($returnurl);

Picture of Bob Puffer
Re: Thinking about clearing all "Overridden" flags
Group Particularly helpful Moodlers

Hi Andrey,

We don't use the "clear overrides" anymore as we're using the "Value input assignment grading UI" with $CFG->wipealloverrides MDL-9085.  Check it out if its of interest to you.

Picture of Andrey Shtifanov
Re: Thinking about clearing all "Overridden" flags
 

Hello Bob,
Thank you very much.