]> git.llucax.com Git - software/sercom.git/commitdiff
show de los datos asociados a un alumno inscripto.
authorRicardo Markiewicz <rmarkie@fi.uba.ar>
Sun, 4 Mar 2007 19:50:28 +0000 (19:50 +0000)
committerRicardo Markiewicz <rmarkie@fi.uba.ar>
Sun, 4 Mar 2007 19:50:28 +0000 (19:50 +0000)
sercom/model.py
sercom/subcontrollers/alumno_inscripto/__init__.py
sercom/subcontrollers/alumno_inscripto/templates/list.kid
sercom/subcontrollers/alumno_inscripto/templates/show.kid [new file with mode: 0644]

index f8ae37485d3fee4cbb59b488c8b2aee898093c5f..b2ec70600179d7f36fc6e2eae6d52f33f34e99da 100644 (file)
@@ -871,6 +871,8 @@ class Correccion(SQLObject): #{{{
                     self.corregido, self.nota, self.observaciones)
 
     def shortrepr(self):
+        if not self.corrector:
+            return '%s' % self.entrega.shortrepr()
         return '%s,%s' % (self.entrega.shortrepr(), self.corrector.shortrepr())
 #}}}
 
index 4b91be00496f7d63c1341b9ace3f9844a2c6cc77..0ba860f549515f5c9b9ad8274399a82da4ebaf99 100644 (file)
@@ -108,10 +108,6 @@ class AlumnoInscriptoController(controllers.Controller, identity.SecureResource)
     def show(self,id, **kw):
         """Show record in model"""
         r = validate_get(id)
-        if r.observaciones is None:
-            r.obs = ''
-        else:
-            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__)
index 148f240b796d1d6942bf6050d33897574f7544da..d407d2f85de9e9bc774f85bb550d2dd4b51bfb82 100644 (file)
@@ -26,7 +26,7 @@
         <td><span py:replace="record.condicional">fecha corregido</span></td>
         <td><a py:if="record.tutor" href="${tg.url('/docente/show/%d' % record.tutor.id)}" py:content="record.tutor.shortrepr()">Tutor</a></td>
                                <td>
-                                       <a href="${tg.url('/correccion/show/%d' % record.id)}">Ver</a>
+                                       <a href="${tg.url('/alumno_inscripto/show/%d' % record.id)}">Ver</a>
                                </td>
     </tr>
 </table>
diff --git a/sercom/subcontrollers/alumno_inscripto/templates/show.kid b/sercom/subcontrollers/alumno_inscripto/templates/show.kid
new file mode 100644 (file)
index 0000000..b3b9bdb
--- /dev/null
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<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>show</title>
+</head>
+<body>
+
+<table class="show">
+    <tr>
+        <th>Curso:</th>
+        <td><span py:replace="record.curso.shortrepr()">padrón</span></td>
+    </tr>
+    <tr>
+        <th>Alumno:</th>
+       <td><span py:replace="record.alumno.shortrepr()">nombre</span></td>
+    </tr>
+    <tr>
+        <th>Condicional::</th>
+       <td><span py:replace="record.condicional">email</span></td>
+    </tr>
+    <tr>
+        <th>Tutor:</th>
+       <td><span py:if="record.tutor" py:replace="record.tutor.shortrepr()">tutor</span></td>
+    </tr>
+    <tr>
+        <th>Responsabilidades:</th>
+             <td>
+            <ul>
+                <li py:for="i in record.responsabilidades">
+                    ${i.shortrepr()}
+                </li>
+            </ul>
+        </td>
+    </tr>
+    <tr>
+        <th>Grupos a los que Pertenece:</th>
+             <td>
+            <ul>
+                <li py:for="i in record.membresias">
+                    ${i.grupo.shortrepr()}
+                </li>
+            </ul>
+        </td>
+    </tr>
+    <tr>
+        <th>Entregas realizadas:</th>
+             <td>
+            <ul>
+                <li py:for="i in record.entregas">
+                    ${i.shortrepr()}
+                </li>
+            </ul>
+        </td>
+    </tr>
+    <tr>
+        <th>Correcciones :</th>
+             <td>
+            <ul>
+                <li py:for="i in record.correcciones">
+                    ${i.shortrepr()}
+                </li>
+            </ul>
+        </td>
+    </tr>
+</table>
+
+<br/>
+<a href="${tg.url('/alumno/edit/%d' % record.id)}">Editar</a> |
+<a href="${tg.url('/alumno/list')}">Volver</a>
+
+</body>
+</html>