Closed eliknebel closed 3 months ago
Also, I see task 2 of "Call line items creation function automatically during LMS section creation". I do not believe that we should do this. Imagine an instructor that is creating a course section with then the intention of remixing to remove some units or modules that they do not plan to cover. A feature where these line items were created automatically at section creation time would populate the LMS gradebook with graded pages that the instructor isn't going to use.
I could be onboard with "Adding an optional feature of course section creation, where we let LMS course section instructors choose if they want to have the system populate the LMS gradebook line items". But that seems like too much work given this stage of development.
Couldn't the "PreviousNextIndex", which is precomputed and already stored in the section record be traversed to determine the page ordering?
I don't initially see any prior art here to traverse this cached index, I suppose we could write a map_reduce function that performs an in-order traversal over this index to build the list of ordered graded pages but this might take a bit more work to optimize this "Update LMS Line Items" that theoretically should only need to be run once per course section
https://eliterate.atlassian.net/browse/MER-3125
This PR changes the "Update LMS Line Items" function to create and update graded line items in the order they appear in the hierarchy, and append all non-hierarchical pages to the end.
This is a stop-gap implementation in order to fix the issue short term of gradebook columns appearing in a seemingly random order. Other improvements to be made here in the future are:
This was tested using a Canvas instance on the Chem course and behaved as expected, but it would be good to test on the LMS' referenced in the ticket, Brightspace and D2L.