已完成“考试安排与考场管理”模块:
考试计划草稿、场次配置与正式发布。 教学班、考试时间、考场、监考教师关联。 自动校验考场容量。 阻止考场、监考教师和学生考试时间冲突。 管理员查看考生名单。 教师查看个人监考安排。 学生查看已发布考试日程。 SQLite 增量升级和 MySQL 正式迁移。
This commit is contained in:
@@ -309,6 +309,24 @@ try {
|
||||
if (@($studentTranscript.records).Count -lt 1) {
|
||||
throw 'Published grade is not visible in the student transcript.'
|
||||
}
|
||||
$examPlans = Invoke-RestMethod -Uri 'http://localhost:5255/api/exams/plans' -Headers $headers
|
||||
if (@($examPlans).Count -lt 1) { throw 'Development exam plan was not seeded.' }
|
||||
$examDetail = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/exams/plans/$($examPlans[0].id)" `
|
||||
-Headers $headers
|
||||
if (@($examDetail.sessions).Count -lt 1) { throw 'Exam plan has no sessions.' }
|
||||
$examRoster = Invoke-RestMethod `
|
||||
-Uri "http://localhost:5255/api/exams/sessions/$($examDetail.sessions[0].id)/roster" `
|
||||
-Headers $headers
|
||||
$studentExams = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/exams/my-schedule' `
|
||||
-Headers $studentHeaders
|
||||
$teacherExams = Invoke-RestMethod `
|
||||
-Uri 'http://localhost:5255/api/exams/my-schedule' `
|
||||
-Headers $teacherHeaders
|
||||
if (@($studentExams).Count -lt 1 -or @($teacherExams).Count -lt 1) {
|
||||
throw 'Personal exam schedule is not visible to student or invigilator.'
|
||||
}
|
||||
|
||||
$frontend = Invoke-WebRequest -Uri 'http://localhost:5255/' -TimeoutSec 5
|
||||
$spaFallback = Invoke-WebRequest -Uri 'http://localhost:5255/base-data' -TimeoutSec 5
|
||||
@@ -341,6 +359,8 @@ try {
|
||||
GradeSheets = @($gradeTasks).Count
|
||||
GradeRecords = @($gradeDetail.sheet.records).Count
|
||||
TranscriptRecords = @($studentTranscript.records).Count
|
||||
ExamSessions = @($examDetail.sessions).Count
|
||||
ExamRoster = @($examRoster.students).Count
|
||||
AccessUpdate = $true
|
||||
ScopeChecks = $scopeChecks -join ', '
|
||||
StaticIndex = $frontend.Content.Contains('明序教务管理系统')
|
||||
|
||||
Reference in New Issue
Block a user