已改成“普通排课与实验学时分离”:
普通课表学时 = 总学时 − 实践学时。 自动排课、手工排课、课表发布都会阻止把实践学时重复排入。 全部为实践学时的课程应设为“非排时课程”,再由实验管理安排。 教学任务和排课页面会显示“常规 / 实践学时”。 已有教学任务即使仍保存旧周学时,排课时也会按拆分后的课程学时计算。 无需数据库迁移。
This commit is contained in:
@@ -82,6 +82,9 @@ public sealed class TeachingTasksController(
|
||||
x.WeeklyHours,
|
||||
x.SchedulingMode,
|
||||
CourseTotalHours = x.Course.TotalHours,
|
||||
CoursePracticeHours = x.Course.PracticeHours,
|
||||
CourseRegularScheduleHours =
|
||||
x.Course.TotalHours - x.Course.PracticeHours,
|
||||
x.GenerationBatchCode,
|
||||
x.Status,
|
||||
TeacherNames = x.Teachers
|
||||
@@ -127,6 +130,10 @@ public sealed class TeachingTasksController(
|
||||
x.EndWeek,
|
||||
x.WeeklyHours,
|
||||
x.SchedulingMode,
|
||||
CourseTotalHours = x.Course!.TotalHours,
|
||||
CoursePracticeHours = x.Course.PracticeHours,
|
||||
CourseRegularScheduleHours =
|
||||
x.Course.TotalHours - x.Course.PracticeHours,
|
||||
TeacherNames = x.Teachers
|
||||
.OrderByDescending(item => item.IsPrimary)
|
||||
.Select(item => item.Teacher!.Name),
|
||||
@@ -163,6 +170,9 @@ public sealed class TeachingTasksController(
|
||||
x.WeeklyHours,
|
||||
x.SchedulingMode,
|
||||
CourseTotalHours = x.Course.TotalHours,
|
||||
CoursePracticeHours = x.Course.PracticeHours,
|
||||
CourseRegularScheduleHours =
|
||||
x.Course.TotalHours - x.Course.PracticeHours,
|
||||
x.GenerationBatchCode,
|
||||
x.Status,
|
||||
x.Notes,
|
||||
@@ -423,7 +433,8 @@ public sealed class TeachingTasksController(
|
||||
course,
|
||||
request.StartWeek,
|
||||
request.EndWeek,
|
||||
request.WeeklyHours);
|
||||
request.WeeklyHours,
|
||||
TeachingTaskSchedulingMode.Standard);
|
||||
if (hoursProblem is not null) return ValidationProblem(hoursProblem);
|
||||
if (course.Nature is not (CourseNature.GeneralRequired or CourseNature.GeneralElective))
|
||||
return ValidationProblem("批量合班生成仅用于公共必修课或公共选修课。");
|
||||
@@ -598,7 +609,8 @@ public sealed class TeachingTasksController(
|
||||
course,
|
||||
request.StartWeek,
|
||||
request.EndWeek,
|
||||
request.WeeklyHours);
|
||||
request.WeeklyHours,
|
||||
request.SchedulingMode);
|
||||
if (hoursProblem is not null) return ValidationProblem(hoursProblem);
|
||||
var collegeId = ScopedCollegeId();
|
||||
if (!await db.AcademicTerms.AnyAsync(
|
||||
|
||||
Reference in New Issue
Block a user