API attendance (#24)

This commit is contained in:
Mikołaj Pich
2017-09-19 19:15:35 +02:00
committed by GitHub
parent aae3d5d357
commit c876d114e3
16 changed files with 1746 additions and 0 deletions

View File

@ -0,0 +1,159 @@
package io.github.wulkanowy.api.attendance;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import java.util.List;
import io.github.wulkanowy.api.FixtureHelper;
import io.github.wulkanowy.api.StudentAndParent;
public class StatisticsTest {
private Statistics excellent;
private Statistics full;
@Before
public void setUp() throws Exception {
this.excellent = getSetUpTable("Frekwencja-excellent.html");
this.full = getSetUpTable("Frekwencja-full.html");
}
private Statistics getSetUpTable(String fixtureFileName) throws Exception {
String input = FixtureHelper.getAsString(getClass().getResourceAsStream(fixtureFileName));
Document tablePageDocument = Jsoup.parse(input);
StudentAndParent timetable = Mockito.mock(StudentAndParent.class);
Mockito.when(timetable.getSnPPageDocument(Mockito.anyString()))
.thenReturn(tablePageDocument);
return new Statistics(timetable);
}
@Test
public void getSubjectList() throws Exception {
Assert.assertEquals(26, excellent.getSubjectList().size());
Assert.assertEquals(23, full.getSubjectList().size());
}
@Test
public void getSubjectListId() throws Exception {
Assert.assertEquals(-1, excellent.getSubjectList().get(0).getId());
Assert.assertEquals(63, excellent.getSubjectList().get(10).getId());
Assert.assertEquals(0, excellent.getSubjectList().get(25).getId());
Assert.assertEquals(-1, full.getSubjectList().get(0).getId());
Assert.assertEquals(108, full.getSubjectList().get(14).getId());
Assert.assertEquals(492, full.getSubjectList().get(21).getId());
}
@Test
public void getSubjectListName() throws Exception {
Assert.assertEquals("Wszystkie", excellent.getSubjectList().get(0).getName());
Assert.assertEquals("Fizyka", excellent.getSubjectList().get(8).getName());
Assert.assertEquals("Sieci komputerowe i administrowanie sieciami",
excellent.getSubjectList().get(21).getName());
Assert.assertEquals("Praktyka zawodowa", full.getSubjectList().get(11).getName());
Assert.assertEquals("Użytkowanie urządzeń peryferyjnych komputera",
full.getSubjectList().get(16).getName());
Assert.assertEquals("Brak opisu lekcji", full.getSubjectList().get(22).getName());
}
@Test
public void getTypesTotal() throws Exception {
Assert.assertEquals(100.0, excellent.getTypesTable().getTotal(), 0);
Assert.assertEquals(80.94, full.getTypesTable().getTotal(), 0);
}
@Test
public void getTypeName() throws Exception {
List<Type> typeList1 = excellent.getTypesTable().getTypeList();
Assert.assertEquals("Obecność", typeList1.get(0).getName());
Assert.assertEquals("Nieobecność nieusprawiedliwiona", typeList1.get(1).getName());
Assert.assertEquals("Nieobecność usprawiedliwiona", typeList1.get(2).getName());
Assert.assertEquals("Nieobecność z przyczyn szkolnych", typeList1.get(3).getName());
List<Type> typeList2 = full.getTypesTable().getTypeList();
Assert.assertEquals("Spóźnienie nieusprawiedliwione", typeList2.get(4).getName());
Assert.assertEquals("Spóźnienie usprawiedliwione", typeList2.get(5).getName());
Assert.assertEquals("Zwolnienie", typeList2.get(6).getName());
}
@Test
public void getTypeTotal() throws Exception {
List<Type> typeList1 = excellent.getTypesTable().getTypeList();
Assert.assertEquals(1211, typeList1.get(0).getTotal());
Assert.assertEquals(0, typeList1.get(1).getTotal());
Assert.assertEquals(0, typeList1.get(2).getTotal());
Assert.assertEquals(0, typeList1.get(3).getTotal());
Assert.assertEquals(0, typeList1.get(4).getTotal());
Assert.assertEquals(0, typeList1.get(5).getTotal());
Assert.assertEquals(0, typeList1.get(6).getTotal());
List<Type> typeList2 = full.getTypesTable().getTypeList();
Assert.assertEquals(822, typeList2.get(0).getTotal());
Assert.assertEquals(6, typeList2.get(1).getTotal());
Assert.assertEquals(192, typeList2.get(2).getTotal());
Assert.assertEquals(7, typeList2.get(3).getTotal());
Assert.assertEquals(12, typeList2.get(4).getTotal());
Assert.assertEquals(1, typeList2.get(5).getTotal());
Assert.assertEquals(2, typeList2.get(6).getTotal());
}
@Test
public void getTypeList() throws Exception {
List<Type> typesList1 = excellent.getTypesTable().getTypeList();
Assert.assertEquals(12, typesList1.get(0).getMonthList().size());
Assert.assertEquals(12, typesList1.get(5).getMonthList().size());
List<Type> typesList2 = full.getTypesTable().getTypeList();
Assert.assertEquals(12, typesList2.get(0).getMonthList().size());
Assert.assertEquals(12, typesList2.get(5).getMonthList().size());
}
@Test
public void getMonthList() throws Exception {
List<Type> typeList1 = excellent.getTypesTable().getTypeList();
Assert.assertEquals(12, typeList1.get(0).getMonthList().size());
List<Type> typeList2 = full.getTypesTable().getTypeList();
Assert.assertEquals(12, typeList2.get(0).getMonthList().size());
}
@Test
public void getMonthName() throws Exception {
List<Month> monthsList1 = excellent.getTypesTable().getTypeList().get(0).getMonthList();
Assert.assertEquals("IX", monthsList1.get(0).getName());
Assert.assertEquals("III", monthsList1.get(6).getName());
Assert.assertEquals("VIII", monthsList1.get(11).getName());
List<Month> monthsList2 = full.getTypesTable().getTypeList().get(0).getMonthList();
Assert.assertEquals("XI", monthsList2.get(2).getName());
Assert.assertEquals("II", monthsList2.get(5).getName());
Assert.assertEquals("VI", monthsList2.get(9).getName());
}
@Test
public void getMonthValue() throws Exception {
List<Month> monthsList1 = excellent.getTypesTable().getTypeList().get(0).getMonthList();
Assert.assertEquals(142, monthsList1.get(0).getValue());
Assert.assertEquals(131, monthsList1.get(4).getValue());
Assert.assertEquals(139, monthsList1.get(7).getValue());
Assert.assertEquals(114, monthsList1.get(9).getValue());
Assert.assertEquals(0, monthsList1.get(11).getValue());
List<Type> typeList1 = full.getTypesTable().getTypeList();
Assert.assertEquals(135, typeList1.get(0).getMonthList().get(0).getValue());
Assert.assertEquals(7, typeList1.get(3).getMonthList().get(5).getValue());
Assert.assertEquals(1, typeList1.get(5).getMonthList().get(0).getValue());
Assert.assertEquals(27, typeList1.get(2).getMonthList().get(9).getValue());
Assert.assertEquals(0, typeList1.get(0).getMonthList().get(11).getValue());
}
}

View File

@ -0,0 +1,181 @@
package io.github.wulkanowy.api.attendance;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import io.github.wulkanowy.api.FixtureHelper;
import io.github.wulkanowy.api.StudentAndParent;
public class TableTest {
private Table excellent;
private Table full;
@Before
public void setUp() throws Exception {
excellent = getSetUpTable("Frekwencja-excellent.html");
full = getSetUpTable("Frekwencja-full.html");
}
public Table getSetUpTable(String fixtureFileName) throws Exception {
String input = FixtureHelper.getAsString(getClass().getResourceAsStream(fixtureFileName));
Document tablePageDocument = Jsoup.parse(input);
StudentAndParent timetable = Mockito.mock(StudentAndParent.class);
Mockito.when(timetable.getSnPPageDocument(Mockito.anyString()))
.thenReturn(tablePageDocument);
return new Table(timetable);
}
@Test
public void getWeekStartByDate() throws Exception {
Assert.assertEquals("31.08.2015", excellent.getWeekTable().getStartDayDate());
Assert.assertEquals("05.09.2016", full.getWeekTable().getStartDayDate());
}
@Test
public void getWeekDaysNumber() throws Exception {
Assert.assertEquals(5, excellent.getWeekTable().getDays().size());
Assert.assertEquals(5, full.getWeekTable().getDays().size());
}
@Test
public void getDayLessonsNumber() throws Exception {
Assert.assertEquals(14, excellent.getWeekTable().getDay(0).getLessons().size());
Assert.assertEquals(14, full.getWeekTable().getDay(0).getLessons().size());
}
@Test
public void getDayDate() throws Exception {
Assert.assertEquals("31.08.2015", excellent.getWeekTable().getDay(0).getDate());
Assert.assertEquals("02.09.2015", excellent.getWeekTable().getDay(2).getDate());
Assert.assertEquals("04.09.2015", excellent.getWeekTable().getDay(4).getDate());
Assert.assertEquals("05.09.2016", full.getWeekTable().getDay(0).getDate());
Assert.assertEquals("07.09.2016", full.getWeekTable().getDay(2).getDate());
Assert.assertEquals("09.09.2016", full.getWeekTable().getDay(4).getDate());
}
@Test
public void getLessonSubject() throws Exception {
Assert.assertEquals("",
excellent.getWeekTable().getDay(0).getLesson(7).getSubject());
Assert.assertEquals("Uroczyste rozpoczęcie roku szkolnego 2015/2016",
excellent.getWeekTable().getDay(1).getLesson(1).getSubject());
Assert.assertEquals("Geografia",
excellent.getWeekTable().getDay(3).getLesson(4).getSubject());
Assert.assertEquals("Naprawa komputera",
full.getWeekTable().getDay(1).getLesson(8).getSubject());
Assert.assertEquals("Religia",
full.getWeekTable().getDay(3).getLesson(1).getSubject());
Assert.assertEquals("Metodologia programowania",
full.getWeekTable().getDay(4).getLesson(5).getSubject());
}
@Test
public void getLessonIsNotExist() throws Exception {
Assert.assertTrue(excellent.getWeekTable().getDay(0).getLesson(5).isNotExist());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(1).isNotExist());
Assert.assertFalse(excellent.getWeekTable().getDay(4).getLesson(12).isNotExist());
Assert.assertFalse(full.getWeekTable().getDay(1).getLesson(12).isAbsenceUnexcused());
Assert.assertFalse(full.getWeekTable().getDay(3).getLesson(1).isAbsenceUnexcused());
Assert.assertFalse(full.getWeekTable().getDay(4).getLesson(5).isAbsenceUnexcused());
}
@Test
public void getLessonIsEmpty() throws Exception {
Assert.assertTrue(excellent.getWeekTable().getDay(0).getLesson(0).isEmpty());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(6).isEmpty());
Assert.assertTrue(excellent.getWeekTable().getDay(4).getLesson(12).isEmpty());
Assert.assertTrue(full.getWeekTable().getDay(1).getLesson(9).isEmpty());
Assert.assertFalse(full.getWeekTable().getDay(2).getLesson(5).isEmpty());
Assert.assertFalse(full.getWeekTable().getDay(4).getLesson(2).isEmpty());
}
@Test
public void getLessonIsPresence() throws Exception {
Assert.assertFalse(excellent.getWeekTable().getDay(0).getLesson(7).isPresence());
Assert.assertTrue(excellent.getWeekTable().getDay(1).getLesson(1).isPresence());
Assert.assertTrue(excellent.getWeekTable().getDay(3).getLesson(7).isPresence());
Assert.assertTrue(full.getWeekTable().getDay(0).getLesson(1).isPresence());
Assert.assertTrue(full.getWeekTable().getDay(2).getLesson(6).isPresence());
Assert.assertFalse(full.getWeekTable().getDay(4).getLesson(7).isPresence());
}
@Test
public void getLessonIsAbsenceUnexcused() throws Exception {
Assert.assertFalse(excellent.getWeekTable().getDay(0).getLesson(7).isAbsenceUnexcused());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(0).isAbsenceUnexcused());
Assert.assertFalse(excellent.getWeekTable().getDay(4).getLesson(4).isAbsenceUnexcused());
Assert.assertTrue(full.getWeekTable().getDay(1).getLesson(8).isAbsenceUnexcused());
Assert.assertFalse(full.getWeekTable().getDay(3).getLesson(1).isAbsenceUnexcused());
Assert.assertFalse(full.getWeekTable().getDay(4).getLesson(8).isAbsenceUnexcused());
}
@Test
public void getLessonIsAbsenceExcused() throws Exception {
Assert.assertFalse(excellent.getWeekTable().getDay(0).getLesson(7).isAbsenceExcused());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(0).isAbsenceExcused());
Assert.assertFalse(excellent.getWeekTable().getDay(4).getLesson(4).isAbsenceExcused());
Assert.assertFalse(full.getWeekTable().getDay(2).getLesson(5).isAbsenceExcused());
Assert.assertFalse(full.getWeekTable().getDay(3).getLesson(1).isAbsenceExcused());
Assert.assertTrue(full.getWeekTable().getDay(4).getLesson(3).isAbsenceExcused());
}
@Test
public void getLessonIsAbsenceForSchoolReasons() throws Exception {
Assert.assertFalse(excellent.getWeekTable().getDay(0).getLesson(4).isAbsenceForSchoolReasons());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(8).isAbsenceForSchoolReasons());
Assert.assertFalse(excellent.getWeekTable().getDay(4).getLesson(12).isAbsenceForSchoolReasons());
Assert.assertTrue(full.getWeekTable().getDay(2).getLesson(5).isAbsenceForSchoolReasons());
Assert.assertFalse(full.getWeekTable().getDay(3).getLesson(1).isAbsenceForSchoolReasons());
Assert.assertFalse(full.getWeekTable().getDay(4).getLesson(8).isAbsenceForSchoolReasons());
}
@Test
public void getLessonIsUnexcusedLateness() throws Exception {
Assert.assertFalse(excellent.getWeekTable().getDay(0).getLesson(4).isUnexcusedLateness());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(8).isUnexcusedLateness());
Assert.assertFalse(excellent.getWeekTable().getDay(4).getLesson(12).isUnexcusedLateness());
Assert.assertTrue(full.getWeekTable().getDay(1).getLesson(6).isUnexcusedLateness());
Assert.assertFalse(full.getWeekTable().getDay(3).getLesson(1).isUnexcusedLateness());
Assert.assertFalse(full.getWeekTable().getDay(4).getLesson(8).isUnexcusedLateness());
}
@Test
public void getLessonIsExcusedLateness() throws Exception {
Assert.assertFalse(excellent.getWeekTable().getDay(0).getLesson(4).isExcusedLateness());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(8).isExcusedLateness());
Assert.assertFalse(excellent.getWeekTable().getDay(4).getLesson(12).isExcusedLateness());
Assert.assertTrue(full.getWeekTable().getDay(1).getLesson(7).isExcusedLateness());
Assert.assertFalse(full.getWeekTable().getDay(3).getLesson(1).isExcusedLateness());
Assert.assertFalse(full.getWeekTable().getDay(4).getLesson(8).isExcusedLateness());
}
@Test
public void getLessonIsExemption() throws Exception {
Assert.assertFalse(excellent.getWeekTable().getDay(0).getLesson(4).isExemption());
Assert.assertFalse(excellent.getWeekTable().getDay(2).getLesson(8).isExemption());
Assert.assertFalse(excellent.getWeekTable().getDay(4).getLesson(12).isExemption());
Assert.assertFalse(full.getWeekTable().getDay(2).getLesson(5).isExemption());
Assert.assertFalse(full.getWeekTable().getDay(3).getLesson(1).isExemption());
Assert.assertTrue(full.getWeekTable().getDay(4).getLesson(8).isExemption());
}
}

