Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions web/courses/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,8 @@ def observed_students(self):
def student_success(self):
students = self.observed_students()
problem_sets = self.problem_sets.filter(visible=True)
part_count = Part.objects.filter(
problem__problem_set__in=problem_sets, problem__visible=True
).count()
attempts = Attempt.objects.filter(
part__problem__problem_set__in=problem_sets, part__problem__visible=True
)
part_count = Part.objects.filter(problem__problem_set__in=problem_sets).count()
attempts = Attempt.objects.filter(part__problem__problem_set__in=problem_sets)
valid_attempts = (
attempts.filter(valid=True).values("user").annotate(Count("user"))
)
Expand Down Expand Up @@ -260,7 +256,7 @@ def student_success_by_problem_set(self):
"problems", "problems__parts"
):
different_subtasks = 0
for problem in problem_set.visible_problems:
for problem in problem_set.problems.all():
different_subtasks += problem.parts.count()

# In case there are no parts, we do not want to divide by 0
Expand All @@ -276,7 +272,6 @@ def student_success_by_problem_set(self):
attempts = Attempt.objects.filter(
part__problem__problem_set=problem_set,
user__in=students,
part__problem__visible=True,
)
for attempt in attempts:
if attempt.valid:
Expand Down
Binary file modified web/locale/sl/LC_MESSAGES/django.mo
Binary file not shown.
138 changes: 88 additions & 50 deletions web/locale/sl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-18 12:29+0000\n"
"POT-Creation-Date: 2023-02-23 16:40+0000\n"
"PO-Revision-Date: 2015-08-18 11:06+0100\n"
"Last-Translator: Sonja Jerše <sonja.jerse@gmail.com>\n"
"Language-Team: American English <kde-i18n-doc@kde.org>\n"
Expand All @@ -18,38 +18,38 @@ msgstr ""
"n%100==4 ? 2 : 3);\n"
"X-Generator: Poedit 1.7.5\n"

#: courses/models.py:367
#: courses/models.py:370
msgid "Problem descriptions and official solutions are hidden"
msgstr "Besedilo nalog in uradne rešitve so skrite"

#. Translators: Uradne rešitve so skrite
#: courses/models.py:368 templates/courses/_problem_set.html:53
#: courses/models.py:371 templates/courses/_problem_set.html:53
msgid "Official solutions are hidden"
msgstr "Uradne rešitve so skrite"

#. Translators: Uradne rešitve so pogojno vidne
#: courses/models.py:369 templates/courses/_problem_set.html:56
#: courses/models.py:372 templates/courses/_problem_set.html:56
msgid "Official solutions are visible when solved"
msgstr "Uradne rešitve so vidne po sprejeti rešitvi"

#. Translators: Uradne rešitve so vidne
#: courses/models.py:370 templates/courses/_problem_set.html:59
#: courses/models.py:373 templates/courses/_problem_set.html:59
msgid "Official solutions are visible"
msgstr "Uradne rešitve so vidne"

#: courses/models.py:375
#: courses/models.py:378
msgid "Title"
msgstr "Naslov"

#: courses/models.py:376
#: courses/models.py:379
msgid "Description"
msgstr "Opis"

#: courses/models.py:377
#: courses/models.py:380 problems/models.py:24
msgid "Visible"
msgstr "Vidno"

#: courses/models.py:380
#: courses/models.py:383
msgid "Solution visibility"
msgstr "Vidnost rešitev"

Expand Down Expand Up @@ -110,7 +110,7 @@ msgstr "Dodaj med moje predmete"
#: templates/courses/_problem_set.html:7
#: templates/courses/course_progress.html:22
#: templates/courses/course_progress.html:33
#: templates/courses/problem_set_detail.html:188
#: templates/courses/problem_set_detail.html:226
#: templates/courses/problem_set_progress.html:37
#: templates/courses/problem_set_progress_groups.html:38
msgid "valid"
Expand All @@ -119,7 +119,7 @@ msgstr "veljavno"
#: templates/courses/_problem_set.html:7
#: templates/courses/course_progress.html:22
#: templates/courses/course_progress.html:33
#: templates/courses/problem_set_detail.html:188
#: templates/courses/problem_set_detail.html:226
#: templates/courses/problem_set_progress.html:37
#: templates/courses/problem_set_progress_groups.html:38
msgid "invalid"
Expand All @@ -128,7 +128,7 @@ msgstr "neveljavno"
#: templates/courses/_problem_set.html:7
#: templates/courses/course_progress.html:22
#: templates/courses/course_progress.html:33
#: templates/courses/problem_set_detail.html:188
#: templates/courses/problem_set_detail.html:226
#: templates/courses/problem_set_progress.html:37
#: templates/courses/problem_set_progress_groups.html:38
msgid "empty"
Expand All @@ -153,7 +153,7 @@ msgstr "Besedila nalog so skrita"
#: templates/courses/_problem_set.html:76
#: templates/courses/course_groups.html:28
#: templates/courses/coursegroup_form.html:30
#: templates/courses/problemset_form.html:30
#: templates/courses/problem_set_detail.html:56
#: templates/problems/problem_form.html:33
msgid "Edit"
msgstr "Uredi"
Expand Down Expand Up @@ -191,7 +191,7 @@ msgstr ""
#. Translators: Button for creating new problem.
#. Translators: Title of 'add new problem set' form.
#: templates/courses/course_detail.html:40
#: templates/courses/problemset_form.html:19
#: templates/courses/problemset_form.html:20
msgid "Add new problem set"
msgstr "Dodaj sklop"

