Skip to content

Commit

Permalink
judge: fix: 选项顺序与官方问题不一致
Browse files Browse the repository at this point in the history
  • Loading branch information
cjybyjk committed Jan 4, 2024
1 parent 24b664b commit f122fc5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions judge.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,13 @@ <h3>请在开始前阅读以下注意事项:</h3>
if (problem.type == "upload_file") {
options.push(new Option("1", "上传文件", true, "single", ""));
} else {
for (let j = 0; j < problem.options.length; j++) {
let option = problem.options[j];
if (latestProblem.options.indexOf(option.id) != -1) {
options.push(new Option(option.id, option.content, option.correct, problem.type, option.explanation));
for (let j = 0; j < latestProblem.options.length; j++) {
for (let k = 0; k < problem.options.length; k++) {
if (problem.options[k].id == latestProblem.options[j]) {
let option = problem.options[k];
options.push(new Option(option.id, option.content, option.correct, problem.type, option.explanation));
break;
}
}
}
if (latestProblem.random_options != false) {
Expand Down

0 comments on commit f122fc5

Please sign in to comment.