getSyllabus method
- required String courseNumber,
- required String teacherId,
- required SyllabusLanguage language,
override
Fetches the detailed syllabus for a course offering in language.
Returns every source-page section in order, or null when the authoring
teacher hasn't submitted one yet (the page shows 尚未登錄).
The courseNumber should be a course offering number (e.g., "346774"),
and teacherId is the authoring teacher's ID (one of the teachers IDs
of a ScheduleDto).
Throws an Exception if the syllabus tables are not found.
Implementation
@override
Future<SyllabusDto?> getSyllabus({
required String courseNumber,
required String teacherId,
required SyllabusLanguage language,
}) async {
if (syllabusResult != null) return syllabusResult;
// Some teachers on a team-taught offering haven't submitted a syllabus yet
// (the real page shows 尚未登錄); return null to exercise that path.
if (const {'11894', '11991'}.contains(teacherId)) return null;
// Actual 115-1 Introduction to Art Theories syllabus (course 366960,
// instructor 章韶洵) from ntut-course-crawler-node.
final titles = switch (language) {
.zhTw => (
objective: '課程大綱',
schedule: '課程進度(1-16週)',
flexibleCategory: '彈性學習(17-18週) / 類別',
flexibleContent: '彈性學習(17-18週) / 內容',
flexibleHours: '彈性學習(17-18週) / 時數 (小時)',
flexibleOutcome: '彈性學習(17-18週) / 學習成果',
flexiblePercentage: '彈性學習(17-18週) / 評量比例',
evaluation: '評量方式與標準',
materials: '使用教材、參考書目或其他',
consultation: '課程諮詢管道',
extension: '延伸教學與資源',
sdgs: '課程對應SDGs指標',
ai: '課程是否導入AI',
note: '備註',
),
.enUs => (
objective: 'Course Objective',
schedule: 'Course Schedule(Week 1-16)',
flexibleCategory: 'Flexible Learning(Week 17-18) / Category',
flexibleContent: 'Flexible Learning(Week 17-18) / Content',
flexibleHours: 'Flexible Learning(Week 17-18) / Hours',
flexibleOutcome: 'Flexible Learning(Week 17-18) / Learning Outcomes',
flexiblePercentage:
'Flexible Learning(Week 17-18) / Assessment Percentage',
evaluation: 'Evaluation and grading policy',
materials: 'Materials',
consultation: 'The access to curricular consultation',
extension: 'Expanding teaching and resources',
sdgs: 'The course corresponds to the SDGs',
ai: 'Does the course incorporate AI',
note: 'Note',
),
};
return (
type: CourseType.universityCommonRequired,
enrolled: 0,
withdrawn: 0,
email: '[email protected]',
lastUpdated: DateTime(2026, 8, 4, 0, 52, 53),
sections: [
(
title: titles.objective,
content:
'本課程介紹各種藝術形式, 包括繪畫, 雕塑等視覺藝術, '
'以及戲劇, 音樂等表演藝術, 引導學生如何欣賞各種藝術風格, '
'進而發展對藝術的終身愛好\n\n'
'課程目標:\n'
'1. 各時期藝術的介紹與鑑賞\n'
'2. 培養學生藝文賞析的能力, 提升自身的美感經驗\n'
'3. 發現生活中的藝術之美',
),
(
title: titles.schedule,
content:
'第一週\t導論\n'
'第二週\t史前 - 古埃及\n'
'第三週\t古希臘羅馬\n'
'第四週\t中世紀\n'
'第五週\t文藝復興\n'
'第六週\t巴洛克/ 洛可可\n'
'第七週\t午間音樂會\n'
'第八週\t新古典/ 浪漫主義\n'
'第九週\t期中考週\n'
'第十週\t國定假日\n'
'第十一週\t午間音樂會\n'
'第十二週\t印象派\n'
'第十三週\t午間音樂會\n'
'第十四週\t後印象派\n'
'第十五週\t20 世紀\n'
'第十六週\t期末考',
),
(
title: titles.flexibleCategory,
content:
'● 參與校內外活動 (講座、工作坊、參訪) 或競賽 '
'(Participation in on-campus or off-campus activities '
'(lectures, workshops, visits) or competitions)',
),
(
title: titles.flexibleContent,
content: '學生自行參觀美術館 / 博物館',
),
(title: titles.flexibleHours, content: '4'),
(title: titles.flexibleOutcome, content: '參觀心得報告'),
(title: titles.flexiblePercentage, content: '20%'),
(
title: titles.evaluation,
content:
'期末考 50%\n'
'平常成績 30%\n'
'參觀展覽 / 音樂會心得 20%',
),
(
title: titles.materials,
content:
'所有藝術相關平面及媒體資訊\n\n'
'參考書籍:\n'
'一次讀懂西洋繪畫史,田中久美子 著,陳嫻若 譯。\n'
'一次讀懂西洋建築, 羅慶鴻、張倩儀 著。\n'
'希利爾講藝術史, 維吉爾・希利爾 著,王奕偉 譯。',
),
(title: titles.consultation, content: '[email protected]'),
(title: titles.extension, content: '● 無 (None)'),
(title: titles.sdgs, content: '無(None)'),
(title: titles.ai, content: '● 無(None)'),
(title: titles.note, content: null),
],
);
}