backend icon indicating copy to clipboard operation
backend copied to clipboard

Remove bonus xp

Open thortol opened this issue 11 months ago • 5 comments

Description

Resolves #2226.

There are occasional "low effort" submissions from students to gain the early submission bonus XP. This PR fixes this while not changing the workload for the avengers.

Previously, bonus XP will be awarded once students finalize submission. Now, when a student finalizes submission, there will be a check whether the autograder scored the submission as 0 or not. If a 0 was given, bonus XP will be 0. Else it will be the full amount. After the tutor marks finish the submission, another check will be done. If the submission is still a 0. bonus XP will be 0. Else, the full amount will be given.

Type of change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update
  • [ ] Code quality improvements

How to test

  • Case 1: If the submission is 0
    • Submit a submission where the autograder gives 0
    • Go to the grading page and grade the submission but do not give any xp
    • The bonus xp shown is 0
  • Case 2: If the autograder gives xp
    • Submit a submission where the autograder does not give 0 (paths)
    • Go to the grading page the submission bonus xp is given
  • Case 3: If the autograder is 0 but the avenger awards xp
    • Submit a submission where the autograder gives 0
    • Go to the grading page and grade the submission and give some xp
    • The bonus xp shown is given

Checklist

  • [x] I have tested this code
  • [ ] I have updated the documentation

thortol avatar Mar 17 '24 07:03 thortol

Coverage Status

coverage: 94.653% (+0.03%) from 94.625% when pulling 7e2b1547fe4fb9fced37e77dd28ec594f7c8ab92 on thortol:remove-bonus-xp into d0fc34fa1c537c0115a13e8251e09dd9890c63aa on source-academy:master.

coveralls avatar Mar 17 '24 07:03 coveralls

Can we fix the tests?

RichDom2185 avatar Mar 21 '24 11:03 RichDom2185

I fixed the test cases but I found a bug where the bonus xp is given through current time not submission time. This creates a bug where bonus xp is given when the grader grades rather than when the user submits. I'll be working on fixing this before it can be merged.

thortol avatar Mar 23 '24 13:03 thortol

Can I check that this does not require any frontend change?

RichDom2185 avatar Apr 06 '24 12:04 RichDom2185

Yes, this does not require any frontend change.

thortol avatar Apr 06 '24 14:04 thortol