Special topics rows on the Courses page have misaligned columns

Abierto Apto para principiantes
#481 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 7 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
82/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
flask, html, python
Área
frontend

Línea de trabajo

Abre app/templates/snips/courseElements/adminCourseTable.html y compara el <td> de Course Materials de la fila de curso regular, cerca de la línea 142, con las filas de special topics alrededor de las líneas 304-312, que saltan de faculty_credit directamente a LAST EDITED BY. Añade ahí la celda de Resources que falta, replicando el texto de respaldo de la fila regular cuando no hay nada definido, y comprueba que el orden de las celdas del encabezado coincida. Luego ejecuta CAS en local, ve a Courses -> Spring 2022 -> African and African American Studies y confirma que una fila de special topics aún no aprobada se alinea con el encabezado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Problem

On the Courses page (/courses/<term>/<program>), special topics rows have their columns shifted one to the left starting at the Resources column. Regular course rows look fine.

For example, on Spring 2022 / AFR, the row for "AFR 286 African Presence in Latin America" (status: Submitted) shows:

  • steeles (the last editor) under Resources instead of Last Edited
  • the edit/delete icons under Last Edited instead of the last column

This only happens for special topics that are not approved yet (e.g. Submitted). Approved special topics display correctly, because once approved they're stored in the Course table and use the regular row template (see the comment in app/controllers/main_routes/course.py: "We exclude the approved courses, because they'll be stored in the 'Course' table already"). So the bug is only in the special topics row template.

cas-special-topics-bug

Cause

In app/templates/snips/courseElements/adminCourseTable.html, regular course rows have a Course Materials <td> between Faculty Load and Last Edited (around line 142), but the special topics rows skip it and go straight from faculty_credit to LAST EDITED BY (around lines 304-312). So each special topics row has one fewer cell than the header.

Possible fix

Add a Resources <td> to the special topics rows between Faculty Load and Last Edited. If special topics don't have course materials stored, it could just show "Unspecified" like the regular rows do when nothing is set.

To reproduce

  1. Run CAS locally (dev container)
  2. Go to Courses -> Spring 2022 -> African and African American Studies
  3. Scroll to a special topics row that is not Approved yet (e.g. one with a "Submitted" badge) and compare its columns to the header
Lenguaje dominante
JavaScript
Estrellas
0
Forks
3
Merge medio
8 d 5 h
PR fusionados (30 d)
6

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de BCStudentSoftwareDevTeam/cas

Todos los issues de BCStudentSoftwareDevTeam/cas

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.