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

书院课选课权重 #870

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

Deophius
Copy link
Collaborator

在自然人模型中加入了course_priority代表选课时的权重,更新了选课抽签的代码,并且加入了基于指定学期学时表中无效学时个数计算权重的manage script

PR通过之后需要在运维文档里面记录:选课前调用management script,更新选课权重。

加了相应的unique constraint,并且使用原子的update_or_create,避免在数据库中产生两个相同的记录
Remember to uncomment return in 2025 Fall
Now accepts year + semester pair on command line.
Does the sorting in the SQL query, allowing O(n) counting invalid records.
Updates course priority in batch and added transaction.atomic
@Deophius Deophius added model changed 模型有修改 need test 尚需用户测试 labels Jan 19, 2025
@Deophius Deophius requested a review from pkuGenuine January 19, 2025 07:29
@Deophius Deophius linked an issue Jan 19, 2025 that may be closed by this pull request
This reverts commit 186301c.

This is because the race condition resolution commit is now in another
PR.
Organize imports and add trailing newline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model changed 模型有修改 need test 尚需用户测试
Projects
None yet
Development

Successfully merging this pull request may close these issues.

为选课添加权重
2 participants