iamjustkoi / StudyTimeStats

Customizable statistics add-on for Anki.
https://ankiweb.net/shared/info/1247171202
MIT License
21 stars 4 forks source link

Multiple uses of %day_avg_hrs give different results based on order #52

Closed TommyAmberson closed 9 months ago

TommyAmberson commented 9 months ago

Bug/Issue Description When there are more than one widgets that use %day_avg_hrs, only the first one seems accurate. I can rearrange them and they change values based on the order.

To Reproduce Steps to reproduce:

  1. from the default settings change both widgets 'Output' to '%range_hrs / %days = %day_avg_hrs' (or just '%day_avg_hrs' but this way you can see that one of them is wrong)
  2. Click on 'OK' and note the values
  3. Go back to the settings and reorder the widgets
  4. The times have completely changed

Screenshots/Visuals image image reorder image image

System/Debug Info Anki 23.12.1 (1a1d4d54) (ao) Python 3.9.15 Qt 6.6.1 PyQt 6.6.1 Platform: Linux-6.5.0-15-generic-x86_64-with-glibc2.35

===Add-ons (active)=== (add-on provided name [Add-on folder, installed at, version, is config changed]) Advanced Browser ['874215009', 2023-10-21T08:34, 'None', ''] Anki Simulator ['817108664', 2023-11-06T11:26, 'None', ''] Batch Editing ['291119185', 2023-10-25T18:38, 'None', ''] FSRS4Anki Helper ['759844606', 2024-02-18T03:32, 'None', mod] More Overview Stats 21 ['738807903', 2021-07-30T13:13, 'None', ''] Study Time Stats ['1247171202', 2024-02-05T08:03, 'None', '']

===IDs of active AnkiWeb add-ons=== 1247171202 291119185 738807903 759844606 817108664 874215009

===Add-ons (inactive)=== (add-on provided name [Add-on folder, installed at, version, is config changed]) Fastbar- with nightmode support ['46611790', 2023-06-27T05:47, 'None', ''] Set Card Ease ['1387847178', 2022-12-26T02:44, 'None', mod]

Additional Context

TommyAmberson commented 9 months ago

It seems to use the range of the first '%day_avg_hrs' instead of the correct range given in the options

iamjustkoi commented 9 months ago

Should be fixed in the latest release! Thanks again for reporting and submitting the pull requests! :D