Commit 7bdebc09 authored by Lorenz Steinert's avatar Lorenz Steinert

cleaned up code

parent 50683c21
......@@ -88,6 +88,7 @@ def resort_fsr(fsr, num_cols=5):
depth = len(fsr)//num_cols
tmp = [[] for i in range(depth)]
for index, elem in zip(range(len(fsr)), fsr):
tmp[index%depth] += [elem]
......@@ -98,10 +99,10 @@ def gen_attendance_tab(fsr, num_cols=5, ext=False):
fsr = resort_fsr(fsr, num_cols)
fsr_tab, tabdef = '', '||'
tabdef = '||' + 'c|l||'*num_cols
fsr_tab = ''
if ext:
fsr_tab += "Externe Referenten\\\\\n\\\\\n" \
+ r"\scriptsize{\begin{tabular}{" \
......@@ -123,12 +124,6 @@ def gen_attendance_tab(fsr, num_cols=5, ext=False):
else:
fsr_tab += "\n"
#add empty cells to padd the last row
# if not len(fsr) % num_cols == 0:
# for i in range(num_cols - len(fsr) % num_cols):
# fsr_tab += "& &\n"
# fsr_tab += "\\\\\\hline\n"
if ext:
fsr_tab += "\\end{tabular}}\\normalsize"
else:
......
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