Skip to content

About

Plataforma para la creación de exámenes tipo test

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Plataforma de Tests

Web application for creating and taking exams, with role-based access for professors and students.

Stack

Layer Technology
Backend Django 4.2 + Django REST Framework
Database PostgreSQL
Auth Token authentication + JWT (SimpleJWT)
Frontend React 18, React Router v6, Axios
Charts Chart.js + react-chartjs-2

Features

  • Professors can create, edit, and delete exams; manage questions and answer options; assign exams to students; view per-exam statistics and detailed results
  • Students can take assigned exams, see their score and a question-by-question breakdown after submission
  • Bulk import — create an exam from a .txt file using a simple format (see below)
  • Randomizable question and option order; configurable questions per page

Project Structure

plataforma-tests-master/
├── backend/                   Django project
│   ├── app_examenes/          Core app (models, views, serializers, urls)
│   │   └── migrations/
│   ├── backend/               Django config (settings, urls)
│   ├── ActualizarBD.sh        Script to reset and rebuild the database
│   ├── requirements.txt
│   └── .env.example
└── frontend/                  React app
    ├── src/
    │   ├── components/        Header, UserArea, ExamenCard
    │   ├── context/           AuthContext (global auth state via localStorage)
    │   ├── pages/             All route pages
    │   ├── services/          Axios API wrappers
    │   └── config.js          Centralized API base URL
    ├── package.json
    └── .env.example

Data Models

Usuario  ──< Examen (creado_por)
Usuario  >──< Examen (alumnos_asignados)
Examen   ──< Pregunta
Pregunta ──< Opcion
Examen   ──< Resultado
Usuario  ──< Resultado

Setup

Backend

  1. Create a virtual environment and install dependencies:

    cd backend
    python -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  2. Create a PostgreSQL database and user, then copy .env.example to .env and fill in your values:

    cp .env.example .env
  3. Apply migrations and run the server:

    python manage.py migrate
    python manage.py runserver

The API will be available at http://localhost:8000/gestion/.

Frontend

  1. Install dependencies:

    cd frontend
    npm install
  2. Optionally copy .env.example to .env if your backend runs on a different address:

    cp .env.example .env
  3. Start the dev server:

    npm start

The app will be available at http://localhost:3000.

Reset database

To drop and recreate the database and regenerate all migrations:

cd backend
bash ActualizarBD.sh

API Endpoints

Method URL Description
POST /gestion/auth/register/ Register a new user
POST /gestion/auth/login/ Login, returns token + role
GET/POST /gestion/api/examenes/ List / create exams
GET /gestion/api/examenes/?user_id={id} Exams created by a professor
GET /gestion/api/examenes/examenes-asignados/?alumno_id={id} Exams assigned to a student
GET/PUT/DELETE /gestion/api/examenes/{id}/ Retrieve / update / delete exam
GET /gestion/api/examenes/{id}/preguntas/ Questions of an exam
GET/POST /gestion/api/examenes/{id}/resultados/ Results for an exam (POST submits answers)
GET/POST/PUT/DELETE /gestion/api/preguntas/ Question CRUD
POST /gestion/api/uploadtxt/ Create exam from .txt file
GET /gestion/api/profesores/{id}/alumnos/ Students assigned to a professor
POST /gestion/api/profesores/{id}/alumnos/ Assign a student to a professor
DELETE /gestion/api/profesores/{id}/alumnos/{alumno_id}/ Remove student from professor
PUT /gestion/api/usuarios/{id}/password/ Change password

Bulk Import Format (.txt)

Nombre del examen: Introducción a Python
Descripción: Preguntas básicas sobre Python

Pregunta: ¿Cuál es el tipo de dato para texto en Python?
a) int
b) str*
c) bool
d) float
Explicación: str es el tipo string en Python.

Pregunta: ¿Cuánto es 2 + 2?
a) 3
b) 5
c) 4*

Mark the correct option with * at the end. The Explicación: line is optional per question.

User Roles

Role Can do
profesor Create/manage exams, manage questions, assign students, view statistics
alumno Take assigned exams, view own results

About

Plataforma para la creación de exámenes tipo test

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages