Commit b2e8b21
committed
Unify task score computation into _compute_task_scores
Replace separate _compute_public_task_scores and sidebar-specific logic with a single _compute_task_scores method that handles both public and tokened/total scores. The new method accepts actual_phase and a hide_zero_max_public flag (default true) to control whether tasks with zero public max score are shown. Update callers in contest/handlers/contest.py and contest/handlers/main.py to use the unified method and pass appropriate hide_zero_max_public values, preserving previous visibility behavior.1 parent 7760b48 commit b2e8b21
2 files changed
Lines changed: 12 additions & 42 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 215 | + | |
249 | 216 | | |
250 | 217 | | |
251 | 218 | | |
252 | 219 | | |
| 220 | + | |
253 | 221 | | |
254 | | - | |
| 222 | + | |
255 | 223 | | |
256 | | - | |
257 | | - | |
258 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
259 | 227 | | |
260 | 228 | | |
261 | 229 | | |
| |||
288 | 256 | | |
289 | 257 | | |
290 | 258 | | |
291 | | - | |
292 | | - | |
| 259 | + | |
| 260 | + | |
293 | 261 | | |
294 | 262 | | |
295 | 263 | | |
| |||
356 | 324 | | |
357 | 325 | | |
358 | 326 | | |
359 | | - | |
| 327 | + | |
360 | 328 | | |
361 | 329 | | |
| 330 | + | |
362 | 331 | | |
363 | 332 | | |
364 | 333 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
0 commit comments