Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier:

Aufgrund einer Wartung wird GitLab am 03.08. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 03.08. between 8:00 and 9:00 am.

Commit 36195f12 authored by LammLukas's avatar LammLukas
Browse files

Changes load_template in to find templates on win and linux

parent cfa573fc
......@@ -6,13 +6,18 @@ This short script will guide you through the process of writing your own scripts
Author: L. Lamm (
""" Import all necessary packages from /src"""
1. Import all necessary packages
from src.exam import Exam
1. Create a new and empty exam object
2. Create a new exam object
After you have downloaded the list of participants from RWTHOnline, you can use this .csv file
to create your new exam.
ex = Exam()
ex = Exam('./data/example_inputdata.csv')
2. Import information from RWTHOnline file
......@@ -25,7 +30,7 @@ information on:
* Name of the principal examiner
* List of participants
3. Assign number of points per task
......@@ -7,6 +7,7 @@ from src.exportable import Exportable
from src.exceptions import *
from src.utils import *
import sqlite3
import os, re
class Room(Exportable):
......@@ -47,8 +48,11 @@ class Room(Exportable):
def load_template(self, id_str, file='./templates/rooms/room_templates.db'):
def load_template(self, id_str, file=None):
"""Load template for room from database"""
if file is None:
basedir = os.path.dirname(os.path.dirname(__file__))
file = os.path.join(basedir, r'templates', r'rooms', r'room_templates.db')
connector = sqlite3.connect(file)
cursor = connector.cursor()
from src.exam import *
from src.protocols import Protocol
ex = Exam('../testdata/large_exam_inputdata.csv')
ex = Exam('./tests/testdata/large_exam_inputdata.csv')
ex.Points_per_task = [10, 10, 5, 10]
prot = Protocol(ex)
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