Test de Recalculación de Puntuaciones
1. Obteniendo estadísticas de tests...
HTTP Code: 404
Response: 2. Recalculando primer lote de tests...
HTTP Code: 404
Response: 3. Recalculando test específico (ID: 1)...
HTTP Code: 404
Response:
Instrucciones de uso:
- Primero necesitas obtener un token de administrador válido haciendo login como admin
- Reemplaza 'TU_TOKEN_DE_ADMIN_AQUI' con el token real
- El endpoint 'getTestsRecalculationStats' te mostrará cuántos tests hay para recalcular
- El endpoint 'recalculateTestScores' recalcula las puntuaciones en lotes:
- Usa 'limit' y 'offset' para procesar por lotes
- Usa 'test_id' para recalcular un test específico
- Los tests se actualizan con las nuevas puntuaciones calculadas con la función corregida
Ejemplo de uso con cURL desde línea de comandos:
# Obtener estadísticas
curl -X POST http://localhost/eneagrama_api/reportes/funciones_php/api.php \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TU_TOKEN_AQUI' \
-d '{"tipo": "getTestsRecalculationStats"}'
# Recalcular lote de 50 tests
curl -X POST http://localhost/eneagrama_api/reportes/funciones_php/api.php \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TU_TOKEN_AQUI' \
-d '{"tipo": "recalculateTestScores", "limit": 50, "offset": 0}'
# Recalcular test específico
curl -X POST http://localhost/eneagrama_api/reportes/funciones_php/api.php \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer TU_TOKEN_AQUI' \
-d '{"tipo": "recalculateTestScores", "test_id": 123}'