refact: remove exercise detail pages and modernize assessment interface
- Remove routes/exercises.py blueprint (only consultation routes) - Delete templates/exercise_detail.html (intermediate page removed) - Update app.py to remove exercises blueprint registration - Modernize templates/assessment_detail.html with: * Hero section with gradient background * Action cards with hover effects and animations * Centered progress indicator with visual circles * Compact exercise structure display * Improved responsive design and UX Part of Phase 2 UX improvements - eliminating intermediate pages for direct navigation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
from flask import Blueprint, render_template
|
||||
from models import Assessment, Exercise
|
||||
from utils import handle_db_errors
|
||||
|
||||
bp = Blueprint('exercises', __name__)
|
||||
|
||||
# Routes de consultation seulement - La création/modification se fait via le formulaire unifié d'évaluation
|
||||
|
||||
@bp.route('/assessments/<int:assessment_id>/exercises/<int:id>')
|
||||
@handle_db_errors
|
||||
def detail(assessment_id, id):
|
||||
from sqlalchemy.orm import joinedload
|
||||
assessment = Assessment.query.get_or_404(assessment_id)
|
||||
exercise = Exercise.query.options(
|
||||
joinedload(Exercise.grading_elements)
|
||||
).filter_by(id=id, assessment_id=assessment_id).first_or_404()
|
||||
return render_template('exercise_detail.html', assessment=assessment, exercise=exercise)
|
||||
Reference in New Issue
Block a user