]> git.llucax.com Git - z.facultad/75.52/sercom.git/commitdiff
Ver entregas de una Correccion.
authorRicardo Markiewicz <rmarkie@fi.uba.ar>
Fri, 2 Mar 2007 02:23:48 +0000 (02:23 +0000)
committerRicardo Markiewicz <rmarkie@fi.uba.ar>
Fri, 2 Mar 2007 02:23:48 +0000 (02:23 +0000)
sercom/subcontrollers/correccion/__init__.py
sercom/subcontrollers/correccion/templates/entregas.kid [new file with mode: 0644]
sercom/subcontrollers/correccion/templates/list.kid

index 4aefc53862f9459c6efde632a3891de564f75c6a..573241e55467f17123e43d86da5b9173ee291c50 100644 (file)
@@ -121,5 +121,11 @@ class CorreccionController(controllers.Controller, identity.SecureResource):
             r.obs = publish_parts(r.observaciones, writer_name='html')['html_body']
         return dict(name=name, namepl=namepl, record=r)
 
+    @expose(template='kid:%s.templates.entregas' % __name__)
+    @paginate('records')
+    def entregas(self, id):
+        r = validate_get(id)
+        return dict(records=r.entregas, correccion = id)
+        
 #}}}
 
diff --git a/sercom/subcontrollers/correccion/templates/entregas.kid b/sercom/subcontrollers/correccion/templates/entregas.kid
new file mode 100644 (file)
index 0000000..876324f
--- /dev/null
@@ -0,0 +1,58 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<?python from sercom.model import Grupo, AlumnoInscripto ?>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
+    py:extends="'../../../templates/master.kid'">
+<head>
+<meta content="text/html; charset=utf-8" http-equiv="Content-Type" py:replace="''"/>
+<title>list</title>
+</head>
+<body>
+
+<h1>Entregas realizadas</h1>
+
+<table class="list">
+    <tr>
+                               <th>Fecha</th>
+        <th>Correcta?</th>
+        <th>Observaciones</th>
+        <th>Tareas</th>
+    </tr>
+    <tr py:for="record in records">
+        <td><span py:replace="record.fecha">usuario</span></td>
+        <td><span py:replace="record.correcta">fecha asignado</span></td>
+        <td><span py:replace="record.observaciones">fecha corregido</span></td>
+                               <td>
+                                       <table>
+                                               <tr>
+                                                       <th>Tarea</th>
+                                                       <th>Desde</th>
+                                                       <th>Hasta</th>
+                                                       <th>Correcta</th>
+                                                       <th>Obs</th>
+                                               </tr>
+                                               <tr py:for="i in record.tareas">
+                                                       <td >${i.tarea.shortrepr()}</td>
+                                                       <td>${i.inicio}</td>
+                                                       <td>${i.fin}</td>
+                                                       <td align="center">
+                                                               <span py:if="i.exito">Si</span>
+                                                               <span py:if="not i.exito">No</span>
+                                                       </td>
+                                                       <td>${i.observaciones}</td>
+                                               </tr>
+                                       </table>
+                               </td>
+    </tr>
+</table>
+<br />
+<a href="/correccion/list">Volver</a>
+<div py:for="page in tg.paginate.pages">
+    <a py:if="page != tg.paginate.current_page"
+        href="${tg.paginate.get_href(page)}">${page}</a>
+    <b py:if="page == tg.paginate.current_page">${page}</b>
+</div>
+
+</body>
+</html>
+
+<!-- vim: set et sw=4 sts=4 : -->
index 0f5f23d7bf0bf15a7f031b4128ec6d96001f66e6..27aab58241f0d5629a71521831cb4c711c900fdc 100644 (file)
@@ -29,7 +29,7 @@
                                        <a py:if="isinstance(record.entregador, Grupo)" href="${tg.url('/grupo/show/%d' % record.entregador.id)}" py:content="record.entregador.shortrepr()">nombre</a>
                                        <a py:if="isinstance(record.entregador, AlumnoInscripto)" href="${tg.url('/alumno/show/%d' % record.entregador.alumno.id)}" py:content="record.entregador.shortrepr()">nombre</a>
                                </td>
-        <td align="center"><span py:replace="len(record.entregas)">email</span></td>
+                               <td align="center"><a href="${tg.url('/correccion/entregas/%d' % record.id)}" py:content="len(record.entregas)">entregas realizadas</a></td>
                                <td><a href="${tg.url('/docente/show/%d' % record.corrector.docente.id)}" py:content="record.corrector.shortrepr()">corrector</a></td>
         <td><span py:replace="record.asignado">fecha asignado</span></td>
         <td><span py:replace="record.corregido">fecha corregido</span></td>