View File

@ -0,0 +1,408 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Witryna ucznia i rodzica Frekwencja</title>
<style>
.x-sp-nieobecny-w-oddziale:before {
content: 'nieobecny w oddziale';
background: grey;
}
.x-obecnosc:before {
content: 'obecność';
background: green;
}
.presentData td:not(.padding-zero):not(.x-sp-nieobecny-w-oddziale):not(:first-child):before {
content: 'pusta';
background: grey;
}
</style>
</head>
<body>
<main class="mainContainer">
<h1>Frekwencja</h1>
<table class="presentData">
<thead>
<tr>
<th>Lekcja</th>
<th>poniedziałek<br>31.08.2015</th>
<th>wtorek<br>01.09.2015</th>
<th>środa<br>02.09.2015</th>
<th>czwartek<br>03.09.2015</th>
<th>piątek<br>04.09.2015</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>1</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Uroczyste rozpoczęcie roku szkolnego 2015/2016</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Wychowanie do życia w rodzinie</span>
</div>
</td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
</tr>
<tr>
<td>2</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język angielski</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język niemiecki</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
</tr>
<tr>
<td>3</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Systemy operacyjne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Chemia</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
</tr>
<tr>
<td>4</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Systemy operacyjne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Geografia</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
</tr>
<tr>
<td>5</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Tworzenie stron internetowych</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Matematyka</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język polski</span>
</div>
</td>
</tr>
<tr>
<td>6</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Tworzenie stron internetowych</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Fizyka</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Matematyka</span>
</div>
</td>
</tr>
<tr>
<td>7</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Wychowanie fizyczne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język polski</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Historia</span>
</div>
</td>
</tr>
<tr>
<td>8</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Wychowanie fizyczne</span>
</div>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>9</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>10</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>11</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>12</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>13</td>
<td class="x-sp-nieobecny-w-oddziale"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<h1 id="statystyki">Statystyki</h1>
<div>
<label for="idPrzedmiot">Przedmiot:</label>
<select id="idPrzedmiot" name="idPrzedmiot">
<option value="-1">Wszystkie</option>
<option value="1">Religia</option>
<option value="4">Język polski</option>
<option value="5">Język angielski</option>
<option value="9">Język niemiecki</option>
<option value="50">Historia</option>
<option value="56">Wiedza o społeczeństwie</option>
<option value="58">Matematyka</option>
<option value="59">Fizyka</option>
<option value="61">Chemia</option>
<option value="63">Biologia</option>
<option value="64">Geografia</option>
<option value="71">Informatyka</option>
<option value="75">Wychowanie fizyczne</option>
<option value="88">Edukacja dla bezpieczeństwa</option>
<option value="91">Wychowanie do życia w rodzinie</option>
<option value="94">Zajęcia z wychowawcą</option>
<option value="106">Techniki biurowe</option>
<option value="108">Urządzenia techniki komputerowej</option>
<option value="109">Naprawa komputera</option>
<option value="113">Systemy operacyjne</option>
<option value="114">Sieci komputerowe i administrowanie sieciami</option>
<option value="118">Tworzenie stron internetowych</option>
<option value="492">Opieka nad uczniami</option>
<option value="664">Fizyka doświadczalna</option>
<option value="0">Brak opisu lekcji</option>
</select>
</div>
<h2>Frekwencja od początku roku szkolnego: 100,00%</h2>
<table>
<thead>
<tr>
<th></th>
<th>IX</th>
<th>X</th>
<th>XI</th>
<th>XII</th>
<th>I</th>
<th>II</th>
<th>III</th>
<th>IV</th>
<th>V</th>
<th>VI</th>
<th>VII</th>
<th>VIII</th>
<th>Razem</th>
</tr>
</thead>
<tbody>
<tr>
<td>Obecność</td>
<td>142</td>
<td>143</td>
<td>139</td>
<td>110</td>
<td>131</td>
<td>75</td>
<td>126</td>
<td>139</td>
<td>92</td>
<td>114</td>
<td></td>
<td></td>
<td>1211</td>
</tr>
<tr>
<td>Nieobecność nieusprawiedliwiona</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Nieobecność usprawiedliwiona</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Nieobecność z przyczyn szkolnych</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Spóźnienie nieusprawiedliwione</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Spóźnienie usprawiedliwione</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Zwolnienie</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</main>
<footer>wersja: 17.07.0002.24480</footer>
</body>
</html>

