forked from github/szkolny
Compare commits
9 Commits
v4.11-rc.2
...
v4.11
Author | SHA1 | Date | |
---|---|---|---|
2b104e6463 | |||
afb1863827 | |||
d8228748e4 | |||
b0608c47c4 | |||
dda0d88f19 | |||
a1b5560977 | |||
86f5811bda | |||
3f11e75985 | |||
c39b5442c9 |
@ -1,4 +1,4 @@
|
||||
<h3>Wersja 4.11-rc.2, 2021-10-30</h3>
|
||||
<h3>Wersja 4.11, 2021-11-01</h3>
|
||||
<ul>
|
||||
<li>Nowości w module Wiadomości:</li>
|
||||
<li>→ <b>Formatowanie tekstu</b> przy wysyłaniu wiadomości oraz dodawaniu wydarzeń.</li>
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
/*secret password - removed for source code publication*/
|
||||
static toys AES_IV[16] = {
|
||||
0x15, 0x02, 0x8d, 0x5d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
0x17, 0xf8, 0xac, 0xf6, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
|
||||
|
||||
unsigned char *agony(unsigned int laugh, unsigned char *box, unsigned char *heat);
|
||||
|
||||
|
@ -137,31 +137,6 @@ open class VulcanWebMain(open val data: DataVulcan, open val lastSync: Long?) {
|
||||
}
|
||||
}
|
||||
|
||||
data.webPermissions = data.webPermissions.toMutableMap().also { map ->
|
||||
val permissions = Regexes.VULCAN_WEB_PERMISSIONS.find(text)?.let { it[1] }
|
||||
if (permissions?.isNotBlank() == true) {
|
||||
val studentId = permissions.split("|")
|
||||
.getOrNull(0)
|
||||
?.base64DecodeToString()
|
||||
?.toJsonObject()
|
||||
?.getJsonArray("AuthInfos")
|
||||
?.asJsonObjectList()
|
||||
?.flatMap { authInfo ->
|
||||
authInfo.getJsonArray("UczenIds")
|
||||
?.map { it.asInt }
|
||||
?: listOf()
|
||||
}
|
||||
?.firstOrNull()
|
||||
?.toString()
|
||||
data.app.cookieJar.set(
|
||||
data.webHost ?: "vulcan.net.pl",
|
||||
"idBiezacyUczen",
|
||||
studentId
|
||||
)
|
||||
}
|
||||
map[symbol] = permissions
|
||||
}
|
||||
|
||||
val schoolSymbols = mutableListOf<String>()
|
||||
val clientUrl = "://uonetplus-uczen.${data.webHost}/$symbol/"
|
||||
var clientIndex = text.indexOf(clientUrl)
|
||||
@ -186,6 +161,42 @@ open class VulcanWebMain(open val data: DataVulcan, open val lastSync: Long?) {
|
||||
return
|
||||
}
|
||||
|
||||
data.webPermissions = data.webPermissions.toMutableMap().also { map ->
|
||||
val permissions = Regexes.VULCAN_WEB_PERMISSIONS.find(text)?.let { it[1] }
|
||||
if (permissions?.isNotBlank() == true) {
|
||||
val json = permissions.split("|")
|
||||
.getOrNull(0)
|
||||
?.base64DecodeToString()
|
||||
?.toJsonObject()
|
||||
val unitIds = json
|
||||
?.getJsonArray("Units")
|
||||
?.asJsonObjectList()
|
||||
?.filter { unit ->
|
||||
unit.getString("Symbol") in schoolSymbols
|
||||
}
|
||||
?.mapNotNull { it.getInt("Id") } ?: emptyList()
|
||||
val studentId = json
|
||||
?.getJsonArray("AuthInfos")
|
||||
?.asJsonObjectList()
|
||||
?.filter { authInfo ->
|
||||
authInfo.getInt("JednostkaSprawozdawczaId") in unitIds
|
||||
}
|
||||
?.flatMap { authInfo ->
|
||||
authInfo.getJsonArray("UczenIds")
|
||||
?.map { it.asInt }
|
||||
?: listOf()
|
||||
}
|
||||
?.firstOrNull()
|
||||
?.toString()
|
||||
data.app.cookieJar.set(
|
||||
data.webHost ?: "vulcan.net.pl",
|
||||
"idBiezacyUczen",
|
||||
studentId
|
||||
)
|
||||
}
|
||||
map[symbol] = permissions
|
||||
}
|
||||
|
||||
onSuccess(text, schoolSymbols)
|
||||
}
|
||||
|
||||
|
@ -4,10 +4,12 @@
|
||||
|
||||
package pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.hebe
|
||||
|
||||
import androidx.room.OnConflictStrategy
|
||||
import pl.szczodrzynski.edziennik.data.api.VULCAN_HEBE_ENDPOINT_TEACHERS
|
||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.DataVulcan
|
||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.ENDPOINT_VULCAN_HEBE_TEACHERS
|
||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.VulcanHebe
|
||||
import pl.szczodrzynski.edziennik.data.db.entity.Teacher
|
||||
import pl.szczodrzynski.edziennik.ext.DAY
|
||||
import pl.szczodrzynski.edziennik.ext.getString
|
||||
|
||||
@ -25,20 +27,32 @@ class VulcanHebeTeachers(
|
||||
TAG,
|
||||
VULCAN_HEBE_ENDPOINT_TEACHERS,
|
||||
HebeFilterType.BY_PERIOD,
|
||||
lastSync = lastSync,
|
||||
lastSync = 0L,
|
||||
) { list, _ ->
|
||||
list.forEach { person ->
|
||||
val name = person.getString("Name")
|
||||
val surname = person.getString("Surname")
|
||||
val displayName = person.getString("DisplayName")
|
||||
val subjectName = person.getString("Description") ?: return@apiGetList
|
||||
val subjectName = person.getString("Description") ?: return@forEach
|
||||
|
||||
if (subjectName.isBlank()) {
|
||||
return@forEach
|
||||
}
|
||||
|
||||
val teacher = data.getTeacherByFirstLast(
|
||||
name?.plus(" ")?.plus(surname) ?: displayName ?: return@forEach
|
||||
)
|
||||
|
||||
teacher.addSubject(data.getSubject(null, subjectName).id)
|
||||
when (subjectName) {
|
||||
"Pedagog" -> teacher.setTeacherType(Teacher.TYPE_PEDAGOGUE)
|
||||
else -> {
|
||||
val subjectId = data.getSubject(null, subjectName).id
|
||||
if (!teacher.subjects.contains(subjectId))
|
||||
teacher.addSubject(subjectId)
|
||||
}
|
||||
}
|
||||
}
|
||||
data.teacherOnConflictStrategy = OnConflictStrategy.REPLACE
|
||||
data.setSyncNext(ENDPOINT_VULCAN_HEBE_TEACHERS, 2 * DAY)
|
||||
onSuccess(ENDPOINT_VULCAN_HEBE_TEACHERS)
|
||||
}
|
||||
|
@ -46,6 +46,6 @@ object Signing {
|
||||
|
||||
/*fun provideKey(param1: String, param2: Long): ByteArray {*/
|
||||
fun pleaseStopRightNow(param1: String, param2: Long): ByteArray {
|
||||
return "$param1.MTIzNDU2Nzg5MDoVA49hWj===.$param2".sha256()
|
||||
return "$param1.MTIzNDU2Nzg5MDlc1YQl9S===.$param2".sha256()
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,10 @@ import android.os.Process
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.sqlite.db.SimpleSQLiteQuery
|
||||
import com.chuckerteam.chucker.api.Chucker
|
||||
import com.chuckerteam.chucker.api.Chucker.SCREEN_HTTP
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
@ -95,6 +98,13 @@ class LabPageFragment : LazyFragment(), CoroutineScope {
|
||||
.show()
|
||||
}
|
||||
|
||||
if (App.enableChucker) {
|
||||
b.openChucker.isVisible = true
|
||||
b.openChucker.onClick {
|
||||
startActivity(Chucker.getLaunchIntent(activity, SCREEN_HTTP))
|
||||
}
|
||||
}
|
||||
|
||||
b.disableDebug.onClick {
|
||||
app.config.devMode = false
|
||||
App.devMode = false
|
||||
|
@ -262,7 +262,7 @@ class LoginFormFragment : Fragment(), CoroutineScope {
|
||||
if (credential.caseMode == FormField.CaseMode.UPPER_CASE)
|
||||
text = text.uppercase()
|
||||
if (credential.caseMode == FormField.CaseMode.LOWER_CASE)
|
||||
text = text.uppercase()
|
||||
text = text.lowercase()
|
||||
|
||||
credential.stripTextRegex?.let {
|
||||
text = text.replace(it.toRegex(), "")
|
||||
|
@ -47,6 +47,15 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Chucker" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/openChucker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Open Chucker"
|
||||
android:textAllCaps="false"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/last10unseen"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -1287,7 +1287,7 @@
|
||||
<string name="attendance_details_time">Time</string>
|
||||
<string name="settings_about_github_subtext">Help with app development on GitHub</string>
|
||||
<string name="build_platform">Distribution</string>
|
||||
<string name="build_validate_progress">Build verification in progress...</string>
|
||||
<string name="build_validate_progress">Build verification in progress…</string>
|
||||
<string name="attendance_tab_months">By months</string>
|
||||
<string name="attendance_tab_summary">Summary</string>
|
||||
<string name="attendance_details_type">Type</string>
|
||||
@ -1307,7 +1307,7 @@
|
||||
<string name="settings_about_homepage_subtext">Get help or support authors</string>
|
||||
<string name="build_invalid_title">Information about application version</string>
|
||||
<string name="home_archive_close_no_target_title">No current profile</string>
|
||||
<string name="login_platform_list_loading">Loading e-registers list...</string>
|
||||
<string name="login_platform_list_loading">Loading e-registers list…</string>
|
||||
<string name="login_mode_podlasie_api">Log in using token</string>
|
||||
<string name="login_mode_podlasie_api_guide">Provide mobile app token.</string>
|
||||
<string name="attendance_config_title">Attendance configuration</string>
|
||||
@ -1321,10 +1321,10 @@
|
||||
<string name="login_mode_vulcan_api">Use token, symbol and PIN code</string>
|
||||
<string name="login_mode_vulcan_api_hint">Register device on journal VULCAN® page</string>
|
||||
<string name="login_mode_vulcan_web">Use e-mail/username and password</string>
|
||||
<string name="edziennik_progress_login_podlasie_api">Logging in to PPE...</string>
|
||||
<string name="edziennik_progress_login_podlasie_api">Logging in to PPE…</string>
|
||||
<string name="login_type_podlasie">Podlaska Platforma Edukacyjna</string>
|
||||
<string name="login_mode_edudziennik_web">Log in using e-mail and password</string>
|
||||
<string name="edziennik_progress_login_vulcan_web_main">Logging in to VULCAN® register...</string>
|
||||
<string name="edziennik_progress_login_vulcan_web_main">Logging in to VULCAN® register…</string>
|
||||
<string name="login_mode_librus_jst">Login via VULCAN® platform</string>
|
||||
<string name="login_mode_librus_email">Log in using e-mail</string>
|
||||
<string name="attendance_details_id">Attendance ID</string>
|
||||
@ -1377,4 +1377,78 @@
|
||||
<string name="menu_teachers">Teachers</string>
|
||||
<string name="edziennik_progress_endpoint_addressbook">Syncing addressbook…</string>
|
||||
<string name="send_message">Send message</string>
|
||||
<string name="color_black">Black</string>
|
||||
<string name="color_grey">Gray</string>
|
||||
<string name="card_type_notes">Notes</string>
|
||||
<string name="menu_notes">Notes</string>
|
||||
<string name="notes_editor_dialog_title">Edit note</string>
|
||||
<string name="notes_editor_color">Color</string>
|
||||
<string name="color_brown">Brown</string>
|
||||
<string name="color_pink">Pink</string>
|
||||
<string name="color_dark_blue">Dark blue</string>
|
||||
<string name="color_purple">Purple</string>
|
||||
<string name="color_blue">Blue</string>
|
||||
<string name="color_teal">Teal</string>
|
||||
<string name="color_green">Green</string>
|
||||
<string name="color_yellow">Yellow</string>
|
||||
<string name="color_orange">Orange</string>
|
||||
<string name="color_red">Red</string>
|
||||
<string name="notes_action_add">Add note</string>
|
||||
<string name="notes_type_grade">Grade</string>
|
||||
<string name="privacy_policy_dialog_html"><![CDATA[By using the application, you confirm that you have <a href="https://szkolny.eu/privacy-policy">read the Privacy Policy</a> and accept its provisions.<br /><br />The authors of the application are not responsible for the use of the Szkolny.eu application.]]></string>
|
||||
<string name="login_chooser_version_format">Szkolny.eu v%s\n%s</string>
|
||||
<string name="agenda_config_appearance">Appearance</string>
|
||||
<string name="agenda_config_elearning">Online learning</string>
|
||||
<string name="event_type_elearning">online lesson</string>
|
||||
<string name="menu_messages_config">Messages settings</string>
|
||||
<string name="message_delete">Delete</string>
|
||||
<string name="message_reply">Reply</string>
|
||||
<string name="message_forward">Forward</string>
|
||||
<string name="discard">Discard</string>
|
||||
<string name="messages_compose_draft_saved">Draft message saved</string>
|
||||
<string name="messages_tab_draft">Drafts</string>
|
||||
<string name="messages_compose_send_long">Send a message</string>
|
||||
<string name="notes_button">Notes</string>
|
||||
<string name="notes_list_dialog_title">Notes</string>
|
||||
<string name="notes_added_by_you_format">Added on %1$s</string>
|
||||
<string name="notes_type_attendance">Attendance</string>
|
||||
<string name="notes_type_behavior">Behavior</string>
|
||||
<string name="notes_type_day">Day</string>
|
||||
<string name="notes_type_event">Event</string>
|
||||
<string name="notes_type_lesson">Lesson</string>
|
||||
<string name="notes_type_message">Message</string>
|
||||
<string name="notes_details_id">Note ID</string>
|
||||
<string name="notes_details_owner_id">Owner ID</string>
|
||||
<string name="notes_type_announcement">Announcement</string>
|
||||
<string name="styled_text_dialog_title">Edit text</string>
|
||||
<string name="login_qr_decoding_error">The QR code doesn\'t seem correct</string>
|
||||
<string name="notes_no_data_hint">You can add notes and share them with your class using the Add button.</string>
|
||||
<string name="legend_notes_added">{cmd-playlist-edit} notes added</string>
|
||||
<string name="legend_notes_added_replaced">{cmd-playlist-edit} notes added\n{cmd-swap-horizontal} text replaced with a note</string>
|
||||
<string name="notes_no_data">No notes added yet</string>
|
||||
<string name="messages_compose_discard_draft_text">Do you want to discard the saved version of the message?\n\nThis will also cancel your changes and delete your message.</string>
|
||||
<string name="messages_compose_discard_draft">Discard draft</string>
|
||||
<string name="messages_compose_draft_discarded">Draft message deleted</string>
|
||||
<string name="messages_compose_discard_draft_title">Discard draft</string>
|
||||
<string name="notes_details_dialog_title">Note</string>
|
||||
<string name="notes_editor_topic">Note title (optional)</string>
|
||||
<string name="notes_editor_body">Note text</string>
|
||||
<string name="notes_editor_share_hint">The classmates will see your note next to this item.</string>
|
||||
<string name="notes_editor_replace_hint">The content of the note will be visible instead of the original content of the item.</string>
|
||||
<string name="notes_editor_body_error">Enter the note text</string>
|
||||
<string name="color_none">None</string>
|
||||
<string name="notification_type_new_shared_note">Note shared</string>
|
||||
<string name="notes_editor_confirmation_text">Do you want to delete this note?\n\nIt will be deleted on your device and on classmates\' devices.</string>
|
||||
<string name="notes_editor_progress_unsharing">Deleting shared note…</string>
|
||||
<string name="notes_editor_progress_sharing">Sharing the note…</string>
|
||||
<string name="notes_editor_replace_text">Replace original content</string>
|
||||
<string name="card_notes_header_title">Newest notes</string>
|
||||
<string name="messages_compose_save_draft_title">Save changes</string>
|
||||
<string name="messages_compose_save_draft_text">Do you want to save your changes as a draft?\n\nIt will be possible to edit and send the message later.</string>
|
||||
<string name="messages_compose_body_load_failed">The original message could not be loaded.</string>
|
||||
<string name="message_download">Download again</string>
|
||||
<string name="hint_message_star">Mark with a star</string>
|
||||
<string name="dialog_lesson_attendance_details">Details</string>
|
||||
<string name="menu_agenda_config">Agenda settings</string>
|
||||
<string name="registration_config_note_sharing_title">Share notes</string>
|
||||
</resources>
|
||||
|
@ -1547,4 +1547,6 @@
|
||||
<string name="color_black">Czarny</string>
|
||||
<string name="card_type_notes">Notatki</string>
|
||||
<string name="card_notes_header_title">Najnowsze notatki</string>
|
||||
<string name="login_summary_account_child">(uczeń)</string>
|
||||
<string name="login_summary_account_parent">(rodzic)</string>
|
||||
</resources>
|
||||
|
@ -5,8 +5,8 @@ buildscript {
|
||||
kotlin_version = '1.5.30'
|
||||
|
||||
release = [
|
||||
versionName: "4.11-rc.2",
|
||||
versionCode: 4110020
|
||||
versionName: "4.11",
|
||||
versionCode: 4110099
|
||||
]
|
||||
|
||||
setup = [
|
||||
|
Reference in New Issue
Block a user