I'm beginning to think that rather than combining the two separate functions I created (one for grade_events and one for grade_events_grades) into a single function that instead I may want to nest both of these functions in the existing gradebook function. Having the functions separate helped me to learn how things work but logistically it makes sense to me to have:
<gradebook>
<grade_events>
<grade_event>
<grade_event_grades>
</grade_event_grades>
</grade_event>
<grade_events>
</gradebook>
in the moodle.xml file; however, if someone were to try to restore a Moodle 1.8 GBPv2 course to a Moodle 1.9 installation I wonder if it would be better to have so that the grade events are kept separate from the gradebook as follows:
<gradebook></gradebook>
<grade_events>
<grade_event>
<grade_event_grades>
<grade_event_grade>
</grade_event_grade>
</grade_event_grades>
</grade_event>
</grade_events>
My working patch currently uses two functions helped me to work on building up the smaller pieces and uses:
<gradebook>
</gradebook>
<grade_events>
<grade_event></grade_event>
</grade_events>
<grade_events_grades>
<grade_event_grade></grade_event_grade>
</grade_events_grades>
As a result, I'm torn between option 1 which is IMO the purest patch that might not import well beyond 1.8 installations with GBPv2 (-1), option 2 which seems to provide the best of both worlds, and option 3 which is functional even if not the most efficient way of doing things at least it works (right now). I think for now, I'm going to go with what is working, commit it and then work on improving it. I'm open to comments, suggestions, preferences, etc. Peace - Anthony
I'm beginning to think that rather than combining the two separate functions I created (one for grade_events and one for grade_events_grades) into a single function that instead I may want to nest both of these functions in the existing gradebook function. Having the functions separate helped me to learn how things work but logistically it makes sense to me to have:
<gradebook>
<grade_events>
<grade_event>
<grade_event_grades>
</grade_event_grades>
</grade_event>
<grade_events>
</gradebook>
in the moodle.xml file; however, if someone were to try to restore a Moodle 1.8 GBPv2 course to a Moodle 1.9 installation I wonder if it would be better to have so that the grade events are kept separate from the gradebook as follows:
<gradebook></gradebook>
<grade_events>
<grade_event>
<grade_event_grades>
<grade_event_grade>
</grade_event_grade>
</grade_event_grades>
</grade_event>
</grade_events>
My working patch currently uses two functions helped me to work on building up the smaller pieces and uses:
<gradebook>
</gradebook>
<grade_events>
<grade_event></grade_event>
</grade_events>
<grade_events_grades>
<grade_event_grade></grade_event_grade>
</grade_events_grades>
As a result, I'm torn between option 1 which is IMO the purest patch that might not import well beyond 1.8 installations with GBPv2 (-1), option 2 which seems to provide the best of both worlds, and option 3 which is functional even if not the most efficient way of doing things at least it works (right now). I think for now, I'm going to go with what is working, commit it and then work on improving it. I'm open to comments, suggestions, preferences, etc. Peace - Anthony