Preguntas
Las preguntas son:
Tipos Preguntas
| v_f | verdadero o falso |
|---|---|
| opcion | opcional |
| justificacion | justificacion |
Obtener todas las preguntas (GET)
URL GET /api/preguntas
- Obtener todas las preguntas
ESQUEMA
Response
{
"estado": true
"datos": [ // Lista de todas preguntas (object Pregunta)
{
"_id" // (string)
"creador" // (object Profesor)
"nombre" // (string)
"tipoLeccion" // (string)
"tipoPregunta" // (string)
"capitulo" // A que capitulo pertenece(int)
"laboratorio" //Laboratorio al que pertenece
"tutorial" // Tutorial al que pertenece
"tiempoEstimado" // minutos (int)
"descripcion" // (string)
"puntaje" // (int)
},
]
}
Obtener un pregunta (GET)
URL GET /api/preguntas/:id_leccion
- Obtener un pregunta
ESQUEMA
Response
{
"estado": true
"datos": {// Lista de todas preguntas (object Pregunta)
"_id" // (string)
"creador" // (object Profesor)
"nombre" // (string)
"tipoLeccion" // (string)
"tipoPregunta" // (string)
"capitulo" // A que capitulo pertenece(int)
"laboratorio" //Laboratorio al que pertenece
"tutorial" // Tutorial al que pertenece
"tiempoEstimado" // minutos (int)
"descripcion" // (string)
"puntaje" // (int)
}
}
Crear una pregunta (POST)
URL POST /api/preguntas
- Crear una pregunta
ESQUEMA
Request
{
"_id" // (string) Esto no hay que pasar
"nombre" // (string)
"creador" //Profesor que creó la pregunta (id)
"tipoLeccion" // (string) estimacion/laboratorio/tutorial
"tipoPregunta" // (string) v_f/opcion/justificacion
"capitulo" // A que capitulo pertenece(int)
"laboratorio" //Laboratorio al que pertenece
"tutorial" //Tutorial al que pertenece
"tiempoEstimado" // minutos (int)
"descripcion" // (string)
"puntaje" // (int)
}
Response
{
"estado": true
}
Actualizar una pregunta (PUT)
URL PUT /api/preguntas/:id_leccion
- Actualizar una pregunta
ESQUEMA
Request
{
"nombre" // (string)
"tipoLeccion" // (string)
"tipoPregunta" // (string)
"capitulo" // A que capitulo pertenece(int)
"laboratorio" //Laboratorio al que pertenece
"tutorial" //Tutorial al que pertenece
"tiempoEstimado" // (date)
"descripcion" // (string)
"puntaje" // (int)
}
Response
{
"estado": true
}
Eliminar una pregunta (DELETE)
URL DELETE /api/preguntas/:id_leccion
- Eliminar una pregunta
ESQUEMA
Response
{
"estado": true
}
Obtener preguntas de profesor (GET)
URL GET /api/preguntas/profesor/:id_profesor
- Obtiene todas las preguntas que el profesor indicado ha creado
ESQUEMA
Response
{
"estado": true,
"datos":[
{
"_id" // (string)
"creador" // (object Profesor)
"nombre" // (string)
"tipoLeccion" // (string)
"tipoPregunta" // (string)
"capitulo" // A que capitulo pertenece(int)
"laboratorio" //Laboratorio al que pertenece
"tutorial" // Tutorial al que pertenece
"tiempoEstimado" // minutos (int)
"descripcion" // (string)
"puntaje" // (int)
},
]
}