Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/EjercitarWeb/WebContent/iniciar_curso.jsp
diff options
context:
space:
mode:
Diffstat (limited to 'EjercitarWeb/WebContent/iniciar_curso.jsp')
-rw-r--r--EjercitarWeb/WebContent/iniciar_curso.jsp133
1 files changed, 133 insertions, 0 deletions
diff --git a/EjercitarWeb/WebContent/iniciar_curso.jsp b/EjercitarWeb/WebContent/iniciar_curso.jsp
new file mode 100644
index 0000000..29d3589
--- /dev/null
+++ b/EjercitarWeb/WebContent/iniciar_curso.jsp
@@ -0,0 +1,133 @@
+<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
+ pageEncoding="ISO-8859-1"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Iniciar Curso</title>
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js" type="text/javascript"></script>
+ <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/ui-lightness/jquery-ui.css" type="text/css" />
+ <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
+ <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
+
+ <script>
+ $(function() {
+ $( "#accordion" ).accordion();
+ });
+ </script>
+
+ <script language='javascript'>
+ function totalTemas(dato) {
+ total=0;
+
+ for (var i=0; i<parseInt(dato); i++)
+ {
+ var id = "peso_"+i;
+ num = document.getElementById(id).value;
+
+ total = parseFloat(total) + parseFloat(num);
+
+ }
+
+ document.getElementById("total_temas").value = total;
+ }
+
+ function totalConceptos(dato,id_tema) {
+ total=0;
+ for (var i=0; i<parseInt(dato); i++)
+ {
+ var id = "cpeso_"+i;
+ num = document.getElementById(id).value;
+ alert(id + num);
+ total = parseFloat(total) + parseFloat(num);
+
+ }
+ var idt = "total_concepto_"+id_tema;
+ alert(idt + total);
+
+ document.getElementById(idt).value = total;
+ }
+
+
+
+ </script>
+</head>
+<body>
+<%@page import="java.util.List" import="model.Tema" import="model.Concepto" import="model.Asignatura"%>
+<div id= "content">
+<form style="width: 1071px; height: 521px;" method="post" name="iniciar_form">
+<div id="accordion">
+ <h3>Temas</h3>
+ <div>
+ <p>
+
+ <table>
+ <thead>
+ <tr>
+ <th>Tema</th>
+ <th>Peso</th>
+ </tr>
+ </thead>
+ <tbody>
+ <%List<Tema> temaList = (List<Tema>) request.getAttribute("lista_temas");%>
+ <% int cont = 0; %>
+ <%for(Tema tema : temaList) {%>
+
+ <tr>
+ <td ><a > <%= tema.getNombre() %></a> </td>
+ <td><input type="text" name="peso" id= "peso_<%=cont %>" onChange='totalTemas(<%=temaList.size() %>)'/></td>
+
+ </tr>
+ <% cont = cont + 1; %>
+ <%}%>
+ <tr>
+ <td ><a > Total Tema:</a> </td>
+ <td ><input type="text" name="total_temas" value="0" id= "total_temas" disabled/> </td>
+ </tr>
+ </tbody>
+ </table>
+ </p>
+ </div>
+ <% int cant_tema = 0;%>
+ <% int cant_concepto = 0;%>
+
+ <%for(Tema tema : temaList) {%>
+
+ <h3>Tema: <%= tema.getNombre() %></h3>
+ <table>
+ <thead>
+ <tr>
+ <th>Concepto</th>
+ <th>Peso</th>
+ </tr>
+ </thead>
+ <tbody>
+ <%for(Concepto concepto : tema.getConceptoList()) {%>
+ <tr>
+ <td><a > <%= concepto.getNombre()%></a> </td>
+ <td><input type="text" name="cpeso" id= "cpeso_<%=cant_concepto %>" onChange='totalConceptos(<%=tema.getConceptoList().size() %>,<%=cant_tema%>)'/></td>
+
+
+ </tr>
+ <% cant_concepto = cant_concepto + 1;%>
+ <%}%>
+ <tr>
+ <td><a > Total Tema:</a> </td>
+ <td><input type="text" name="total_concepto" value="0" id= "total_concepto_<%=cant_tema %>" disabled/> </td>
+ </tr>
+ </tbody>
+ </table>
+ <% cant_tema = cant_tema + 1;%>
+
+ <%} %>
+
+ </div>
+ <p class="nolabel">
+ <button type="submit" name="Submit"> Comenzar </button>
+
+ </p>
+ </form>
+ </div>
+</body>
+</html> \ No newline at end of file