Bug 387602 - StatisticsView doesn't display correct values
Summary: StatisticsView doesn't display correct values
Status: RESOLVED FIXED
Alias: None
Product: parley
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: parley bug tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-04 20:32 UTC by Hartmut Riesenbeck
Modified: 2018-04-18 16:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hartmut Riesenbeck 2017-12-04 20:32:00 UTC
The lesson statistics chart in StatisticsMainWindow shows only the correct values when the widget was just created. Changing practice language, mode or direction doesn't change the displayed percentage values.

Steps to Reproduce: 
1) Open a file in dashboard window
2) Now statistics main window is displayed (with correct values). 
3) Change learning language, practice mode or practice direction

Actual Results:
Percentage values, bar chart colors and tree view headers doesn't change.

Expected Results:
The displayed language in the tree view header should change if language to learn or practice direction was changed. The bar chart and percentage values should change accordingly.
If you change practice mode from e.g. written to gender of nouns, only a subset of vocables will be selected for practice. So the entries count and statistics chart should change. The same should happen for comparisons and conjugation practice.

Version:
Build from latest source code from git repository.
origin/Applications/17.12
Comment 1 Hartmut Riesenbeck 2017-12-12 20:03:49 UTC
Git commit 37fd379bf412fc6cdfc6a1dbe2c09c96f78ae6d1 by Hartmut Riesenbeck.
Committed on 12/12/2017 at 20:01.
Pushed by hriesenbeck into branch 'master'.

Bugfix: StatisticsView doesn't display correct values

Summary:
The color bars in LessonStatisticsView show only the correct values
when the widget was just created. Changing practice language, mode or
direction doesn't change the displayed values.

Added missing method calls in StatisticsMainWindow slot methods.
Implemented improved word counting for gender, conjugation and
comparison practice, to provide correct statistics values for this
practice modes.

Removed wrongly displayed horizontal scroll bar in LessonStatisticsView.
Modified column width calculation, not to use a hard coded magic number,
which does not fit to plasma anymore. Use instead the viewport width of
the LessonStatisticsView widget.

Reviewers: #kde_edu, apol

Reviewed By: apol

Subscribers: apol

Tags: #kde_edu

Differential Revision: https://phabricator.kde.org/D9187

A  +3    -0    .arcconfig
M  +1    -1    src/collection/readonlycontainermodel.h
M  +27   -3    src/statistics/conjugationoptions.cpp
M  +13   -3    src/statistics/conjugationoptions.h
M  +12   -6    src/statistics/lessonstatisticsview.cpp
M  +4    -4    src/statistics/lessonstatisticsview.h
M  +17   -1    src/statistics/statisticsmainwindow.cpp
M  +1    -0    src/statistics/statisticsmainwindow.h
M  +113  -17   src/statistics/statisticsmodel.cpp
M  +22   -2    src/statistics/statisticsmodel.h
M  +82   -10   src/utils.cpp
M  +11   -0    src/utils.h

https://commits.kde.org/parley/37fd379bf412fc6cdfc6a1dbe2c09c96f78ae6d1