Browse Source

随机题目的简答题得分,优化

lizhen_gitee 7 months ago
parent
commit
c033b6e6f0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      addons/exam/library/ExamService.php

+ 1 - 1
addons/exam/library/ExamService.php

@@ -241,6 +241,7 @@ class ExamService
                             // 匹配答案关键词
                             if (strpos($user_answers, $answer_item['answer']) !== false) {
 //                                $right_score += $answer_item['score'];
+                                $right_score = $score;
                                 // 得分情况
                                 $answer_score[] = [
                                     'answer'        => $answer_item['answer'],
@@ -255,7 +256,6 @@ class ExamService
 
                     // 最高得分不能超过题目分数
 //                    $right_score = min($right_score, $score);//这里不对
-                    $right_score = $score;
 
                     // 有得分
                     if ($right_score > 0) {