X-Git-Url: https://git.llucax.com/software/sercom.git/blobdiff_plain/5b8a71a4d21a5ee35694718804dda7820f13f768..c727869631ca11e50cdcb996d5cf7782bc865f3f:/sercom/subcontrollers/enunciado/__init__.py diff --git a/sercom/subcontrollers/enunciado/__init__.py b/sercom/subcontrollers/enunciado/__init__.py index 5016aad..9ef523f 100644 --- a/sercom/subcontrollers/enunciado/__init__.py +++ b/sercom/subcontrollers/enunciado/__init__.py @@ -1,58 +1,124 @@ -# vim: set et sw=4 sts=4 encoding=utf-8 : +# vim: set et sw=4 sts=4 encoding=utf-8 foldmethod=marker : +#{{{ Imports from turbogears import controllers, expose, redirect -from turbogears import validate, validators, flash, error_handler -from turbogears.widgets import * +from turbogears import validate, flash, error_handler +from turbogears import validators as V +from turbogears import widgets as W from turbogears import identity from turbogears import paginate from docutils.core import publish_parts from sercom.subcontrollers import validate as val -from sercom.model import Enunciado, Docente +from sercom.model import Enunciado, Docente, Curso, Tarea, TareaFuente, TareaPrueba +from cherrypy import request, response +from sercom.widgets import * +from caso_de_prueba import CasoDePruebaController +#}}} +#{{{ Configuración cls = Enunciado name = 'enunciado' namepl = name + 's' -def validate_autor(data): - autor = data.get('autorID', None) - if autor == 0: autor = None - if autor is not None: +fkcls = Docente +fkname = 'autor' +fknamepl = fkname + 'es' +#}}} + +ajax = u""" + function doSubmit() + { + /* TODO : Validar datos y evitar el submit si no esta completo */ + + /* Selecciono todos los miembros si no, no llegan al controllere*/ + l = MochiKit.DOM.getElement('form_tareas_fuente_to'); + for (i=0; i