Skip to content

Commit

Permalink
courses: smoother exams submissions (fixes #5104) (#5105)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
Okuro3499 and dogi authored Jan 24, 2025
1 parent 6eb4cc1 commit ba21c71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "org.ole.planet.myplanet"
minSdkVersion 26
targetSdkVersion 34
versionCode 2234
versionName "0.22.34"
versionCode 2235
versionName "0.22.35"
ndkVersion '21.3.6528147'
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,17 @@ class TakeExamFragment : BaseExamFragment(), View.OnClickListener, CompoundButto

override fun onClick(view: View) {
if (view.id == R.id.btn_submit) {
val type = questions?.get(currentIndex)?.type
showTextInput(type)
if (showErrorMessage(getString(R.string.please_select_write_your_answer_to_continue))) {
return
if (questions != null && currentIndex in 0 until (questions?.size ?: 0)) {
val type = questions?.get(currentIndex)?.type
showTextInput(type)
if (showErrorMessage(getString(R.string.please_select_write_your_answer_to_continue))) {
return
}
val cont = updateAnsDb()
capturePhoto()
hideSoftKeyboard(requireActivity())
checkAnsAndContinue(cont)
}
val cont = updateAnsDb()
capturePhoto()
hideSoftKeyboard(requireActivity())
checkAnsAndContinue(cont)
}
}

Expand Down

0 comments on commit ba21c71

Please sign in to comment.