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

Confirm merit list and task helper functions logic and tests #2556

Open
4 tasks
KoWeiJAC opened this issue Sep 4, 2024 · 0 comments
Open
4 tasks

Confirm merit list and task helper functions logic and tests #2556

KoWeiJAC opened this issue Sep 4, 2024 · 0 comments
Assignees

Comments

@KoWeiJAC
Copy link
Contributor

KoWeiJAC commented Sep 4, 2024

Background

When adding tests of #2529, found there are some logic having conflicts, it may because of the merit list is developing.
If the merit list is finished, it may worth to confirm following logic conflicts still remain or not.

In src/views/Exercise/Tasks/Task/Finalised/meritListHelper.js

  • totalPassed(task, scoreType, scores)
    • Confirm if this change work. This change is for the function can accept the return values of scores(task, scoreType, exerciseDiversity) for scores parameter and pass the tests.
    • related tests
      • [totalPass] should calculate total passed correctly without overrides
      • [totalPass] should calculate total passed correctly with overrides
      • [scores] should correctly calculates cumulative diversity data
    Screenshot 2024-09-04 at 14.48.35.png
  • xlsxData(didNotTake, failed, task, diversityData, type)
    • Confirm this nested condition blocks using the same type parameter comparing with different constants, the inner block may never be excuted.
    • Related test:
      • [downloadMeritList] should handle QUALIFYING_TEST type correctly
    Screenshot 2024-09-04 at 15.01.49.png
  • getDownloadTypes(task)
    • Confirm if task affect the download types.
    Screenshot 2024-09-04 at 15.09.20.png

In src/helpers/taskHelper.js

  • function markingScheme2ColumnHeaders(markingScheme)
    • Confirm if other marking schema type needs to add headers as well to match the function markingScheme2Columns(markingScheme, editable = false) logic
    • Related tests:
      • [markingScheme2ColumnHeaders] should generate correct headers for a simple marking scheme
      • [markingScheme2ColumnHeaders] should handle mixed types correctly
      • [markingScheme2ColumnHeaders] should handle multiple groups and non-group items
    Screenshot 2024-09-04 at 15.17.12.png
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

No branches or pull requests

2 participants