Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
teknikattan-scoring-system
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
tddd96-grupp1
teknikattan-scoring-system
Commits
2f84965c
Commit
2f84965c
authored
3 years ago
by
Albin Henriksson
Browse files
Options
Downloads
Patches
Plain Diff
Slides start out as information slides
parent
6891c0dc
No related branches found
No related tags found
No related merge requests found
Pipeline
#46189
failed
3 years ago
Stage: setup
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/app/apis/slides.py
+1
-1
1 addition, 1 deletion
server/app/apis/slides.py
server/app/database/controller/add.py
+9
-28
9 additions, 28 deletions
server/app/database/controller/add.py
with
10 additions
and
29 deletions
server/app/apis/slides.py
+
1
−
1
View file @
2f84965c
...
...
@@ -38,7 +38,7 @@ class SlidesList(Resource):
def
post
(
self
,
competition_id
):
"""
Posts a new slide to the specified competition.
"""
item_slide
=
dbc
.
add
.
slide
(
competition_id
)
item_slide
=
dbc
.
add
.
slide
_without_question
(
competition_id
)
return
item_response
(
schema
.
dump
(
item_slide
))
...
...
This diff is collapsed.
Click to expand it.
server/app/database/controller/add.py
+
9
−
28
View file @
2f84965c
...
...
@@ -7,30 +7,15 @@ import os
import
app.core.http_codes
as
codes
import
app.database.controller
as
dbc
from
app.core
import
db
from
app.database.models
import
(
Blacklist
,
City
,
Code
,
Competition
,
ComponentType
,
ImageComponent
,
Media
,
MediaType
,
Question
,
QuestionAlternative
,
QuestionAlternativeAnswer
,
QuestionComponent
,
QuestionScore
,
QuestionType
,
Role
,
Slide
,
Team
,
TextComponent
,
User
,
ViewType
,
Whitelist
,
)
from
app.database.types
import
IMAGE_COMPONENT_ID
,
QUESTION_COMPONENT_ID
,
TEXT_COMPONENT_ID
from
app.database.models
import
(
Blacklist
,
City
,
Code
,
Competition
,
ComponentType
,
ImageComponent
,
Media
,
MediaType
,
Question
,
QuestionAlternative
,
QuestionAlternativeAnswer
,
QuestionComponent
,
QuestionScore
,
QuestionType
,
Role
,
Slide
,
Team
,
TextComponent
,
User
,
ViewType
,
Whitelist
)
from
app.database.types
import
(
IMAGE_COMPONENT_ID
,
QUESTION_COMPONENT_ID
,
TEXT_COMPONENT_ID
)
from
flask
import
current_app
from
flask.globals
import
current_app
from
flask_restx
import
abort
...
...
@@ -140,10 +125,6 @@ def slide(competition_id):
# Add slide
item_slide
=
db_add
(
Slide
(
order
,
competition_id
))
# Add default question
question
(
f
"
Fråga
{
item_slide
.
order
+
1
}
"
,
10
,
1
,
item_slide
.
id
)
item_slide
=
dbc
.
utils
.
refresh
(
item_slide
)
return
item_slide
...
...
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