|
|
@@ -226,12 +226,19 @@ class InterviewController extends BaseApiController
|
|
|
foreach($data as &$item) {
|
|
|
$answer = $answers[$item['id']];
|
|
|
$item['options'] = preg_replace('/[^a-zA-Z]/', '', $item['options']);
|
|
|
+
|
|
|
+ //用户选项排序
|
|
|
+ $options = str_split($item['options']);
|
|
|
+ sort($options);
|
|
|
+ $item['options'] = implode('', $options);
|
|
|
+
|
|
|
if ($answer == '对' || $answer == '错') {
|
|
|
$item['options'] = $item['options'] == 'A' ? '对' : '错';
|
|
|
}
|
|
|
if ($item['options'] == $answer) {
|
|
|
$rights ++;
|
|
|
}
|
|
|
+ $item['answer'] = $answer;
|
|
|
}
|
|
|
if ($rights / count($data) >= 0.8) {
|
|
|
$result = $list3;
|