Expand Down Expand Up @@ -236,21 +236,21 @@ msgstr "Da"
msgid "No"
msgstr "Ne"

#. Translators: Title of editing form for problems sets.
#. Translators: Title of editing form for problem sets.
#: templates/courses/coursegroup_form.html:16
msgid "Edit course group"
msgstr "Uredi skupino"

#. Translators: add new problem form button.
#: templates/courses/coursegroup_form.html:33
#: templates/courses/problemset_form.html:33
#: templates/courses/problemset_form.html:34
#: templates/problems/problem_form.html:36
msgid "Add"
msgstr "Dodaj"

#: templates/courses/coursegroup_form.html:36
#: templates/courses/problem_copy_form.html:23
#: templates/courses/problemset_form.html:36
#: templates/courses/problemset_form.html:37
#: templates/problems/problem_form.html:39
msgid "Cancel"
msgstr "Prekliči"
Expand All @@ -267,78 +267,104 @@ msgstr "Prosimo, izberite sklop, v katerega bo prekopirana ta naloga."

#. Translators: Confirm copying of a problem.
#: templates/courses/problem_copy_form.html:21
#: templates/courses/problem_set_detail.html:111
#: templates/courses/problem_set_detail.html:133
#: templates/courses/problem_set_detail.html:139
#: templates/courses/problem_set_detail.html:161
msgid "Copy"
msgstr "Kopiraj"

#: templates/courses/problem_set_detail.html:19
#: templates/courses/problem_set_detail.html:45
#: templates/courses/problem_set_detail.html:121
#: templates/courses/problem_set_detail.html:20
#: templates/courses/problem_set_detail.html:65
#: templates/courses/problem_set_detail.html:149
msgid "Download"
msgstr "Prenesi"

#. Translators: Datoteke za učence
#: templates/courses/problem_set_detail.html:28
#: templates/courses/problem_set_detail.html:29
msgid "Student files"
msgstr "Datoteke za učence"

#. Translators: Datoteke z uradnimi rešitvami
#: templates/courses/problem_set_detail.html:33
#, fuzzy
#| msgid "Solutions"
msgid "Solution files"
msgstr "Rešitve"

#. Translators: Datoteke za učitelje
#: templates/courses/problem_set_detail.html:32
#: templates/courses/problem_set_detail.html:37
msgid "Teacher files"
msgstr "Datoteke za učitelje"

#. Translators: LaTeX datoteke
#: templates/courses/problem_set_detail.html:36
#: templates/courses/problem_set_detail.html:41
msgid "LaTeX files"
msgstr "LaTeX datoteke"

#. Translators: Datoteke z rezultati
#: templates/courses/problem_set_detail.html:40
#: templates/courses/problem_set_detail.html:45
msgid "Files with results"
msgstr "Datoteke z rezultati"

#: templates/courses/problem_set_detail.html:48
#, fuzzy
#| msgid "Your solution"
msgid "HTML without solutions"
msgstr "HTML brez rešitev"

#: templates/courses/problem_set_detail.html:51
#, fuzzy
#| msgid "solutions"
msgid "HTML with solutions"
msgstr "HTML z rešitvami"

#: templates/courses/problem_set_detail.html:54
#: templates/courses/problem_set_detail.html:135
msgid "Update"
msgstr "Posodobi"

#. Translators: Button for downloading all problem files within a problem set.
#: templates/courses/problem_set_detail.html:47
#: templates/courses/problem_set_detail.html:67
msgid "Download all problem files"
msgstr "Prenesi vse datoteke z nalogami"

#. Translators: Datoteka za reševanje
#: templates/courses/problem_set_detail.html:86
#: templates/courses/problem_set_detail.html:110
msgid "File for solving"
msgstr "Datoteka za reševanje"

