Compare commits
1 Commits
8f01eaacb5
...
dbba005327
| Author | SHA1 | Date | |
|---|---|---|---|
| dbba005327 |
9
index.ts
9
index.ts
@@ -805,6 +805,7 @@ async function navigateToGrading(page: Page, allClassGrades: any[]) {
|
|||||||
// Check if this row is a grade type header (Major Grades / Minor Grades)
|
// Check if this row is a grade type header (Major Grades / Minor Grades)
|
||||||
const gradeTypeSpan = await row.$('span.anchorText');
|
const gradeTypeSpan = await row.$('span.anchorText');
|
||||||
|
|
||||||
|
|
||||||
if (gradeTypeSpan) {
|
if (gradeTypeSpan) {
|
||||||
const gradeTypeText = (await gradeTypeSpan.textContent())?.trim();
|
const gradeTypeText = (await gradeTypeSpan.textContent())?.trim();
|
||||||
logger.info(` Row ${j}: Found span with text "${gradeTypeText}"`);
|
logger.info(` Row ${j}: Found span with text "${gradeTypeText}"`);
|
||||||
@@ -817,11 +818,17 @@ async function navigateToGrading(page: Page, allClassGrades: any[]) {
|
|||||||
logger.info(` → Set current grade type to MINOR`);
|
logger.info(` → Set current grade type to MINOR`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else if (gradeTypeText === 'Semester Exam') {
|
||||||
|
currentGradeType = 'minor';
|
||||||
|
logger.info(` → Semester Exam Detected → defaulting to MINOR`);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Skip if we haven't found a grade type yet
|
|
||||||
if (!currentGradeType) {
|
if (!currentGradeType) {
|
||||||
logger.info(` Row ${j}: Skipping (no grade type set yet)`);
|
logger.info(` Row ${j}: Skipping (no grade type set yet)`);
|
||||||
|
currentGradeType = 'minor'; // default
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user