Skip to content
Snippets Groups Projects
Commit f8004073 authored by robinwilliam.hundt's avatar robinwilliam.hundt Committed by Dominik Seeger
Browse files

Changed importer such that exam is mandatory

parent e38d3043
No related branches found
No related tags found
1 merge request!154Resolve "Received 500 on export Student Scores"
Pipeline #91902 passed
...@@ -253,10 +253,9 @@ def do_load_submission_types(): ...@@ -253,10 +253,9 @@ def do_load_submission_types():
def do_load_module_descriptions(): def do_load_module_descriptions():
print(''' print('''
This loader imports descriptions of modules in an exam. This step is purely This loader imports descriptions of modules in an exam. This information
optional -- Grady works just fine without these information. If you want to is used to distinguish students within one instance or give information
distinguish students within one instance or give information about the about the grading type.
grading type you should provide this info.
CSV file format: module_reference, total_score, pass_score, pass_only CSV file format: module_reference, total_score, pass_score, pass_only
...@@ -377,8 +376,9 @@ def do_load_submissions(): ...@@ -377,8 +376,9 @@ def do_load_submissions():
file = i('Get me the file with all the submissions', file = i('Get me the file with all the submissions',
'submissions.json', is_file=True) 'submissions.json', is_file=True)
exam_obj = {} if not ExamType.objects.all():
if ExamType.objects.all(): raise Exception('Modules need to be loaded before submissions.')
else:
exam_query_set = ExamType.objects.all() exam_query_set = ExamType.objects.all()
print('Please select the corresponding module') print('Please select the corresponding module')
print('You have the following choices:\n') print('You have the following choices:\n')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment