feat: “出问题了”三栏说清问题,交作品时写一句反思,外部提示词至少 8 个字
Deploy / deploy (build, debian, 22) (push) Canceled after 0s
Deploy / deploy (build, debian, 22) (push) Canceled after 0s
- 对话框加“出问题了”:做了什么 / 想看到什么 / 实际看到了什么拼成一句发给 AI; 只说“还是不行”这类的提醒一次,可以直接发 - “交这一版”先弹框问最满意的改动和理由(可以不写),存在 submission_reflection, 批改面板显示为“学生说”,只有老师和作者本人看得到 - 粘贴外部 AI 代码时提示词至少 8 个字,可以把几轮都贴进来 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5bdacc438d
commit
e9127318cb
12 files changed
+351
-63
No files matched your search
@@ -276,6 +276,34 @@ describe("提交与删除", () => {
|
||||
expect(all(`SELECT COUNT(*) AS n FROM submission_submission WHERE id != $id`, { id: otherSub })).toEqual([{ n: 1 }])
|
||||
})
|
||||
|
||||
test("交的时候写的反思:再交没写就保留,只有老师和作者能看,删提交时一起删", async () => {
|
||||
makeUser("stu")
|
||||
makeUser("mate")
|
||||
makeUser("teacher", "admin")
|
||||
const task = makeTask("T")
|
||||
const stu = await client("stu")
|
||||
const edit = await stu("POST", "/api/prompt/versions", { task_id: task, html: "<p>1", css: "", js: "" })
|
||||
const sub = await stu("POST", "/api/submission/", {
|
||||
task_id: task,
|
||||
html: "<p>1",
|
||||
message_id: edit.json.message_id,
|
||||
reflection: " 按钮改成三个,因为五个太乱 ",
|
||||
})
|
||||
const id = sub.json.id
|
||||
await stu("POST", "/api/submission/", { task_id: task, html: "<p>1!", message_id: edit.json.message_id, reflection: "" })
|
||||
expect((await stu("GET", `/api/submission/${id}`)).json.reflection).toBe("按钮改成三个,因为五个太乱")
|
||||
expect((await (await client("teacher"))("GET", `/api/submission/${id}`)).json.reflection).toBe("按钮改成三个,因为五个太乱")
|
||||
|
||||
const mate = await client("mate")
|
||||
await mate("POST", "/api/submission/", { task_id: task, html: "<p>m" })
|
||||
const peer = await mate("GET", `/api/submission/${id}`)
|
||||
expect(peer.status).toBe(200)
|
||||
expect(peer.json.reflection).toBeNull()
|
||||
|
||||
expect((await stu("DELETE", `/api/submission/${id}`)).status).toBe(200)
|
||||
expect(all(`SELECT * FROM submission_reflection`)).toEqual([])
|
||||
})
|
||||
|
||||
test("被评分的提交只有超管能删", async () => {
|
||||
const author = makeUser("author")
|
||||
const other = makeUser("other")
|
||||
|
||||
Reference in new issue
Block a user