X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/f8e0f8df0b9169f34109c752c63d67851c319ff7..5abdab4db1be106faafe469314fa939d1948399b:/sercom/subcontrollers/curso/__init__.py?ds=sidebyside diff --git a/sercom/subcontrollers/curso/__init__.py b/sercom/subcontrollers/curso/__init__.py index fe63512..699bc79 100644 --- a/sercom/subcontrollers/curso/__init__.py +++ b/sercom/subcontrollers/curso/__init__.py @@ -17,6 +17,7 @@ from sqlobject.dberrors import * from sercom.widgets import * from alumno import AlumnoInscriptoController from grupo import GrupoController +from ejercicio import EjercicioController #}}} #{{{ Configuración @@ -163,6 +164,7 @@ class CursoController(controllers.Controller, identity.SecureResource): curso_alumno = CursoAlumnoController() alumno = AlumnoInscriptoController() grupo = GrupoController() + ejercicio = EjercicioController() @expose() def default(self, tg_errors=None): @@ -177,7 +179,7 @@ class CursoController(controllers.Controller, identity.SecureResource): @paginate('records') def list(self): """List records in model""" - r = cls.select() + r = cls.select().orderBy((-cls.q.anio, -cls.q.cuatrimestre, cls.q.numero)) return dict(records=r, name=name, namepl=namepl) @expose()