+ record = {}
+ if 'admin' in identity.current.permissions:
+ from sqlobject import DateTimeCol
+ # TODO : Fijar el curso !!
+ record['entregas_para_corregir'] = Correccion.selectBy(corrector=identity.current.user, nota=None).count()
+ try:
+ record['proxima_entrega'] = InstanciaDeEntrega.select(InstanciaDeEntrega.q.inicio >= DateTimeCol.now() and InstanciaDeEntrega.q.fin > DateTimeCol.now()).getOne()
+ record['proxima_entrega'] = record['proxima_entrega'][0]
+ except:
+ record['proxima_entrega'] = None