feat: localize various UI texts and labels to Spanish across application pages and interactive components.
This commit is contained in:
@@ -34,7 +34,7 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
});
|
||||
setLessons(allLessons);
|
||||
} catch (err) {
|
||||
console.error("Failed to load course data", err);
|
||||
console.error("Error al cargar los datos del curso", err);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
<div key={day} className={`h-28 border border-white/5 p-2 relative hover:bg-white/5 transition-colors group ${isToday ? 'bg-blue-500/5' : ''}`}>
|
||||
<span className={`text-sm font-black ${isToday ? 'text-blue-400' : 'text-gray-600'}`}>
|
||||
{day}
|
||||
{isToday && <span className="ml-2 text-[8px] uppercase tracking-widest px-1.5 py-0.5 bg-blue-500 text-white rounded">Today</span>}
|
||||
{isToday && <span className="ml-2 text-[8px] uppercase tracking-widest px-1.5 py-0.5 bg-blue-500 text-white rounded">Hoy</span>}
|
||||
</span>
|
||||
<div className="mt-1 space-y-1 overflow-y-auto max-h-20">
|
||||
{dayLessons.map(lesson => (
|
||||
@@ -94,8 +94,8 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
const nextMonth = () => setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() + 1));
|
||||
const prevMonth = () => setCurrentDate(new Date(currentDate.getFullYear(), currentDate.getMonth() - 1));
|
||||
|
||||
if (loading) return <div className="py-20 text-center animate-pulse text-gray-500 font-bold uppercase tracking-widest text-xs">Syncing your timeline...</div>;
|
||||
if (!course) return <div className="text-center py-20 text-red-400">Course not found.</div>;
|
||||
if (loading) return <div className="py-20 text-center animate-pulse text-gray-500 font-bold uppercase tracking-widest text-xs">Sincronizando tu cronología...</div>;
|
||||
if (!course) return <div className="text-center py-20 text-red-400">Curso no encontrado.</div>;
|
||||
|
||||
const monthName = currentDate.toLocaleString('default', { month: 'long' });
|
||||
const year = currentDate.getFullYear();
|
||||
@@ -105,23 +105,23 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
<div className="mb-12 flex flex-col md:flex-row justify-between items-start md:items-end gap-6">
|
||||
<div>
|
||||
<div className="flex items-center gap-2 mb-4 text-blue-500 font-bold text-xs uppercase tracking-widest">
|
||||
<Link href={`/courses/${params.id}`} className="hover:text-white transition-colors">Outline</Link>
|
||||
<Link href={`/courses/${params.id}`} className="hover:text-white transition-colors">Esquema</Link>
|
||||
<ChevronRightIcon size={14} className="text-gray-600" />
|
||||
<span>Timeline</span>
|
||||
</div>
|
||||
<h1 className="text-4xl font-black tracking-tight mb-2">Course <span className="text-blue-500">Timeline</span></h1>
|
||||
<h1 className="text-4xl font-black tracking-tight mb-2">Cronología del Curso</h1>
|
||||
<p className="text-gray-500 font-medium">{course.title}</p>
|
||||
</div>
|
||||
|
||||
<div className="flex flex-wrap gap-4">
|
||||
<div className="flex items-center gap-2 px-4 py-2 rounded-full border border-white/5 bg-white/2 text-[10px] font-black uppercase tracking-widest text-gray-400">
|
||||
<div className="w-2 h-2 rounded-full bg-red-500"></div> Exam
|
||||
<div className="w-2 h-2 rounded-full bg-red-500"></div> Examen
|
||||
</div>
|
||||
<div className="flex items-center gap-2 px-4 py-2 rounded-full border border-white/5 bg-white/2 text-[10px] font-black uppercase tracking-widest text-gray-400">
|
||||
<div className="w-2 h-2 rounded-full bg-blue-500"></div> Assignment
|
||||
<div className="w-2 h-2 rounded-full bg-blue-500"></div> Tarea
|
||||
</div>
|
||||
<div className="flex items-center gap-2 px-4 py-2 rounded-full border border-white/5 bg-white/2 text-[10px] font-black uppercase tracking-widest text-gray-400">
|
||||
<div className="w-2 h-2 rounded-full bg-green-500"></div> Task
|
||||
<div className="w-2 h-2 rounded-full bg-green-500"></div> Actividad
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -133,13 +133,13 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
<h3 className="text-xl font-black uppercase tracking-tight italic">{monthName} {year}</h3>
|
||||
<div className="flex items-center gap-2 bg-white/5 rounded-2xl p-1 border border-white/10">
|
||||
<button onClick={prevMonth} className="p-2 hover:bg-white/10 rounded-xl transition-colors"><ChevronLeft className="w-5 h-5" /></button>
|
||||
<button onClick={() => setCurrentDate(new Date())} className="px-4 py-1 text-[10px] font-black uppercase tracking-widest hover:text-blue-400 transition-colors">Today</button>
|
||||
<button onClick={() => setCurrentDate(new Date())} className="px-4 py-1 text-[10px] font-black uppercase tracking-widest hover:text-blue-400 transition-colors">Hoy</button>
|
||||
<button onClick={nextMonth} className="p-2 hover:bg-white/10 rounded-xl transition-colors"><ChevronRight className="w-5 h-5" /></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-7 border-t border-l border-white/5 rounded-2xl overflow-hidden">
|
||||
{['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'].map(day => (
|
||||
{['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb'].map(day => (
|
||||
<div key={day} className="bg-white/5 py-4 text-center text-[10px] font-black uppercase tracking-widest text-gray-600 border-r border-b border-white/5">
|
||||
{day}
|
||||
</div>
|
||||
@@ -153,7 +153,7 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
<div className="glass-card p-8 border-blue-500/20 bg-blue-500/5 rounded-3xl relative overflow-hidden">
|
||||
<div className="relative z-10">
|
||||
<h4 className="text-xs font-black uppercase tracking-[0.2em] text-blue-400 mb-6 flex items-center gap-2">
|
||||
<AlertCircle size={14} /> Upcoming Deadlines
|
||||
<AlertCircle size={14} /> Próximos Vencimientos
|
||||
</h4>
|
||||
<div className="space-y-6">
|
||||
{lessons
|
||||
@@ -171,7 +171,7 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
))
|
||||
}
|
||||
{lessons.filter(l => l.due_date && new Date(l.due_date) >= new Date()).length === 0 && (
|
||||
<div className="text-xs text-gray-600 italic py-4">No upcoming deadlines. You are all caught up!</div>
|
||||
<div className="text-xs text-gray-600 italic py-4">No hay próximos vencimientos. ¡Estás al día!</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -180,22 +180,22 @@ export default function StudentCalendarPage({ params }: { params: { id: string }
|
||||
|
||||
<div className="glass-card p-8 border-white/5 bg-white/[0.01] rounded-3xl">
|
||||
<h4 className="text-xs font-black uppercase tracking-[0.2em] text-gray-500 mb-6 flex items-center gap-2">
|
||||
<Clock size={14} /> Course Pace
|
||||
<Clock size={14} /> Ritmo del Curso
|
||||
</h4>
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-xs font-medium text-gray-600">Mode</span>
|
||||
<span className="text-xs font-medium text-gray-600">Modo</span>
|
||||
<span className="text-xs font-black uppercase tracking-widest text-white">{course.pacing_mode.replace('_', '-')}</span>
|
||||
</div>
|
||||
{course.start_date && (
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-xs font-medium text-gray-600">Start Date</span>
|
||||
<span className="text-xs font-medium text-gray-600">Fecha de Inicio</span>
|
||||
<span className="text-xs font-black text-white">{new Date(course.start_date).toLocaleDateString()}</span>
|
||||
</div>
|
||||
)}
|
||||
{course.end_date && (
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-xs font-medium text-gray-600">End Date</span>
|
||||
<span className="text-xs font-medium text-gray-600">Fecha de Finalización</span>
|
||||
<span className="text-xs font-black text-white">{new Date(course.end_date).toLocaleDateString()}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -42,7 +42,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
setUserGrade(currentGrade || null);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Failed to load lesson data", err);
|
||||
console.error("Error al cargar los datos de la lección", err);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -50,8 +50,8 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
fetchAll();
|
||||
}, [params.id, params.lessonId, user]);
|
||||
|
||||
if (loading) return <div className="p-20 text-center animate-pulse text-gray-500 font-bold uppercase tracking-widest">Loading Experience...</div>;
|
||||
if (!lesson || !course) return <div className="p-20 text-center text-red-400">Content not found.</div>;
|
||||
if (loading) return <div className="p-20 text-center animate-pulse text-gray-500 font-bold uppercase tracking-widest">Cargando Experiencia...</div>;
|
||||
if (!lesson || !course) return <div className="p-20 text-center text-red-400">Contenido no encontrado.</div>;
|
||||
|
||||
const allLessons = course.modules.flatMap(m => m.lessons);
|
||||
const currentIndex = allLessons.findIndex(l => l.id === params.lessonId);
|
||||
@@ -76,7 +76,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
className={`glass border-r border-white/5 transition-all duration-500 bg-black/40 flex flex-col ${sidebarOpen ? 'w-80' : 'w-0 overflow-hidden border-none'}`}
|
||||
>
|
||||
<div className="p-6 border-b border-white/5">
|
||||
<h2 className="text-xs font-black uppercase tracking-widest text-blue-500 mb-1">Course Content</h2>
|
||||
<h2 className="text-xs font-black uppercase tracking-widest text-blue-500 mb-1">Contenido del Curso</h2>
|
||||
<p className="text-sm font-bold text-white truncate">{course.title}</p>
|
||||
</div>
|
||||
|
||||
@@ -108,7 +108,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
<button
|
||||
onClick={() => setSidebarOpen(!sidebarOpen)}
|
||||
className="p-3 rounded-xl glass border-white/10 text-gray-400 hover:text-white transition-all bg-black/40"
|
||||
title="Toggle Sidebar"
|
||||
title="Alternar Barra Lateral"
|
||||
>
|
||||
<Menu size={20} />
|
||||
</button>
|
||||
@@ -116,7 +116,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
<button
|
||||
onClick={() => setTranscriptOpen(!transcriptOpen)}
|
||||
className={`p-3 rounded-xl glass border-white/10 transition-all bg-black/40 ${transcriptOpen ? 'text-blue-400' : 'text-gray-400 hover:text-white'}`}
|
||||
title="Toggle Transcript"
|
||||
title="Alternar Transcripción"
|
||||
>
|
||||
<ListMusic size={20} />
|
||||
</button>
|
||||
@@ -128,7 +128,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
<div className="max-w-4xl mx-auto space-y-20 pb-40">
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center gap-2 text-[10px] font-black uppercase tracking-widest text-blue-400">
|
||||
<span>{lesson.content_type === 'activity' ? 'Interactive Activity' : 'Video Lesson'}</span>
|
||||
<span>{lesson.content_type === 'activity' ? 'Actividad Interactiva' : 'Lección en Video'}</span>
|
||||
</div>
|
||||
<h1 className="text-4xl font-black tracking-tighter text-white">{lesson.title}</h1>
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
{lesson.summary && (
|
||||
<div className="p-8 rounded-3xl bg-gradient-to-br from-blue-500/10 to-indigo-500/10 border border-blue-500/20 animate-in fade-in slide-in-from-top-4 duration-1000">
|
||||
<h3 className="text-[10px] font-black uppercase tracking-[0.3em] text-blue-400 mb-4 flex items-center gap-2">
|
||||
<span className="text-base">✨</span> Summary
|
||||
<span className="text-base">✨</span> Resumen
|
||||
</h3>
|
||||
<p className="text-lg text-gray-300 leading-relaxed font-medium italic">
|
||||
"{lesson.summary}"
|
||||
@@ -183,7 +183,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
);
|
||||
setUserGrade(res);
|
||||
} catch (err) {
|
||||
console.error("Failed to persist play count", err);
|
||||
console.error("Error al guardar el recuento de reproducciones", err);
|
||||
}
|
||||
}
|
||||
}}
|
||||
@@ -219,7 +219,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
);
|
||||
setUserGrade(res);
|
||||
} catch (err) {
|
||||
console.error("Failed to persist block attempts", err);
|
||||
console.error("Error al guardar los intentos del bloque", err);
|
||||
}
|
||||
}
|
||||
}}
|
||||
@@ -248,7 +248,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
</div>
|
||||
) : (
|
||||
<div className="py-20 text-center glass-card border-dashed border-white/10">
|
||||
<p className="text-gray-500 font-bold uppercase tracking-widest">This lesson currently has no content.</p>
|
||||
<p className="text-gray-500 font-bold uppercase tracking-widest">Actualmente, esta lección no tiene contenido.</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -257,12 +257,12 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
{userGrade && lesson.max_attempts && userGrade.attempts_count >= lesson.max_attempts ? (
|
||||
<div className="space-y-4">
|
||||
<div className="inline-flex items-center gap-2 px-6 py-2 bg-amber-500/10 border border-amber-500/30 text-amber-400 rounded-full text-xs font-black uppercase tracking-widest">
|
||||
Locked: Maximum attempts reached ({lesson.max_attempts})
|
||||
Bloqueado: Se alcanzó el máximo de intentos ({lesson.max_attempts})
|
||||
</div>
|
||||
<div className="text-4xl font-black text-white">
|
||||
Score: <span className="text-blue-500">{userGrade.score * 100}%</span>
|
||||
Puntuación: <span className="text-blue-500">{userGrade.score * 100}%</span>
|
||||
</div>
|
||||
<p className="text-gray-500 text-xs italic">This assessment is now closed for further submissions.</p>
|
||||
<p className="text-gray-500 text-xs italic">Esta evaluación ya está cerrada para futuras entregas.</p>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
@@ -273,23 +273,23 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
// In a real scenario, we'd calculate the actual score from blocks
|
||||
const res = await lmsApi.submitScore(user.id, params.id, params.lessonId, 1.0);
|
||||
setUserGrade(res);
|
||||
alert("Score submitted successfully!");
|
||||
alert("¡Puntuación enviada con éxito!");
|
||||
} catch (err) {
|
||||
console.error("Submission failed", err);
|
||||
alert("Failed to submit score. Please try again.");
|
||||
console.error("Falló el envío", err);
|
||||
alert("Error al enviar la puntuación. Por favor, inténtalo de nuevo.");
|
||||
}
|
||||
}
|
||||
}}
|
||||
className="btn-premium px-12 py-4 rounded-2xl shadow-blue-500/40 shadow-xl group/btn"
|
||||
>
|
||||
<span className="flex items-center gap-2 font-black italic">
|
||||
{userGrade ? `SUBMIT ATTEMPT ${userGrade.attempts_count + 1}` : 'SUBMIT FOR GRADING'}
|
||||
{userGrade ? `ENVIAR INTENTO ${userGrade.attempts_count + 1}` : 'ENVIAR PARA CALIFICAR'}
|
||||
<CheckCircle2 className="w-5 h-5 group-hover/btn:scale-110 transition-transform" />
|
||||
</span>
|
||||
</button>
|
||||
{lesson.max_attempts && (
|
||||
<p className="mt-4 text-[10px] text-gray-500 font-bold uppercase tracking-widest">
|
||||
Attempt {userGrade ? userGrade.attempts_count : 0} of {lesson.max_attempts} used
|
||||
Intento {userGrade ? userGrade.attempts_count : 0} de {lesson.max_attempts} usado
|
||||
</p>
|
||||
)}
|
||||
</>
|
||||
@@ -319,7 +319,7 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
<ChevronLeft size={20} />
|
||||
</div>
|
||||
<div className="hidden sm:block">
|
||||
<p className="text-[10px] font-black uppercase tracking-widest text-gray-500">Previous</p>
|
||||
<p className="text-[10px] font-black uppercase tracking-widest text-gray-500">Anterior</p>
|
||||
<p className="text-xs font-bold text-gray-300 group-hover:text-white truncate max-w-[120px]">{prevLesson.title}</p>
|
||||
</div>
|
||||
</Link>
|
||||
@@ -332,17 +332,17 @@ export default function LessonPlayerPage({ params }: { params: { id: string, les
|
||||
))}
|
||||
</div>
|
||||
<span className="text-[10px] font-black uppercase tracking-widest text-gray-500 ml-4">
|
||||
{currentIndex + 1} OF {allLessons.length} COMPLETED
|
||||
{currentIndex + 1} OF {allLessons.length} COMPLETADO
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{nextLesson ? (
|
||||
<Link href={`/courses/${params.id}/lessons/${nextLesson.id}`} className="btn-premium !py-3 !px-6 text-xs !shadow-none">
|
||||
Next Lesson <ChevronRight size={18} />
|
||||
Siguiente Lección <ChevronRight size={18} />
|
||||
</Link>
|
||||
) : (
|
||||
<Link href="/" className="btn-premium !bg-green-600 !py-3 !px-6 text-xs !shadow-none">
|
||||
Finish Course <CheckCircle2 size={18} />
|
||||
Finalizar Curso <CheckCircle2 size={18} />
|
||||
</Link>
|
||||
)}
|
||||
</footer>
|
||||
|
||||
@@ -30,35 +30,35 @@ export default function CourseOutlinePage({ params }: { params: { id: string } }
|
||||
);
|
||||
}
|
||||
|
||||
if (!courseData) return <div className="text-center py-20 text-gray-500">Course not found.</div>;
|
||||
if (!courseData) return <div className="text-center py-20 text-gray-500">Curso no encontrado.</div>;
|
||||
|
||||
return (
|
||||
<div className="max-w-4xl mx-auto px-6 py-20">
|
||||
<div className="mb-16">
|
||||
<div className="flex items-center gap-2 mb-6 text-blue-500 font-bold text-xs uppercase tracking-widest">
|
||||
<Link href="/" className="hover:text-white transition-colors">Catalog</Link>
|
||||
<Link href="/" className="hover:text-white transition-colors">Catálogo</Link>
|
||||
<ChevronRight size={14} className="text-gray-600" />
|
||||
<span>Course Details</span>
|
||||
<span>Detalles del Curso</span>
|
||||
</div>
|
||||
<h1 className="text-5xl font-black tracking-tighter mb-6">{courseData.title}</h1>
|
||||
<p className="text-gray-400 text-lg leading-relaxed max-w-2xl mb-10">
|
||||
{courseData.description || "Master the core principles and advanced techniques in this structured curriculum. Each module is designed to provide actionable insights and hands-on experience."}
|
||||
{courseData.description || "Domina los principios básicos y las técnicas avanzadas en este plan de estudios estructurado. Cada módulo está diseñado para proporcionar conocimientos prácticos y experiencia práctica."}
|
||||
</p>
|
||||
|
||||
<div className="flex flex-wrap items-center gap-4 mb-10">
|
||||
<div className={`flex items-center gap-2 px-4 py-2 rounded-full border text-xs font-bold uppercase tracking-widest ${courseData.pacing_mode === 'instructor_led' ? 'bg-purple-500/10 border-purple-500/30 text-purple-400' : 'bg-blue-500/10 border-blue-500/30 text-blue-400'
|
||||
}`}>
|
||||
{courseData.pacing_mode === 'instructor_led' ? <Clock size={14} /> : <Info size={14} />}
|
||||
{courseData.pacing_mode === 'instructor_led' ? 'Instructor-Led' : 'Self-Paced'}
|
||||
{courseData.pacing_mode === 'instructor_led' ? 'Dirigido por un Instructor' : 'A tu Ritmo'}
|
||||
</div>
|
||||
|
||||
{courseData.pacing_mode === 'instructor_led' && (courseData.start_date || courseData.end_date) && (
|
||||
<div className="flex items-center gap-4 text-xs font-bold text-gray-500 uppercase tracking-widest">
|
||||
<Calendar size={14} />
|
||||
<span>
|
||||
{courseData.start_date ? new Date(courseData.start_date).toLocaleDateString() : 'TBD'}
|
||||
{courseData.start_date ? new Date(courseData.start_date).toLocaleDateString() : 'Por Determinar'}
|
||||
<span className="mx-2 text-gray-700">→</span>
|
||||
{courseData.end_date ? new Date(courseData.end_date).toLocaleDateString() : 'TBD'}
|
||||
{courseData.end_date ? new Date(courseData.end_date).toLocaleDateString() : 'Por Determinar'}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
@@ -67,12 +67,12 @@ export default function CourseOutlinePage({ params }: { params: { id: string } }
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center gap-8">
|
||||
<div className="flex flex-col">
|
||||
<span className="text-[10px] font-black uppercase tracking-widest text-gray-600 mb-1">Modules</span>
|
||||
<span className="text-[10px] font-black uppercase tracking-widest text-gray-600 mb-1">Módulos</span>
|
||||
<span className="text-xl font-bold text-white">{courseData.modules.length}</span>
|
||||
</div>
|
||||
<div className="w-px h-8 bg-white/10" />
|
||||
<div className="flex flex-col">
|
||||
<span className="text-[10px] font-black uppercase tracking-widest text-gray-600 mb-1">Total Lessons</span>
|
||||
<span className="text-[10px] font-black uppercase tracking-widest text-gray-600 mb-1">Lecciones Totales</span>
|
||||
<span className="text-xl font-bold text-white">
|
||||
{courseData.modules.reduce((acc, m) => acc + m.lessons.length, 0)}
|
||||
</span>
|
||||
@@ -82,12 +82,12 @@ export default function CourseOutlinePage({ params }: { params: { id: string } }
|
||||
<div className="flex gap-2">
|
||||
<Link href={`/courses/${params.id}/calendar`}>
|
||||
<button className="px-6 py-3 glass hover:border-blue-500/50 transition-all font-bold text-xs uppercase tracking-widest flex items-center gap-3 active:scale-95">
|
||||
<Calendar size={16} /> Timeline
|
||||
<Calendar size={16} /> Cronología
|
||||
</button>
|
||||
</Link>
|
||||
<Link href={`/courses/${params.id}/progress`}>
|
||||
<button className="px-8 py-3 glass hover:border-blue-500/50 transition-all font-bold text-xs uppercase tracking-widest flex items-center gap-3 active:scale-95">
|
||||
📊 Progress
|
||||
📊 Progreso
|
||||
</button>
|
||||
</Link>
|
||||
</div>
|
||||
@@ -120,14 +120,14 @@ export default function CourseOutlinePage({ params }: { params: { id: string } }
|
||||
<div>
|
||||
<h3 className="text-sm font-bold text-gray-200 group-hover:text-white transition-colors">{lesson.title}</h3>
|
||||
<span className="text-[10px] font-bold uppercase tracking-widest text-gray-500">
|
||||
{lesson.content_type === 'activity' ? 'Interactive Activity' : 'Video Lesson'}
|
||||
{lesson.content_type === 'activity' ? 'Actividad Interactiva' : 'Lección en Video'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-6">
|
||||
{lesson.due_date && (
|
||||
<div className="text-right hidden sm:block">
|
||||
<div className="text-[9px] font-black uppercase tracking-widest text-gray-600">Deadline</div>
|
||||
<div className="text-[9px] font-black uppercase tracking-widest text-gray-600">Vencimiento</div>
|
||||
<div className={`text-[10px] font-bold ${new Date(lesson.due_date) < new Date() ? 'text-red-400' : 'text-blue-400'}`}>
|
||||
{new Date(lesson.due_date).toLocaleDateString()}
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@ export default function StudentProgressPage() {
|
||||
setUserGrades(grades);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("Failed to load progress data", err);
|
||||
console.error("Error al cargar los datos de progreso", err);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
@@ -56,7 +56,7 @@ export default function StudentProgressPage() {
|
||||
</div>
|
||||
);
|
||||
|
||||
if (!course) return <div className="p-20 text-center text-white">Course not found.</div>;
|
||||
if (!course) return <div className="p-20 text-center text-white">Curso no encontrado.</div>;
|
||||
|
||||
const gradingCategories = course.grading_categories || [];
|
||||
|
||||
@@ -103,7 +103,7 @@ export default function StudentProgressPage() {
|
||||
<div className="lg:col-span-1 space-y-8">
|
||||
<div className="bg-gradient-to-br from-blue-600/20 to-indigo-600/20 rounded-[2.5rem] p-12 border border-blue-500/20 text-center relative overflow-hidden group">
|
||||
<div className="absolute top-0 right-0 w-32 h-32 bg-blue-500/10 blur-3xl rounded-full -translate-y-1/2 translate-x-1/2 group-hover:bg-blue-500/20 transition-all duration-700"></div>
|
||||
<h2 className="text-gray-400 font-bold uppercase tracking-widest text-xs mb-8">Overall Standing</h2>
|
||||
<h2 className="text-gray-400 font-bold uppercase tracking-widest text-xs mb-8">Estado General</h2>
|
||||
|
||||
<div className="relative inline-flex items-center justify-center mb-8">
|
||||
<svg className="w-48 h-48 -rotate-90">
|
||||
@@ -131,7 +131,7 @@ export default function StudentProgressPage() {
|
||||
</svg>
|
||||
<div className="absolute inset-0 flex flex-col items-center justify-center">
|
||||
<span className="text-6xl font-black">{Math.round(totalWeightedGrade)}%</span>
|
||||
<span className="text-xs text-blue-400 font-bold uppercase tracking-widest mt-1">Current Grade</span>
|
||||
<span className="text-xs text-blue-400 font-bold uppercase tracking-widest mt-1">Calificación Actual</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -146,7 +146,7 @@ export default function StudentProgressPage() {
|
||||
|
||||
<div className="bg-white/5 rounded-3xl p-8 border border-white/10 space-y-6">
|
||||
<h3 className="text-sm font-bold uppercase tracking-[0.2em] text-gray-500 flex items-center gap-2">
|
||||
<BarChart3 className="w-4 h-4" /> Assessment Summary
|
||||
<BarChart3 className="w-4 h-4" /> Resumen de Evaluaciones
|
||||
</h3>
|
||||
<div className="space-y-4">
|
||||
{categoryStats.map(stat => (
|
||||
@@ -167,7 +167,7 @@ export default function StudentProgressPage() {
|
||||
<section>
|
||||
<h2 className="text-2xl font-black mb-8 flex items-center gap-3">
|
||||
<Target className="w-8 h-8 text-blue-500" />
|
||||
Detailed Breakdown
|
||||
Desglose Detallado
|
||||
</h2>
|
||||
|
||||
<div className="space-y-4">
|
||||
@@ -177,12 +177,12 @@ export default function StudentProgressPage() {
|
||||
<div>
|
||||
<h3 className="text-xl font-bold">{cat.name}</h3>
|
||||
<p className="text-gray-400 text-sm mt-1">
|
||||
Weight: {cat.weight}% of total course grade
|
||||
Peso: {cat.weight}% de la calificación total del curso
|
||||
</p>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="text-4xl font-black text-blue-500">{Math.round(cat.avgScore)}%</div>
|
||||
<div className="text-[10px] text-gray-500 font-bold uppercase tracking-widest mt-1">Average Score</div>
|
||||
<div className="text-[10px] text-gray-500 font-bold uppercase tracking-widest mt-1">Puntuación Promedio</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -198,13 +198,13 @@ export default function StudentProgressPage() {
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<BookOpen className="w-4 h-4 text-gray-500" />
|
||||
<span className="text-gray-400">{cat.completedCount} / {cat.count} assessments completed</span>
|
||||
<span className="text-gray-400">{cat.completedCount} / {cat.count} evaluaciones completadas</span>
|
||||
</div>
|
||||
</div>
|
||||
{cat.completedCount === cat.count && (
|
||||
<div className="flex items-center gap-2 text-green-400 font-bold">
|
||||
<CheckCircle2 className="w-4 h-4" />
|
||||
Category Finished
|
||||
Categoría Finalizada
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
@@ -222,16 +222,16 @@ export default function StudentProgressPage() {
|
||||
<Award className="w-8 h-8" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg font-bold text-green-400">Course Completed!</h3>
|
||||
<h3 className="text-lg font-bold text-green-400">¡Curso Completado!</h3>
|
||||
<p className="text-sm text-green-300/60 mt-0.5">
|
||||
Congratulations! You have passed <b>{course.title}</b>.
|
||||
¡Felicidades! Has aprobado <b>{course.title}</b>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
onClick={() => {
|
||||
if (!course.certificate_template || !user) {
|
||||
alert("Certificate template not available.");
|
||||
alert("Plantilla de certificado no disponible.");
|
||||
return;
|
||||
}
|
||||
const filledTemplate = course.certificate_template
|
||||
@@ -254,7 +254,7 @@ export default function StudentProgressPage() {
|
||||
className="px-6 py-3 bg-green-500 hover:bg-green-600 text-white font-bold rounded-xl transition-colors shadow-lg shadow-green-900/20 flex items-center gap-2"
|
||||
>
|
||||
<Award className="w-4 h-4" />
|
||||
Download Certificate
|
||||
Descargar Certificado
|
||||
</button>
|
||||
</section>
|
||||
) : (
|
||||
@@ -264,14 +264,14 @@ export default function StudentProgressPage() {
|
||||
<TrendingUp className="w-8 h-8" />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="text-lg font-bold">Certification Track</h3>
|
||||
<h3 className="text-lg font-bold">Ruta de Certificación</h3>
|
||||
<p className="text-sm text-indigo-300/60 mt-0.5">
|
||||
Maintain {course.passing_percentage || 70}% or higher to earn your verified certificate.
|
||||
Mantén {course.passing_percentage || 70}% o más para obtener tu certificado verificado.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-indigo-400 font-bold text-sm">
|
||||
{Math.max(0, (course.passing_percentage || 70) - Math.round(totalWeightedGrade))}% to go
|
||||
Falta {Math.max(0, (course.passing_percentage || 70) - Math.round(totalWeightedGrade))}%
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user