mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
8e73a9ec19
Problem: In grade_edittree_column_status::get_category_cell, an assumption was made that $category->grade_item is always populated. However, this was not guaranteed, leading to potential issues. Solution: To ensure $category->grade_item availability, a $category->load_grade_item(); call was introduced in grade_edittree_column_status::get_category_cell. This guarantees safe usage of $category->grade_item. Furthermore, in grade_edit_tree::build_html_tree, $category->get_grade_item() was replaced with $category->load_grade_item() for enhanced reliability and potential performance improvement. Explanation: These changes enhance robustness and efficiency in gradebook. Addressing incomplete grade item handling improves code reliability and user experiences.