|
|
|
@ -104,6 +104,7 @@ public class TeaCaseStepServiceImpl implements ITeaCaseStepService {
|
|
|
|
|
TestTestSysCaseQuestionStepWithBLOBs sysCaseQuestionStep = CaseApi.selectCaseStepDetails(commitCaseDto.getCaseStepId());
|
|
|
|
|
String answerOriginal = dbCaseQuestionStep.getAnswerOriginal();
|
|
|
|
|
String cleanedString = answerOriginal.replaceAll("^```python|```$", "").replaceAll("\\s*|\r|\n|\t", "").trim();//表里取的正确答案
|
|
|
|
|
cleanedString = cleanedString.replaceAll("^```Python|```$", "");
|
|
|
|
|
String stuAnswer = commitCaseDto.getStuAnswer().replaceAll("\\s*|\r|\n|\t", "").trim(); //前端传的学生答案
|
|
|
|
|
if(cleanedString.equals(stuAnswer)){
|
|
|
|
|
//答案正确 记录到案例步骤记录表中
|
|
|
|
|