feat: harden student grade privacy, eradicate mock hallucinations, and normalize profile tool access (v3.8.33)
This commit is contained in:
@@ -1162,8 +1162,17 @@
|
||||
</div>
|
||||
|
||||
<div class="sidebar-body flex-grow-1 overflow-y-auto p-2">
|
||||
<ul class="sidebar-nav" id="sidebarNav">
|
||||
{% set user_role = role if role else (auth_user.role if auth_user else 'admin') %}
|
||||
{% set active_nav_user = impersonated_user if (is_impersonating and impersonated_user) else (auth_user if (auth_user and auth_user.is_authenticated) else (current_user if (current_user and current_user.is_authenticated) else user)) %}
|
||||
{% set raw_user_role = ((active_nav_user.role if active_nav_user and active_nav_user.role else (role if role else 'alumno')) | string | lower) %}
|
||||
{% if 'admin' in raw_user_role %}
|
||||
{% set user_role = 'admin' %}
|
||||
{% elif 'bedel' in raw_user_role %}
|
||||
{% set user_role = 'bedelia' %}
|
||||
{% elif 'docent' in raw_user_role or 'prof' in raw_user_role %}
|
||||
{% set user_role = 'docente' %}
|
||||
{% else %}
|
||||
{% set user_role = 'alumno' %}
|
||||
{% endif %}
|
||||
{% if user_role == 'admin' %}
|
||||
<!-- ADMINISTRADOR -->
|
||||
<li class="nav-item">
|
||||
|
||||
@@ -128,6 +128,13 @@
|
||||
<i class="bi bi-journal-check me-1"></i>Libro de Calificaciones (Actas)
|
||||
</a>
|
||||
</div>
|
||||
{% elif role == 'alumno' %}
|
||||
<div class="mt-3">
|
||||
<a href="/schedule/my_grades"
|
||||
class="btn btn-primary btn-sm w-100 shadow-sm" id="view-my-grades-btn">
|
||||
<i class="bi bi-award me-1"></i>Ver mis calificaciones e hitos
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if role in ['admin', 'bedelia'] %}
|
||||
@@ -260,6 +267,18 @@
|
||||
<p class="text-muted small">{{ commission.subject.description }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="mt-4 pt-3 border-top d-flex flex-wrap gap-2">
|
||||
<a href="/schedule/my_grades" class="btn btn-primary btn-sm">
|
||||
<i class="bi bi-award me-1"></i>Mis Calificaciones e Hitos
|
||||
</a>
|
||||
<a href="/schedule/today_schedule" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-calendar-day me-1"></i>Clases de Hoy
|
||||
</a>
|
||||
<a href="/schedule/calendar_view" class="btn btn-outline-secondary btn-sm">
|
||||
<i class="bi bi-calendar3 me-1"></i>Cronograma Semanal
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% set active_auth_user = auth_user if (auth_user and auth_user.is_authenticated) else (current_user if (current_user and current_user.is_authenticated) else user) %}
|
||||
{% set active_auth_user = impersonated_user if (is_impersonating and impersonated_user) else (auth_user if (auth_user and auth_user.is_authenticated) else (current_user if (current_user and current_user.is_authenticated) else user)) %}
|
||||
{% set current_user_id = active_auth_user.id if active_auth_user and active_auth_user.id else '' %}
|
||||
{% set current_user_email = active_auth_user.email if active_auth_user and active_auth_user.email else '' %}
|
||||
{% set current_user_name = active_auth_user.first_name if (active_auth_user and active_auth_user.first_name) else (active_auth_user.name if active_auth_user else '') %}
|
||||
|
||||
Reference in New Issue
Block a user