-
Notifications
You must be signed in to change notification settings - Fork 23
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
Update macOS scripts and support multiple types of GPA (new) #101
Conversation
…. Made function for toggling between weighted, unweighted, and % GPA (only works for current quarter right now... Also, There is a bu where if you select another quarter you cannot return to the initial quarter and have it work properly...).
Apparently kdk1616's editor completely changed the formatting of the README. As there were no substantial changes, I have reverted all changes that were made to the README.
…riable for current term
There is a function in extraFunctions.js to convert a percentage to a GPA out of 4.0; the inline code duplicating that behavior has been replaced by a function call.
This is a minor change, as the currently selected term is the same as the current term when Aspine is first loading, but it aids code readability for the refactoring to come.
Abstracting away the iterator reduces the potential for errors and simplifies the code.
The GPA and calcGPA attributes of each term's object under tableData are now themselves objects with attributes "percent", "outOfFour", and "outOfFive". This approach is more scalable and also allows all GPAs to be returned by a single function, computeGPA, which has been modified to compute all three formats of GPA.
The current quarter need not be hardcoded anymore. Also, the refactored GPAType uses jQuery and is more readable.
Because the selection of the <select> element is a string and it is being compared to the number zero, I have changed triple equals to double equals in order to invoke type coercion.
2c334f3
to
e6a8705
Compare
49458de
to
5a79cb1
Compare
Instead of taking `type` as a parameter and giving a different value depending on the type, cumGPA() now returns an object containing all GPA types.
The "GPA Type" button now controls the GPA type of all terms in the dropdown instead of only the selected one, and the term can be changed while a non-percent GPA type is selected.
This makes the UI work more intuitively and allows the term dropdown to resize horizontally as needed.
Fix a bug in which fetching a new term would overwrite the current term data
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.
Overall great work! Two minor comments.
Fix some bugs that would be encountered if a user modifies some assignments, thus generating a calculated GPA, in any one of the non-percent GPA types.
I have addressed every issue that I have identified, except for redesigning the cumulative GPA indicator so that it updates along with the quarters in showing percent, unweighted, or weighted instead of just showing all three always. It would also be nice to have a calculated cumulative GPA which uses calcGPA for each quarter (falling back to GPA if needed). |
Instead of having a rich-text presentation of the cumulative GPA showing all GPA types at once, make it cycle through the GPA types along with the quarters (current, Q1, Q2, Q3, Q4).
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.
Looks good to me
I approve! |
This PR contains two features.