v4.0 权限组重构与导出/个人查询优化
1. 权限重构:自定义权限组(14项功能权限+允许加分/加分上限/允许扣分/扣分上限),管理员账号绑定权限组,预置六组且班主任组锁定;全站前后端改为权限驱动,权限变更60秒内自动生效 2. 新增班主任导出学生名单(导出前自选字段) 3. 加减分/考勤上限改为按权限组动态校验,弹窗实时提示并限制输入 4. 导出按学期隔离(默认当前学期,可选历史/全部),历史导出不再受1000条限制 5. 新增管理端个人查询:基础分/加分/扣分/月度分/月度理由汇总及明细导出 6. 版本升级至4.0(sql/upgrades/v4.0.sql)
This commit is contained in:
1 parent
3067542e53
commit
3588b4c28c
55 files changed
+2846
-801
No files matched your search
@@ -18,12 +18,8 @@ if (!isset($_SESSION['user_id']) || $_SESSION['user_type'] !== 'admin') {
|
||||
}
|
||||
|
||||
$page_title = '作业扣分';
|
||||
$role = $_SESSION['role'] ?? '';
|
||||
|
||||
if (!in_array($role, ['班主任', '学习委员'])) {
|
||||
header('Location: /admin/dashboard.php');
|
||||
exit();
|
||||
}
|
||||
$role = current_group_name();
|
||||
require_perm('manage_homework');
|
||||
|
||||
include __DIR__ . '/../includes/header.php';
|
||||
?>
|
||||
@@ -31,6 +27,7 @@ include __DIR__ . '/../includes/header.php';
|
||||
<?php include __DIR__ . '/../includes/nav.php'; ?>
|
||||
|
||||
<div class="container">
|
||||
<?php if (has_perm('manage_subjects')): ?>
|
||||
<!-- 科目管理折叠面板 -->
|
||||
<div class="card collapsible-card" style="margin-bottom: 20px;">
|
||||
<div class="collapsible-header" id="subjectPanelHeader">
|
||||
@@ -44,6 +41,7 @@ include __DIR__ . '/../includes/header.php';
|
||||
<div id="subjectList" class="subject-list"></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card">
|
||||
<div class="action-bar">
|
||||
@@ -79,14 +77,12 @@ include __DIR__ . '/../includes/header.php';
|
||||
<label>已选学生</label>
|
||||
<div id="selectedStudentsCount" class="selected-info">未选择学生</div>
|
||||
</div>
|
||||
<?php if (in_array($role, ['班主任', '学习委员'])): ?>
|
||||
<div class="form-group">
|
||||
<label>科目</label>
|
||||
<select id="hwSubjectSelect">
|
||||
<option value="">不选择科目</option>
|
||||
</select>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="form-group">
|
||||
<label>扣分类型</label>
|
||||
<div class="deduction-types" style="display: flex; flex-wrap: wrap; gap: 6px;">
|
||||
@@ -98,7 +94,6 @@ include __DIR__ . '/../includes/header.php';
|
||||
<button type="button" class="btn btn-sm" onclick="selectDeductionType(0, '')">自定义</button>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (in_array($role, ['班主任', '学习委员'])): ?>
|
||||
<div class="form-group">
|
||||
<label>具体作业</label>
|
||||
<input type="text" id="hwTitle" placeholder="选填,如:第三章练习">
|
||||
@@ -107,14 +102,10 @@ include __DIR__ . '/../includes/header.php';
|
||||
<label>缴交时间</label>
|
||||
<input type="date" id="hwDeadline" value="<?php echo date('Y-m-d'); ?>">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="form-group">
|
||||
<label>分数变动</label>
|
||||
<input type="number" id="pointsChange" required min="-5" max="5" step="1" placeholder="正数加分,负数扣分">
|
||||
<small><?php
|
||||
if ($role === '学习委员') echo '学习委员单次±5分以内';
|
||||
else echo '班主任无限制';
|
||||
?></small>
|
||||
<input type="number" id="pointsChange" required step="1" placeholder="正数加分,负数扣分">
|
||||
<small class="hw-max"></small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>原因</label>
|
||||
|
||||
Reference in new issue
Block a user