Special topics rows on the Courses page have misaligned columns

オープン 初心者向け
#481 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 7 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
flask, html, python
領域
frontend

調査の方向性

app/templates/snips/courseElements/adminCourseTable.html を開き、約142行目にある通常のコース行の Course Materials の <td> と、304〜312行目付近の special topics の行を比較してください。special topics の行は faculty_credit から直接 LAST EDITED BY に飛んでいます。そこに不足している Resources のセルを追加し、何も設定されていない場合は通常の行のフォールバックテキストと同じ表示にしてください。また、ヘッダーのセルの順序が一致しているか確認してください。その後、ローカルで CAS を実行し、Courses -> Spring 2022 -> African and African American Studies に進み、まだ承認されていない special topics の行がヘッダーと揃っていることを確認してください。

索引モデルが issue の本文から書いたものです。

説明

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
主要言語
JavaScript
スター
0
フォーク
3
平均マージ
8日 5時間
マージ済み PR(30日)
6

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

BCStudentSoftwareDevTeam/cas のほかの issue

BCStudentSoftwareDevTeam/cas の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。