forked from github/wulkanowy-mirror
Add missing info to student selection email reports (#2096)
This commit is contained in:
parent
377e0c3a0d
commit
5161fdd543
@ -186,7 +186,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation "io.github.wulkanowy:sdk:1.9.0"
|
implementation "io.github.wulkanowy:sdk:1.9.1-SNAPSHOT"
|
||||||
|
|
||||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'
|
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.8'
|
||||||
|
|
||||||
|
@ -280,11 +280,24 @@ class LoginStudentSelectPresenter @Inject constructor(
|
|||||||
|
|
||||||
private fun onEmailClick() {
|
private fun onEmailClick() {
|
||||||
view?.openEmail(lastError?.message.ifNullOrBlank {
|
view?.openEmail(lastError?.message.ifNullOrBlank {
|
||||||
registerUser.symbols.flatMap { symbol ->
|
loginData.baseUrl + "/" + loginData.symbol + "\n" + registerUser.symbols.filterNot {
|
||||||
symbol.schools.map { it.error?.message } + symbol.error?.message
|
it.error is AccountPermissionException && it.symbol != loginData.symbol
|
||||||
}.filterNotNull().distinct().joinToString("; ") {
|
}.joinToString(";\n") { symbol ->
|
||||||
it.take(46) + "..."
|
buildString {
|
||||||
}.ifEmpty { "blank" }
|
append(" -")
|
||||||
|
append(symbol.symbol)
|
||||||
|
append("(${symbol.error?.message?.let { it.take(46) + "..." } ?: symbol.schools.size})")
|
||||||
|
if (symbol.schools.isNotEmpty()) {
|
||||||
|
append(": ")
|
||||||
|
}
|
||||||
|
append(symbol.schools.joinToString(", ") { unit ->
|
||||||
|
buildString {
|
||||||
|
append(unit.schoolShortName)
|
||||||
|
append("(${unit.error?.message?.let { it.take(46) + "..." } ?: unit.students.size})")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user