Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-App-Alsijil
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-App-Alsijil
Commits
5a66f5fb
Verified
Commit
5a66f5fb
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
[Week view] Show statistics on extra marks
parent
c8b20d10
No related branches found
No related tags found
1 merge request
!68
Resolve "Add option to configure extra marks for personal notes"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html
+6
-1
6 additions, 1 deletion
...s/alsijil/templates/alsijil/class_register/week_view.html
aleksis/apps/alsijil/views.py
+17
-0
17 additions, 0 deletions
aleksis/apps/alsijil/views.py
with
23 additions
and
1 deletion
aleksis/apps/alsijil/templates/alsijil/class_register/week_view.html
+
6
−
1
View file @
5a66f5fb
{# -*- engine:django -*- #}
{# -*- engine:django -*- #}
{% extends "core/base.html" %}
{% extends "core/base.html" %}
{% load material_form i18n week_helpers static %}
{% load material_form i18n week_helpers static
data_helpers
%}
{% block browser_title %}{% blocktrans %}Week view{% endblocktrans %}{% endblock %}
{% block browser_title %}{% blocktrans %}Week view{% endblocktrans %}{% endblock %}
...
@@ -96,6 +96,11 @@
...
@@ -96,6 +96,11 @@
<p
class=
"card-text"
>
<p
class=
"card-text"
>
{% trans "Summed up tardiness" %}: {{ person.tardiness_sum }}'
{% trans "Summed up tardiness" %}: {{ person.tardiness_sum }}'
</p>
</p>
{% for extra_mark in extra_marks %}
<p
class=
"card-text"
>
{{ extra_mark.name }}: {{ person|get_dict:extra_mark.count_label }}
</p>
{% endfor %}
{% for note in person.personal_notes|only_week:week %}
{% for note in person.personal_notes|only_week:week %}
{% if note.remarks %}
{% if note.remarks %}
<blockquote>
<blockquote>
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/views.py
+
17
−
0
View file @
5a66f5fb
...
@@ -226,6 +226,22 @@ def week_view(
...
@@ -226,6 +226,22 @@ def week_view(
),
),
)
)
)
)
for
extra_mark
in
ExtraMark
.
objects
.
all
():
persons
=
persons
.
annotate
(
**
{
extra_mark
.
count_label
:
Count
(
"
personal_notes
"
,
filter
=
Q
(
personal_notes__lesson_period__in
=
lesson_periods
,
personal_notes__week
=
wanted_week
.
week
,
personal_notes__extra_marks
=
extra_mark
,
),
distinct
=
True
,
)
}
)
else
:
else
:
persons
=
None
persons
=
None
...
@@ -234,6 +250,7 @@ def week_view(
...
@@ -234,6 +250,7 @@ def week_view(
lesson_periods
,
key
=
lambda
x
:
(
x
.
period
.
weekday
,
x
.
period
.
period
)
lesson_periods
,
key
=
lambda
x
:
(
x
.
period
.
weekday
,
x
.
period
.
period
)
)
)
context
[
"
extra_marks
"
]
=
ExtraMark
.
objects
.
all
()
context
[
"
week
"
]
=
wanted_week
context
[
"
week
"
]
=
wanted_week
context
[
"
lesson_periods
"
]
=
lesson_periods
context
[
"
lesson_periods
"
]
=
lesson_periods
context
[
"
persons
"
]
=
persons
context
[
"
persons
"
]
=
persons
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment