Skip to content

书院课选课权重#870

Open
Deophius wants to merge 11 commits intoYuanpei-Intelligence:developfrom
Deophius:course-select
Open

书院课选课权重#870
Deophius wants to merge 11 commits intoYuanpei-Intelligence:developfrom
Deophius:course-select

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
@Deophius
Copy link
Collaborator Author

等到下个学期需要用了再合并,需要修改script中的权重函数,并在运维文档中记录

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