X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/b7dc7b7d1fff161bef13b1219cc32c9b4472b97a..2cccd648ebe3e070f6f550e2444052c30f1a29fd:/sercom/subcontrollers/curso/__init__.py diff --git a/sercom/subcontrollers/curso/__init__.py b/sercom/subcontrollers/curso/__init__.py index 5380d43..b9ce585 100644 --- a/sercom/subcontrollers/curso/__init__.py +++ b/sercom/subcontrollers/curso/__init__.py @@ -18,6 +18,7 @@ from sercom.widgets import * from alumno import AlumnoInscriptoController from grupo import GrupoController from ejercicio import EjercicioController +from docente import DocenteInscriptoController #}}} #{{{ Configuración @@ -165,6 +166,7 @@ class CursoController(controllers.Controller, identity.SecureResource): alumno = AlumnoInscriptoController() grupo = GrupoController() ejercicio = EjercicioController() + docente = DocenteInscriptoController() @expose() def default(self, tg_errors=None): @@ -223,8 +225,8 @@ class CursoController(controllers.Controller, identity.SecureResource): """Edit record in model""" r = validate_get(id) # cargo la lista con los docentes asignados al curso - r.docentes_to = [{"id":d.docente.id, "label":d.docente.shortrepr()} for d in r.docentes] - r.alumnos_inscriptos = [{"id":a.alumno.id, "label":a.alumno.shortrepr()} for a in r.alumnos] + r.docentes_to = [{"id":d.docente.id, "label":d.docente.shortrepr().replace("'", "\\'")} for d in r.docentes] + r.alumnos_inscriptos = [{"id":a.alumno.id, "label":a.alumno.shortrepr().replace("'", "\\'")} for a in r.alumnos] return dict(name=name, namepl=namepl, record=r, form=form) @validate(form=form)