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

学时表更新 #889

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

Conversation

Deophius
Copy link
Collaborator

  1. 修改了学时表发布的时间,现在助教只要结课之后提交学时表就可以给同学们显示,可以更早的发现问题。
  2. 学时表中,把通过活动获得的学时和助教手动给的学时分开。这样,结课之后手动签到也可以正常地影响学时。在管理界面和导出的Excel文件中,反映了这一新变化。
  3. 为了向后兼容,保留了总学时数 total_hours,并用了一个 CheckConstraint 来确保活动获得学时+手动学时=总学时。为了在迁移时保留原来的数据,对migration文件进行了修改。
  4. 书院课支持自定义一次活动的学时数。
  5. 之前使用课程结项页面修改学时时,会出现报错信息和成功信息不显示的问题。这里解决了这个问题,并且在实现上优化了一下,可能会更加安全。

Also included the migration file to make sure that the constraint is satisfied after migrating.
1. Adds columns for bonus_hours and total_hours in the front end.
2. Updates total_hours whenever we update attend_times or bonus_hours.
3. Make the message after modifying course records visible.
Django docs says "Avoid catching exceptions inside atomic!".
I guess it's also good to make the transaction smaller.
@Deophius Deophius marked this pull request as ready for review February 16, 2025 09:39
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