Gradebook is empty when I re-enroll students

Gradebook is empty when I re-enroll students

by Christos Savva -
Number of replies: 4

Hello again Moodle Community!


I have a problem with the gradebook. When I am re-enrolling students in their courses I cannot see their grades in the gradebook. Now, if I check each submission activity I can see the grades there.


I had a similar problem before, post here. The difference now is that I didn't restore the course, the course was always in Moodle, and Recover Grades Default is checked to Yes. Still cannot get the grades to show up in the gradebook.


Any help?

Thanks in advance

In reply to Christos Savva

Re: Gradebook is empty when I re-enroll students

by Christos Savva -
Update


I tried to restore a course, and I got the error below, where can I enable grade history?


Attempting to recover grades when grade history is disabled.

line 950 of /lib/gradelib.php: call to debugging()

line 1347 of /lib/enrollib.php: call to grade_recover_history_grades()

line 524 of /enrol/manual/lib.php: call to enrol_plugin->enrol_user()

line 1900 of /backup/moodle2/restore_stepslib.php: call to enrol_manual_plugin->restore_user_enrolment()

line 137 of /backup/util/plan/restore_structure_step.class.php: call to restore_enrolments_structure_step->process_enrolment()

line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()

line 151 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()

line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()

line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()

line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()

line 190 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()

line 278 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()

line ? of unknownfile: call to progressive_parser->end_tag()

line 179 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()

line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()

line 110 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()

line 181 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()

line 177 of /backup/util/plan/base_plan.class.php: call to base_task->execute()

line 167 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()

line 333 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()

line 184 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()

line 107 of /backup/restore.php: call to restore_ui->execute()

In reply to Christos Savva

Re: Gradebook is empty when I re-enroll students

by Perry Way -

I've been modifying parts of Moodle to suit the needs of my employer and I discovered in the process of trying to automate enrollment from our student management system that when you unenroll a student from a course, it also removes the final grades in Moodle's grade tables as a part of the unenrollment process. The scores are still in the history but the record that is used to show you the grade results are cleared of any data and no grading reports pull data from the history, they only pull data from the final reporting table. I'm not sure why this was how the user community designed Moodle but I know in our case it was almost the flip flop of what we needed, so I changed our Moodle so that when the student is unenrolled from one course, the grades still stay in the system. And when they are re-enrolled to the course at a later time, that is when we delete the previous final grades. The history of grades is still there in case the instructor wants to use any number of the scoring mechanisms that aggregates results in the future (I suppose).

In reply to Perry Way

Re: Gradebook is empty when I re-enroll students

by brian kremer -

Perry,

Greetings. How did you modify your Moodle so that when the student is unenrolled from one course, the grades still stay in the system?

Thank you! 

In reply to brian kremer

Re: Gradebook is empty when I re-enroll students

by Perry Way -

what I did was simply comment out line #1481 in /lib/enrollib.php where it calls:

grade_user_unenrol($courseid, $userid);

This is Moodle 2.7.x by the way..