relate icon indicating copy to clipboard operation
relate copied to clipboard

Fix #263, #417, #430 and #457.

Open dzhuang opened this issue 8 years ago • 10 comments

#263 #417: (Bulk) Regrade/recacluate resulted in wrong gradechange state (percentage) when use_latest #430: Reopening latest session if use_latest should result in NONE, instead of the grades of that session or the grades of the second latest session. #457: Failure to stringify graded gradeChanges with state None.

  • [ ] Naming of newly introduced field effective_time in GradeChange
  • [ ] In terms of backward compatibility, is the new migration right?
  • [x] More tests to cover changes

cc @inducer

dzhuang avatar Feb 20 '18 16:02 dzhuang

Codecov Report

Merging #466 into master will increase coverage by 0.05%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #466      +/-   ##
==========================================
+ Coverage   96.36%   96.41%   +0.05%     
==========================================
  Files          45       45              
  Lines       11046    11100      +54     
  Branches     2055     2069      +14     
==========================================
+ Hits        10644    10702      +58     
+ Misses        342      340       -2     
+ Partials       60       58       -2
Impacted Files Coverage Δ
course/grades.py 97.12% <ø> (+0.29%) :arrow_up:
course/receivers.py 100% <100%> (ø) :arrow_up:
course/flow.py 99.2% <100%> (+0.01%) :arrow_up:
course/models.py 100% <100%> (+0.26%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d0c89e4...58b3421. Read the comment docs.

codecov[bot] avatar Feb 20 '18 16:02 codecov[bot]

@inducer Can you review this? Thanks. The two TODOs need your verfication, thanks.

dzhuang avatar Feb 22 '18 17:02 dzhuang

@inducer Can you look at this PR and make sure the migration is correct? I wish to integrate this into my instance soon, new semester is coming. Thanks!

dzhuang avatar Feb 23 '18 16:02 dzhuang

For record:

This might result in inconsistency when grade changes are ordered improperly.

grades accumulation strategy: use_latest A: grade time 2015 B: grade time 2016, flow completed 2014 C: grade time 2017 D: grade time 2018, flow completed 2013 Then A < B < C

But also D < B and C < D, which is a direct contradiction.

C's grade percentage should be the overall grade.

dzhuang avatar Feb 24 '18 16:02 dzhuang

@inducer What about this? I wish to put the exempt issue later, since it's only debug-related (currently).

dzhuang avatar Feb 26 '18 07:02 dzhuang

This is complicated (and terrifying) to review because of the long-term consequences. I just didn't have the time today. I'll try hard to get to it tomorrow night. Sorry!

inducer avatar Feb 26 '18 07:02 inducer

NVM and Thanks alot.

dzhuang avatar Feb 26 '18 07:02 dzhuang

Sorry for pushing you here @inducer. It seems I'll have to merge this into my instance tomorrow, if no progress is made here.

dzhuang avatar Mar 01 '18 18:03 dzhuang

In cases when reopening a session, https://github.com/inducer/relate/blob/855801d463120e0fc74de08466e5d4ac39bac46d/course/flow.py#L510 ~~and https://github.com/inducer/relate/blob/855801d463120e0fc74de08466e5d4ac39bac46d/course/flow.py#L567~~ should also be adjusted.

Update: This seems won't be affected.

dzhuang avatar Apr 05 '18 14:04 dzhuang

@inducer I've updated the code, looking forward to your review some day (not urging you to do it now, but hope that it will be merged someday).

dzhuang avatar Apr 25 '18 06:04 dzhuang