Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(quiz): create QuizRecord #352

Merged
merged 26 commits into from
Dec 22, 2023
Merged

feat(quiz): create QuizRecord #352

merged 26 commits into from
Dec 22, 2023

Conversation

CapooL
Copy link
Collaborator

@CapooL CapooL commented Dec 7, 2023

No description provided.

@CapooL
Copy link
Collaborator Author

CapooL commented Dec 7, 2023

赶着写就没删分支接着写了),merge那一步有点蠢了,冲突手动解决了

Copy link
Member

@lin594 lin594 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QuizRecord 应该可以能独立使用?

@@ -60,3 +60,19 @@ class PaperRecord(models.Model):
verbose_name="试卷",
)
id = models.CharField(max_length=20, verbose_name="ID", primary_key=True)


class QuizRecord(models.Model):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wu 你的 QuizRecord 要依附于 PaperRecord 吗? 我本来以为是相关但独立的两个东西?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所以我设想中应该还有contributor、time之类的字段

quiz = models.ForeignKey(
Quiz, on_delete=models.CASCADE, related_name="quiz", verbose_name="测试题"
)
paper = models.ForeignKey(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该是PaperRecord吧,而且是个可选项

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

因为我认为不在卷子里也可能可以答题

"quiz": quiz_all(record.quiz),
"answer": record.answer,
"correctness": record.correctness,
"paper": None if record.paper is None else paper_simple(record.paper),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

总担心这里的返回会嵌套) 但是也都还行吧,大不了到时候再改

Copy link
Member

@lin594 lin594 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一点小细节(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件命名错误

PaperRecord,
on_delete=models.CASCADE,
related_name="quiz_paper",
verbose_name="所在试卷",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所在答卷记录

@lin594 lin594 changed the title create QuizRecord feat(quiz): create QuizRecord Dec 22, 2023
@CapooL
Copy link
Collaborator Author

CapooL commented Dec 22, 2023

一点小细节(

改完了

@lin594 lin594 merged commit 5af482c into e-dialect:develop Dec 22, 2023
3 checks passed
@CapooL CapooL deleted the quiz_record branch March 6, 2024 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants