Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Kontr 2.0
Portal API Backend
Commits
ae860203
Unverified
Commit
ae860203
authored
Sep 11, 2018
by
Peter Stanko
Browse files
Project config - subdir
parent
79641561
Changes
4
Hide whitespace changes
Inline
Side-by-side
portal/async_celery/tasks.py
View file @
ae860203
...
...
@@ -45,6 +45,7 @@ def update_project_test_files(course_id: str, project_id: str):
course
=
find_course
(
course_id
)
project
=
find_project
(
course
,
project_id
)
params
=
{
'from_dir'
:
project
.
config
.
test_files_subdir
,
'source'
:
{
'type'
:
'git'
,
'url'
:
project
.
config
.
test_files_source
...
...
portal/rest/projects.py
View file @
ae860203
...
...
@@ -138,7 +138,7 @@ class ProjectTestFilesRefresh(Resource):
project
=
general
.
find_project
(
course
,
pid
)
# authorization
permissions
.
PermissionsService
(
course
=
course
).
require
.
write_projects
()
ProjectService
(
project
).
update_project_test_files
_hash
()
ProjectService
(
project
).
update_project_test_files
()
return
''
,
204
...
...
portal/rest/schemas.py
View file @
ae860203
...
...
@@ -149,6 +149,7 @@ class SubmissionFileParamsSchema(Schema):
"""Submission File Params Schema
"""
source
=
NESTED
(
'SubmissionFileSource'
,
required
=
True
)
from_dir
=
fields
.
Str
(
allow_none
=
True
)
class
SubmissionCreateSchema
(
Schema
):
...
...
portal/service/projects.py
View file @
ae860203
...
...
@@ -157,7 +157,7 @@ class ProjectService:
return
filters
.
filter_projects_from_course
(
course
=
course
,
user
=
perm_service
.
client
)
raise
ForbiddenError
(
uid
=
perm_service
.
client
.
id
)
def
update_project_test_files
_hash
(
self
):
def
update_project_test_files
(
self
):
""" Sends a request to Storage to update the project's test_files to the newest version.
:return: nothing
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment