2 Angajamente cf7f079258 ... 1c6b44e365

Autor SHA1 Permisiunea de a trimite mesaje. Dacă este dezactivată, utilizatorul nu va putea trimite nici un fel de mesaj Data
  Senya 1c6b44e365 fix bugs 6 luni în urmă
  kot-senya cf7f079258 update settings app 6 luni în urmă

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

@@ -1 +1 @@
-{"setting" : [{"id":31,"count_of_hints":10,"time":"00:45:00","count_of_questions":30,"date_of_changing":"2024-05-11T17:21:07.041838","raiting5":30,"raiting4":23,"raiting3":16,"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)