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
b088c0bc
Commit
b088c0bc
authored
10 months ago
by
Julian
Browse files
Options
Downloads
Patches
Plain Diff
Create types for ExtraMarks
parent
a5951b81
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!362
Resolve "Add personal note management dialog in course book"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
aleksis/apps/alsijil/schema/__init__.py
+12
-0
12 additions, 0 deletions
aleksis/apps/alsijil/schema/__init__.py
aleksis/apps/alsijil/schema/extra_marks.py
+43
-0
43 additions, 0 deletions
aleksis/apps/alsijil/schema/extra_marks.py
with
55 additions
and
0 deletions
aleksis/apps/alsijil/schema/__init__.py
+
12
−
0
View file @
b088c0bc
...
...
@@ -12,6 +12,12 @@ from aleksis.core.models import Group, Person
from
aleksis.core.schema.base
import
FilterOrderList
from
aleksis.core.schema.group
import
GroupType
from
aleksis.core.util.core_helpers
import
has_person
from
.extra_marks
import
(
ExtraMarkBatchCreateMutation
,
ExtraMarkBatchPatchMutation
,
ExtraMarkBatchDeleteMutation
,
ExtraMarkType
,
)
from
..models
import
Documentation
from
.documentation
import
(
...
...
@@ -48,6 +54,8 @@ class Query(graphene.ObjectType):
end
=
graphene
.
Date
(
required
=
True
),
)
extra_marks
=
FilterOrderList
(
ExtraMarkType
)
def
resolve_documentations_by_course_id
(
root
,
info
,
course_id
,
**
kwargs
):
documentations
=
Documentation
.
objects
.
filter
(
Q
(
course__pk
=
course_id
)
|
Q
(
amends__course__pk
=
course_id
)
...
...
@@ -171,3 +179,7 @@ class Mutation(graphene.ObjectType):
create_or_update_documentations
=
DocumentationBatchCreateOrUpdateMutation
.
Field
()
touch_documentation
=
TouchDocumentationMutation
.
Field
()
update_participation_statuses
=
ParticipationStatusBatchPatchMutation
.
Field
()
create_extra_marks
=
ExtraMarkBatchCreateMutation
.
Field
()
update_extra_marks
=
ExtraMarkBatchPatchMutation
.
Field
()
delete_extra_marks
=
ExtraMarkBatchDeleteMutation
.
Field
()
This diff is collapsed.
Click to expand it.
aleksis/apps/alsijil/schema/extra_marks.py
0 → 100644
+
43
−
0
View file @
b088c0bc
from
graphene_django
import
DjangoObjectType
from
aleksis.apps.alsijil.models
import
ExtraMark
from
aleksis.core.schema.base
import
OptimisticResponseTypeMixin
,
PermissionsTypeMixin
,
DjangoFilterMixin
,
\
BaseBatchCreateMutation
,
BaseBatchDeleteMutation
,
BaseBatchPatchMutation
class
ExtraMarkType
(
OptimisticResponseTypeMixin
,
PermissionsTypeMixin
,
DjangoFilterMixin
,
DjangoObjectType
,
):
class
Meta
:
model
=
ExtraMark
fields
=
(
"
id
"
,
"
short_name
"
,
"
name
"
,
"
colour_fg
"
,
"
colour_bg
"
,
"
show_in_coursebook
"
)
class
ExtraMarkBatchCreateMutation
(
BaseBatchCreateMutation
):
class
Meta
:
model
=
ExtraMark
fields
=
(
"
short_name
"
,
"
name
"
,
"
colour_fg
"
,
"
colour_bg
"
,
"
show_in_coursebook
"
)
optional_fields
=
(
"
name
"
,)
permissions
=
(
"
alsijil.create_extra_mark
"
,)
# FIXME
class
ExtraMarkBatchDeleteMutation
(
BaseBatchDeleteMutation
):
class
Meta
:
model
=
ExtraMark
permission_required
=
"
alsijil.delete_extra_mark
"
# FIXME
class
ExtraMarkBatchPatchMutation
(
BaseBatchPatchMutation
):
class
Meta
:
model
=
ExtraMark
fields
=
(
"
id
"
,
"
short_name
"
,
"
name
"
,
"
colour_fg
"
,
"
colour_bg
"
,
"
show_in_coursebook
"
)
permissions
=
(
"
alsijil.change_extra_mark
"
,)
# FIXME
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