Browse Source

Merge branch 'develop' of gimli.ms.mff.cuni.cz:/akce/mam/git/mamweb into develop

export_seznamu_prednasek
parent
commit
9f4be74e7e
  1. 1
      seminar/models/tvorba.py
  2. 9
      seminar/utils.py

1
seminar/models/tvorba.py

@ -6,6 +6,7 @@ import tempfile
import logging
from django.contrib.sites.shortcuts import get_current_site
from django.core.files.storage import FileSystemStorage
from django.db import models
from django.utils import timezone
from django.conf import settings

9
seminar/utils.py

@ -309,6 +309,15 @@ def podproblemy_v_cislu(cislo, problemy=None, hlavni_problemy=None):
else:
podproblemy[-1].append(problem)
for podproblem in podproblemy.keys():
def int_or_zero(p):
try:
return int(p.kod)
except ValueError:
return 0
podproblemy[podproblem] = sorted(podproblemy[podproblem], key=int_or_zero)
return podproblemy
class TypDeadline(Enum):

Loading…
Cancel
Save