Commit 85893585 authored by Michael Völske's avatar Michael Völske

update exams.py

parent c0b02a51
......@@ -30,7 +30,7 @@ def exams():
'defining students for which variants should be sampled. Must have a header. '
'Header names define variable names, rows define their values. '
'ATTENTION: use latin-1 encoding!', required=True)
def generate_variants(pool_yaml, output_dir, student_list_file):
def generate_variants(pool_yaml, output_file, student_list_file):
""" Generate a variant-list-file, where each student in the
student-list-file gets a unique sample of problems, one from each pool
defined in the pool_yaml
......@@ -55,9 +55,7 @@ def generate_variants(pool_yaml, output_dir, student_list_file):
next(open(student_list_file, encoding='latin1')))
items = list(csv.DictReader(open(student_list_file, encoding='latin1'),
dialect=dialect))
os.makedirs(output_dir, exist_ok=True)
with open('variant-list-file.csv', 'w',
with open(output_file, 'w',
newline='', encoding='latin1') as of:
writer = csv.writer(of, delimiter='\t', dialect=dialect)
variable_string = list(pools.keys())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment