forked from github/wulkanowy-mirror
Merge branch 'release/0.25.1'
This commit is contained in:
commit
e0c802bf67
@ -18,8 +18,8 @@ android {
|
|||||||
testApplicationId "io.github.tests.wulkanowy"
|
testApplicationId "io.github.tests.wulkanowy"
|
||||||
minSdkVersion 17
|
minSdkVersion 17
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 82
|
versionCode 83
|
||||||
versionName "0.25.0"
|
versionName "0.25.1"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
@ -142,7 +142,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.github.wulkanowy:sdk:0.25.0"
|
implementation "io.github.wulkanowy:sdk:0.25.1"
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1'
|
||||||
|
|
||||||
|
2142
app/schemas/io.github.wulkanowy.data.db.AppDatabase/33.json
Normal file
2142
app/schemas/io.github.wulkanowy.data.db.AppDatabase/33.json
Normal file
File diff suppressed because it is too large
Load Diff
@ -34,5 +34,9 @@
|
|||||||
{
|
{
|
||||||
"displayName": "Mateusz Idziejczak",
|
"displayName": "Mateusz Idziejczak",
|
||||||
"githubUsername": "Luncenok"
|
"githubUsername": "Luncenok"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"displayName": "MRmlik12",
|
||||||
|
"githubUsername": "MRmlik12"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -86,7 +86,11 @@ class WulkanowyApp : Application(), Configuration.Provider {
|
|||||||
|
|
||||||
private fun fixWebViewLocale() {
|
private fun fixWebViewLocale() {
|
||||||
//https://stackoverflow.com/questions/40398528/android-webview-language-changes-abruptly-on-android-7-0-and-above
|
//https://stackoverflow.com/questions/40398528/android-webview-language-changes-abruptly-on-android-7-0-and-above
|
||||||
|
try {
|
||||||
WebView(this).destroy()
|
WebView(this).destroy()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
//Ignore exceptions
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getWorkManagerConfiguration() = Configuration.Builder()
|
override fun getWorkManagerConfiguration() = Configuration.Builder()
|
||||||
|
@ -84,6 +84,7 @@ import io.github.wulkanowy.data.db.migrations.Migration3
|
|||||||
import io.github.wulkanowy.data.db.migrations.Migration30
|
import io.github.wulkanowy.data.db.migrations.Migration30
|
||||||
import io.github.wulkanowy.data.db.migrations.Migration31
|
import io.github.wulkanowy.data.db.migrations.Migration31
|
||||||
import io.github.wulkanowy.data.db.migrations.Migration32
|
import io.github.wulkanowy.data.db.migrations.Migration32
|
||||||
|
import io.github.wulkanowy.data.db.migrations.Migration33
|
||||||
import io.github.wulkanowy.data.db.migrations.Migration4
|
import io.github.wulkanowy.data.db.migrations.Migration4
|
||||||
import io.github.wulkanowy.data.db.migrations.Migration5
|
import io.github.wulkanowy.data.db.migrations.Migration5
|
||||||
import io.github.wulkanowy.data.db.migrations.Migration6
|
import io.github.wulkanowy.data.db.migrations.Migration6
|
||||||
@ -129,7 +130,7 @@ import javax.inject.Singleton
|
|||||||
abstract class AppDatabase : RoomDatabase() {
|
abstract class AppDatabase : RoomDatabase() {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val VERSION_SCHEMA = 32
|
const val VERSION_SCHEMA = 33
|
||||||
|
|
||||||
fun getMigrations(sharedPrefProvider: SharedPrefProvider): Array<Migration> {
|
fun getMigrations(sharedPrefProvider: SharedPrefProvider): Array<Migration> {
|
||||||
return arrayOf(
|
return arrayOf(
|
||||||
@ -163,7 +164,8 @@ abstract class AppDatabase : RoomDatabase() {
|
|||||||
Migration29(),
|
Migration29(),
|
||||||
Migration30(),
|
Migration30(),
|
||||||
Migration31(),
|
Migration31(),
|
||||||
Migration32()
|
Migration32(),
|
||||||
|
Migration33()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,10 +59,10 @@ data class StudentInfo(
|
|||||||
val email: String,
|
val email: String,
|
||||||
|
|
||||||
@Embedded(prefix = "first_guardian_")
|
@Embedded(prefix = "first_guardian_")
|
||||||
val firstGuardian: StudentGuardian,
|
val firstGuardian: StudentGuardian?,
|
||||||
|
|
||||||
@Embedded(prefix = "second_guardian_")
|
@Embedded(prefix = "second_guardian_")
|
||||||
val secondGuardian: StudentGuardian
|
val secondGuardian: StudentGuardian?
|
||||||
|
|
||||||
) : Serializable {
|
) : Serializable {
|
||||||
|
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
package io.github.wulkanowy.data.db.migrations
|
||||||
|
|
||||||
|
import androidx.room.migration.Migration
|
||||||
|
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||||
|
|
||||||
|
class Migration33 : Migration(32, 33) {
|
||||||
|
|
||||||
|
override fun migrate(database: SupportSQLiteDatabase) {
|
||||||
|
database.execSQL("DROP TABLE IF EXISTS StudentInfo")
|
||||||
|
|
||||||
|
database.execSQL(
|
||||||
|
"""CREATE TABLE IF NOT EXISTS StudentInfo (
|
||||||
|
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||||
|
student_id INTEGER NOT NULL,
|
||||||
|
full_name TEXT NOT NULL,
|
||||||
|
first_name TEXT NOT NULL,
|
||||||
|
second_name TEXT NOT NULL,
|
||||||
|
surname TEXT NOT NULL,
|
||||||
|
birth_date INTEGER NOT NULL,
|
||||||
|
birth_place TEXT NOT NULL,
|
||||||
|
gender TEXT NOT NULL,
|
||||||
|
has_polish_citizenship INTEGER NOT NULL,
|
||||||
|
family_name TEXT NOT NULL,
|
||||||
|
parents_names TEXT NOT NULL,
|
||||||
|
address TEXT NOT NULL,
|
||||||
|
registered_address TEXT NOT NULL,
|
||||||
|
correspondence_address TEXT NOT NULL,
|
||||||
|
phone_number TEXT NOT NULL,
|
||||||
|
cell_phone_number TEXT NOT NULL,
|
||||||
|
email TEXT NOT NULL,
|
||||||
|
first_guardian_full_name TEXT,
|
||||||
|
first_guardian_kinship TEXT,
|
||||||
|
first_guardian_address TEXT,
|
||||||
|
first_guardian_phones TEXT,
|
||||||
|
first_guardian_email TEXT,
|
||||||
|
second_guardian_full_name TEXT,
|
||||||
|
second_guardian_kinship TEXT,
|
||||||
|
second_guardian_address TEXT,
|
||||||
|
second_guardian_phones TEXT,
|
||||||
|
second_guardian_email TEXT)
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -25,8 +25,8 @@ fun SdkStudentInfo.mapToEntity(semester: Semester) = StudentInfo(
|
|||||||
phoneNumber = phoneNumber,
|
phoneNumber = phoneNumber,
|
||||||
cellPhoneNumber = phoneNumber,
|
cellPhoneNumber = phoneNumber,
|
||||||
email = email,
|
email = email,
|
||||||
firstGuardian = guardians[0].mapToEntity(),
|
firstGuardian = guardianFirst?.mapToEntity(),
|
||||||
secondGuardian = guardians[1].mapToEntity()
|
secondGuardian = guardianSecond?.mapToEntity()
|
||||||
)
|
)
|
||||||
|
|
||||||
fun SdkStudentGuardian.mapToEntity() = StudentGuardian(
|
fun SdkStudentGuardian.mapToEntity() = StudentGuardian(
|
||||||
|
@ -5,14 +5,21 @@ import android.view.LayoutInflater
|
|||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import io.github.wulkanowy.data.db.entities.Grade
|
||||||
import io.github.wulkanowy.data.db.entities.GradeSummary
|
import io.github.wulkanowy.data.db.entities.GradeSummary
|
||||||
|
import io.github.wulkanowy.data.db.entities.Student
|
||||||
|
import io.github.wulkanowy.data.repositories.PreferencesRepository
|
||||||
import io.github.wulkanowy.databinding.ItemGradeSummaryBinding
|
import io.github.wulkanowy.databinding.ItemGradeSummaryBinding
|
||||||
import io.github.wulkanowy.databinding.ScrollableHeaderGradeSummaryBinding
|
import io.github.wulkanowy.databinding.ScrollableHeaderGradeSummaryBinding
|
||||||
|
import io.github.wulkanowy.sdk.Sdk
|
||||||
import io.github.wulkanowy.utils.calcAverage
|
import io.github.wulkanowy.utils.calcAverage
|
||||||
|
import io.github.wulkanowy.utils.changeModifier
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class GradeSummaryAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
class GradeSummaryAdapter @Inject constructor(
|
||||||
|
private val preferencesRepository: PreferencesRepository
|
||||||
|
) : RecyclerView.Adapter<RecyclerView.ViewHolder>() {
|
||||||
|
|
||||||
private enum class ViewType(val id: Int) {
|
private enum class ViewType(val id: Int) {
|
||||||
HEADER(1),
|
HEADER(1),
|
||||||
@ -49,7 +56,7 @@ class GradeSummaryAdapter @Inject constructor() : RecyclerView.Adapter<RecyclerV
|
|||||||
if (items.isEmpty()) return
|
if (items.isEmpty()) return
|
||||||
|
|
||||||
with(binding) {
|
with(binding) {
|
||||||
gradeSummaryScrollableHeaderFinal.text = formatAverage(items.calcAverage())
|
gradeSummaryScrollableHeaderFinal.text = formatAverage(items.calcAverage(preferencesRepository.gradePlusModifier, preferencesRepository.gradeMinusModifier))
|
||||||
gradeSummaryScrollableHeaderCalculated.text = formatAverage(items
|
gradeSummaryScrollableHeaderCalculated.text = formatAverage(items
|
||||||
.filter { value -> value.average != 0.0 }
|
.filter { value -> value.average != 0.0 }
|
||||||
.map { values -> values.average }
|
.map { values -> values.average }
|
||||||
|
@ -15,6 +15,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
|||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import dagger.hilt.android.AndroidEntryPoint
|
import dagger.hilt.android.AndroidEntryPoint
|
||||||
import io.github.wulkanowy.R
|
import io.github.wulkanowy.R
|
||||||
|
import io.github.wulkanowy.data.db.entities.StudentGuardian
|
||||||
import io.github.wulkanowy.data.db.entities.StudentInfo
|
import io.github.wulkanowy.data.db.entities.StudentInfo
|
||||||
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
||||||
import io.github.wulkanowy.data.enums.Gender
|
import io.github.wulkanowy.data.enums.Gender
|
||||||
@ -75,7 +76,11 @@ class StudentInfoFragment :
|
|||||||
with(binding) {
|
with(binding) {
|
||||||
studentInfoSwipe.setOnRefreshListener(presenter::onSwipeRefresh)
|
studentInfoSwipe.setOnRefreshListener(presenter::onSwipeRefresh)
|
||||||
studentInfoSwipe.setColorSchemeColors(requireContext().getThemeAttrColor(R.attr.colorPrimary))
|
studentInfoSwipe.setColorSchemeColors(requireContext().getThemeAttrColor(R.attr.colorPrimary))
|
||||||
studentInfoSwipe.setProgressBackgroundColorSchemeColor(requireContext().getThemeAttrColor(R.attr.colorSwipeRefresh))
|
studentInfoSwipe.setProgressBackgroundColorSchemeColor(
|
||||||
|
requireContext().getThemeAttrColor(
|
||||||
|
R.attr.colorSwipeRefresh
|
||||||
|
)
|
||||||
|
)
|
||||||
studentInfoErrorRetry.setOnClickListener { presenter.onRetry() }
|
studentInfoErrorRetry.setOnClickListener { presenter.onRetry() }
|
||||||
studentInfoErrorDetails.setOnClickListener { presenter.onDetailsClick() }
|
studentInfoErrorDetails.setOnClickListener { presenter.onDetailsClick() }
|
||||||
}
|
}
|
||||||
@ -135,11 +140,14 @@ class StudentInfoFragment :
|
|||||||
@SuppressLint("DefaultLocale")
|
@SuppressLint("DefaultLocale")
|
||||||
override fun showFamilyTypeData(studentInfo: StudentInfo) {
|
override fun showFamilyTypeData(studentInfo: StudentInfo) {
|
||||||
updateData(
|
updateData(
|
||||||
listOf(
|
listOfNotNull(
|
||||||
studentInfo.firstGuardian.kinship.capitalize() to studentInfo.firstGuardian.fullName,
|
studentInfo.firstGuardian?.let { it.kinship.capitalize() to it.fullName },
|
||||||
studentInfo.secondGuardian.kinship.capitalize() to studentInfo.secondGuardian.fullName
|
studentInfo.secondGuardian?.let { it.kinship.capitalize() to it.fullName },
|
||||||
).map {
|
).map { (title, value) ->
|
||||||
if (it.second.isBlank()) it.copy(second = getString(R.string.all_no_data)) else it
|
val updatedValue = value.ifBlank { getString(R.string.all_no_data) }
|
||||||
|
val updatedTitle = title.ifBlank { getString(R.string.all_no_data) }
|
||||||
|
|
||||||
|
updatedTitle to updatedValue
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -156,28 +164,28 @@ class StudentInfoFragment :
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showFirstGuardianTypeData(studentInfo: StudentInfo) {
|
override fun showFirstGuardianTypeData(studentGuardian: StudentGuardian) {
|
||||||
updateData(
|
updateData(
|
||||||
listOf(
|
listOf(
|
||||||
getString(R.string.student_info_full_name) to studentInfo.firstGuardian.fullName,
|
getString(R.string.student_info_full_name) to studentGuardian.fullName,
|
||||||
getString(R.string.student_info_kinship) to studentInfo.firstGuardian.kinship,
|
getString(R.string.student_info_kinship) to studentGuardian.kinship,
|
||||||
getString(R.string.student_info_guardian_address) to studentInfo.firstGuardian.address,
|
getString(R.string.student_info_guardian_address) to studentGuardian.address,
|
||||||
getString(R.string.student_info_phones) to studentInfo.firstGuardian.phones,
|
getString(R.string.student_info_phones) to studentGuardian.phones,
|
||||||
getString(R.string.student_info_email) to studentInfo.firstGuardian.email
|
getString(R.string.student_info_email) to studentGuardian.email
|
||||||
).map {
|
).map {
|
||||||
if (it.second.isBlank()) it.copy(second = getString(R.string.all_no_data)) else it
|
if (it.second.isBlank()) it.copy(second = getString(R.string.all_no_data)) else it
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showSecondGuardianTypeData(studentInfo: StudentInfo) {
|
override fun showSecondGuardianTypeData(studentGuardian: StudentGuardian) {
|
||||||
updateData(
|
updateData(
|
||||||
listOf(
|
listOf(
|
||||||
getString(R.string.student_info_full_name) to studentInfo.secondGuardian.fullName,
|
getString(R.string.student_info_full_name) to studentGuardian.fullName,
|
||||||
getString(R.string.student_info_kinship) to studentInfo.secondGuardian.kinship,
|
getString(R.string.student_info_kinship) to studentGuardian.kinship,
|
||||||
getString(R.string.student_info_guardian_address) to studentInfo.secondGuardian.address,
|
getString(R.string.student_info_guardian_address) to studentGuardian.address,
|
||||||
getString(R.string.student_info_phones) to studentInfo.secondGuardian.phones,
|
getString(R.string.student_info_phones) to studentGuardian.phones,
|
||||||
getString(R.string.student_info_email) to studentInfo.secondGuardian.email
|
getString(R.string.student_info_email) to studentGuardian.email
|
||||||
).map {
|
).map {
|
||||||
if (it.second.isBlank()) it.copy(second = getString(R.string.all_no_data)) else it
|
if (it.second.isBlank()) it.copy(second = getString(R.string.all_no_data)) else it
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ class StudentInfoPresenter @Inject constructor(
|
|||||||
when (it.status) {
|
when (it.status) {
|
||||||
Status.LOADING -> Timber.i("Loading student info $infoType started")
|
Status.LOADING -> Timber.i("Loading student info $infoType started")
|
||||||
Status.SUCCESS -> {
|
Status.SUCCESS -> {
|
||||||
if (it.data != null) {
|
if (it.data != null && !(infoType == StudentInfoView.Type.FAMILY && it.data.firstGuardian == null && it.data.secondGuardian == null)) {
|
||||||
Timber.i("Loading student info $infoType result: Success")
|
Timber.i("Loading student info $infoType result: Success")
|
||||||
showCorrectData(it.data)
|
showCorrectData(it.data)
|
||||||
view?.run {
|
view?.run {
|
||||||
@ -94,7 +94,7 @@ class StudentInfoPresenter @Inject constructor(
|
|||||||
}
|
}
|
||||||
analytics.logEvent("load_item", "type" to "student_info")
|
analytics.logEvent("load_item", "type" to "student_info")
|
||||||
} else {
|
} else {
|
||||||
Timber.i("Loading student info $infoType result: No school info found")
|
Timber.i("Loading student info $infoType result: No student or family info found")
|
||||||
view?.run {
|
view?.run {
|
||||||
showContent(!isViewEmpty)
|
showContent(!isViewEmpty)
|
||||||
showEmpty(isViewEmpty)
|
showEmpty(isViewEmpty)
|
||||||
@ -122,8 +122,8 @@ class StudentInfoPresenter @Inject constructor(
|
|||||||
StudentInfoView.Type.CONTACT -> view?.showContactTypeData(studentInfo)
|
StudentInfoView.Type.CONTACT -> view?.showContactTypeData(studentInfo)
|
||||||
StudentInfoView.Type.ADDRESS -> view?.showAddressTypeData(studentInfo)
|
StudentInfoView.Type.ADDRESS -> view?.showAddressTypeData(studentInfo)
|
||||||
StudentInfoView.Type.FAMILY -> view?.showFamilyTypeData(studentInfo)
|
StudentInfoView.Type.FAMILY -> view?.showFamilyTypeData(studentInfo)
|
||||||
StudentInfoView.Type.SECOND_GUARDIAN -> view?.showSecondGuardianTypeData(studentInfo)
|
StudentInfoView.Type.SECOND_GUARDIAN -> view?.showSecondGuardianTypeData(studentInfo.secondGuardian!!)
|
||||||
StudentInfoView.Type.FIRST_GUARDIAN -> view?.showFirstGuardianTypeData(studentInfo)
|
StudentInfoView.Type.FIRST_GUARDIAN -> view?.showFirstGuardianTypeData(studentInfo.firstGuardian!!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.github.wulkanowy.ui.modules.studentinfo
|
package io.github.wulkanowy.ui.modules.studentinfo
|
||||||
|
|
||||||
|
import io.github.wulkanowy.data.db.entities.StudentGuardian
|
||||||
import io.github.wulkanowy.data.db.entities.StudentInfo
|
import io.github.wulkanowy.data.db.entities.StudentInfo
|
||||||
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
import io.github.wulkanowy.data.db.entities.StudentWithSemesters
|
||||||
import io.github.wulkanowy.ui.base.BaseView
|
import io.github.wulkanowy.ui.base.BaseView
|
||||||
@ -24,9 +25,9 @@ interface StudentInfoView : BaseView {
|
|||||||
|
|
||||||
fun showFamilyTypeData(studentInfo: StudentInfo)
|
fun showFamilyTypeData(studentInfo: StudentInfo)
|
||||||
|
|
||||||
fun showFirstGuardianTypeData(studentInfo: StudentInfo)
|
fun showFirstGuardianTypeData(studentGuardian: StudentGuardian)
|
||||||
|
|
||||||
fun showSecondGuardianTypeData(studentInfo: StudentInfo)
|
fun showSecondGuardianTypeData(studentGuardian: StudentGuardian)
|
||||||
|
|
||||||
fun openStudentInfoView(infoType: Type, studentWithSemesters: StudentWithSemesters)
|
fun openStudentInfoView(infoType: Type, studentWithSemesters: StudentWithSemesters)
|
||||||
|
|
||||||
|
@ -16,10 +16,20 @@ fun List<Grade>.calcAverage(): Double {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@JvmName("calcSummaryAverage")
|
@JvmName("calcSummaryAverage")
|
||||||
fun List<GradeSummary>.calcAverage() = asSequence()
|
fun List<GradeSummary>.calcAverage(plusModifier: Double, minusModifier: Double) = asSequence()
|
||||||
.mapNotNull {
|
.mapNotNull {
|
||||||
if (it.finalGrade.matches("[0-6]".toRegex())) {
|
if (it.finalGrade.matches("[0-6][+-]?".toRegex())) {
|
||||||
|
when {
|
||||||
|
it.finalGrade.endsWith('+') -> {
|
||||||
|
it.finalGrade.removeSuffix("+").toDouble() + plusModifier
|
||||||
|
}
|
||||||
|
it.finalGrade.endsWith('-') -> {
|
||||||
|
it.finalGrade.removeSuffix("-").toDouble() - minusModifier
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
it.finalGrade.toDouble()
|
it.finalGrade.toDouble()
|
||||||
|
}
|
||||||
|
}
|
||||||
} else null
|
} else null
|
||||||
}
|
}
|
||||||
.average()
|
.average()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
Wersja 0.25.0
|
Wersja 0.25.1
|
||||||
- naprawiliśmy przełączanie semestrów przy przełączaniu uczniów
|
- naprawiliśmy przełączanie semestrów przy przełączaniu uczniów
|
||||||
- naprawiliśmy błąd przy odświeżaniu ocen gdy włączony był inny niż domyślny tryb liczenia średniej
|
- naprawiliśmy błąd przy odświeżaniu ocen gdy włączony był inny niż domyślny tryb liczenia średniej
|
||||||
|
- do średniej końcowej wliczają się teraz również oceny z plusami i minusami
|
||||||
- dodaliśmy menadżer kont, gdzie można podejrzeć informacje o uczniu oraz zmienić pseudonim
|
- dodaliśmy menadżer kont, gdzie można podejrzeć informacje o uczniu oraz zmienić pseudonim
|
||||||
- zmieniliśmy ikonę planu lekcji oraz kolor animacji odświeżania w ciemnym motywie
|
- zmieniliśmy ikonę planu lekcji oraz kolor animacji odświeżania w ciemnym motywie
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
android:padding="10dp"
|
android:padding="10dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
tools:ignore="UseCompoundDrawables"
|
tools:ignore="UseCompoundDrawables"
|
||||||
tools:visibility="gone">
|
tools:visibility="visible">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
|
@ -393,7 +393,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!--Student info-->
|
<!--Student info-->
|
||||||
<string name="student_info_empty">No info about student</string>
|
<string name="student_info_empty">No info about student or student family</string>
|
||||||
<string name="student_info_first_name">Name</string>
|
<string name="student_info_first_name">Name</string>
|
||||||
<string name="student_info_second_name">Second name</string>
|
<string name="student_info_second_name">Second name</string>
|
||||||
<string name="student_info_gender">Gender</string>
|
<string name="student_info_gender">Gender</string>
|
||||||
|
@ -33,12 +33,13 @@ class GradeExtensionTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun calcSummaryAverage() {
|
fun calcSummaryAverage() {
|
||||||
assertEquals(2.5, listOf(
|
assertEquals(3.5, listOf(
|
||||||
createGradeSummary("5"),
|
createGradeSummary("4"),
|
||||||
createGradeSummary("-5"),
|
createGradeSummary("5+"),
|
||||||
|
createGradeSummary("5-"),
|
||||||
createGradeSummary("test"),
|
createGradeSummary("test"),
|
||||||
createGradeSummary("0")
|
createGradeSummary("0")
|
||||||
).calcAverage(), 0.005)
|
).calcAverage(0.5, 0.5), 0.005)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user