X-Git-Url: https://git.llucax.com/z.facultad/75.52/sercom.git/blobdiff_plain/206d6cd5f26a563166199329735818db9345828b..68e9d1b139c54e69d0afcbfb53df4b42ced27348:/sercom/subcontrollers/curso/__init__.py diff --git a/sercom/subcontrollers/curso/__init__.py b/sercom/subcontrollers/curso/__init__.py index 8873458..7411437 100644 --- a/sercom/subcontrollers/curso/__init__.py +++ b/sercom/subcontrollers/curso/__init__.py @@ -13,6 +13,7 @@ from sercom.subcontrollers import validate as val from sercom.model import Curso, Ejercicio, Alumno, Docente, Grupo, DocenteInscripto from curso_alumno import * from sqlobject import * +from sqlobject.dberrors import * from sercom.widgets import * #}}} @@ -23,20 +24,6 @@ namepl = name + 's' #}}} ajax = u""" - function makeOption(option) { - return OPTION({"value": option.value}, option.text); - } - - function moveOption( fromSelect, toSelect) { - // add 'selected' nodes toSelect - appendChildNodes(toSelect, - map( makeOption,ifilter(itemgetter('selected'), $(fromSelect).options))); - // remove the 'selected' fromSelect - replaceChildNodes(fromSelect, - list(ifilterfalse(itemgetter('selected'), $(fromSelect).options)) - ); - } - function alumnos_agregar_a_la_lista(texto, lista) { t = MochiKit.DOM.getElement(texto); @@ -80,26 +67,23 @@ ajax = u""" var d = loadJSONDoc(url); d.addCallbacks(procesar, err); } - - function prepare() - { - connect('form_responsable', 'onblur', buscar_alumno); - } - + function onsubmit() { /* 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_miembros'); + l = MochiKit.DOM.getElement('form_alumnos'); + for (i=0; i