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
Merge requests
!396
Migration path to new models
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Migration path to new models
migration_path
into
master
Overview
3
Commits
11
Pipelines
7
Changes
44
All threads resolved!
Hide all comments
Merged
Jonathan Weth
requested to merge
migration_path
into
master
7 months ago
Overview
3
Commits
11
Pipelines
7
Changes
1
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
version 2
version 6
b51ff2bd
6 months ago
version 5
5ec4dc30
6 months ago
version 4
edca2cd7
6 months ago
version 3
3df0bb2d
7 months ago
version 2
3c51e9d9
7 months ago
version 1
5a20c553
7 months ago
master (base)
and
version 3
latest version
b3c63074
11 commits,
4 months ago
version 6
b51ff2bd
10 commits,
6 months ago
version 5
5ec4dc30
10 commits,
6 months ago
version 4
edca2cd7
9 commits,
6 months ago
version 3
3df0bb2d
8 commits,
7 months ago
version 2
3c51e9d9
7 commits,
7 months ago
version 1
5a20c553
4 commits,
7 months ago
Show latest version
1 file
+
1
−
143
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
aleksis/apps/alsijil/preferences.py
+
1
−
143
Options
from
django.core.exceptions
import
ValidationError
from
django.utils.translation
import
gettext_lazy
as
_
from
dynamic_preferences.preferences
import
Section
from
dynamic_preferences.types
import
(
BooleanPreference
,
ChoicePreference
,
IntegerPreference
,
ModelChoicePreference
,
ModelMultipleChoicePreference
,
)
from
aleksis.core.models
import
GroupType
from
aleksis.core.registries
import
person_preferences_registry
,
site_preferences_registry
from
aleksis.core.registries
import
site_preferences_registry
alsijil
=
Section
(
"
alsijil
"
,
verbose_name
=
_
(
"
Class register
"
))
@site_preferences_registry.register
class
BlockPersonalNotesForCancelled
(
BooleanPreference
):
section
=
alsijil
name
=
"
block_personal_notes_for_cancelled
"
default
=
True
verbose_name
=
_
(
"
Block adding personal notes for cancelled lessons
"
)
@site_preferences_registry.register
class
ViewOwnPersonalNotes
(
BooleanPreference
):
section
=
alsijil
name
=
"
view_own_personal_notes
"
default
=
True
verbose_name
=
_
(
"
Allow users to view their own personal notes
"
)
@site_preferences_registry.register
class
RegisterAbsenceAsPrimaryGroupOwner
(
BooleanPreference
):
section
=
alsijil
name
=
"
register_absence_as_primary_group_owner
"
default
=
True
verbose_name
=
_
(
"
Allow primary group owners to register future absences for students in their groups
"
)
@site_preferences_registry.register
class
InheritPrivilegesFromParentGroup
(
BooleanPreference
):
section
=
alsijil
name
=
"
inherit_privileges_from_parent_group
"
default
=
True
verbose_name
=
_
(
"
Grant the owner of a parent group the same privileges
"
"
as the owners of the respective child groups
"
)
@site_preferences_registry.register
class
EditLessonDocumentationAsOriginalTeacher
(
BooleanPreference
):
section
=
alsijil
name
=
"
edit_lesson_documentation_as_original_teacher
"
default
=
True
verbose_name
=
_
(
"
Allow original teachers to edit their lessons although they are substituted
"
)
@site_preferences_registry.register
class
CarryOverDataToNextPeriods
(
BooleanPreference
):
section
=
alsijil
name
=
"
carry_over_next_periods
"
default
=
True
verbose_name
=
_
(
"
Carry over data from first lesson period to the
"
"
following lesson periods in lessons over multiple periods
"
)
help_text
=
_
(
"
This will carry over data only if the data in the following periods are empty.
"
)
@site_preferences_registry.register
class
AllowCarryOverLessonDocumentationToCurrentWeek
(
BooleanPreference
):
section
=
alsijil
name
=
"
allow_carry_over_same_week
"
default
=
False
verbose_name
=
_
(
"
Allow carrying over data from any lesson period to all other lesson
\
periods with the same lesson and in the same week
"
)
help_text
=
_
(
"
This will carry over data only if the data in the aforementioned periods are empty.
"
)
@site_preferences_registry.register
class
CarryOverPersonalNotesToNextPeriods
(
BooleanPreference
):
section
=
alsijil
name
=
"
carry_over_personal_notes
"
default
=
True
verbose_name
=
_
(
"
Carry over personal notes to all following lesson periods on the same day.
"
)
@site_preferences_registry.register
class
AllowOpenPeriodsOnSameDay
(
BooleanPreference
):
section
=
alsijil
name
=
"
open_periods_same_day
"
default
=
False
verbose_name
=
_
(
"
Allow teachers to open lesson periods on the
"
"
same day and not just at the beginning of the period
"
)
help_text
=
_
(
"
Lessons in the past are not affected by this setting, you can open them whenever you want.
"
)
@site_preferences_registry.register
class
AllowEntriesInHolidays
(
BooleanPreference
):
section
=
alsijil
name
=
"
allow_entries_in_holidays
"
default
=
False
verbose_name
=
_
(
"
Allow teachers to add data for lessons in holidays
"
)
@site_preferences_registry.register
class
GroupOwnersCanAssignRolesToParents
(
BooleanPreference
):
section
=
alsijil
@@ -127,45 +24,6 @@ class GroupOwnersCanAssignRolesToParents(BooleanPreference):
)
@person_preferences_registry.register
class
ShowGroupRolesInWeekView
(
BooleanPreference
):
section
=
alsijil
name
=
"
group_roles_in_week_view
"
default
=
True
verbose_name
=
_
(
"
Show assigned group roles in week view
"
)
help_text
=
_
(
"
Only week view of groups
"
)
@person_preferences_registry.register
class
ShowGroupRolesInLessonView
(
BooleanPreference
):
section
=
alsijil
name
=
"
group_roles_in_lesson_view
"
default
=
True
verbose_name
=
_
(
"
Show assigned group roles in lesson view
"
)
@person_preferences_registry.register
class
RegisterObjectsTableItemsPerPage
(
IntegerPreference
):
"""
Preference how many items are shown per page in ``RegisterObjectTable``.
"""
section
=
alsijil
name
=
"
register_objects_table_items_per_page
"
default
=
100
verbose_name
=
_
(
"
Items per page in lessons table
"
)
def
validate
(
self
,
value
):
if
value
<
1
:
raise
ValidationError
(
_
(
"
Each page must show at least one item.
"
))
@person_preferences_registry.register
class
DefaultLessonDocumentationFilter
(
BooleanPreference
):
section
=
alsijil
name
=
"
default_lesson_documentation_filter
"
default
=
True
verbose_name
=
_
(
"
Filter lessons by existence of their lesson documentation on default
"
)
@site_preferences_registry.register
class
AllowEditFutureDocumentations
(
ChoicePreference
):
"""
Time range for which documentations may be edited.
"""
Loading