Commit 9be7ebae by wenww

多选题逻辑判断修改

parent 4f7978f0
......@@ -54,13 +54,20 @@ public class MultipleChoicesAnswerHandler extends AbstractAnswerHandler {
@Override
public boolean judgeRight(Answer answer, SubjectDto subject) {
int right = 0;
String[] correctAnswers = AnswerHandlerUtil.replaceComma(subject.getAnswer().getAnswer()).split(CommonConstant.COMMA);
for (String as : answer.getAnswer().split(CommonConstant.COMMA)) {
if (!ArrayUtils.contains(correctAnswers, as)) {
return false;
}else {
right ++;
}
}
if (right == correctAnswers.length) {
return true;
}else {
return false;
}
}
@Override
......
......@@ -403,31 +403,13 @@
</pluginManagement>
</build>
<!--指定仓库-->
<repositories>
<repository>
<id>spring-milestone</id>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>http://repo.spring.io/milestone</url>
</repository>
<repository>
<id>spring-snapshot</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<url>http://repo.spring.io/snapshot</url>
</repository>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
<id>nexus-central</id>
<url>http://nexus.ui-tech.cn/repository/maven-public/</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment