Preserve courses with pending rooms and report precise graduate import errors

This commit is contained in:
david1465833828
2026-10-28 19:56:02 +08:00
parent 8713bce0ee
commit 21b0df9e33
17 changed files with 340 additions and 53 deletions
@@ -28,7 +28,8 @@ class UndergraduateTimetableAdapter {
table = html
.parse(content)
.querySelector('#manualArrangeCourseTable');
if (table == null || doc.querySelector('input[type="password"]') != null) {
if (table == null ||
doc.querySelector('input[type="password"]') != null) {
throw const FormatException('请先在学校网页打开课表');
}
final termIds = doc
@@ -161,7 +162,10 @@ class UndergraduateTimetableAdapter {
weeks: group.weeks,
source: source,
courseCode: info?.code ?? a.courseCode,
notes: info?.notes ?? '',
notes: [
if (info?.notes.isNotEmpty == true) info!.notes,
if (a.room == '教室待定') '学校未提供教室,请以学校最新安排为准并在公布后刷新课表。',
].join('\n'),
),
);
}