Skip to content
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

Avoid rounding final score during bulk grade export #1860

Merged
merged 2 commits into from
Mar 31, 2023

Conversation

damianhxy
Copy link
Member

Description

Remove rounding of floats when computing total score during bulk grade export.

Motivation and Context

Currently, the total column is rounded to 1 decimal digit. This means that the total and hence the student's semester grade might be incorrect.

Closes #1859

How Has This Been Tested?

Make a student submission, annotate it with e.g. 0.12345. Bulk export grades.

Before
Screenshot 2023-03-28 at 23 52 57

After
Screenshot 2023-03-28 at 23 52 41

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have run rubocop for style check. If you haven't, run overcommit --install && overcommit --sign to use pre-commit hook for linting
  • My change requires a change to the documentation, which is located at Autolab Docs
  • I have updated the documentation accordingly, included in this PR

Copy link
Contributor

@victorhuangwq victorhuangwq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be a situation where completely not rounding it is an issue?

Approved the PR in advance however.

@damianhxy
Copy link
Member Author

Would there be a situation where completely not rounding it is an issue?

Approved the PR in advance however.

I don't think so -- the export is meant for external use, and even if an instructor were to massage the data for an import, the code calls Float anyway:

Screenshot 2023-03-29 at 20 51 37

@damianhxy damianhxy added this pull request to the merge queue Mar 31, 2023
Merged via the queue into master with commit b40b592 Mar 31, 2023
@damianhxy damianhxy deleted the gradeexport-remove-rounding branch March 31, 2023 01:58
20wildmanj added a commit that referenced this pull request Apr 8, 2023
* Fix bug in GitHub api rate limit check (#1821)

Fix buggy code

* Update docker compose docs (#1823)

* Update docker compose docs

* Add make warning

* Update Export / Import Assessment to support more fields, make importAsmtFromTar and importAssessment more robust (#1822)

* - Lint ruby files within spec/

* Add more fields to yml serialization of assessment
Add error checking to import assessments (still some errors)

* add check to ensure asmt name is valid for import

* remove redundant text

* create assessment using factory bot, jank test for assessment export

* - Add success flash to assessment import
- Add a bunch of testcases for bad assessment imports
- Modify create_course_with_many_students to handle custom assessment creation, do validation on assessment name

* rubocop style

* Jump to currently enrolled course (#1812)

* Modifications for RuboCop style

* Update Manage Submissions test specs to work regardless of jump to course logic

---------

Co-authored-by: Damian Ho <damian_ho_xu_yang@yahoo.com>

* Bump rack from 2.2.6.2 to 2.2.6.3 (#1828)

Bumps [rack](https://github.com/rack/rack) from 2.2.6.2 to 2.2.6.3.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](rack/rack@v2.2.6.2...v2.2.6.3)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix bug where course gets created even if there are errors (#1820)

* Add required fields to html for name and instructor email

* Destroy course if instructor email is invalid

* Change required syntax to favored form

* Fix annotated PDF download when global annotation is present (#1833)

Skip if coordinate is nil

* Course start/end date nil checks (#1834)

Add nil check for course start and end dates

* Bump rack from 2.2.6.3 to 2.2.6.4 (#1835)

Bumps [rack](https://github.com/rack/rack) from 2.2.6.3 to 2.2.6.4.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](rack/rack@v2.2.6.3...v2.2.6.4)

---
updated-dependencies:
- dependency-name: rack
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add LTI Configuration to "Manage Autolab" Dropdown, Update docs and gitignore (#1817)

* begin updating lti integration documentation and add feature documentation

* - update documentation for LTI configuration, linking, installation
- add images for LTI linking for documentation
- update gitignore, add ignore node_modules (for stylelint)

* Revise LTI docs to make instructions more clear

---------

Co-authored-by: Victor Huang <victorhuangwq@gmail.com>

* Remove unused "Additional Submission Form" feature code (#1830)

* Remove dead code

* Update schema version

* Fix thead alignment in manage submissions (#1838)

* Add sticky to thead css

* Remove js file that added a new thead element

* Update MacOS install docs to use Homebrew (#1841)

Update docs to install homebrew first, then install rbenv and ruby-build
- add troubleshooting help for OpenSSL related error

* Update Docs to use bash to run init-letsencrypt.sh instead of sh (#1842)

Use bash to run init-letsencrypt.sh instead of sh

* Allow GitHub submissions to specify commit SHA (#1836)

* Add logic to display commit sha and messages

* Add logic to pull correct commit

* Updating formatting

* Remove unnecessary params

* Indent update_commits

* Clear commit dropdown when switching repository

* Use Factory Bot to Replace Autopopulated Database for Testing (#1837)

* starter code from pair prog sesh! working factories for now

* e

* very inconspicuous commit message where assessments controller gets updated with new sets and factory functions  e

* update users_controller_spec to use new contexts, use shared_examples

* update submissions_controller_spec to use new contexts

* update admins_controller_spec, attachments_controller_spec (not fully working but going to be deprecated anyways)

* - update courses_controller_spec
- update schedulers_controller_spec
- add nicknames to students in create_course_with_users in order to bypass nickname creation redirect (this fixes attachments controller broken test)

* - fix features/manage_submissions_spec.rb to use factory
- create controllers_shared_context to facilitate easy use of course and users without having to create a new course / users for every context
- begin updating api tests

* update controller spec to use new shared context

* fix config module not being loaded for assessment

* - update factories and create_course to build submissions for students, along with scores
- create problems as well
- fix more tests

* all pre-existing tests now work with FactoryBot
- add create_autograded_course to make a "dummy" autograded course (we can't talk with tango but it has all the files / config of an autograded assessment)
- create autograder factory
- update assessment to by default have group size of 1 (should be individual assessment)

* - re-enable autograding_roundtrip_spec
- refactor get_course_id_by_uid to get_first_cid_by_uid

* Update factory for submissions due to db field being removed, test setup

* Remove commented out code

* test for create when user is instructor

* moved behavior to shared example

* annotations specs for expected failures of #create

* delete dead code

* factory for annotations

* Address PR nits

---------

Co-authored-by: Joanna Ge <joannage87@gmail.com>
Co-authored-by: Joey Wildman <josephwildman88@gmail.com>

* Grade Export: Move total column to be after email (#1829)

* Move total to after email

* Fix typo on bulkGrade page

* Add warning to documentation about RAM requirements (#1847)

* Update documentation

* Add warning to osx and ubuntu pages

* Shift admonition to overview page

* Avoid rounding final score during bulk grade export (#1860)

Avoid rounding final score

* Version dropdown: jump to same file if it exists (#1840)

* Update paths

* Add indicator and jump to correct file

* Extract dropdown html

* Update dropdown when switching files

* Update pdfUrls to use _path methods

* Add newline

* Add missing semicolon to view.js.erb

* Use template strings for this.value

* Use document.location.href

* Don't put asterisk for current version

* [Breaking] Create per-user handin subdirectories (#1831)

* Create per-user subdirectories

* Create per-user archive subdirectories

* Use id for archive filename

* Refactor archive_handin

* Implement Backwards Compatibility to Per-user Handin Subdirectories (#1846)

* initial patch code to fall back to old handin file path if new handin file not found

* - update path finding functions to check for existence old path/file first, then return new path

* address newline nit

* actually address newline nit

---------

Co-authored-by: Joey Wildman <josephwildman88@gmail.com>

* [Cherry Picked] Adds modifySubmissionScores hook  (#1866)

Adds modifySubmissionScores hook (#1832)

* Adds modifyScores hook

* change name from modifyScores to modifySubmissionScores

* Add problems to the modifySubmissionScores hook

* adds assessment variable hook

* Add a default lookback limit to previous_submissions

* Fix order

* Append error message to feedback

* Remove comment

* Add filter on exclude autograding in progress

* Exclude autograding

* Add docs for modify submission score

* Fix error, and add reference to argument types

* Refactor develop tests to use new framework, commit correct schema.rb (for mysql)

* Run rubocop

* Clean up context blocks in attachments_controller_spec by defining u at top of context block instead for each shared example

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Evan Shi <14984764+evanyeyeye@users.noreply.github.com>
Co-authored-by: lykimchee <lchaeryn5863@gmail.com>
Co-authored-by: Damian Ho <damian_ho_xu_yang@yahoo.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: jlge <45646252+jlge@users.noreply.github.com>
Co-authored-by: Victor Huang <victorhuangwq@gmail.com>
Co-authored-by: Umar Alkafaween <30433769+umar221b@users.noreply.github.com>
Co-authored-by: Michelle Liu <mliuu3259@gmail.com>
Co-authored-by: Joanna Ge <joannage87@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid rounding of total score in bulk export grades
2 participants