Skip to content

Commit 624f01c

Browse files
committed
jueves
1 parent 69b7deb commit 624f01c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1581
-459
lines changed

Dump20190525-1.sql

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ CREATE TABLE `examen` (
3131
`tematica` int(11) DEFAULT NULL,
3232
`aprueba_con` int(11) DEFAULT NULL,
3333
PRIMARY KEY (`idexamen`)
34-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
34+
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
3535
/*!40101 SET character_set_client = @saved_cs_client */;
3636

3737
--
@@ -40,6 +40,7 @@ CREATE TABLE `examen` (
4040

4141
LOCK TABLES `examen` WRITE;
4242
/*!40000 ALTER TABLE `examen` DISABLE KEYS */;
43+
INSERT INTO `examen` VALUES (3,'Examen convivencia vial ciclistas','responda las preguntas de selección múltiple ','2019-06-19',5,1,3);
4344
/*!40000 ALTER TABLE `examen` ENABLE KEYS */;
4445
UNLOCK TABLES;
4546

@@ -57,7 +58,7 @@ CREATE TABLE `imagen` (
5758
PRIMARY KEY (`idImagen`),
5859
KEY `fk_imagen_tematica_idx` (`tematica_idTematica`),
5960
CONSTRAINT `fk_imagen_tematica` FOREIGN KEY (`tematica_idTematica`) REFERENCES `tematica` (`idTematica`) ON DELETE NO ACTION ON UPDATE NO ACTION
60-
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;
61+
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;
6162
/*!40101 SET character_set_client = @saved_cs_client */;
6263

6364
--
@@ -66,7 +67,7 @@ CREATE TABLE `imagen` (
6667

6768
LOCK TABLES `imagen` WRITE;
6869
/*!40000 ALTER TABLE `imagen` DISABLE KEYS */;
69-
INSERT INTO `imagen` VALUES (1,'../../imagenes/1.PNG',1),(2,'../../imagenes/2.PNG',1),(3,'../../imagenes/3.PNG',1),(16,'../../imagenes/4.PNG',1);
70+
INSERT INTO `imagen` VALUES (1,'../../imagenes/1.PNG',1),(2,'../../imagenes/2.PNG',1),(3,'../../imagenes/3.PNG',1),(16,'../../imagenes/4.PNG',1),(20,'../../imagenes/img 35.jpg',3),(21,'../../imagenes/5.PNG',1);
7071
/*!40000 ALTER TABLE `imagen` ENABLE KEYS */;
7172
UNLOCK TABLES;
7273

@@ -91,7 +92,7 @@ CREATE TABLE `menu` (
9192

9293
LOCK TABLES `menu` WRITE;
9394
/*!40000 ALTER TABLE `menu` DISABLE KEYS */;
94-
INSERT INTO `menu` VALUES (1,'Gestionar Persona','fa fa-male'),(2,'Curso','fa fa-car'),(3,'Gestionar Tematica','fa fa-book'),(4,'Gestionar Evaluacion','fa fa-mortar-board'),(5,'Perfil','fa fa-male'),(6,'Resultados','fa fa-bar-chart');
95+
INSERT INTO `menu` VALUES (1,'Gestionar Persona','fa fa-male'),(2,'Curso','fa fa-car'),(3,'Gestionar Tematica','fa fa-book'),(4,'Gestionar Evaluacion','fa fa-mortar-board'),(5,'Perfil','fa fa-male'),(6,'Resultados','fa fa-check-square-o');
9596
/*!40000 ALTER TABLE `menu` ENABLE KEYS */;
9697
UNLOCK TABLES;
9798

@@ -189,17 +190,18 @@ DROP TABLE IF EXISTS `preguntas`;
189190
/*!40101 SET character_set_client = utf8 */;
190191
CREATE TABLE `preguntas` (
191192
`idpreguntas` int(11) NOT NULL AUTO_INCREMENT,
192-
`enunciado` varchar(300) DEFAULT NULL,
193-
`opc1` varchar(200) DEFAULT NULL,
194-
`opc2` varchar(200) DEFAULT NULL,
195-
`opc3` varchar(200) DEFAULT NULL,
196-
`opc4` varchar(200) DEFAULT NULL,
197-
`respuesta__correcta` int(11) DEFAULT NULL,
193+
`cont` int(11) DEFAULT NULL,
194+
`enunciado` varchar(1000) DEFAULT NULL,
195+
`opc1` varchar(1000) DEFAULT NULL,
196+
`opc2` varchar(1000) DEFAULT NULL,
197+
`opc3` varchar(1000) DEFAULT NULL,
198+
`opc4` varchar(1000) DEFAULT NULL,
199+
`respuesta` int(11) DEFAULT NULL,
198200
`examen_idexamen` int(11) NOT NULL,
199201
PRIMARY KEY (`idpreguntas`),
200202
KEY `fk_preguntas_examen_idx` (`examen_idexamen`),
201203
CONSTRAINT `fk_preguntas_examen` FOREIGN KEY (`examen_idexamen`) REFERENCES `examen` (`idexamen`) ON DELETE NO ACTION ON UPDATE NO ACTION
202-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
204+
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
203205
/*!40101 SET character_set_client = @saved_cs_client */;
204206

205207
--
@@ -208,9 +210,44 @@ CREATE TABLE `preguntas` (
208210

209211
LOCK TABLES `preguntas` WRITE;
210212
/*!40000 ALTER TABLE `preguntas` DISABLE KEYS */;
213+
INSERT INTO `preguntas` VALUES (1,1,'rerr','ert','e3tr','ert','ert',2,3),(2,2,'rterert','etrer','ertert','ert','ert',3,3),(3,3,'jhhjhhgjhghgjh','uuyy','bnbnb','nbnbn','jhjhhj',3,3),(4,4,'hgfhgfhgfgh','dfgggfdg','dfgdfg','gfdg','gfdgd',3,3),(5,5,'jkjkknjjkjjnn','hjjjh','hjj','jkk','lklk',3,3);
211214
/*!40000 ALTER TABLE `preguntas` ENABLE KEYS */;
212215
UNLOCK TABLES;
213216

217+
--
218+
-- Table structure for table `resultado`
219+
--
220+
221+
DROP TABLE IF EXISTS `resultado`;
222+
/*!40101 SET @saved_cs_client = @@character_set_client */;
223+
/*!40101 SET character_set_client = utf8 */;
224+
CREATE TABLE `resultado` (
225+
`idresultado` int(11) NOT NULL AUTO_INCREMENT,
226+
`estado` varchar(50) DEFAULT NULL,
227+
`pre_buenas` bigint(20) DEFAULT NULL,
228+
`pre_malas` bigint(20) DEFAULT NULL,
229+
`total_preguntas` bigint(20) DEFAULT NULL,
230+
`fecha` varchar(45) DEFAULT NULL,
231+
`examen_idexamen` int(11) NOT NULL,
232+
`persona_idPersona` int(11) NOT NULL,
233+
PRIMARY KEY (`idresultado`),
234+
KEY `fk_resultado_examen_idx` (`examen_idexamen`),
235+
KEY `fk_resultado_persona1_idx` (`persona_idPersona`),
236+
CONSTRAINT `fk_resultado_examen` FOREIGN KEY (`examen_idexamen`) REFERENCES `examen` (`idexamen`) ON DELETE NO ACTION ON UPDATE NO ACTION,
237+
CONSTRAINT `fk_resultado_persona1` FOREIGN KEY (`persona_idPersona`) REFERENCES `persona` (`idPersona`) ON DELETE NO ACTION ON UPDATE NO ACTION
238+
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
239+
/*!40101 SET character_set_client = @saved_cs_client */;
240+
241+
--
242+
-- Dumping data for table `resultado`
243+
--
244+
245+
LOCK TABLES `resultado` WRITE;
246+
/*!40000 ALTER TABLE `resultado` DISABLE KEYS */;
247+
INSERT INTO `resultado` VALUES (1,'Pass',4,1,5,'22/06/2019 11:04:46 p. m.',3,6),(2,'Pass',5,0,5,'24/06/2019 9:09:19 p. m.',3,6);
248+
/*!40000 ALTER TABLE `resultado` ENABLE KEYS */;
249+
UNLOCK TABLES;
250+
214251
--
215252
-- Table structure for table `rol`
216253
--
@@ -251,7 +288,7 @@ CREATE TABLE `rol_vista` (
251288
KEY `fk_idVista_idx` (`Vista_idvista`),
252289
CONSTRAINT `fk_idRol` FOREIGN KEY (`rol_idrol`) REFERENCES `rol` (`idRol`) ON DELETE NO ACTION ON UPDATE NO ACTION,
253290
CONSTRAINT `fk_idVista` FOREIGN KEY (`Vista_idvista`) REFERENCES `vista` (`idVista`) ON DELETE NO ACTION ON UPDATE NO ACTION
254-
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
291+
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
255292
/*!40101 SET character_set_client = @saved_cs_client */;
256293

257294
--
@@ -260,7 +297,7 @@ CREATE TABLE `rol_vista` (
260297

261298
LOCK TABLES `rol_vista` WRITE;
262299
/*!40000 ALTER TABLE `rol_vista` DISABLE KEYS */;
263-
INSERT INTO `rol_vista` VALUES (1,1,1),(3,1,3),(5,1,5),(6,1,6),(8,1,8),(9,1,9),(11,2,11),(12,2,12),(13,2,13);
300+
INSERT INTO `rol_vista` VALUES (5,1,5),(6,1,6),(8,1,8),(11,2,11),(12,2,12),(13,2,13),(14,2,14);
264301
/*!40000 ALTER TABLE `rol_vista` ENABLE KEYS */;
265302
UNLOCK TABLES;
266303

@@ -289,7 +326,7 @@ CREATE TABLE `tematica` (
289326

290327
LOCK TABLES `tematica` WRITE;
291328
/*!40000 ALTER TABLE `tematica` DISABLE KEYS */;
292-
INSERT INTO `tematica` VALUES (1,'Convivencia Vial Ciclistas ','1','A',1),(2,'tipos de señales','2','A',2),(3,'Señalamientos viales ','3','A',1);
329+
INSERT INTO `tematica` VALUES (1,'Convivencia Vial Ciclistas ','1','A',1),(2,'tipos de señales','2','I',2),(3,'Señalamientos viales ','3','A',1);
293330
/*!40000 ALTER TABLE `tematica` ENABLE KEYS */;
294331
UNLOCK TABLES;
295332

@@ -359,7 +396,7 @@ CREATE TABLE `vista` (
359396
PRIMARY KEY (`idVista`),
360397
KEY `fk_menu_idx` (`menu_idmenu`),
361398
CONSTRAINT `fk_menu` FOREIGN KEY (`menu_idmenu`) REFERENCES `menu` (`idMenu`) ON DELETE NO ACTION ON UPDATE NO ACTION
362-
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
399+
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
363400
/*!40101 SET character_set_client = @saved_cs_client */;
364401

365402
--
@@ -368,7 +405,7 @@ CREATE TABLE `vista` (
368405

369406
LOCK TABLES `vista` WRITE;
370407
/*!40000 ALTER TABLE `vista` DISABLE KEYS */;
371-
INSERT INTO `vista` VALUES (1,'Registrar Usuario','../Usuario/RegistrarU.aspx','fa fa-pencil',1),(3,'Actualizar Usuario','../Usuario/ActualizarU.aspx','fa fa-edit',1),(5,'Registrar Tematica','../Administrador/Agregar_tematica.aspx','fa fa-pencil',3),(6,'Agregar Contenido','../Administrador/Ver_tematica_admin.aspx','fa fa-edit',3),(8,'Realizar Evaluacion ','../Administrador/examen.aspx','fa fa-line-chart',4),(9,'Modificar Evaluacion','../Evaluacion/ActualizarE.aspx','fa fa-edit',4),(10,'Eliminar Evaluacion ','e','fa fa-times',4),(11,'Actualizar Datos','a','fa fa-pencil',5),(12,'Ver temáticas ','../Estudiante/Tematicas_estudiantes.aspx','fa fa-gamepad',2),(13,'Ver Resultados','b','fa fa-area-chart',6);
408+
INSERT INTO `vista` VALUES (1,'Registrar Usuario','../Usuario/RegistrarU.aspx','fa fa-pencil',1),(3,'Actualizar Usuario','../Usuario/ActualizarU.aspx','fa fa-edit',1),(5,'Registrar Tematica','../Administrador/Agregar_tematica.aspx','fa fa-pencil',3),(6,'Agregar Contenido','../Administrador/Ver_tematica_admin.aspx','fa fa-edit',3),(8,'Realizar Evaluacion ','../Administrador/examen.aspx','fa fa-line-chart',4),(10,'Eliminar Evaluacion ','e','fa fa-times',4),(11,'Actualizar Datos','a','fa fa-pencil',5),(12,'Ver temáticas ','../Estudiante/Tematicas_estudiantes.aspx','fa fa-gamepad',2),(13,'Ver Resultados','../Estudiante/mis_resulltados.aspx','fa fa-check-square-o',6),(14,'Evaluación','../Estudiante/ver_examenes.aspx','fa fa-pencil',2);
372409
/*!40000 ALTER TABLE `vista` ENABLE KEYS */;
373410
UNLOCK TABLES;
374411

@@ -514,4 +551,4 @@ DELIMITER ;
514551
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
515552
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
516553

517-
-- Dump completed on 2019-06-17 9:55:22
554+
-- Dump completed on 2019-06-26 21:32:35

swtransito/.vs/swtransito/v14/.suo

46 KB
Binary file not shown.

swtransito/swtransito/Controllers/ExamenController.cs

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,84 @@ public class ExamenController
1212

1313
Examen ex = new Examen();
1414

15-
public bool insert_exam(string a, string b, string c, string d, string e, string f)
15+
public bool insert_exam(string a, string b, string c, string d, string e, string f)
1616
{
17-
return ex.insertar_exam(a,b,c,d,e,f);
17+
return ex.insertar_exam(a, b, c, d, e, f);
1818
}
1919

2020
public DataTable traer_examen()
2121
{
2222
return ex.traer_examen();
2323
}
2424

25-
public bool eliminar_examen( string id)
25+
//traer numero de preguntas de cada examen
26+
public string numero_preguntas_examen(string id)
27+
{
28+
return ex.traer_numero_examen(id);
29+
}
30+
public string existe(string id)
31+
{
32+
return ex.if_exist(id);
33+
}
34+
35+
36+
public bool eliminar_examen(string id)
2637
{
2738
return ex.eliminar_examen(id);
2839
}
2940

3041

42+
public DataTable traer_examen_id(string a)
43+
{
44+
return ex.traer_examen_id(a);
45+
}
46+
47+
public bool insert_preguntas(string a, int b, string c, string d, string e, string f, string g, string h)
48+
{
49+
return ex.insertar_preguntas(a, b, c, d, e, f, g, h);
50+
}
51+
52+
/// preguntas ///////////////////////////////////////777
53+
54+
public DataTable traer_preguntas_id(string id)
55+
{
56+
return ex.traer_preguntas(id);
57+
}
58+
public DataTable info_preguntas(string id)
59+
{
60+
return ex.traer_info_pregunta(id);
61+
}
62+
3163

3264

65+
public string traer_numero(string id)
66+
{
67+
return ex.traer_numero(id);
68+
}
69+
70+
71+
// examen estudiante //////////////////////////////////////////////////////////////////////////////
72+
73+
public DataTable info_examen_estudiante()
74+
{
75+
return ex.info_examen_estudiante();
76+
}
77+
78+
79+
public DataTable preguntas_estudiante(string id)
80+
{
81+
return ex.preguntas_estudiante(id);
82+
}
83+
84+
public string traer_respuestacorrecta(string id)
85+
{
86+
return ex.traer_respuesta_correcta(id);
87+
}
88+
public string traer_numero_pasar(string id)
89+
{
90+
return ex.traer_numero_para_pasar(id);
91+
}
92+
3393

3494

3595
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using swtransito.Models;
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Web;
7+
8+
namespace swtransito.Controllers
9+
{
10+
public class ResultadoController
11+
{
12+
Resultado res = new Resultado();
13+
14+
15+
16+
public DataTable traer_resultado(string id)
17+
{
18+
return res.traer_resultadoid(id);
19+
}
20+
21+
22+
}
23+
}

0 commit comments

Comments
 (0)