Senya 6 miesięcy temu
rodzic
commit
1c6b44e365

+ 1 - 1
app/src/main/assets/settings.json

@@ -1 +1 @@
-{"setting" : [{"id":30,"count_of_hints":10,"time":"00:45:00","count_of_questions":30,"date_of_changing":"2024-05-02T16:33:07.041838","raiting5":5,"raiting4":4,"raiting3":3,"hint_visibility":true,"result_visibiliry":true}]}
+{"setting" : [{"id":30,"count_of_hints":10,"time":"00:45:00","count_of_questions":30,"date_of_changing":"2024-05-02T16:33:07.041838","raiting5":30,"raiting4":23,"raiting3":16,"hint_visibility":true,"result_visibiliry":true}]}

+ 4 - 2
app/src/main/java/com/example/testing_app/ResultActivity.kt

@@ -34,10 +34,12 @@ class ResultActivity : AppCompatActivity() {
         val countPositive = Data.questions.filter { it.correctlyAnswer }.size
         val procentPositive = round(countPositive.toDouble()/Data.count.toDouble() * 10000) / 100
         var result = ""
+        
         if (countPositive >= Data.appSetting.raiting5) result = "Оценка 5"
-        if (countPositive >= Data.appSetting.raiting4) result = "Оценка 4"
-        if (countPositive >= Data.appSetting.raiting3) result = "Оценка 3"
+        else if (countPositive >= Data.appSetting.raiting4) result = "Оценка 4"
+        else if (countPositive >= Data.appSetting.raiting3) result = "Оценка 3"
         else result = "Незачет"
+
         var hintLine = ""
         if(!Data.appSetting.hint_visibility) hintLine = "Подсказки отключены"
         else  hintLine = "Кол-во используемых подсказок: ${Data.appSetting.user_count_hint} из ${Data.appSetting.count_of_hints}"

+ 1 - 0
app/src/main/java/com/example/testing_app/Storage/Data.kt

@@ -51,6 +51,7 @@ object Data {
                 questions = result.take(count).toMutableList()
             }
 
+            numerics = mutableListOf()
             for (i in 1..count)
                 numerics.add(i)