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
c748b886
Commit
c748b886
authored
1 year ago
by
magicfelix
Browse files
Options
Downloads
Patches
Plain Diff
Remove coursebook-specific task
parent
4089c69f
Branches
migration-for-legacy
No related tags found
No related merge requests found
Pipeline
#148163
failed
1 year ago
Stage: prepare
Stage: test
Stage: build
Stage: publish
Stage: docker
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
aleksis/apps/alsijil/tasks.py
+0
-27
0 additions, 27 deletions
aleksis/apps/alsijil/tasks.py
with
0 additions
and
27 deletions
aleksis/apps/alsijil/tasks.py
+
0
−
27
View file @
c748b886
...
...
@@ -186,30 +186,3 @@ def generate_full_register_printout(group: int, file_object: int, recorder: Prog
raise
Exception
(
_
(
"
PDF generation failed
"
))
recorder
.
set_progress
(
8
,
_number_of_steps
)
@app.task
(
run_every
=
timedelta
(
days
=
1
))
def
create_week_lesson_documentations
()
->
None
:
validity
=
ValidityRange
.
current
lessons
=
set
()
now
=
datetime
.
now
()
for
lesson
in
Lesson
.
objects
.
filter
(
validity
=
validity
):
eq_l_documentations
=
LessonDocumentation
.
objects
.
filter
(
lesson_period__lesson__in
=
lesson
.
_equal_lessons
)
for
planned
in
lesson
.
planned_lessonperiods_datetimes
:
if
planned
[
"
datetime_start
"
]
>
now
+
timedelta
(
days
=
1
):
continue
documentations
=
eq_l_documentations
.
filter
(
year
=
planned
[
"
year
"
],
week
=
planned
[
"
week
"
],
lesson_period
=
planned
[
"
lesson_period
"
],
)
if
documentations
.
exists
():
continue
LessonDocumentation
.
objects
.
get_or_create
(
week
=
planned
[
"
week
"
],
year
=
planned
[
"
year
"
],
lesson_period
=
planned
[
"
lesson_period
"
],
)
# FIXME: Queries shouldn't alter data
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