布置作业、提交与自动评分
- 作业:老师选实验、起点(界面已做好 / 空白工程)、截止时间、每项分值(自动评分项 + 老师评分项); 起点工程由设计器引擎从参考答案生成(去掉事件绑定和事件处理方法),布置时保存起点和评分规则快照 - 提交:后台排队评分(全站同时最多评 3 份、跑 6 个检查项),重启后继续评;评分中不能再交,截止后不能交 - 学生:"我的作业"列表;实验页的作业模式(作业名、截止时间、提交、得分),评分结果弹出逐项显示 - 老师:班级管理页加"作业"标签页,布置、修改、删除作业,查看全班提交情况;改分值后重新算分 - 串口列表为空时提示在 Load 或 Click 事件里填充 - 测试:作业接口(可见范围、排队评分、部分得分、改分值、截止、删除);10 个示例两种起点都能编译 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
37fc747b49
commit
4e6b0d5cb2
23 files changed
+1439
-50
No files matched your search
@@ -1,10 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
// 老师的班级管理:建班、导入学生名单(CSV)、查看和重置密码、导出名单发给学生。
|
||||
// 老师的班级管理:建班、导入学生名单(CSV)、查看和重置密码、导出名单发给学生;布置作业、查看提交情况。
|
||||
import { computed, h, onMounted, ref } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { NButton, NDataTable, NEmpty, NInput, NModal, NPopconfirm, NPopover, useDialog, useMessage, type DataTableColumns } from 'naive-ui'
|
||||
import { NButton, NDataTable, NEmpty, NInput, NModal, NPopconfirm, NPopover, NTabPane, NTabs, useDialog, useMessage, type DataTableColumns } from 'naive-ui'
|
||||
import { api } from '../api'
|
||||
import { currentUser, logout } from '../auth'
|
||||
import AssignmentsPanel from '../teacher/AssignmentsPanel.vue'
|
||||
import { decodeCsv, parseCsv, toRoster, type RosterRow } from '../teacher/roster'
|
||||
|
||||
interface ClassInfo {
|
||||
@@ -264,16 +265,24 @@ async function signOut() {
|
||||
</template>
|
||||
只能删除没有学生的班级。确定删除"{{ selected.name }}"吗?
|
||||
</NPopconfirm>
|
||||
<span class="spacer" />
|
||||
<NButton size="small" type="primary" @click="fileInput?.click()">导入名单(CSV)</NButton>
|
||||
<NButton size="small" :disabled="students.length === 0" @click="exportRoster">导出名单(含密码)</NButton>
|
||||
<NButton size="small" quaternary @click="downloadTemplate">下载名单模板</NButton>
|
||||
<input ref="fileInput" type="file" accept=".csv,text/csv" hidden @change="onFileChosen" />
|
||||
</div>
|
||||
<p class="tip">
|
||||
名单是 Excel 另存的 CSV,列为"学号、姓名、密码"。密码可以留空,平台会生成 6 位数字密码;导入后点"导出名单"发给学生。学号已存在时更新姓名和班级,密码留空则不变。
|
||||
</p>
|
||||
<NDataTable :columns="columns" :data="students" :row-key="(s: Student) => s.id" size="small" :bordered="false" />
|
||||
<NTabs type="line" default-value="students">
|
||||
<NTabPane name="students" :tab="`学生(${students.length})`">
|
||||
<div class="students-actions">
|
||||
<NButton size="small" type="primary" @click="fileInput?.click()">导入名单(CSV)</NButton>
|
||||
<NButton size="small" :disabled="students.length === 0" @click="exportRoster">导出名单(含密码)</NButton>
|
||||
<NButton size="small" quaternary @click="downloadTemplate">下载名单模板</NButton>
|
||||
<input ref="fileInput" type="file" accept=".csv,text/csv" hidden @change="onFileChosen" />
|
||||
</div>
|
||||
<p class="tip">
|
||||
名单是 Excel 另存的 CSV,列为"学号、姓名、密码"。密码可以留空,平台会生成 6 位数字密码;导入后点"导出名单"发给学生。学号已存在时更新姓名和班级,密码留空则不变。
|
||||
</p>
|
||||
<NDataTable :columns="columns" :data="students" :row-key="(s: Student) => s.id" size="small" :bordered="false" />
|
||||
</NTabPane>
|
||||
<NTabPane name="assignments" tab="作业">
|
||||
<AssignmentsPanel :class-id="selected.id" />
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
</section>
|
||||
<section v-else class="students">
|
||||
<NEmpty description="选择或新建一个班级" />
|
||||
@@ -425,6 +434,12 @@ async function signOut() {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.students-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
color: #6b7280;
|
||||
font-size: 12px;
|
||||
|
||||
Reference in new issue
Block a user