Commit 5e9e2402 authored by LammLukas's avatar LammLukas

Deleted redundand files and created tests directory

parent d019a169
\documentclass[a4paper, 12pt, oneside, toc=indent, DIV=17]{scrartcl}
\usepackage{csvsimple}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\inputencoding{latin1}
\usepackage{selinput}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{tabularx}
\setlength\parindent{0pt}
\begin{document}
\vspace{1.5em}
% Include IFAM Logo on top
\begin{minipage}{\textwidth}
\begin{flushright}
\includegraphics[width=0.5\textwidth]{logo.png}
\end{flushright}
\end{minipage}
% Make header
\begin{center}
\textbf{\Large{Pr\"ufungsprotokoll f\"ur die schriftliche Pr\"ufung im Fach ?COURSE?}}
\end{center}
\vspace{1.5em}
\begin{minipage}{0.5\textwidth}
\begin{tabular}{l r}
Pr\"uferIn:& ?EXAMINOR?\\
H\"orsaal:& ?ROOM?\\
Verantw. Aufsicht:& ?SUPERVISION?\\
Zus. Aufsichtspers.:& \\
\end{tabular}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tabular}{l r}
Datum:& ?DATE?\\
Pr\"ufungsbeginn (Uhrzeit):& \\
Pr\"ufungsende (Uhrzeit):& \\
\end{tabular}
\end{minipage}
\vspace{1.5em}
% Toilettengänge
\vspace{1.5em}
\noindent\textbf{Toiletteng\"ange}\\
\begin{tabular}{|l|l|l|}\hline
Matr.-Nr. & H\"orsaal verlassen & Zur\"uck im H\"orsaal \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
\end{tabular}
% Bemerkungsfeld
\vspace{1.5em}
\noindent\textbf{Bemerkungen}\\
\framebox(500,150){}
% Anhänge
\vspace{1.5em}
\noindent\textbf{Anhang:} Anwesenheitsliste\\
% Unterschrift
\vspace{2.5em}
\begin{flushright}
\begin{tabular}{l}
\hrulefill \\
(Unterschift H\"orsaalaufsicht)
\end{tabular}
\end{flushright}
% Include Anwesenheitsliste
\newpage
\vspace{1.5em}
% Include IFAM Logo on top
\begin{minipage}{\textwidth}
\begin{flushright}
\includegraphics[width=0.5\textwidth]{logo.png}
\end{flushright}
\end{minipage}
\begin{center}
\textbf{\Large{Anwesenheitsliste f\"ur die schriftliche Pr\"ufung im Fach ?COURSE? am ?DATE?}}
\end{center}
\vspace{1.5em}
\begin{tabularx}{\textwidth}{|c|c|c|l|l|c|X|}\hline
e & ne & Matr.-Nr. & Nachname & Vorname & Vers. & Bemerkung
\csvreader[head to column names, table foot=\hline]{?LIST?}{}{\\\hline & & \Matrikelnummer & \Nachname & \Vorname & \Versuch & } \\\hline
\end{tabularx}
\small{e: Erschienen}\\
\small{ne: Nicht erschienen}
\vspace{1.5em}
\noindent\textbf{Zus\"atzlich erschienen}\\
\begin{tabularx}{\textwidth}{|c|c|c|c|X|}\hline
Matr.-Nr. & Nachname & Vorname & Vers. & Bemerkung \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
\end{tabularx}
\end{document}
name,givenname,mat,trial
Maier,Hans,12345,1
Huber,Anna,23456,3
Weisbaeck,Werner,34567,2
\documentclass[a4paper, 12pt, oneside, toc=indent, DIV=17]{scrartcl}
\usepackage{csvsimple}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\inputencoding{latin1}
\usepackage{selinput}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{ltablex}
\keepXColumns
\setlength\parindent{0pt}
\begin{document}
\vspace{1.5em}
% Include IFAM Logo on top
\begin{minipage}{\textwidth}
\begin{flushright}
\includegraphics[width=0.5\textwidth]{logo.png}
\end{flushright}
\end{minipage}
% Make header
\begin{center}
\textbf{\Large{Pr\"ufungsprotokoll f\"ur die schriftliche Pr\"ufung im Fach ?COURSE?}}
\end{center}
\vspace{1.5em}
\begin{minipage}{0.5\textwidth}
\begin{tabular}{l r}
Pr\"uferIn:& ?EXAMINOR?\\
H\"orsaal:& ?ROOM?\\
Verantw. Aufsicht:& ?SUPERVISION?\\
Zus. Aufsichtspers.:& \\
\end{tabular}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tabular}{l r}
Datum:& ?DATE?\\
Pr\"ufungsbeginn (Uhrzeit):& \\
Pr\"ufungsende (Uhrzeit):& \\
\end{tabular}
\end{minipage}
\vspace{1.5em}
% Toilettengänge
\vspace{1.5em}
\noindent\textbf{Toiletteng\"ange}\\
\begin{tabular}{|l|l|l|}\hline
Matr.-Nr. & H\"orsaal verlassen & Zur\"uck im H\"orsaal \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
\end{tabular}
% Bemerkungsfeld
\vspace{1.5em}
\noindent\textbf{Bemerkungen}\\
\framebox(500,150){}
% Anhänge
\vspace{1.5em}
\noindent\textbf{Anhang:} Anwesenheitsliste\\
% Unterschrift
\vspace{2.5em}
\begin{flushright}
\begin{tabular}{l}
\hrulefill \\
(Unterschift H\"orsaalaufsicht)
\end{tabular}
\end{flushright}
% Include Anwesenheitsliste
\newpage
\vspace{1.5em}
% Include IFAM Logo on top
\begin{minipage}{\textwidth}
\begin{flushright}
\includegraphics[width=0.5\textwidth]{logo.png}
\end{flushright}
\end{minipage}
\begin{center}
\textbf{\Large{Anwesenheitsliste f\"ur die schriftliche Pr\"ufung im Fach ?COURSE? am ?DATE?}}
\end{center}
\vspace{1.5em}
\begin{tabularx}{\textwidth}{|c|c|c|l|l|c|X|}\hline
\textbf{e} & \textbf{ne} & \textbf{Matr.-Nr.} & \textbf{Nachname} & \textbf{Vorname} & \textbf{Vers.} & \textbf{Bemerkung}
\csvreader[head to column names, table foot=\hline]{ratingList_sorted_short.csv}{}{\\\hline & & \Matrikelnummer & \Nachname & \Vorname & \Versuch & } \\\hline
\end{tabularx}
\small{e: Erschienen}\\
\small{ne: Nicht erschienen}
\vspace{1.5em}
\noindent\textbf{Zus\"atzlich erschienen}\\
\begin{tabularx}{\textwidth}{|c|X|X|c|X|}\hline
Matr.-Nr. & Nachname & Vorname & Vers. & Bemerkung \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
\end{tabularx}
\end{document}
\documentclass[a4paper, 12pt, oneside, toc=indent, DIV=17]{scrartcl}
\usepackage{csvsimple}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\inputencoding{latin1}
\usepackage{selinput}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{tabularx}
\setlength\parindent{0pt}
\begin{document}
\vspace{1.5em}
% Include IFAM Logo on top
\begin{minipage}{\textwidth}
\begin{flushright}
\includegraphics[width=0.5\textwidth]{logo.png}
\end{flushright}
\end{minipage}
% Make header
\begin{center}
\textbf{\Large{Pr\"ufungsprotokoll f\"ur die schriftliche Pr\"ufung im Fach ?COURSE?}}
\end{center}
\vspace{1.5em}
\begin{minipage}{0.5\textwidth}
\begin{tabular}{l r}
Pr\"uferIn:& ?EXAMINOR?\\
H\"orsaal:& ?ROOM?\\
Verantw. Aufsicht:& ?SUPERVISION?\\
Zus. Aufsichtspers.:& \\
\end{tabular}
\end{minipage}
\begin{minipage}{0.5\textwidth}
\begin{tabular}{l r}
Datum:& ?DATE?\\
Pr\"ufungsbeginn (Uhrzeit):& \\
Pr\"ufungsende (Uhrzeit):& \\
\end{tabular}
\end{minipage}
\vspace{1.5em}
% Toilettengänge
\vspace{1.5em}
\noindent\textbf{Toiletteng\"ange}\\
\begin{tabular}{|l|l|l|}\hline
Matr.-Nr. & H\"orsaal verlassen & Zur\"uck im H\"orsaal \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
& & \\\hline
\end{tabular}
% Bemerkungsfeld
\vspace{1.5em}
\noindent\textbf{Bemerkungen}\\
\framebox(500,150){}
% Anhänge
\vspace{1.5em}
\noindent\textbf{Anhang:} Anwesenheitsliste\\
% Unterschrift
\vspace{2.5em}
\begin{flushright}
\begin{tabular}{l}
\hrulefill \\
(Unterschift H\"orsaalaufsicht)
\end{tabular}
\end{flushright}
% Include Anwesenheitsliste
\newpage
\vspace{1.5em}
% Include IFAM Logo on top
\begin{minipage}{\textwidth}
\begin{flushright}
\includegraphics[width=0.5\textwidth]{logo.png}
\end{flushright}
\end{minipage}
\begin{center}
\textbf{\Large{Anwesenheitsliste f\"ur die schriftliche Pr\"ufung im Fach ?COURSE? am ?DATE?}}
\end{center}
\vspace{1.5em}
\begin{tabularx}{\textwidth}{|c|c|c|l|l|c|X|}\hline
e & ne & Matr.-Nr. & Nachname & Vorname & Vers. & Bemerkung
\csvreader[head to column names, table foot=\hline]{?LIST?}{}{\\\hline & & \Matrikelnummer & \Nachname & \Vorname & \Versuch & } \\\hline
\end{tabularx}
\small{e: Erschienen}\\
\small{ne: Nicht erschienen}
\vspace{1.5em}
\noindent\textbf{Zus\"atzlich erschienen}\\
\begin{tabularx}{\textwidth}{|c|c|c|c|X|}\hline
Matr.-Nr. & Nachname & Vorname & Vers. & Bemerkung \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
& & & & \\\hline
\end{tabularx}
\end{document}
import os
import click
import sys
import shutil
from src import Exam_old
# Define input parameters
#@click.command()
# Display welcome message
def disp_welcome():
print("**************************************************************************")
print("| |")
print("| WELCOME TO |")
print("| __ __ _____ _____ _____ _ _ _ _______ __ |")
print("| | \/ |_ _| __ \ /\ / ____| | | | | |_ _\ \ / / |")
print("| | \ / | | | | |__) | / \ | | | | | | | | | \ V / |")
print("| | |\/| | | | | _ / / /\ \| | | | | | | | | > < |")
print("| | | | |_| |_| | \ \ / ____ \ |____| |__| | |____ _| |_ / . \ |")
print("| |_| |_|_____|_| \_\/_/ \_\_____|\____/|______|_____/_/ \_\ |")
print("| |")
print("| -A handy tool for your examination processes!- |")
print("| |")
print("| |")
print("| Copyright 2019 - Institute for Applied Mechanics/RWTH Aachen |")
print("| |")
print("**************************************************************************")
print("")
# Startup function
def startup():
string = 'You can choose between the following tasks. \n' \
'[1]: Set up new exam \n' \
'[2]: Rate existing exam \n' \
'[3]: Create uploadable file for RWTHonline\n' \
'\n' \
'What do you want to do?'
action_value = click.prompt(string, type=int)
return action_value
# Verify to continue
def ask_continue():
if click.confirm('Do you want to continue?'):
click.echo('\nAlright, let\'s start!')
else:
click.echo('Okay, the program is being closed!')
sys.exit()
# Make new exam
def new_exam():
print("\nYou chose to create a NEW examination!")
print("Before you proceed, please download the list of participants for the examination from RWTHonline!\n")
ask_continue()
# Get user data
course_name = click.prompt('Enter name of the course being examinated')
exam_examiner = click.prompt('Enter name of the examiner')
exam_date = click.prompt('Enter date of the examination')
exam_num_rooms = click.prompt('How many rooms are booked for the examination?')
exam_room_names = []
exam_room_supervisors = []
exam_room_capacities = []
if exam_num_rooms >= 1:
for index in range(int(exam_num_rooms)):
exam_room_names.append(click.prompt("Please enter room name for room no. " + str(index+1)))
exam_room_capacities.append(click.prompt("Please enter max. number of students for room no. " + str(index + 1)))
exam_room_supervisors.append(click.prompt("Please enter name of the supervisor for room no. " + str(index+1)))
else:
sys.exit('WARNING! An examination must not have zero or less than zero rooms booked!')
exam_room = {
'number_of_rooms': exam_num_rooms,
'names': exam_room_names,
'capacities': exam_room_capacities,
'supervisors': exam_room_supervisors
}
exam_participants = click.prompt('Enter file name for list of participants')
if os.path.isfile(exam_participants):
if click.confirm('Do you want to use the same directory for your exam data?'):
exam_directory = os.path.dirname(exam_participants)
else:
exam_directory = click.prompt('Enter a directory you want to store your exam data in')
if not os.path.isdir(exam_directory):
if click.confirm('This directory does not exist! Do you want to create it?'):
os.mkdir(exam_directory)
else:
click.echo('Okay, the program is being closed!')
sys.exit()
# Copy participants list to defined directory
shutil.copyfile(exam_participants, exam_directory+"/"+os.path.basename(exam_participants))
exam_participants = exam_directory+"/"+os.path.basename(exam_participants)
else:
print('WARNING! File not found!')
sys.exit('Program is being terminated!')
exam_num_tasks = click.prompt('Enter number of tasks given in the exam')
exam_points = []
for index in range(int(exam_num_tasks)):
exam_points.append(click.prompt("Enter number of maximal points for task no. " + str(index+1)))
# Create exam object with given data and write to json file
exam = Exam_old.Exam(course_name, exam_date, exam_examiner, exam_room, exam_participants, exam_directory,
exam_points)
exam.write_json()
# Create rating list and examination protocol
Exam_old.make_list(exam_participants, exam_directory, int(exam_num_tasks))
Exam_old.make_protocol(exam_directory)
# Rate examination
def rate_exam():
print("\nYou chose RATING of existing examination!")
print("Before you proceed, please make sure you recorded the the points reached in the exam within the rating "
"list file!\n")
ask_continue()
# Make uploadable file
def make_upload():
print("\nYou chose to make an UPLOADABLE file for RWTHonline!")
print("Before you proceed, please make sure you ran miraculix in rating mode!\n")
ask_continue()
def debug():
exam = Exam_old.Exam()
exam.read_json('./test/Test_exam_data.json')
Exam_old.make_list('./test/exam_list_test.csv', './test', 3)
Exam_old.make_protocol('./test', exam)
# Starting main program
if __name__ == '__main__':
os.system('clear')
try:
disp_welcome()
val = startup()
if val == 1:
new_exam()
elif val == 2:
rate_exam()
elif val == 3:
make_upload()
elif val == 4:
debug()
else:
print("Sorry, your choice is not defined!")
except click.exceptions.Abort:
sys.exit("\n\nThe program is being closed!")
from src.Exam import *
from src.Exceptions import *
bs1 = Room('./templates/rooms/BSI.json')
#bs2 = Room('./templates/rooms/BSII.json')
ex = Exam('./test/rwthonline_data.csv', rooms=[bs1])
ex.Points_per_task = [10, 10, 10]
ex.assign_participants()
#ex.export_rating_list('./test/rating_test.csv')
#ex.import_rating_list('./test/rating_test.csv')
#ex.export_data_RWTHOnline()
print(bs1)
from src.exam import *
from src.protocols import Protocol
ex = Exam('./testdata/large_exam_inputdata.csv')
ex.Points_per_task = [10, 10, 5, 10]
ex.assign_participants()
prot = Protocol(ex)
prot.make_protocol('./testdata/test_protocol.docx')
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