修复了一些已知问题

This commit is contained in:
2026-04-29 15:20:28 +08:00
parent 3aac2395a0
commit 5c0b9c8516
10 changed files with 117 additions and 20 deletions

View File

@@ -83,8 +83,11 @@ include __DIR__ . '/../includes/header.php';
</div>
<div class="form-group">
<label>分数变动</label>
<input type="number" id="pointsChange" required min="-3" max="3" step="1" placeholder="正数加分,负数扣分">
<small>每次加减分不超过<span class="hw-max"></span>分</small>
<input type="number" id="pointsChange" required min="-5" max="5" step="1" placeholder="正数加分,负数扣分">
<small><?php
if ($role === '学习委员') echo '学习委员单次±5分以内';
else echo '班主任无限制';
?></small>
</div>
<div class="form-group">
<label>原因</label>
@@ -103,7 +106,7 @@ var selectedStudentIds = [];
const hwRole = '<?php echo $role; ?>';
// 初始化扣分配置
const hwMaxPoints = window.HOMEWORK_MAX_POINTS || 3;
const hwMaxPoints = hwRole === '班主任' ? 100 : (window.HOMEWORK_MAX_POINTS || 5);
const hwNotSubmit = window.DEDUCTION_HOMEWORK_NOT_SUBMIT || 2;
const hwLate = window.DEDUCTION_HOMEWORK_LATE || 1;