Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Merge branch 'develop' of github.com:SELab-2/UGent-1 into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpdev committed May 23, 2024
2 parents 775251f + 6834860 commit 3c62cc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions backend/pigeonhole/apps/submissions/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def has_permission(self, request, view):
"retrieve",
"create",
"download",
"download_artifacts",
"get_project",
]
return False
Expand Down
2 changes: 0 additions & 2 deletions backend/pigeonhole/apps/users/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ def has_permission(self, request, view):
if request.user.is_teacher or request.user.is_student:
if view.action in ["list", "retrieve"]:
return True
if view.action in ["update", "partial_update"]:
return request.user.pk == int(view.kwargs["pk"])
elif view.action in ["add_course_to_user", "remove_course_from_user"]:
return request.user.is_teacher or (
request.user.is_student
Expand Down
4 changes: 2 additions & 2 deletions examples/advanced-evaluation/fibonacci-python/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ def write_sequences_to_file(fibonacci_method, limit: int = 25) -> None:
fibonacci = module_from_spec(spec)
spec.loader.exec_module(fibonacci)

write_sequences_to_file(fibonacci.fibonacci)

assert check_fibonacci(fibonacci.fibonacci(0)), 'Fibonacci sequence with length 0 incorrect'
assert check_fibonacci(fibonacci.fibonacci(1)), 'Fibonacci sequence with length 1 incorrect'
assert check_fibonacci(fibonacci.fibonacci(2)), 'Fibonacci sequence with length 2 incorrect'
assert check_fibonacci(fibonacci.fibonacci(1000)), 'Fibonacci sequence with length 1000 incorrect'

write_sequences_to_file(fibonacci.fibonacci)

except FileNotFoundError:
sys.exit("Required main file missing.\nPlease consult the project assignment.")

Expand Down
8 changes: 4 additions & 4 deletions scripts/mockdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def run():
visible=True,
number_of_groups=1,
group_size=8,
file_structure='*.py',
file_structure='+*.py',
test_docker_image='fibonacci-python'
)

Expand All @@ -297,7 +297,7 @@ def run():
visible=True,
number_of_groups=4,
group_size=2,
file_structure='*.py',
file_structure='+*.py',
test_docker_image='fibonacci-python'
)

Expand All @@ -309,7 +309,7 @@ def run():
visible=True,
number_of_groups=10,
group_size=2,
file_structure='*.py',
file_structure='+*.py',
test_docker_image='fibonacci-python'
)

Expand All @@ -321,7 +321,7 @@ def run():
visible=True,
number_of_groups=10,
group_size=2,
file_structure='*.py',
file_structure='+*.py',
test_docker_image='fibonacci-python'
)

Expand Down

0 comments on commit 3c62cc1

Please sign in to comment.