Sort grades by descending date
This commit is contained in:
parent
25f7dff477
commit
c143bde234
4 changed files with 18 additions and 18 deletions
|
@ -91,7 +91,7 @@ class StudentAndParentRepository(private val api: StudentAndParentService) {
|
|||
if (entry == comment) comment = ""
|
||||
if (description == symbol) description = ""
|
||||
}
|
||||
}.toList()
|
||||
}.toList().sortedByDescending { it.date }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class StudentRepository(private val api: StudentService) {
|
|||
weightValue = if (isGradeValid(entry)) weightValue else 0
|
||||
color = if ("0" == color) "000000" else color.toInt().toString(16).toUpperCase()
|
||||
}
|
||||
}
|
||||
}.sortedByDescending { it.date }
|
||||
}?.flatten()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("PIERWSZA POMOC I RESUSCYTACJA", description)
|
||||
assertEquals("5,00", weight)
|
||||
assertEquals(5, weightValue)
|
||||
assertEquals(getDate(2017, 3, 31), date)
|
||||
assertEquals(getDate(2018, 12, 12), date)
|
||||
assertEquals("Weronika Ratajczak", teacher)
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("Odpowiedź", description)
|
||||
assertEquals("3,00", weight)
|
||||
assertEquals(3, weightValue)
|
||||
assertEquals(getDate(2017, 6, 25), date)
|
||||
assertEquals(getDate(2018, 12, 5), date)
|
||||
assertEquals("Jakub Michalak", teacher)
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("Writing", description)
|
||||
assertEquals("3,00", weight)
|
||||
assertEquals(3, weightValue)
|
||||
assertEquals(getDate(2017, 6, 2), date)
|
||||
assertEquals(getDate(2018, 11, 28), date)
|
||||
assertEquals("Oliwia Woźniak", teacher)
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("Kordian", description)
|
||||
assertEquals("5,00", weight)
|
||||
assertEquals(5, weightValue)
|
||||
assertEquals(getDate(2017, 2, 6), date)
|
||||
assertEquals(getDate(2018, 11, 21), date)
|
||||
assertEquals("Amelia Stępień", teacher)
|
||||
}
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("", description)
|
||||
assertEquals("8,00", weight)
|
||||
assertEquals(8, weightValue)
|
||||
assertEquals(getDate(2017, 4, 2), date)
|
||||
assertEquals(getDate(2018, 11, 14), date)
|
||||
assertEquals("Klaudia Dziedzic", teacher)
|
||||
}
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("Kordian", description)
|
||||
assertEquals("5,00", weight)
|
||||
assertEquals(5, weightValue)
|
||||
assertEquals(getDate(2017, 5, 11), date)
|
||||
assertEquals(getDate(2018, 11, 7), date)
|
||||
assertEquals("Amelia Stępień", teacher)
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("Dzień Kobiet w naszej klasie", description)
|
||||
assertEquals("1,00", weight)
|
||||
assertEquals(1, weightValue)
|
||||
assertEquals(getDate(2017, 3, 21), date)
|
||||
assertEquals(getDate(2018, 10, 31), date)
|
||||
assertEquals("Patryk Maciejewski", teacher)
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ class GradesTest : BaseLocalTest() {
|
|||
assertEquals("matura próbna", description)
|
||||
assertEquals("0,00", weight)
|
||||
assertEquals(0, weightValue)
|
||||
assertEquals(getDate(2017, 6, 11), date)
|
||||
assertEquals(getDate(2018, 10, 24), date)
|
||||
assertEquals("Jadwiga Czerwieńska", teacher)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
</td>
|
||||
<td class="break-word">S1, PIERWSZA POMOC I RESUSCYTACJA</td>
|
||||
<td>5,00</td>
|
||||
<td>31.03.2017</td>
|
||||
<td>12.12.2018</td>
|
||||
<td>Weronika Ratajczak</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -65,7 +65,7 @@
|
|||
</td>
|
||||
<td class="break-word">O, Odpowiedź</td>
|
||||
<td>3,00</td>
|
||||
<td>25.06.2017</td>
|
||||
<td>05.12.2018</td>
|
||||
<td>Jakub Michalak</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -77,7 +77,7 @@
|
|||
</td>
|
||||
<td class="break-word">BW3, Writing</td>
|
||||
<td>3,00</td>
|
||||
<td>02.06.2017</td>
|
||||
<td>28.11.2018</td>
|
||||
<td>Oliwia Woźniak</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<td class="break-word"><span class="ocenaCzastkowa" style="color:#6ECD07;">2=</span></td>
|
||||
<td class="break-word">K, Kordian</td>
|
||||
<td>5,00</td>
|
||||
<td>06.02.2017</td>
|
||||
<td>21.11.2018</td>
|
||||
<td>Amelia Stępień</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<td class="break-word"><span class="ocenaCzastkowa" style="color:#6ECD07;">1+</span></td>
|
||||
<td class="break-word">STR</td>
|
||||
<td>8,00</td>
|
||||
<td>02.04.2017</td>
|
||||
<td>14.11.2018</td>
|
||||
<td>Klaudia Dziedzic</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -107,7 +107,7 @@
|
|||
<td class="break-word"><span class="ocenaCzastkowa" style="color:#6ECD07;">5+</span></td>
|
||||
<td class="break-word">+Odp, Kordian</td>
|
||||
<td>5,00</td>
|
||||
<td>11.05.2017</td>
|
||||
<td>07.11.2018</td>
|
||||
<td>Amelia Stępień</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -119,7 +119,7 @@
|
|||
</td>
|
||||
<td class="break-word">A1, Dzień Kobiet w naszej klasie</td>
|
||||
<td>1,00</td>
|
||||
<td>21.03.2017</td>
|
||||
<td>31.10.2018</td>
|
||||
<td>Patryk Maciejewski</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -129,7 +129,7 @@
|
|||
<td class="break-word"><span class="ocenaCzastkowa" style="color:#20A4F7">65 (%)</span></td>
|
||||
<td class="break-word">MP1, matura próbna</td>
|
||||
<td>0,00</td>
|
||||
<td>11.06.2017</td>
|
||||
<td>24.10.2018</td>
|
||||
<td>Jadwiga Czerwieńska</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
Loading…
Reference in a new issue