page break nach 80 Aufgaben und Drop Down Aufgaben

This commit is contained in:
2021-06-05 15:01:11 +02:00
parent 6b1c0eb192
commit d12eae4830
4 changed files with 19 additions and 2 deletions

8
app.py
View File

@@ -39,7 +39,13 @@ def index():
zufall = []
for r in request.form.getlist('rechenreihen'):
alle.extend(rechenreihen[r])
while len(alle):
if request.form.get('anzahl'):
count = (int(request.form.get('anzahl')) + 1)
else:
count = len(alle)
for i in range(1,count):
zufall.append(alle.pop(random.randint(0,len(alle)-1)))
return render_template('arbeitsblatt.html',aufgaben=zufall)
else: