Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/EjercitarWeb/WebContent/Ejercicios.jsp
blob: 335f48b482d018e68648f8ccdb987b32f8b096db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<%@ include file="templateCSS.jsp"%>

<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Ejercicio</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>

<script
	src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"
	type="text/javascript"></script>
<script src="http://code.jquery.com/jquery-1.8.2.js"
	type="text/javascript"></script>
<script
	src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"
	type="text/javascript"></script>
<script
	src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/ui-lightness/jquery-ui.css"
	type="text/javascript"></script>
<script src="js/jquery.multiselect.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/jquery.multiselect.css" type="text/css" />
<link rel="stylesheet"
	href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/ui-lightness/jquery-ui.css"
	type="text/css" />
</head>
<body>

	<%@page import="java.util.List" import="model.Tema"
		import="model.Profesor"%>
	<div id="content">
		<form style="width: 1071px; height: 521px;" method="post"
			name="ejercicio_form">

			<input type=hidden id="asignatura" name="asignatura" value=<%=request.getParameter("asignatura")%>>

			<%Profesor profesor = (Profesor) request.getSession().getAttribute("profesor");%>
			<input name="profesor" type=hidden id="profesor" value=<%=profesor.getIdProfesor()%>>

			<fieldset>

				<p>
					<label>Enunciado:</label>
					<input type="text" id="enunciado" name="enunciado"></input>
				</p>

				
				<p> </p>
				
				
					<label>Concepto:</label> 
					<select id="conceptos" multiple="multiple"name="concepto"></select>
				
				<p>
					<label>Respuesta 1:</label> <input type="text" name="respuesta1"id="respuesta1">
				</p>

				<p>
					<label>Respuesta 2:</label> <input type="text" name="respuesta2"id="respuesta2">
				</p>

				<p>
					<label>Respuesta 3:</label> <input type="text" name="respuesta3"id="respuesta3">
				</p>
				<p>
					<label>Respuesta 4:</label> <input type="text" name="respuesta4"id="respuesta4">
				</p>
				<label>Respuesta:</label> <select name="respuesta_correcta">
					<option id="1" name="1" value="1">Respuesta 1</option>
					<option id="2" name="2" value="2">Respuesta 2</option>
					<option id="3" name="3" value="3">Respuesta 3</option>
					<option id="4" name="4" value="4">Respuesta 4</option>
				</select>
				
				<p class="nolabel">
				        <button type="submit" name="Submit"> <img src="css/img/guardar.png" align="middle"/> Guardar </button>

				</p>
				
			</fieldset>
		</form>
	</div>
	<script type="text/javascript">

            function cargarConceptos(asignatura){
                //obtiene los objetos productCode, y obtiene el valor del objeto
                var tema_id=$("#temas").val(); //ya se tiene el objeto select
                //llama al servlet con el parametro seleccionado
                $("#conceptos").load("CargarConceptosServlet", {asignatura:asignatura});
                //$("#conceptos").multiselect("refresh");
                
            }

       
            cargarConceptos($("#asignatura").val());
     	
            $(document).ready(function(){
                
            	$("#conceptos").multiselect({

            		
             	   header: "Seleccione una opcion...",
             	  noneSelectedText: "Seleccionar Conceptos",
             	 selectedText: "# Seleccionado(s)",
             	 
             	   click: function(event, ui){
             		  
                  	var lista = $("#conceptos").multiselect("getChecked").map(function(){
                  		   return this.value;    
                  		}).get();
      				
                  	$("#lista_conceptos").val(lista);
      						
                   },
                   open: function(event, ui){
                	   $("#conceptos").multiselect("refresh");
                   }
          	   
                });
            	
            	
            });
    </script>



</body>
</html>