Commit 2eca62e6f789d6503823e71f0ac71a2f6f0a8832
1 parent
fedacc1b
Added new statistic presented in user statistics tab.
Showing
2 changed files
with
9 additions
and
3 deletions
dictionary/ajax_user_stats.py
| ... | ... | @@ -252,7 +252,10 @@ def get_semantics_stats(user): |
| 252 | 252 | wrong_frames = 0 |
| 253 | 253 | corr_frames = RealizedSemantics.objects.filter(user_stats__user=user).aggregate(Sum('corr_frames'))['corr_frames__sum'] |
| 254 | 254 | if corr_frames == None: |
| 255 | - corr_frames = 0 | |
| 255 | + corr_frames = 0 | |
| 256 | + part_corr_frames = RealizedSemantics.objects.filter(user_stats__user=user).aggregate(Sum('part_corr_frames'))['part_corr_frames__sum'] | |
| 257 | + if part_corr_frames == None: | |
| 258 | + part_corr_frames = 0 | |
| 256 | 259 | ncorr_frames = RealizedSemantics.objects.filter(user_stats__user=user).aggregate(Sum('ncorr_frames'))['ncorr_frames__sum'] |
| 257 | 260 | if ncorr_frames == None: |
| 258 | 261 | ncorr_frames = 0 |
| ... | ... | @@ -272,7 +275,8 @@ def get_semantics_stats(user): |
| 272 | 275 | 'part_prop_frames': part_prop_frames, |
| 273 | 276 | 'wrong_frames': wrong_frames, |
| 274 | 277 | 'corr_frames': corr_frames, |
| 275 | - 'checked_frames': ncorr_frames+corr_frames, | |
| 278 | + 'part_corr_frames': part_corr_frames, | |
| 279 | + 'checked_frames': ncorr_frames+corr_frames+part_corr_frames, | |
| 276 | 280 | 'made_frames': made_frames, |
| 277 | 281 | 'efficacy': round(efficacy, 2), |
| 278 | 282 | 'added_connections' : added_connections} |
| ... | ... |
dictionary/templates/sel_user_stats.html
| ... | ... | @@ -124,7 +124,7 @@ |
| 124 | 124 | <tr> |
| 125 | 125 | <td class='EmptyCell' colspan=1></td> |
| 126 | 126 | <td class='ColumnHeader' colspan=7>Semantycy:</td> |
| 127 | - <td class='ColumnHeader' colspan=2>Supersemantycy:</td> | |
| 127 | + <td class='ColumnHeader' colspan=3>Supersemantycy:</td> | |
| 128 | 128 | </tr> |
| 129 | 129 | <tr> |
| 130 | 130 | <td class='ColumnHeader'>Kwota za wykonaną pracę:</td> |
| ... | ... | @@ -137,6 +137,7 @@ |
| 137 | 137 | <td class='ColumnHeader'>Skuteczność:</td> |
| 138 | 138 | <td class='ColumnHeader'>Sprawdzone ramy:</td> |
| 139 | 139 | <td class='ColumnHeader'>Poprawione ramy:</td> |
| 140 | + <td class='ColumnHeader'>Częściowo poprawione ramy:</td> | |
| 140 | 141 | </tr> |
| 141 | 142 | <tr> |
| 142 | 143 | <td>{{semantics_work_stats.earned_cash}} zł</td> |
| ... | ... | @@ -149,5 +150,6 @@ |
| 149 | 150 | <td>{{semantics_work_stats.efficacy}} %</td> |
| 150 | 151 | <td>{{semantics_work_stats.checked_frames}}</td> |
| 151 | 152 | <td>{{semantics_work_stats.corr_frames}}</td> |
| 153 | + <td>{{semantics_work_stats.part_corr_frames}}</td> | |
| 152 | 154 | </tr> |
| 153 | 155 | </table> |
| ... | ... |