#. Translators: Datoteka z uradnimi rešitvami
#: templates/courses/problem_set_detail.html:114
#, fuzzy
#| msgid "Solutions"
msgid "Solution file"
msgstr "Rešitve"

#. Translators: Datoteka za urejanje
#: templates/courses/problem_set_detail.html:90
#: templates/courses/problem_set_detail.html:118
msgid "File for editing"
msgstr "Datoteka za urejanje"

#: templates/courses/problem_set_detail.html:94
#: templates/courses/problem_set_detail.html:95
#: templates/courses/problem_set_detail.html:126
#: templates/courses/problem_set_detail.html:127
#: templates/courses/problem_set_detail.html:122
#: templates/courses/problem_set_detail.html:123
#: templates/courses/problem_set_detail.html:154
#: templates/courses/problem_set_detail.html:155
#: templates/problems/solutions.html:12 templates/problems/solutions.html:14
msgid "Solutions"
msgstr "Rešitve"

#: templates/courses/problem_set_detail.html:99
#: templates/courses/problem_set_detail.html:127
msgid "Move up"
msgstr "Premakni gor"

#: templates/courses/problem_set_detail.html:103
#: templates/courses/problem_set_detail.html:131
msgid "Move down"
msgstr "Premakni dol"

#: templates/courses/problem_set_detail.html:107
msgid "Update"
msgstr "Posodobi"

#: templates/courses/problem_set_detail.html:124
#: templates/courses/problem_set_detail.html:152
msgid "Download this problem file"
msgstr "Datoteka z nalogo"

#. Translators: problem set detail
#: templates/courses/problem_set_detail.html:158
#: templates/courses/problem_set_detail.html:193
#: templates/problems/solutions.html:39 templates/problems/solutions.html:41
#: templates/statistics/solution_at_time.html:35
#: templates/statistics/solution_at_time.html:37
Expand All @@ -347,7 +373,7 @@ msgstr "podnaloga"

#. Translators: Button for creating new problem.
#. Translators: Title of 'add new problem' form.
#: templates/courses/problem_set_detail.html:170
#: templates/courses/problem_set_detail.html:207
#: templates/problems/problem_form.html:22
msgid "Add new problem"
msgstr "Dodaj nalogo"
Expand All @@ -369,10 +395,15 @@ msgid "Are you sure you want to delete problem set"
msgstr "Ste prepričani, da želite pobrisati sklop"

#. Translators: Title of editing form for problems sets.
#: templates/courses/problemset_form.html:16
#: templates/courses/problemset_form.html:17
msgid "Edit problem set"
msgstr "Uredi sklop"

#. Translators: edit problem confirmation form button.
#: templates/courses/problemset_form.html:31
msgid "Save"
msgstr "Shrani"

#. Translators: Title of problem delete confirmation page. Brisanje naloge
#: templates/problems/problem_confirm_delete.html:9
msgid "Delete problem"
Expand All @@ -393,37 +424,44 @@ msgstr "Uredi nalogo"
msgid "solutions"
msgstr "rešitve"

#. Translators: Title of user solutions column with student name.
#: templates/problems/solutions.html:54
#, fuzzy
#| msgid "Solutions"
msgid "Solution of"
msgstr "Rešitve"

#. Translators: Title of user solutions column.
#: templates/problems/solutions.html:53
#: templates/problems/solutions.html:57
#: templates/statistics/solution_at_time.html:50
msgid "Your solution"
msgstr "Vaša rešitev"

#: templates/problems/solutions.html:57
#: templates/problems/solutions.html:62
#: templates/statistics/solution_at_time.html:56
msgid "Last submission time:"
msgstr "Čas zadnje oddaje:"

#. Translators: in solution comparison table
#: templates/problems/solutions.html:61
#: templates/problems/solutions.html:66
#: templates/statistics/solution_at_time.html:60
msgid "You did not attempt to solve this part."
msgstr "Tega dela naloge niste poskušali reševati."

#. Translators: Title of official solutions column.
#: templates/problems/solutions.html:69
#: templates/problems/solutions.html:74
#: templates/statistics/solution_at_time.html:70
msgid "Official solution"
msgstr "Uradna rešitev"

#. Translators: in solution comparison table
#: templates/problems/solutions.html:77
#: templates/problems/solutions.html:82
#: templates/statistics/solution_at_time.html:80
msgid "Official solutions are hidden."
msgstr "Uradne rešitve so skrite."

#. Translators: in solution comparison table
#: templates/problems/solutions.html:84
#: templates/problems/solutions.html:89
#: templates/statistics/solution_at_time.html:87
msgid "Official solution will be visible once you submit a valid solution."
msgstr "Uradne rešitve bodo vidne, ko boste oddali veljavno rešitev."
Expand Down
Loading