-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
4.4.8, 4.5.4, 5.0
While developing a local plugin that interacts with the gradebook backup structure, I encountered a dependency issue related to the timing of when local plugin structures are added.
In the original code, the add_plugin_structure() call was made immediately after $grade_item was defined, before the grade item hierarchy was fully constructed (i.e., before it was attached to its child elements and added to the gradebook structure). This limited the ability to correctly access and rely on the fully initialized grade_item structure during plugin backup processing.
To resolve this, I relocated the add_plugin_structure() call to occur after the full construction of the gradebook tree, ensuring that all grade items and their children are in place before any plugin structure is added.