harvard-lil / h2o

H2O is a web app for creating and reading open educational resources, primarily in the legal field
https://opencasebook.org
GNU Affero General Public License v3.0
35 stars 30 forks source link

Add new timestamps for recent casebooks in reporting #2022

Closed lizadaly closed 1 year ago

lizadaly commented 1 year ago

@cath9 wanted to see which authors had recent activity on casebooks in reporting.

This modifies all professor-level reports to include two new columns:

This is distinct from the most recently created casebook, which may be an obsolete or unused clone and while technically be more recent, actually not have more recent activity.

"most recently modified" here means any modification to any of the ContentNode objects (so, the content of the chapter or resource) OR any modification to the Casebook object itself. It doesn't include any annotations added to it, including elisions, though the method could be modified to do that. (Ideally H2O would track last-mod date at the casebook level holistically through signals or some other method.)

(Also changed these methods to return strings rather than datetime objects to force Excel to default to understanding them as dates.)

codecov-commenter commented 1 year ago

Codecov Report

Merging #2022 (f1ea273) into develop (87fb39a) will decrease coverage by 0.10%. The diff coverage is 60.00%.

:exclamation: Current head f1ea273 differs from pull request most recent head fd4ef36. Consider uploading reports for the commit fd4ef36 to get more accurate results

@@             Coverage Diff             @@
##           develop    #2022      +/-   ##
===========================================
- Coverage    76.68%   76.59%   -0.10%     
===========================================
  Files           64       64              
  Lines         7034     7066      +32     
===========================================
+ Hits          5394     5412      +18     
- Misses        1640     1654      +14     
Impacted Files Coverage Δ
web/reporting/admin/views.py 98.08% <ø> (ø)
web/reporting/models.py 86.20% <60.00%> (-11.42%) :arrow_down:
bensteinberg commented 1 year ago

Sometimes "approved" is not really approval, I guess.