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
d57cb250
Commit
d57cb250
authored
3 years ago
by
Nik | Klampfradler
Browse files
Options
Downloads
Plain Diff
Merge branch 'prepare-release-2.0rc4' into 'release/2.0'
Prepare release 2.0rc4 (the second time) See merge request
!218
parents
74de90da
3867579d
No related branches found
Branches containing commit
Tags
2.0rc4
Tags containing commit
1 merge request
!218
Prepare release 2.0rc4 (the second time)
Pipeline
#24913
passed with warnings
3 years ago
Stage: test
Stage: build
Stage: publish
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.rst
+2
-0
2 additions, 0 deletions
CHANGELOG.rst
aleksis/apps/alsijil/actions.py
+9
-4
9 additions, 4 deletions
aleksis/apps/alsijil/actions.py
with
11 additions
and
4 deletions
CHANGELOG.rst
+
2
−
0
View file @
d57cb250
...
@@ -14,6 +14,8 @@ Fixed
...
@@ -14,6 +14,8 @@ Fixed
* The lesson documentations tab was displayed on overviews for persons who are not teachers.
* The lesson documentations tab was displayed on overviews for persons who are not teachers.
* Teachers weren't able to edit personal notes of their students in the person overview.
* Teachers weren't able to edit personal notes of their students in the person overview.
* The actions to mark absences as excused in the personal notes table also marked personal notes as excused which are not absences.
* The delete action in the personal notes table really deleted the items instead of just resetting them to default values.
`2.0rc3`_ - 2021-07-20
`2.0rc3`_ - 2021-07-20
----------------------
----------------------
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/actions.py
+
9
−
4
View file @
d57cb250
...
@@ -7,18 +7,19 @@ from django.template.loader import get_template
...
@@ -7,18 +7,19 @@ from django.template.loader import get_template
from
django.urls
import
reverse
from
django.urls
import
reverse
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.translation
import
gettext_lazy
as
_
from
aleksis.apps.alsijil.models
import
PersonalNote
from
aleksis.core.models
import
Notification
from
aleksis.core.models
import
Notification
def
mark_as_excused
(
modeladmin
,
request
,
queryset
):
def
mark_as_excused
(
modeladmin
,
request
,
queryset
):
queryset
.
update
(
excused
=
True
,
excuse_type
=
None
)
queryset
.
filter
(
absent
=
True
).
update
(
excused
=
True
,
excuse_type
=
None
)
mark_as_excused
.
short_description
=
_
(
"
Mark as excused
"
)
mark_as_excused
.
short_description
=
_
(
"
Mark as excused
"
)
def
mark_as_unexcused
(
modeladmin
,
request
,
queryset
):
def
mark_as_unexcused
(
modeladmin
,
request
,
queryset
):
queryset
.
update
(
excused
=
False
,
excuse_type
=
None
)
queryset
.
filter
(
absent
=
True
).
update
(
excused
=
False
,
excuse_type
=
None
)
mark_as_unexcused
.
short_description
=
_
(
"
Mark as unexcused
"
)
mark_as_unexcused
.
short_description
=
_
(
"
Mark as unexcused
"
)
...
@@ -26,7 +27,7 @@ mark_as_unexcused.short_description = _("Mark as unexcused")
...
@@ -26,7 +27,7 @@ mark_as_unexcused.short_description = _("Mark as unexcused")
def
mark_as_excuse_type_generator
(
excuse_type
)
->
Callable
:
def
mark_as_excuse_type_generator
(
excuse_type
)
->
Callable
:
def
mark_as_excuse_type
(
modeladmin
,
request
,
queryset
):
def
mark_as_excuse_type
(
modeladmin
,
request
,
queryset
):
queryset
.
update
(
excused
=
True
,
excuse_type
=
excuse_type
)
queryset
.
filter
(
absent
=
True
).
update
(
excused
=
True
,
excuse_type
=
excuse_type
)
mark_as_excuse_type
.
short_description
=
_
(
f
"
Mark as
{
excuse_type
.
name
}
"
)
mark_as_excuse_type
.
short_description
=
_
(
f
"
Mark as
{
excuse_type
.
name
}
"
)
mark_as_excuse_type
.
__name__
=
f
"
mark_as_excuse_type_
{
excuse_type
.
short_name
}
"
mark_as_excuse_type
.
__name__
=
f
"
mark_as_excuse_type_
{
excuse_type
.
short_name
}
"
...
@@ -35,7 +36,11 @@ def mark_as_excuse_type_generator(excuse_type) -> Callable:
...
@@ -35,7 +36,11 @@ def mark_as_excuse_type_generator(excuse_type) -> Callable:
def
delete_personal_note
(
modeladmin
,
request
,
queryset
):
def
delete_personal_note
(
modeladmin
,
request
,
queryset
):
queryset
.
delete
()
notes
=
[]
for
personal_note
in
queryset
:
personal_note
.
reset_values
()
notes
.
append
(
personal_note
)
PersonalNote
.
objects
.
bulk_update
(
notes
)
delete_personal_note
.
short_description
=
_
(
"
Delete
"
)
delete_personal_note
.
short_description
=
_
(
"
Delete
"
)
...
...
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