680在线课未设置及格线时考试无法提交的问题

This commit is contained in:
670788339
2024-05-28 09:49:48 +08:00
parent e71c18dafe
commit 0c5b8c3a74

View File

@@ -67,7 +67,12 @@ public class StudyExamServiceImpl implements IStudyExamService{
//用于计算考试成绩
CourseExam cexam=cexamDao.get(exam.getTestId());
int prog=exam.getScore().intValue()>=exam.getPassLine()?100:exam.getScore().intValue();
Integer passLine = 0;
if( exam.getPassLine() !=null){
passLine = exam.getPassLine();
}
int prog=exam.getScore().intValue()>= passLine?100:exam.getScore().intValue();
//完成处理,判断是否已存在
Object obj=scItemDao.findField("id", FieldFilters.eq("studyId", exam.getStudyId()), FieldFilters.eq("contentId", exam.getContentId()));
int status=exam.getScore()>=exam.getPassLine()?StudyCourseItem.STATUS_FINISH:StudyCourseItem.STATUS_STUDYING;