diff --git a/internal/handlers/exam_grading.go b/internal/handlers/exam_grading.go index 900d64e..d50197f 100644 --- a/internal/handlers/exam_grading.go +++ b/internal/handlers/exam_grading.go @@ -68,13 +68,13 @@ func gradeExam(recordID uint, examID uint, userID uint) { // 使用固定的题型分值映射 scoreMap := map[string]float64{ - "fill-in-blank": 2.0, - "true-false": 2.0, - "multiple-choice": 1.0, - "multiple-selection": 2.5, - "short-answer": 8.0, // 简答题 8 分 - "ordinary-essay": 9.0, // 论述题 9 分 - "management-essay": 9.0, // 论述题 9 分 + "fill-in-blank": 2.0, // 填空题每题2分 + "true-false": 1.0, // 判断题每题1分 + "multiple-choice": 1.0, // 单选题每题1分 + "multiple-selection": 2.0, // 多选题每题2分 + "short-answer": 10.0, // 简答题10分 + "ordinary-essay": 10.0, // 论述题10分 + "management-essay": 10.0, // 论述题10分 } // 评分 diff --git a/internal/handlers/exam_handler.go b/internal/handlers/exam_handler.go index 600c521..bdc3aac 100644 --- a/internal/handlers/exam_handler.go +++ b/internal/handlers/exam_handler.go @@ -46,13 +46,13 @@ func CreateExam(c *gin.Context) { // 使用固定的题型配置(总分100分) questionTypes := []models.QuestionTypeConfig{ - {Type: "fill-in-blank", Count: 10, Score: 2.0}, // 20分 - {Type: "true-false", Count: 10, Score: 2.0}, // 20分 + {Type: "fill-in-blank", Count: 20, Score: 2.0}, // 40分 + {Type: "true-false", Count: 10, Score: 1.0}, // 10分 {Type: "multiple-choice", Count: 10, Score: 1.0}, // 10分 - {Type: "multiple-selection", Count: 10, Score: 2.5}, // 25分 - {Type: "short-answer", Count: 2, Score: 10.0}, // 20分 - {Type: "ordinary-essay", Count: 1, Score: 4.5}, // 4.5分(普通涉密人员论述题) - {Type: "management-essay", Count: 1, Score: 4.5}, // 4.5分(保密管理人员论述题) + {Type: "multiple-selection", Count: 10, Score: 2.0}, // 20分 + {Type: "short-answer", Count: 1, Score: 10.0}, // 10分 + {Type: "ordinary-essay", Count: 1, Score: 10.0}, // 10分(普通涉密人员论述题) + {Type: "management-essay", Count: 1, Score: 10.0}, // 10分(保密管理人员论述题) } // 按题型配置随机抽取题目