All checks were successful
continuous-integration/drone/push Build is passing
解决题目数量无法整除总分时出现无限小数的问题 后端: - 新增 ScoreDistributor 分数分配工具类 - 支持整数分配和小数分配两种模式 - 更新 exam_service.py 使用智能分配 - 考试总分固定100分,按题目数量智能分配 前端: - 新增 scoreFormatter.ts 分数格式化工具 - 提供分数显示、等级判断等辅助函数 示例:100分/6题 = [17,17,17,17,16,16] 总和=100
15 lines
238 B
Python
15 lines
238 B
Python
"""
|
|
工具模块
|
|
"""
|
|
from app.utils.score_distributor import (
|
|
ScoreDistributor,
|
|
distribute_scores,
|
|
get_question_score,
|
|
)
|
|
|
|
__all__ = [
|
|
"ScoreDistributor",
|
|
"distribute_scores",
|
|
"get_question_score",
|
|
]
|