Gitlab Community Edition Instance

Skip to content
Snippets Groups Projects

Resolve "Disable login single-login restriction for weekly exercises"

1 file
+ 4
2
Compare changes
  • Side-by-side
  • Inline
+ 4
2
@@ -2,6 +2,7 @@ import json
import os
import readline
import logging
import constance
from rest_framework.exceptions import ValidationError
from util.messages import warn
@@ -12,7 +13,7 @@ from util.factories import GradyUserFactory
import semver
log = logging.getLogger(__name__)
config = constance.config
WELCOME = r'''
______ __ ____ __
@@ -128,7 +129,8 @@ def parse_and_import_hektor_json(exam_data):
raise ValidationError(f"Updated submission type: {submission_type['name']}")
for student in exam_data['students']:
student_obj = user_factory.make_student(exam=exam, is_active=False,
# student accounts will be automatically enabled when in exercise mode
student_obj = user_factory.make_student(exam=exam, is_active=config.EXERCISE_MODE,
**student).student
for submission_obj in student['submissions']:
add_submission(student_obj, **submission_obj)
Loading