[Bugfix:RainbowGrades] Fix manual generation banner#13026
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #13026 +/- ##
============================================
+ Coverage 21.09% 21.10% +0.01%
+ Complexity 10115 10109 -6
============================================
Files 279 279
Lines 38167 38145 -22
Branches 585 585
============================================
Hits 8051 8051
+ Misses 29544 29522 -22
Partials 572 572
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
GarvitKhandelwal31
left a comment
There was a problem hiding this comment.
First I checkout the main branch, went to a new course with rainbow grades enabled, then I could verify that the warning banner did appear even though the rainbow grades were not generated manually.
Then I checkout this PR's branch, went to a course with rainbow grades enabled, when I clicked build, the yellow banner did not appear this time. Then I created rainbow grades manually , this time the yellow banner appeared correctly.
When I clicked 'build' again the yellow banner disappeared.
The old logic relied on checking the timestamp of a meta file inside rainbow_grades/Build/ . Previously it was assumed that if the meta file was missing or older than the HTML reports that it meant the instructor must have manually uploaded the grades. This was the reason of false positives.
The current logic of checking the 'twin' files with the 'served' file is accurate and more robust.
### Why is this Change Important & Necessary? In [PR#13026](#13026), I added a reload on build success to clear the manual generation banner if it was present. This had the side effect of changing the message shown by the output of building rainbow grades, which broke the grades configuration spec. The reload would also clear the log button, so this change is better reverted and I can work on a fix for clearing the banner in another PR. ### What is the New Behavior? The page will no longer reload on a successful build of rainbow grades. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Checkout the branch and do submitty_install_site 2. Do a manual generation of rainbow grades 3. After the banner appears, click build in the UI 4. The page should no longer reload ### Other information N/A
Why is this Change Important & Necessary?
Fixes Issue#13018
The rainbow grades manual generation warning banner has been constantly present in the grades configuration page, even on brand new courses. It is important to have this function working for instructors.
What is the New Behavior?
Prior, the manual generation function was checking individual summaries against the build files. Now, the function compares the html files in
summary_html/andindividual_summary_html/to see if there are differences. If there are, then the manual generation warning banner is displayed.What steps should a reviewer take to reproduce or test the bug or new feature?
Go to a course with rainbow grades enabled
Go to the grades configuration page and click build
See that the banner does not appear
Follow the instructions for manual generation here
After pushing the manually generated files to the server, check that the banner appears in the grades configuration page
With the banner present, build rainbow grades again and verify the banner disappears
Here is an example of what the banner looks like:

Automated Testing & Documentation
This feature is tested by E2E tests.
Other information
Not a breaking change.
No migrations.
No security concerns.