View File

@ -0,0 +1,498 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Witryna ucznia i rodzica Frekwencja</title>
<style>
.x-obecnosc:before {
content: 'obecność';
background: green;
}
.x-nieobecnosc-nieuspr:before {
content: 'nieobecność nieusprawiedliwiona';
background: red;
}
.x-nieobecnosc-uspr:before {
content: 'nieobecność usprawiedliwiona';
background: orange;
}
.x-nieobecnosc-przycz-szkol:before {
content: 'nieobecność z przyczyn szkolnych';
background: lightblue;
}
.x-sp-nieusprawiedliwione:before {
content: 'spóźnienie nieusprawiedliwione';
background: yellow;
}
.x-sp-spr:before {
content: 'spóźnienie usprawiedliwione';
background: black;
color: white;
}
.x-sp-zwolnienie:before {
content: 'zwolnienie';
background: purple;
}
.x-sp-nieobecny-w-oddziale:before {
content: 'nieobecny w oddziale';
background: grey;
}
.x-obecnosc:before {
content: 'obecność';
background: green;
}
.presentData td:not(.padding-zero):not(.x-sp-nieobecny-w-oddziale):not(:first-child):before {
content: 'pusta';
background: grey;
}
</style>
</head>
<body>
<main class="mainContainer">
<h1>Frekwencja</h1>
<table class="presentData">
<thead>
<tr>
<th>Lekcja</th>
<th>poniedziałek<br>05.09.2016</th>
<th>wtorek<br>06.09.2016</th>
<th>środa<br>07.09.2016</th>
<th>czwartek<br>08.09.2016</th>
<th>piątek<br>09.09.2016</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>1</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Multimedia i grafika komputerowa</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Użytkowanie urządzeń peryferyjnych komputera</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Religia</span>
</div>
</td>
<td></td>
</tr>
<tr>
<td>2</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język niemiecki</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Użytkowanie urządzeń peryferyjnych komputera</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język niemiecki</span>
</div>
</td>
<td class="padding-zero">
<div class="x-nieobecnosc-uspr">
<span>Sieci komputerowe i administrowanie sieciami</span>
</div>
</td>
</tr>
<tr>
<td>3</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Fizyka</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Historia</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Wychowanie fizyczne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-nieobecnosc-uspr">
<span>Wiedza o kulturze</span>
</div>
</td>
</tr>
<tr>
<td>4</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Naprawa komputera</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Wychowanie fizyczne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język angielski</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Wychowanie fizyczne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-nieobecnosc-uspr">
<span>Język polski</span>
</div>
</td>
</tr>
<tr>
<td>5</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Sieci komputerowe i administrowanie sieciami</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Metodologia programowania</span>
</div>
</td>
<td class="padding-zero">
<div class="x-nieobecnosc-przycz-szkol">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Matematyka</span>
</div>
</td>
<td class="padding-zero">
<div class="x-nieobecnosc-uspr">
<span>Metodologia programowania</span>
</div>
</td>
</tr>
<tr>
<td>6</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język niemiecki</span>
</div>
</td>
<td class="padding-zero">
<div class="x-sp-nieusprawiedliwione">
<span>Sieci komputerowe i administrowanie sieciami</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Język polski</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Podstawy przedsiębiorczości</span>
</div>
</td>
<td class="padding-zero">
<div class="x-nieobecnosc-uspr">
<span>Matematyka</span>
</div>
</td>
</tr>
<tr>
<td>7</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Fizyka</span>
</div>
</td>
<td class="padding-zero">
<div class="x-sp-spr">
<span>Język polski</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Systemy operacyjne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Zajęcia z wychowawcą</span>
</div>
</td>
<td class="padding-zero">
<div class="x-nieobecnosc-uspr">
<span>Religia</span>
</div>
</td>
</tr>
<tr>
<td>8</td>
<td></td>
<td class="padding-zero">
<div class="x-nieobecnosc-nieuspr">
<span>Naprawa komputera</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Systemy operacyjne</span>
</div>
</td>
<td class="padding-zero">
<div class="x-obecnosc">
<span>Urządzenia techniki komputerowej</span>
</div>
</td>
<td class="padding-zero">
<div class="x-sp-zwolnienie">
<span>Zajęcia z wychowawcą</span>
</div>
</td>
</tr>
<tr>
<td>9</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>10</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>11</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>12</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>13</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<h1 id="statystyki">Statystyki</h1>
<div>
<label for="idPrzedmiot">Przedmiot:</label>
<select id="idPrzedmiot" name="idPrzedmiot">
<option value="-1">Wszystkie</option>
<option value="1">Religia</option>
<option value="4">Język polski</option>
<option value="5">Język angielski</option>
<option value="9">Język niemiecki</option>
<option value="50">Historia</option>
<option value="57">Wiedza o kulturze</option>
<option value="58">Matematyka</option>
<option value="59">Fizyka</option>
<option value="70">Podstawy przedsiębiorczości</option>
<option value="75">Wychowanie fizyczne</option>
<option value="77">Praktyka zawodowa</option>
<option value="91">Wychowanie do życia w rodzinie</option>
<option value="94">Zajęcia z wychowawcą</option>
<option value="108">Urządzenia techniki komputerowej</option>
<option value="109">Naprawa komputera</option>
<option value="110">Użytkowanie urządzeń peryferyjnych komputera</option>
<option value="113">Systemy operacyjne</option>
<option value="114">Sieci komputerowe i administrowanie sieciami</option>
<option value="116">Multimedia i grafika komputerowa</option>
<option value="120">Metodologia programowania</option>
<option value="492">Opieka nad uczniami</option>
<option value="0">Brak opisu lekcji</option>
</select>
</div>
<h2>Frekwencja od początku roku szkolnego: 80,94%</h2>
<table>
<thead>
<tr>
<th></th>
<th>IX</th>
<th>X</th>
<th>XI</th>
<th>XII</th>
<th>I</th>
<th>II</th>
<th>III</th>
<th>IV</th>
<th>V</th>
<th>VI</th>
<th>VII</th>
<th>VIII</th>
<th>Razem</th>
</tr>
</thead>
<tbody>
<tr>
<td>Obecność</td>
<td>135</td>
<td>103</td>
<td>108</td>
<td>54</td>
<td>37</td>
<td>100</td>
<td>33</td>
<td>90</td>
<td>103</td>
<td>59</td>
<td></td>
<td></td>
<td>822</td>
</tr>
<tr>
<td>Nieobecność nieusprawiedliwiona</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>2</td>
<td></td>
<td></td>
<td></td>
<td>4</td>
<td></td>
<td></td>
<td>6</td>
</tr>
<tr>
<td>Nieobecność usprawiedliwiona</td>
<td>6</td>
<td>27</td>
<td>29</td>
<td>30</td>
<td>44</td>
<td></td>
<td></td>
<td>16</td>
<td>13</td>
<td>27</td>
<td></td>
<td></td>
<td>192</td>
</tr>
<tr>
<td>Nieobecność z przyczyn szkolnych</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>7</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>7</td>
</tr>
<tr>
<td>Spóźnienie nieusprawiedliwione</td>
<td>4</td>
<td></td>
<td>1</td>
<td></td>
<td></td>
<td>2</td>
<td>2</td>
<td></td>
<td>2</td>
<td>1</td>
<td></td>
<td></td>
<td>12</td>
</tr>
<tr>
<td>Spóźnienie usprawiedliwione</td>
<td>1</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>1</td>
</tr>
<tr>
<td>Zwolnienie</td>
<td></td>
<td>1</td>
<td></td>
<td></td>
<td></td>
<td>1</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>2</td>
</tr>
</tbody>
</table>
</main>
<footer>wersja: 17.07.0002.24480</footer>
</body>
</html>