Skip to content

Commit

Permalink
add error throwing logic on education survay unfinished
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Lu-none committed Dec 18, 2023
1 parent 3f1e6da commit ed3a835
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/src/connector/score_connector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,14 @@ class ScoreConnector {
parameter = ConnectorParameter(_scoreAllScoreUrl);
parameter.data = data;
result = await Connector.getDataByGet(parameter);
final List<String> evalQuestionnaireCheckTexts = ['教學評量', 'Course Evaluation Questionnaire'];
if (evalQuestionnaireCheckTexts.any((text) => result.contains(text))) {
//TODO: add notification to notify users to complete the Course Evaluation Questionnaire
throw RangeError("[TAT] score_connector.dart: evalQuestionnaireCheckTexts was found in request result");
}

tagNode = parse(result);
final h3Nodes = tagNode.getElementsByTagName("h3");

//依照學期取得課程資料
for (final h3Node in h3Nodes) {
final siblingOfH3 = h3Node.nextElementSibling;
Expand Down

0 comments on commit ed3a835

Please sign in to comment.