Notify users if they have submitted a text answer but sent no description#1421
Notify users if they have submitted a text answer but sent no description#1421michalstanik1 wants to merge 4 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1421 +/- ##
==========================================
+ Coverage 74.29% 74.39% +0.10%
==========================================
Files 138 138
Lines 6482 6492 +10
Branches 822 824 +2
==========================================
+ Hits 4816 4830 +14
+ Misses 1520 1518 -2
+ Partials 146 144 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
gardenerik
left a comment
There was a problem hiding this comment.
Zabezpečme, prosím, nech ak by sa ďalšia súťaž rozhodla mať textové submity, nech im to tam automaticky nesvieti.
| msgstr "Zahrnúť všetky semináre" | ||
|
|
||
| msgid "You have submitted a text answer but have not submitted a description. This may lead to point deduction." | ||
| msgstr "Máš odovzdanú textovú odpoveď, ale žiaden popis. Toto môže viesť k strate bodov." No newline at end of file |
There was a problem hiding this comment.
| msgstr "Máš odovzdanú textovú odpoveď, ale žiaden popis. Toto môže viesť k strate bodov." | |
| msgstr "Máš odovzdanú textovú odpoveď, ale žiaden popis. Toto môže viesť k strate bodov." | |
| and task.round.can_submit | ||
| and user_submits.filter(task=task, submit_type=SUBMIT_TYPE_TEXT, points__gt=0) | ||
| and not user_submits.filter(task=task, submit_type=SUBMIT_TYPE_DESCRIPTION) | ||
| ): |
There was a problem hiding this comment.
Toto má potenciál spraviť pomerne veľké množstvo dotazov na databázu.
There was a problem hiding this comment.
Máš nejaký návrh, ako to spraviť lepšie? Ak to bude iba 1 query a toto finálne filtrovanie sa urobí čisto v Pythone, pomôže to alebo sa to zhorší?
There was a problem hiding this comment.
@gardenerik Vieš sa, prosím, vyjadriť k tomuto? Ako zefektívniť ten dotaz na databázu?
There was a problem hiding this comment.
asi by som si vybral všetky submity, ktoré ťa zaujímajú a potom cez nejaký dict zisťovať, či pre danú úlohu (ne)existujú oba
|
Takže navrhuješ tam pridať podmienku typu "a zároveň súťaž je suši"? Rozmýšľal som nad tým a je rovnako možné, že ďalšia súťaž s textovými submitmi bude tiež chcieť nejaké dôkazy/popisy, ako že nebude chcieť. |
|
V tomto stave ideálne asi ako konštanta v pravidlách súťaže? 🤔 |
…tion