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
62fe64b3
Verified
Commit
62fe64b3
authored
4 years ago
by
Jonathan Weth
Browse files
Options
Downloads
Patches
Plain Diff
Fix inclusion of group roles with events and extra lessons after merge
parent
7c1387cf
No related branches found
No related tags found
1 merge request
!120
Resolve "Support events and extra lessons in class register"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/templates/alsijil/class_register/lesson.html
+1
-1
1 addition, 1 deletion
...apps/alsijil/templates/alsijil/class_register/lesson.html
aleksis/apps/alsijil/views.py
+3
-3
3 additions, 3 deletions
aleksis/apps/alsijil/views.py
with
4 additions
and
4 deletions
aleksis/apps/alsijil/templates/alsijil/class_register/lesson.html
+
1
−
1
View file @
62fe64b3
...
...
@@ -366,7 +366,7 @@
{% if group_roles %}
<div
class=
"col s12"
id=
"group-roles"
>
{% include "alsijil/group_role/partials/assigned_roles.html" with roles=group_roles group=
lesson_period.lesson.
groups.first back_url=back_url %}
{% include "alsijil/group_role/partials/assigned_roles.html" with roles=group_roles group=
register_object.get_
groups.first back_url=back_url %}
</div>
{% endif %}
...
...
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/views.py
+
3
−
3
View file @
62fe64b3
...
...
@@ -147,7 +147,7 @@ def register_object(
else
None
)
back_url
=
reverse
(
"
lesson_
by_week_and_
period
"
,
args
=
[
wanted_week
.
year
,
wanted_week
.
week
,
lesson_period
.
pk
]
"
lesson_period
"
,
args
=
[
wanted_week
.
year
,
wanted_week
.
week
,
register_object
.
pk
]
)
context
[
"
back_url
"
]
=
back_url
...
...
@@ -167,9 +167,9 @@ def register_object(
# Group roles
show_group_roles
=
request
.
user
.
person
.
preferences
[
"
alsijil__group_roles_in_lesson_view
"
]
and
request
.
user
.
has_perm
(
"
alsijil.view_assigned_grouproles
"
,
lesson_period
)
]
and
request
.
user
.
has_perm
(
"
alsijil.view_assigned_grouproles
"
,
register_object
)
if
show_group_roles
:
groups
=
lesson_period
.
lesson
.
groups
.
all
()
groups
=
register_object
.
get_
groups
()
.
all
()
group_roles
=
GroupRole
.
objects
.
with_assignments
(
date_of_lesson
,
groups
)
context
[
"
group_roles
"
]
=
group_roles
...
...
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