X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/a146bf18e42d925d1c76f6cfd9d5d35225e41110..30b66b3ed7061eaaab51a23cc71e6aff0dbdc650:/sercom/controllers.py diff --git a/sercom/controllers.py b/sercom/controllers.py index 8930478..b84b7c2 100644 --- a/sercom/controllers.py +++ b/sercom/controllers.py @@ -46,7 +46,7 @@ class Root(controllers.RootController): .orderBy(InstanciaDeEntrega.q.fin)) return dict(a_corregir=correcciones, instancias_activas=instancias, now=now) - + if 'entregar' in identity.current.permissions: # Proximas instancias de entrega instancias = list(InstanciaDeEntrega.select( @@ -111,22 +111,20 @@ class Root(controllers.RootController): docente = DocenteController() - grupo = GrupoController() - alumno = AlumnoController() enunciado = EnunciadoController() ejercicio = EjercicioController() - caso_de_prueba = CasoDePruebaController() + tarea_fuente = TareaFuenteController() + + tarea_prueba = TareaPruebaController() curso = CursoController() docente_inscripto = DocenteInscriptoController() - alumno_inscripto = AlumnoInscriptoController() - correccion = CorreccionController() admin = identity.SecureObject(CatWalk(model), identity.has_permission('admin')) @@ -135,6 +133,8 @@ class Root(controllers.RootController): mis_correcciones = MisCorreccionesController() + grupo_admin = GrupoAdminController() + #{{{ Agrega summarize a namespace tg de KID def summarize(text, size, concat=True, continuation='...'): """Summarize a string if it's length is greater than a specified size. This @@ -164,8 +164,13 @@ def summarize(text, size, concat=True, continuation='...'): text = text[:size-len(continuation)] + continuation return text +def strbool(bool): + if bool: + return _(u'Sí') + return _(u'No') + def add_custom_stdvars(vars): - return vars.update(dict(summarize=summarize)) + return vars.update(dict(summarize=summarize, strbool=strbool)) view.variable_providers.append(add_custom_stdvars) #}}}