Hi dears,
I used moodle 3.0 in a school, when i want add a new item to gradebook or change number of old items or shifting item and categories, I see high time to runtime for that works.
When I check the relevant codes, I realized that the reason for this is high time for implementation of grade_regrade_final_grades() in lib/gradelib.php .
in shifting item and categories most time is in grade_regrade_final_grades().
in updating gradebook grade_regrade_final_grades() is call in update_final_grade() that this call in 3 Nested foreach loop in process_data() in grade/report/grader/lib.php.
now my question is why this code run high time?
Is this type of coding in grade_regrade_final_grades() the most optimal way possible?
What is the solution to reduce the time of implementation of this sections?
thanks a lot