Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/EjercitarClient
diff options
context:
space:
mode:
authorSamu <samurey@gmail.com>2013-05-13 14:46:47 (GMT)
committer Samu <samurey@gmail.com>2013-05-13 14:46:47 (GMT)
commit42b83a85293bc32882faa2d03b8b96971e138346 (patch)
tree31c4cb8f7ebaf825d32a7017f1b4c5dcc71aff91 /EjercitarClient
parentc5567b536ef529f91154438552bf52642632eeef (diff)
parent6712e68e2564bbaf2ce604f368ef37b4c7056d8c (diff)
Merge remote-tracking branch 'remotes/origin/Cecilia' into samu
Conflicts: EjercitarClient/gui/ContenedorTareas.py EjercitarClient/gui/Login.py EjercitarClient/gui/Temas.py EjercitarServer/ejbModule/beans/EjercitarWSBean.java
Diffstat (limited to 'EjercitarClient')
-rw-r--r--EjercitarClient/.project34
-rw-r--r--EjercitarClient/.pydevproject24
-rw-r--r--EjercitarClient/gui/EjercitarGUI.py92
-rw-r--r--EjercitarClient/gui/Ejercitario.py182
4 files changed, 166 insertions, 166 deletions
diff --git a/EjercitarClient/.project b/EjercitarClient/.project
index edf3299..c508845 100644
--- a/EjercitarClient/.project
+++ b/EjercitarClient/.project
@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>EjercitarClient</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.python.pydev.PyDevBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.python.pydev.pythonNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>EjercitarClient</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.python.pydev.PyDevBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.python.pydev.pythonNature</nature>
+ </natures>
+</projectDescription>
diff --git a/EjercitarClient/.pydevproject b/EjercitarClient/.pydevproject
index 6121ef5..33ec52e 100644
--- a/EjercitarClient/.pydevproject
+++ b/EjercitarClient/.pydevproject
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<?eclipse-pydev version="1.0"?>
-
-<pydev_project>
-<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
-<path>/EjercitarClient</path>
-<path>/EjercitarClient/lib/suds-0.4-py2.6.egg</path>
-</pydev_pathproperty>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
-<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
-
-</pydev_project>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?eclipse-pydev version="1.0"?>
+
+<pydev_project>
+<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
+<path>/EjercitarClient</path>
+<path>/EjercitarClient/lib/suds-0.4-py2.6.egg</path>
+</pydev_pathproperty>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
+<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
+
+</pydev_project>
diff --git a/EjercitarClient/gui/EjercitarGUI.py b/EjercitarClient/gui/EjercitarGUI.py
index cfc3fd7..b9cc643 100644
--- a/EjercitarClient/gui/EjercitarGUI.py
+++ b/EjercitarClient/gui/EjercitarGUI.py
@@ -1,47 +1,47 @@
-'''
-Created on Feb 2, 2013
-
-@author: Samu
-'''
-import gtk
-import gobject
-from gui.Login import Login
-from gui.Temas import Temas
-
-class EjercitarGUI:
-
- # This is a callback function. The data arguments are ignored
- # in this example. More on callbacks below.
- def hello(self, widget, data=None):
- print "Hello World"
-
- def delete_event(self, widget, event, data=None):
- # If you return FALSE in the "delete_event" signal handler,
- # GTK will emit the "destroy" signal. Returning TRUE means
- # you don't want the window to be destroyed.
- # This is useful for popping up 'are you sure you want to quit?'
- # type dialogs.
- print "delete event occurred"
-
- # Change FALSE to TRUE and the main window will not be destroyed
- # with a "delete_event".
- return False
-
- def destroy(self, widget, data=None):
- print "destroy signal occurred"
- gtk.main_quit()
-
- def __init__(self):
- # create a new window
- self.ventana = gtk.Window(gtk.WINDOW_TOPLEVEL)
- login = Login(self.ventana)
- self.ventana.add(login)
- self.ventana.show()
-
- def main(self):
- gtk.main()
-
-
-if __name__ == "__main__":
- hello = EjercitarGUI()
+'''
+Created on Feb 2, 2013
+
+@author: Samu
+'''
+import gtk
+import gobject
+from gui.Login import Login
+from gui.Temas import Temas
+
+class EjercitarGUI:
+
+ # This is a callback function. The data arguments are ignored
+ # in this example. More on callbacks below.
+ def hello(self, widget, data=None):
+ print "Hello World"
+
+ def delete_event(self, widget, event, data=None):
+ # If you return FALSE in the "delete_event" signal handler,
+ # GTK will emit the "destroy" signal. Returning TRUE means
+ # you don't want the window to be destroyed.
+ # This is useful for popping up 'are you sure you want to quit?'
+ # type dialogs.
+ print "delete event occurred"
+
+ # Change FALSE to TRUE and the main window will not be destroyed
+ # with a "delete_event".
+ return False
+
+ def destroy(self, widget, data=None):
+ print "destroy signal occurred"
+ gtk.main_quit()
+
+ def __init__(self):
+ # create a new window
+ self.ventana = gtk.Window(gtk.WINDOW_TOPLEVEL)
+ login = Login(self.ventana)
+ self.ventana.add(login)
+ self.ventana.show()
+
+ def main(self):
+ gtk.main()
+
+
+if __name__ == "__main__":
+ hello = EjercitarGUI()
hello.main() \ No newline at end of file
diff --git a/EjercitarClient/gui/Ejercitario.py b/EjercitarClient/gui/Ejercitario.py
index 7d60441..ce6bcde 100644
--- a/EjercitarClient/gui/Ejercitario.py
+++ b/EjercitarClient/gui/Ejercitario.py
@@ -1,91 +1,91 @@
-'''
-Created on Feb 4, 2013
-
-@author: Samu
-'''
-
-import gtk
-
-import suds
-from suds.client import Client
-
-class Ejercitario(gtk.VBox):
-
- # This is a callback function. The data arguments are ignored
- # in this example. More on callbacks below.
-
-
- def __init__(self, cliente_WS, id_tarea, id_alumno):
- # create a new window
- super(Ejercitario, self).__init__()
-
- self.id_tarea = id_tarea
- self.id_alumno = id_alumno
- self.cliente_WS = cliente_WS
-
- self.__inicializar_componentes()
- self.siguiente_ejercicio = self.__obtener_siguiente_ejercicio(cliente_WS)
- self.__organizar_gui(self.siguiente_ejercicio)
- #self.__sincronizar_temas()
- self.show_all()
-
- def __inicializar_componentes(self):
- self.label_enunciado = gtk.Label()
- self.solucion1 = gtk.RadioButton()
- self.solucion2 = gtk.RadioButton()
- self.solucion3 = gtk.RadioButton()
- self.solucion4 = gtk.RadioButton()
-
- self.solucion2.set_group(self.solucion1)
- self.solucion3.set_group(self.solucion1)
- self.solucion4.set_group(self.solucion1)
-
- self.boton_responder = gtk.Button("Responder")
- self.boton_responder.connect("clicked", self.__responder_cb)
-
- def __organizar_gui(self, siguiente_ejercicio):
-
- self.solucion1.set_label(siguiente_ejercicio.respuestaList.respuestaList[0].descripcion)
- self.solucion2.set_label(siguiente_ejercicio.respuestaList.respuestaList[1].descripcion)
- self.solucion3.set_label(siguiente_ejercicio.respuestaList.respuestaList[2].descripcion)
- self.solucion4.set_label(siguiente_ejercicio.respuestaList.respuestaList[3].descripcion)
-
- self.label_enunciado.set_label(siguiente_ejercicio.enunciado)
-
-
- contenedor_soluciones = gtk.HBox()
- contenedor_soluciones.add(self.solucion1)
- contenedor_soluciones.add(self.solucion2)
- contenedor_soluciones.add(self.solucion3)
- contenedor_soluciones.add(self.solucion4)
-
- self.add(self.label_enunciado)
- self.add(contenedor_soluciones)
- self.add(self.boton_responder)
- self.show_all()
-
- def __sincronizar_temas(self):
- pass
-
- def __obtener_siguiente_ejercicio(self, cliente_WS):
- try:
- #cliente_WS = Client(self.WSDL_URL)
- siguiente_ejercicio = cliente_WS.service.getSiguienteEjercicio(self.id_tarea, self.id_alumno, self.siguiente_ejercicio.idEjercicio, "respuesta")
- except:
- print "\n\nERROR al instanciar el SINCRONIZAR PROXY:"
-
- return siguiente_ejercicio
-
- def __responder_cb(self, boton):
- siguiente_ejercicio = self.__obtener_siguiente_ejercicio(self.cliente_WS)
- self.__actualizar_gui(siguiente_ejercicio)
-
- def __actualizar_gui(self, siguiente_ejercicio):
- self.solucion1.set_label(siguiente_ejercicio.respuestaList.respuestaList[0].descripcion)
- self.solucion2.set_label(siguiente_ejercicio.respuestaList.respuestaList[1].descripcion)
- self.solucion3.set_label(siguiente_ejercicio.respuestaList.respuestaList[2].descripcion)
- self.solucion4.set_label(siguiente_ejercicio.respuestaList.respuestaList[3].descripcion)
-
- self.label_enunciado.set_label(siguiente_ejercicio.enunciado)
-
-
+'''
+Created on Feb 4, 2013
+
+@author: Samu
+'''
+
+import gtk
+
+import suds
+from suds.client import Client
+
+class Ejercitario(gtk.VBox):
+
+ # This is a callback function. The data arguments are ignored
+ # in this example. More on callbacks below.
+
+
+ def __init__(self, cliente_WS, id_tarea, id_alumno):
+ # create a new window
+ super(Ejercitario, self).__init__()
+
+ self.id_tarea = id_tarea
+ self.id_alumno = id_alumno
+ self.cliente_WS = cliente_WS
+
+ self.__inicializar_componentes()
+ self.siguiente_ejercicio = self.__obtener_siguiente_ejercicio(cliente_WS)
+ self.__organizar_gui(self.siguiente_ejercicio)
+ #self.__sincronizar_temas()
+ self.show_all()
+
+ def __inicializar_componentes(self):
+ self.label_enunciado = gtk.Label()
+ self.solucion1 = gtk.RadioButton()
+ self.solucion2 = gtk.RadioButton()
+ self.solucion3 = gtk.RadioButton()
+ self.solucion4 = gtk.RadioButton()
+
+ self.solucion2.set_group(self.solucion1)
+ self.solucion3.set_group(self.solucion1)
+ self.solucion4.set_group(self.solucion1)
+
+ self.boton_responder = gtk.Button("Responder")
+ self.boton_responder.connect("clicked", self.__responder_cb)
+
+ def __organizar_gui(self, siguiente_ejercicio):
+
+ self.solucion1.set_label(siguiente_ejercicio.respuestaList.respuestaList[0].descripcion)
+ self.solucion2.set_label(siguiente_ejercicio.respuestaList.respuestaList[1].descripcion)
+ self.solucion3.set_label(siguiente_ejercicio.respuestaList.respuestaList[2].descripcion)
+ self.solucion4.set_label(siguiente_ejercicio.respuestaList.respuestaList[3].descripcion)
+
+ self.label_enunciado.set_label(siguiente_ejercicio.enunciado)
+
+
+ contenedor_soluciones = gtk.HBox()
+ contenedor_soluciones.add(self.solucion1)
+ contenedor_soluciones.add(self.solucion2)
+ contenedor_soluciones.add(self.solucion3)
+ contenedor_soluciones.add(self.solucion4)
+
+ self.add(self.label_enunciado)
+ self.add(contenedor_soluciones)
+ self.add(self.boton_responder)
+ self.show_all()
+
+ def __sincronizar_temas(self):
+ pass
+
+ def __obtener_siguiente_ejercicio(self, cliente_WS):
+ try:
+ #cliente_WS = Client(self.WSDL_URL)
+ siguiente_ejercicio = cliente_WS.service.getSiguienteEjercicio(self.id_tarea, self.id_alumno, self.siguiente_ejercicio.idEjercicio, "respuesta")
+ except:
+ print "\n\nERROR al instanciar el SINCRONIZAR PROXY:"
+
+ return siguiente_ejercicio
+
+ def __responder_cb(self, boton):
+ siguiente_ejercicio = self.__obtener_siguiente_ejercicio(self.cliente_WS)
+ self.__actualizar_gui(siguiente_ejercicio)
+
+ def __actualizar_gui(self, siguiente_ejercicio):
+ self.solucion1.set_label(siguiente_ejercicio.respuestaList.respuestaList[0].descripcion)
+ self.solucion2.set_label(siguiente_ejercicio.respuestaList.respuestaList[1].descripcion)
+ self.solucion3.set_label(siguiente_ejercicio.respuestaList.respuestaList[2].descripcion)
+ self.solucion4.set_label(siguiente_ejercicio.respuestaList.respuestaList[3].descripcion)
+
+ self.label_enunciado.set_label(siguiente_ejercicio.enunciado)
+
+