-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature:RainbowGrades] Adding Link to Gradeables #83
base: main
Are you sure you want to change the base?
Conversation
Added a function getCourseDetails(), which returns the base url, term, and course, which helps in getting the total link to a specific gradeable on the output page. These changes are untested.
From the MakefileHelper, I used REPORTS_DIRECTORY to make the link work for all courses and semesters. Fixed the URL.
Made an extra check to see that the gradeable has actually been released to view the link to the gradeable itself, otherwise this would be useless. Also, added the blue box permanently to be displayed along with the gradeable names that have links.
The logic here is that starting from DISPLAY_GRADE_DETAILS, I find a random user (the first user after AVERAGE AND STDDEV, could be the instructor who opened the course). Then, I call the getGreadeableType function to go to their summary json and scan for the gradeable id. If the gradeable id is found, I return the value of gradeable_type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code changes generally make sense. The URL building should probably be relooked at for security reasons.
But everything else looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails & crashes when I run rainbow grades on my local machine vs on the server.
@@ -140,6 +141,54 @@ int convertMajor(const std::string &major) { | |||
|
|||
// ========================================================== | |||
|
|||
std::tuple<std::string, std::string, std::string> getCourseDetails() { | |||
const char* reportsDir = std::getenv("REPORTS_DIRECTORY"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this directory does not exist when instructor runs rainbow grades locally.
Closes #10433 (Submitty/Submitty#10433)
Credit to @oliiso for making PR #81 and making the initial starting point to work off of.
What is the current behavior?
Currently, students can only see their grade for a specific gradeable on Rainbow Grades, and would have to search through gradeables to see their full report.
What is the new behavior?
Now, when students see their grade on Rainbow Grades, they can just click on it and it sends them to see their full report directly. This is more convenient and helpful for students. Note that for a gradeable to have a link, the gradeable must be released AND its type must be an Electronic File Upload, nothing else will work.
Other information?
This PR fixes and reimplements the code made in PR #81.
To test: Go to a course --> Make sure Rainbow Grades viewing is enabled --> Generate Grade Summaries --> Web-Based Rainbow Grades Generation --> (Drop items into bucket and display at least grade_summary and grade_details) --> Build --> View changes on Rainbow Grades by clicking on a gradeable.