Ver código fonte

1.添加获取mmse试题库UI跳转

王鹏鹏 2 anos atrás
pai
commit
fb53606e07

+ 10 - 16
mmse/src/main/java/com/yingyangfly/mmse/fragment/MultipleChoiceFragment.kt

@@ -104,26 +104,20 @@ class MultipleChoiceFragment : BaseFragment<FragmentMultipleChoiceBinding>() {
      */
     private fun judge(): Boolean {
         if (dao != null) {
-            val firstquestion = dao?.getQuestion(questionId)
-            if (firstquestion != null) {
-                if (firstquestion.reviewItem.isNullOrEmpty()) {
-                    "请判断是否正确".toast()
-                    return false
-                }
+            val firstquestion = dao?.getQuestion(11)
+            if (firstquestion != null && firstquestion.inputString.isNullOrEmpty()) {
+                "请判断是否正确".toast()
+                return false
             }
             val secondQuestion = dao?.getQuestion(12)
-            if (secondQuestion != null) {
-                if (secondQuestion.reviewItem.isNullOrEmpty()) {
-                    "请判断是否正确".toast()
-                    return false
-                }
+            if (secondQuestion != null && secondQuestion.inputString.isNullOrEmpty()) {
+                "请判断是否正确".toast()
+                return false
             }
             val thirdQuestion = dao?.getQuestion(13)
-            if (thirdQuestion != null) {
-                if (thirdQuestion.reviewItem.isNullOrEmpty()) {
-                    "请判断是否正确".toast()
-                    return false
-                }
+            if (thirdQuestion != null && thirdQuestion.inputString.isNullOrEmpty()) {
+                "请判断是否正确".toast()
+                return false
             }
         }
         return true