diff --git a/webseite/assets/css/subject.css b/webseite/assets/css/subject.css index de96c61..e41ffa4 100644 --- a/webseite/assets/css/subject.css +++ b/webseite/assets/css/subject.css @@ -29,7 +29,7 @@ body { left: 0; top: 0; transition: transform 0.3s ease; - z-index: 50; + z-index: 40; } .sidebar-header { @@ -100,7 +100,7 @@ body { .main-content { margin-left: 280px; width: calc(100% - 280px); - padding-top: 5rem; + padding-top: 3rem; transition: margin-left 0.3s ease; } @@ -287,15 +287,6 @@ body { } } -.menu-toggle { - padding: 0.75rem; - border-radius: 10px; - cursor: pointer; - display: none; - align-items: center; - justify-content: center; - transition: all 0.3s ease; -} /* Add floating animation for icons */ @keyframes float { diff --git a/webseite/assets/css/topic.css b/webseite/assets/css/topic.css index 4721a8f..1f21a4a 100644 --- a/webseite/assets/css/topic.css +++ b/webseite/assets/css/topic.css @@ -28,7 +28,7 @@ body { left: 0; top: 0; transition: transform 0.3s ease; - z-index: 50; + z-index: 40; } .sidebar-header { @@ -187,6 +187,16 @@ body { width: 100%; padding: 1rem; } + + .menu-toggle { + display: flex !important; + } +} + +@media (min-width: 1025px) { + .menu-toggle { + display: none; + } } /* Active nav link style */ @@ -209,12 +219,3 @@ body { left: 0; font-weight: bold; } - -.menu-toggle { - padding: 0.75rem; - border-radius: 10px; - cursor: pointer; - align-items: center; - justify-content: center; - transition: all 0.3s ease; -} \ No newline at end of file diff --git a/webseite/assets/js/search.js b/webseite/assets/js/search.js deleted file mode 100644 index 0fa586b..0000000 --- a/webseite/assets/js/search.js +++ /dev/null @@ -1,31 +0,0 @@ -// Update search function with fallback animation -function handleSearch() { - const searchTerm = document.getElementById('searchInput').value.toLowerCase(); - const topicCards = document.querySelectorAll('.topic-card'); - - topicCards.forEach(card => { - const title = card.querySelector('.topic-title')?.textContent.toLowerCase() || ''; - const description = card.querySelector('.topic-description')?.textContent.toLowerCase() || ''; - const relatedTopics = Array.from(card.querySelectorAll('.related-topics li')) - .map(li => li.textContent.toLowerCase()) - .join(' '); - - const content = `${title} ${description} ${relatedTopics}`; - - if (content.includes(searchTerm)) { - card.style.display = 'block'; - if (window.gsap) { - gsap.to(card, { - opacity: 1, - y: 0, - duration: 0.3 - }); - } else { - card.style.opacity = 1; - card.style.transform = 'translateY(0)'; - } - } else { - card.style.display = 'none'; - } - }); -} \ No newline at end of file diff --git a/webseite/assets/js/sidebar.js b/webseite/assets/js/sidebar.js index a500929..330b8df 100644 --- a/webseite/assets/js/sidebar.js +++ b/webseite/assets/js/sidebar.js @@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', () => { right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); - z-index: 45; + z-index: 30; transition: opacity 0.3s ease; `; document.body.appendChild(overlay); diff --git a/webseite/classes/Config.php b/webseite/classes/Config.php new file mode 100644 index 0000000..27e6f42 --- /dev/null +++ b/webseite/classes/Config.php @@ -0,0 +1,51 @@ +id = $id; + + $result->displayName = $displayName; + + $result->description = $description; + + $result->color = $color; + + $result->icon = $icon; + + $result->topics = $topics; + + return $result; + } + + /** + * Prüft, ob das Thema zu den angegebenen IDs existiert + * @param string $subjectId ID des Faches + * @return bool true, wenn es existiert, sonst false + */ + public static function exists(string $subjectId): bool + { + if(!is_dir(Config::getSubjectDirectory($subjectId))) { + return false; + } + + return true; + } + /** * Gibt alle Fächer als SubjectData Objekt zurück * @return array Alle Fächer als SubjectData @@ -47,8 +97,7 @@ class SubjectData { $result = array(); - $subjectDirectory = "config/subjects"; - $subjectNames = scandir($subjectDirectory); + $subjectNames = scandir(Config::getSubjectsDirectory()); usort($subjectNames, function ($a, $b) { return strcmp($a, $b); @@ -79,43 +128,171 @@ class SubjectData { $result = new SubjectData(); - $subjectId = Util::removeIllegalCharacters($subjectId); + if (Util::containsIllegalCharacters($subjectId)) { + return null; + } + $result->id = $subjectId; - $subjectDirectory = "config/subjects/$subjectId"; - $filename = "$subjectDirectory/properties.json"; + $filename = Config::getSubjectDirectory($subjectId) . "properties.json"; $data = Util::parseJsonFromFile($filename); if (!isset($data)) { return null; } - $result->id = $subjectId; - - if (isset($data->displayName)) { - $result->displayName = $data->displayName; - } else { + if (!isset($data->displayName)) { return null; } + $result->displayName = $data->displayName; - if (isset($data->description)) { - $result->description = $data->description; - } else { + if (!isset($data->description)) { return null; } + $result->description = $data->description; - if (isset($data->color)) { - $result->color = $data->color; - } else { + if (!isset($data->color)) { return null; } + $result->color = $data->color; - if (isset($data->icon)) { - $result->icon = $data->icon; - } else { + if (!isset($data->icon)) { return null; } + $result->icon = $data->icon; $result->topics = TopicData::getAll($subjectId); return $result; } + + /** + * Schreibt alle Daten in Dateien + * @return bool true, wenn erfolgreich, sonst false + */ + public function save(): bool + { + $data = array(); + $data["displayName"] = $this->displayName; + $data["description"] = $this->description; + $data["color"] = $this->color; + $data["icon"] = $this->icon; + + $json = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + if (!$json) { + return false; + } + + $subjectDirectory = Config::getSubjectDirectory($this->getId()); + if (!is_dir($subjectDirectory)) { + mkdir($subjectDirectory, 0777, true); + } + + if (!Util::writeFileContent($subjectDirectory . "properties.json", $json)) { + return false; + } + + return true; + } + + /** + * Löscht das Fach inklusive aller zugehörigen Themen + * @return bool true, wenn erfolgreich, sonst false + */ + public function delete(): bool + { + if (!Util::delete(Config::getSubjectDirectory($this->getId()))) { + return false; + } + + return true; + } + + /** + * Fügt ein neues Thema zum Fach hinzu + * @param TopicData $topic Das neue Thema + * @return bool true, wenn erfolgreich, sonst false + */ + public function addTopic(TopicData $topic): bool + { + if(isset($this->topics[$topic->getId()])) { + return false; + } + + $this->topics[] = $topic; + return true; + } + + /** + * Entfernt ein Thema vom Fach + * @param TopicData $topic Das zu entfernende Thema + * @return bool true, wenn erfolgreich, sonst false + */ + public function removeTopic(TopicData $topic): bool + { + if(!isset($this->topics[$topic->getId()])) { + return false; + } + + $this->topics = array_diff($this->topics, [$topic]); + return true; + } + + public function getId(): string + { + return $this->id; + } + + public function setId(string $id): void + { + $this->id = $id; + } + + public function getDisplayName(): string + { + return $this->displayName; + } + + public function setDisplayName(string $displayName): void + { + $this->displayName = $displayName; + } + + public function getDescription(): string + { + return $this->description; + } + + public function setDescription(string $description): void + { + $this->description = $description; + } + + public function getColor(): string + { + return $this->color; + } + + public function setColor(string $color): void + { + $this->color = $color; + } + + public function getIcon(): string + { + return $this->icon; + } + + public function setIcon(string $icon): void + { + $this->icon = $icon; + } + + public function getTopics(): array + { + return $this->topics; + } + + public function setTopics(array $topics): void + { + $this->topics = $topics; + } } \ No newline at end of file diff --git a/webseite/classes/TopicData.php b/webseite/classes/TopicData.php index 66bbac4..95d7177 100644 --- a/webseite/classes/TopicData.php +++ b/webseite/classes/TopicData.php @@ -1,4 +1,9 @@ subjectId = $subjectId; + + if (Util::containsIllegalCharacters($id)) { + return false; + } + if (self::exists($subjectId, $id)) { + return false; + } + $result->id = $id; + + $result->displayName = $displayName; + + $result->icon = $icon; + + $result->description = $description; + + $result->relatedTopics = $relatedTopics; + + $result->files = array(); + + $result->article = $article; + + return $result; + } + + /** + * Prüft, ob das Thema zu den angegebenen IDs existiert + * @param string $subjectId ID des Faches + * @param string $topicId ID des Themas + * @return bool true, wenn es existiert, sonst false + */ + public static function exists(string $subjectId, string $topicId): bool + { + if (!is_dir(Config::getTopicDirectory($subjectId, $topicId))) { + return false; + } + + return true; + } + /** * Gibt alle Themen zu einem gegebenen Fach zurück * @param $subjectId string Die ID des Faches @@ -52,8 +118,7 @@ class TopicData { $result = array(); - $topicDirectory = "config/subjects/$subjectId/topics"; - $topicNames = scandir($topicDirectory); + $topicNames = scandir(Config::getTopicsDirectory($subjectId)); usort($topicNames, function ($a, $b) { return strcmp($a, $b); @@ -84,57 +149,319 @@ class TopicData { $result = new TopicData(); - $subjectId = Util::removeIllegalCharacters($subjectId); - $topicId = Util::removeIllegalCharacters($topicId); + if (Util::containsIllegalCharacters($subjectId)) { + return null; + } + if (Util::containsIllegalCharacters($topicId)) { + return null; + } + $result->id = $topicId; + $result->subjectId = $subjectId; - $topicsDirectory = "config/subjects/$subjectId/topics"; - $topicDataDirectory = "$topicsDirectory/$topicId"; - $data = Util::parseJsonFromFile("$topicDataDirectory/properties.json"); + $data = Util::parseJsonFromFile(Config::getTopicDirectory($subjectId, $topicId) . "properties.json"); if (!isset($data)) { return null; } - $result->id = $topicId; - $result->subjectId = $subjectId; - - if (isset($data->displayName)) { - $result->displayName = $data->displayName; - } else { + if (!isset($data->displayName)) { return null; } + $result->displayName = $data->displayName; - if (isset($data->icon)) { - $result->icon = $data->icon; - } else { + if (!isset($data->icon)) { return null; } + $result->icon = $data->icon; - if (isset($data->description)) { - $result->description = $data->description; - } else { + if (!isset($data->description)) { return null; } + $result->description = $data->description; + $relatedTopics = array(); if (isset($data->relatedTopics)) { - $result->relatedTopics = $data->relatedTopics; - } else { - $result->relatedTopics = array(); - } - if (isset($data->files)) { - $result->files = $data->files; - } else { - $result->files = array(); + $relatedTopics = $data->relatedTopics; } + $result->relatedTopics = $relatedTopics; - $article = Util::readFileContent("$topicDataDirectory/article.html"); + $files = Util::getFilesFromDirectory(Config::getTopicDirectory($subjectId, $topicId) . "downloads/"); + $result->files = $files; + + $article = Util::readFileContent(Config::getTopicDirectory($subjectId, $topicId) . "article.html"); if (!isset($article)) { $article = "Kein Erklärtext vorhanden"; } - $article = str_replace('$TOPICPATH', $topicDataDirectory, $article); + $result->article = str_replace('$TOPICPATH', Config::getTopicDirectory($subjectId, $topicId) . "images", $article); - $result->article = $article; + $result->cleanupRelatedTopics(); + $result->cleanupFiles(); return $result; } + /** + * Schreibt alle Daten in Dateien + * @return bool true, wenn erfolgreich, sonst false + */ + public function save(): bool + { + $this->cleanupRelatedTopics(); + $this->cleanupFiles(); + + $data = array(); + $data["displayName"] = $this->displayName; + $data["icon"] = $this->icon; + $data["description"] = $this->description; + $data["relatedTopics"] = $this->relatedTopics; + $data["files"] = $this->files; + + $json = json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT); + if (!$json) { + return false; + } + + if (!is_dir(Config::getSubjectDirectory($this->getSubjectId()))) { + return false; + } + + $topicDirectory = Config::getTopicDirectory($this->getSubjectId(), $this->getId()); + if (!is_dir($topicDirectory)) { + mkdir($topicDirectory, 0777, true); + } + + if (!(Util::writeFileContent($topicDirectory . "properties.json", $json) + && Util::writeFileContent($topicDirectory . "article.html", $json)) + ) { + return false; + } + + return true; + } + + /** + * Lädt eine Datei als Download zum Thema hoch + * @param string $name Dateiname von User, z.B. $_FILES['html-input-name']['name'][0] + * @param string $tmp_name Temporärer Pfad zur hochgeladenen Datei, z.B. $_FILES['html-input-name']['tmp_name'][0] + * @return bool true, wenn erfolgreich, sonst false + */ + public function addDownload(string $name, string $tmp_name): bool + { + $downloadDirectory = Config::getTopicDirectory($this->getSubjectId(), $this->getId()) . "downloads/"; + + if (!is_dir($downloadDirectory)) { + if (!mkdir($downloadDirectory)) { + return false; + } + } + + if (!move_uploaded_file($tmp_name, $downloadDirectory . $name)) { + return false; + } + + $this->files[] = $name; + + return true; + } + + /** + * Löscht eine downloadbare Datei des Themas + * @param string $name Dateiname + * @return bool true, wenn erfolgreich, sonst false + */ + public function deleteDownload(string $name): bool + { + if (!isset($this->files[$name])) { + return false; + } + + if (!unlink(Config::getTopicDirectory($this->getSubjectId(), $this->getId()) . "downloads/$name")) { + return false; + } + + $this->files = array_diff($this->files, [$name]); + + return true; + } + + /** + * Lädt eine Datei als Bild zum Thema hoch + * @param string $name Dateiname von User, z.B. $_FILES['html-input-name']['name'][0] + * @param string $tmp_name Temporärer Pfad zum hochgeladenen Bild, z.B. $_FILES['html-input-name']['tmp_name'][0] + * @return bool true, wenn erfolgreich, sonst false + */ + public function addImage(string $name, string $tmp_name): bool + { + $imageDirectory = Config::getTopicDirectory($this->getSubjectId(), $this->getId()) . "images/"; + + if (!is_dir($imageDirectory)) { + if (!mkdir($imageDirectory)) { + return false; + } + } + + if (!move_uploaded_file($tmp_name, $imageDirectory . $name)) { + return false; + } + + return true; + } + + /** + * Prüft für alle verwandten Themen, ob diese auch existieren. Wenn nicht, wird es aus der Liste entfernt + * @return bool true, wenn Elemente entfernt wurden, sonst false + */ + private function cleanupRelatedTopics(): bool + { + $changed = false; + $nonexistentEntries = array(); + + foreach ($this->relatedTopics as $topic) { + if (!self::exists($this->subjectId, $topic)) { + $nonexistentEntries[] = $topic; + $changed = true; + } + } + + $this->relatedTopics = array_diff($this->relatedTopics, $nonexistentEntries); + + return $changed; + } + + /** + * Prüft für alle Downloads, ob die zugehörige Datei existiert und ob zu jeder Datei ein Eintrag existiert. + * Wenn eine Datei nicht existiert, wird auch der zugehörige Eintrag entfernt. + * Wenn ein Eintrag nicht existiert, wird auch die Datei gelöscht. + * @return bool true, wenn etwas verändert wurde + */ + private function cleanupFiles(): bool + { + $changed = false; + + $nonexistentEntries = array(); + foreach ($this->files as $file) { + if(!file_exists(Config::getTopicDirectory($this->subjectId, $this->id) . "downloads/$file")) { + $nonexistentEntries[] = $file; + $changed = true; + } + } + $this->files = array_diff($this->files, $nonexistentEntries); + + foreach (Util::getFilesFromDirectory(Config::getTopicDirectory($this->subjectId, $this->id) . "downloads/") as $file) { + if(!array_search($file, $this->files)) { + $this->deleteDownload($file); + $changed = true; + } + } + + return $changed; + } + + /** + * Löscht ein Bild des Themas + * @param string $name Dateiname + * @return bool true, wenn erfolgreich, sonst false + */ + public function deleteImage(string $name): bool + { + if (!unlink(Config::getTopicDirectory($this->getSubjectId(), $this->getId()) . "images/$name")) { + return false; + } + + return true; + } + + /** + * Löscht das Thema inklusive aller zugehörigen Dateien + * @return bool true, wenn erfolgreich gelöscht, sonst false + */ + public function delete(): bool + { + if (!Util::delete(Config::getTopicDirectory($this->getSubjectId(), $this->getId()))) { + return false; + } + + return true; + } + + public function getId(): string + { + return $this->id; + } + + public function setId(string $id): void + { + $this->id = $id; + } + + public function getSubjectId(): string + { + return $this->subjectId; + } + + public function setSubjectId(string $subjectId): void + { + $this->subjectId = $subjectId; + } + + public function getDisplayName(): string + { + return $this->displayName; + } + + public function setDisplayName(string $displayName): void + { + $this->displayName = $displayName; + } + + public function getIcon(): string + { + return $this->icon; + } + + public function setIcon(string $icon): void + { + $this->icon = $icon; + } + + public function getDescription(): string + { + return $this->description; + } + + public function setDescription(string $description): void + { + $this->description = $description; + } + + public function getRelatedTopics(): array + { + return $this->relatedTopics; + } + + public function setRelatedTopics(array $relatedTopics): void + { + $this->relatedTopics = $relatedTopics; + } + + public function getFiles(): array + { + return $this->files; + } + + public function setFiles(array $files): void + { + $this->files = $files; + } + + public function getArticle(): string + { + return $this->article; + } + + public function setArticle(string $article): void + { + $this->article = $article; + } + + } \ No newline at end of file diff --git a/webseite/classes/User.php b/webseite/classes/User.php new file mode 100644 index 0000000..308375d --- /dev/null +++ b/webseite/classes/User.php @@ -0,0 +1,277 @@ + 100) { + return false; + } + if(strlen($password) > 100) { + return false; + } + + if (Util::containsIllegalCharacters($username)) { + return false; + } + + $passwordHash = password_hash($password, PASSWORD_ARGON2I); + + if(!is_dir(self::$userdataDirectory)) { + mkdir(self::$userdataDirectory); + } + + $file = fopen(self::$userdataDirectory . self::$userdataFile, "a"); + if (!$file) { + return false; + } + + fputcsv($file, array($username, $passwordHash),",", '"', "\\"); + fclose($file); + + return self::getFromUsername($username); + } + + /** + * Gibt einen Benutzer anhand eines Benutzernamen zurück + * @param string $username Benutzername nach dem gesucht wird + * @return User|false Der gefundene Besucher oder false, wenn der Benutzer nicht gefunden wurde + */ + public static function getFromUsername(string $username): User|false + { + if (!file_exists(self::$userdataDirectory . self::$userdataFile)) { + return false; + } + + $file = fopen(self::$userdataDirectory . self::$userdataFile, "r"); + if (!$file) { + return false; + } + + while (($data = fgetcsv($file, 300, ',', '"', '\\')) !== false) { + if (count($data) != 2) { + continue; + } + if ($data[0] !== $username) { + continue; + } + + $user = new User(); + $user->username = $data[0]; + $user->passwordHash = $data[1]; + return $user; + } + + fclose($file); + + return false; + } + + /** + * Löscht einen Benutzer + * @param string $password Richtiges Passwort zu diesem Nutzer + * @return bool true, wenn erfolgreich gelöscht, sonst false + */ + public function delete(string $password): bool + { + if(!$this->isPasswordCorrect($password)) { + return false; + } + + if(!$this->logout()) { + return false; + } + + $file = fopen(self::$userdataDirectory . self::$userdataFile, "r"); + if(!$file) { + return false; + } + + $newCsv = array(); + + while (($data = fgetcsv($file, 300, ',', '"', '\\')) !== false) { + if (count($data) != 2) { + continue; + } + if ($data[0] !== $this->username) { + $newCsv[] = $data; + } + } + fclose($file); + + $file = fopen(self::$userdataDirectory . self::$userdataFile, "w"); + if(!$file) { + return false; + } + + foreach ($newCsv as $newCsvData) { + fputcsv($file, $newCsvData, ',', '"', '\\'); + } + fclose($file); + + unset($this->username); + unset($this->passwordHash); + + return true; + } + + /** + * Ändert das Passwort des Accounts + * @param string $oldPassword altes Passwort + * @param string $newPassword Neues Passwort + * @return bool true, wenn erfolgreich geändert, sonst false + */ + public function changePassword(string $oldPassword, string $newPassword): bool + { + if(!$this->isPasswordCorrect($oldPassword)) { + return false; + } + + if(!$this->logout()) { + return false; + } + + $file = fopen(self::$userdataDirectory . self::$userdataFile, "c+"); + if(!$file) { + return false; + } + + $this->passwordHash = password_hash($newPassword, PASSWORD_ARGON2I); + + $lastLine = ftell($file); + while (($data = fgetcsv($file, 300, ',', '"', '\\')) !== false) { + if (count($data) != 2) { + + } else if ($data[0] !== $this->username) { + + } else { + $data[1] = $this->passwordHash; + + fseek($file, $lastLine); + + fputcsv($file, $data, ',', '"', '\\'); + break; + } + + $lastLine = ftell($file); + } + fclose($file); + + return true; + } + + /** + * Prüft, ob ein Passwort für diesen Benutzer korrekt ist + * @param string $password Zu prüfendes Passwort + * @return bool true, wenn korrekt, sonst false + */ + public function isPasswordCorrect(string $password): bool + { + return password_verify($password, $this->passwordHash); + } + + /** + * Meldet den Benutzer an, wenn das Passwort richtig ist + * @param string $password Passwort + * @return bool true, wenn erfolgreich, sonst false + */ + public function login(string $password): bool + { + if(!$this->isPasswordCorrect($password)) { + return false; + } + + if($this->isLoggedIn()) { + return false; + } + + $_SESSION["user"] = $this; + $_SESSION["login_time"] = time(); + + return true; + } + + /** + * Prüft, ob ein Benutzer angemeldet ist + * @return bool true, wenn angemeldet, sonst false + */ + public function isLoggedIn(): bool + { + if(!isset($_SESSION["user"])) { + return false; + } + + if($_SESSION["user"] != $this) { + return false; + } + + if(time() - $_SESSION["login_time"] > 86400 * 5) { + session_unset(); + return false; + } + + $_SESSION["login_time"] = time(); + + return true; + } + + /** + * Meldet den Benutzer ab + * @return bool true, wenn erfolgreich abgemeldet, false, wenn vorher schon abgemeldet + */ + public function logout(): bool + { + if(!$this->isLoggedIn()) { + return false; + } + + session_unset(); + + return true; + } + + /** + * Gibt den Benutzernamen zurück + * @return string Benutzername + */ + public function getUsername(): string + { + return $this->username; + } +} \ No newline at end of file diff --git a/webseite/classes/Util.php b/webseite/classes/Util.php index e83349f..2802e8a 100644 --- a/webseite/classes/Util.php +++ b/webseite/classes/Util.php @@ -15,6 +15,43 @@ class Util return preg_replace("/[^a-zA-Z0-9_-]/", "", $string); } + /** + * Prüft, ob Zeichen außer A-Z, a-z, 0-9 sowie - und _ enthalten sind + * @param string $string Zu prüfender Text + * @return bool true, wenn ungültige Zeichen enthalten sind, sonst false + */ + static function containsIllegalCharacters(string $string): bool + { + if (preg_match("/[^a-zA-Z0-9_-]/", $string)) { + return true; + } + + return false; + } + + static function getFilesFromDirectory(string $directory): array + { + $files = array(); + + if (is_dir($directory)) { + $fileNames = scandir($directory); + foreach ($fileNames as $fileName) { + if ($fileName == "." || $fileName == "..") { + continue; + } + + $files[] = $fileName; + } + } + + return $files; + } + + /** + * Liest den gesamten Text aus einer Datei aus + * @param string $filename Dateipfad + * @return string|null Der enthaltene Text oder null bei einem Fehler + */ static function readFileContent(string $filename): string|null { if (!file_exists($filename)) { @@ -33,6 +70,54 @@ class Util return $fileContent; } + /** + * Schreibt Inhalt in eine Datei. Überschreibt vorhandene Inhalte. Erstellt eine neue Datei, falls nötig. + * @param string $filename Dateipfad + * @param string $content Zu schreibender Text + * @return bool true, wenn erfolgreich, false, wenn ein Fehler aufgetreten ist + */ + static function writeFileContent(string $filename, string $content): bool + { + $file = fopen($filename, "w"); + if (!$file) { + return false; + } + + if (!fwrite($file, $content)) { + return false; + } + + fclose($file); + + return true; + } + + /** + * Löscht eine Datei oder einen Ordner inklusive aller Inhalte + * @param string $path Pfad zur Datei oder Verzeichnis + * @return bool true, wenn gelöscht, sonst false + */ + static function delete(string $path): bool + { + if(is_file($path)) { + if(!unlink($path)) { + return false; + } + } else if(is_dir($path)) { + $entries = scandir($path); + foreach ($entries as $entry) { + if($entry == "." || $entry == "..") { + continue; + } + + self::delete($path . "/" . $entry); + } + + } + + return true; + } + /** * Öffnet eine Datei und gibt JSON-Inhalte als Array zurück * @param string $filename Dateipfad diff --git a/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/exercise1.pdf b/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/exercise1.pdf rename to webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/downloads/exercise1.pdf diff --git a/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/image.png b/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/image.png and /dev/null differ diff --git a/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/properties.json b/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/properties.json index eb6817d..854795c 100644 --- a/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/properties.json +++ b/webseite/config/subjects/deutsch/topics/adverbiale-bestimmung/properties.json @@ -4,8 +4,5 @@ "description": "Adverbiale Bestimmungen sind Satzteile, die zusätzliche Informationen über Umstände wie Zeit, Ort, Grund oder Art und Weise geben und dadurch die Handlung des Satzes genauer beschreiben.", "relatedTopics": [ "wortarten", "vier-faelle" - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/exercise1.pdf b/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/exercise1.pdf rename to webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/downloads/exercise1.pdf diff --git a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/exercise2.pdf b/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/downloads/exercise2.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/exercise2.pdf rename to webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/downloads/exercise2.pdf diff --git a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/exercise3.pdf b/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/downloads/exercise3.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/exercise3.pdf rename to webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/downloads/exercise3.pdf diff --git a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/image.png b/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/image.png and /dev/null differ diff --git a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/img.png b/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/images/img.png similarity index 100% rename from webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/img.png rename to webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/images/img.png diff --git a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/properties.json b/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/properties.json index 3372f25..a297d57 100644 --- a/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/properties.json +++ b/webseite/config/subjects/deutsch/topics/geschichten-erzaehlen/properties.json @@ -4,8 +4,5 @@ "description": "Das Thema \"Geschichten erzählen\" umfasst das kreative Gestalten und Vermitteln von Erlebnissen oder Fantasien durch eine spannende Handlung, interessante Charaktere und lebendige Beschreibungen, um die Zuhörer oder Leser zu fesseln.", "relatedTopics": [ "satzglieder", "personalpronomen" - ], - "files": [ - "exercise1.pdf", "exercise2.pdf", "exercise3.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/deutsch/topics/personalpronomen/exercise1.pdf b/webseite/config/subjects/deutsch/topics/personalpronomen/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/personalpronomen/exercise1.pdf rename to webseite/config/subjects/deutsch/topics/personalpronomen/downloads/exercise1.pdf diff --git a/webseite/config/subjects/deutsch/topics/personalpronomen/image.png b/webseite/config/subjects/deutsch/topics/personalpronomen/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/deutsch/topics/personalpronomen/image.png and /dev/null differ diff --git a/webseite/config/subjects/deutsch/topics/personalpronomen/img.png b/webseite/config/subjects/deutsch/topics/personalpronomen/images/img.png similarity index 100% rename from webseite/config/subjects/deutsch/topics/personalpronomen/img.png rename to webseite/config/subjects/deutsch/topics/personalpronomen/images/img.png diff --git a/webseite/config/subjects/deutsch/topics/personalpronomen/properties.json b/webseite/config/subjects/deutsch/topics/personalpronomen/properties.json index eec49d2..4f1f61b 100644 --- a/webseite/config/subjects/deutsch/topics/personalpronomen/properties.json +++ b/webseite/config/subjects/deutsch/topics/personalpronomen/properties.json @@ -4,8 +4,5 @@ "description": "Personalpronomen sind Wörter, die anstelle von Personen oder Dingen verwendet werden, wie zum Beispiel \"ich\", \"du\", \"er\", \"sie\" oder \"es\", um Wiederholungen zu vermeiden und Sätze flüssiger zu gestalten.", "relatedTopics": [ "wortarten", "geschichten-erzaehlen" - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/deutsch/topics/satzglieder/exercise1.pdf b/webseite/config/subjects/deutsch/topics/satzglieder/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/satzglieder/exercise1.pdf rename to webseite/config/subjects/deutsch/topics/satzglieder/downloads/exercise1.pdf diff --git a/webseite/config/subjects/deutsch/topics/satzglieder/image.png b/webseite/config/subjects/deutsch/topics/satzglieder/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/deutsch/topics/satzglieder/image.png and /dev/null differ diff --git a/webseite/config/subjects/deutsch/topics/satzglieder/properties.json b/webseite/config/subjects/deutsch/topics/satzglieder/properties.json index 90a0dfa..5c690bc 100644 --- a/webseite/config/subjects/deutsch/topics/satzglieder/properties.json +++ b/webseite/config/subjects/deutsch/topics/satzglieder/properties.json @@ -4,8 +4,5 @@ "description": "Satzglieder sind die Bausteine eines Satzes, die jeweils eine bestimmte Funktion erfüllen, wie Subjekt, Prädikat, Objekt oder adverbiale Bestimmung, und sich gemeinsam verschieben lassen, ohne die grammatische Korrektheit des Satzes zu verändern.", "relatedTopics": [ "wortarten", "vier-faelle" - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/deutsch/topics/vier-faelle/exercise1.pdf b/webseite/config/subjects/deutsch/topics/vier-faelle/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/vier-faelle/exercise1.pdf rename to webseite/config/subjects/deutsch/topics/vier-faelle/downloads/exercise1.pdf diff --git a/webseite/config/subjects/deutsch/topics/vier-faelle/exercise2.pdf b/webseite/config/subjects/deutsch/topics/vier-faelle/downloads/exercise2.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/vier-faelle/exercise2.pdf rename to webseite/config/subjects/deutsch/topics/vier-faelle/downloads/exercise2.pdf diff --git a/webseite/config/subjects/deutsch/topics/vier-faelle/image.png b/webseite/config/subjects/deutsch/topics/vier-faelle/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/deutsch/topics/vier-faelle/image.png and /dev/null differ diff --git a/webseite/config/subjects/deutsch/topics/vier-faelle/properties.json b/webseite/config/subjects/deutsch/topics/vier-faelle/properties.json index b76669a..5339b63 100644 --- a/webseite/config/subjects/deutsch/topics/vier-faelle/properties.json +++ b/webseite/config/subjects/deutsch/topics/vier-faelle/properties.json @@ -4,8 +4,5 @@ "description": "Die vier Fälle im Deutschen - Nominativ, Genitiv, Dativ und Akkusativ - beschreiben die verschiedenen grammatischen Funktionen eines Nomens oder Pronomens im Satz, wie Subjekt, Besitz, indirektes Objekt oder direktes Objekt.", "relatedTopics": [ "satzglieder" - ], - "files": [ - "exercise1.pdf", "exercise2.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/deutsch/topics/wortarten/exercise1.pdf b/webseite/config/subjects/deutsch/topics/wortarten/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/deutsch/topics/wortarten/exercise1.pdf rename to webseite/config/subjects/deutsch/topics/wortarten/downloads/exercise1.pdf diff --git a/webseite/config/subjects/deutsch/topics/wortarten/image.png b/webseite/config/subjects/deutsch/topics/wortarten/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/deutsch/topics/wortarten/image.png and /dev/null differ diff --git a/webseite/config/subjects/deutsch/topics/wortarten/img.png b/webseite/config/subjects/deutsch/topics/wortarten/images/img.png similarity index 100% rename from webseite/config/subjects/deutsch/topics/wortarten/img.png rename to webseite/config/subjects/deutsch/topics/wortarten/images/img.png diff --git a/webseite/config/subjects/deutsch/topics/wortarten/properties.json b/webseite/config/subjects/deutsch/topics/wortarten/properties.json index 66f0c51..422354e 100644 --- a/webseite/config/subjects/deutsch/topics/wortarten/properties.json +++ b/webseite/config/subjects/deutsch/topics/wortarten/properties.json @@ -4,8 +4,5 @@ "description": "Wortarten sind Kategorien, in die Wörter anhand ihrer grammatischen Funktion und Bedeutung eingeteilt werden, wie zum Beispiel Nomen, Verben, Adjektive und Adverbien.", "relatedTopics": [ "satzglieder", "adverbiale-bestimmung", "personalpronomen" - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/englisch/topics/LoremIpsum/exercise1.pdf b/webseite/config/subjects/englisch/topics/LoremIpsum/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/englisch/topics/LoremIpsum/exercise1.pdf rename to webseite/config/subjects/englisch/topics/LoremIpsum/downloads/exercise1.pdf diff --git a/webseite/config/subjects/englisch/topics/LoremIpsum/image.png b/webseite/config/subjects/englisch/topics/LoremIpsum/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/englisch/topics/LoremIpsum/image.png and /dev/null differ diff --git a/webseite/config/subjects/englisch/topics/LoremIpsum/img.png b/webseite/config/subjects/englisch/topics/LoremIpsum/images/img.png similarity index 100% rename from webseite/config/subjects/englisch/topics/LoremIpsum/img.png rename to webseite/config/subjects/englisch/topics/LoremIpsum/images/img.png diff --git a/webseite/config/subjects/englisch/topics/LoremIpsum/properties.json b/webseite/config/subjects/englisch/topics/LoremIpsum/properties.json index df380f7..5caecd9 100644 --- a/webseite/config/subjects/englisch/topics/LoremIpsum/properties.json +++ b/webseite/config/subjects/englisch/topics/LoremIpsum/properties.json @@ -4,8 +4,5 @@ "description": "Lorem Ipsum", "relatedTopics": [ - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/mathe/topics/bruchrechnung/exercise1.pdf b/webseite/config/subjects/mathe/topics/bruchrechnung/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/bruchrechnung/exercise1.pdf rename to webseite/config/subjects/mathe/topics/bruchrechnung/downloads/exercise1.pdf diff --git a/webseite/config/subjects/mathe/topics/bruchrechnung/exercise2.pdf b/webseite/config/subjects/mathe/topics/bruchrechnung/downloads/exercise2.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/bruchrechnung/exercise2.pdf rename to webseite/config/subjects/mathe/topics/bruchrechnung/downloads/exercise2.pdf diff --git a/webseite/config/subjects/mathe/topics/bruchrechnung/image.png b/webseite/config/subjects/mathe/topics/bruchrechnung/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/mathe/topics/bruchrechnung/image.png and /dev/null differ diff --git a/webseite/config/subjects/mathe/topics/bruchrechnung/properties.json b/webseite/config/subjects/mathe/topics/bruchrechnung/properties.json index 4b9c4b8..dd4e274 100644 --- a/webseite/config/subjects/mathe/topics/bruchrechnung/properties.json +++ b/webseite/config/subjects/mathe/topics/bruchrechnung/properties.json @@ -4,8 +4,5 @@ "description": "Die Bruchrechnung ist ein Teil der Mathematik, der das Rechnen mit Brüchen beinhaltet, also das Teilen eines Ganzen in gleich große Teile, und umfasst Operationen wie Addition, Subtraktion, Multiplikation und Division von Brüchen.", "relatedTopics": [ "schriftliches-multiplizieren", "schriftliches-dividieren", "punkt-vor-strichrechnung", "rechnen-mit-klammern" - ], - "files": [ - "exercise1.pdf", "exercise2.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/exercise1.pdf b/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/exercise1.pdf rename to webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/downloads/exercise1.pdf diff --git a/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/image.png b/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/image.png and /dev/null differ diff --git a/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/properties.json b/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/properties.json index bcc3e3f..9a958cf 100644 --- a/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/properties.json +++ b/webseite/config/subjects/mathe/topics/punkt-vor-strichrechnung/properties.json @@ -4,8 +4,5 @@ "description": "Die Regel \"Punkt vor Strichrechnung\" besagt, dass bei mathematischen Berechnungen Multiplikation und Division immer vor Addition und Subtraktion ausgeführt werden müssen, um das richtige Ergebnis zu erhalten.", "relatedTopics": [ "rechnen-mit-klammern", "bruchrechnung" - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/exercise1.pdf b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/exercise1.pdf rename to webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/downloads/exercise1.pdf diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/exercise2.pdf b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/downloads/exercise2.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/exercise2.pdf rename to webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/downloads/exercise2.pdf diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/image.png b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/image.png and /dev/null differ diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/gewichte.png b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/images/gewichte.png similarity index 100% rename from webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/gewichte.png rename to webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/images/gewichte.png diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/laengen.png b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/images/laengen.png similarity index 100% rename from webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/laengen.png rename to webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/images/laengen.png diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/zeit.png b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/images/zeit.png similarity index 100% rename from webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/zeit.png rename to webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/images/zeit.png diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/properties.json b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/properties.json index 010a643..b85e3ad 100644 --- a/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/properties.json +++ b/webseite/config/subjects/mathe/topics/rechnen-mit-einheiten/properties.json @@ -4,8 +4,5 @@ "description": "Rechnen mit Einheiten bedeutet, Größen mit verschiedenen Maßeinheiten wie Meter, Kilogramm oder Liter rechnerisch zu verarbeiten, dabei die Einheiten korrekt umzurechnen und sicherzustellen, dass das Ergebnis in der richtigen Einheit angegeben wird.", "relatedTopics": [ "schriftliches-dividieren", "bruchrechnung" - ], - "files": [ - "exercise1.pdf", "exercise2.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/exercise1.pdf b/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/rechnen-mit-klammern/exercise1.pdf rename to webseite/config/subjects/mathe/topics/rechnen-mit-klammern/downloads/exercise1.pdf diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/image.png b/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/image.png and /dev/null differ diff --git a/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/properties.json b/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/properties.json index 016563e..6d50956 100644 --- a/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/properties.json +++ b/webseite/config/subjects/mathe/topics/rechnen-mit-klammern/properties.json @@ -4,8 +4,5 @@ "description": "Beim Rechnen mit Klammern werden die Rechenoperationen innerhalb der Klammern zuerst ausgeführt, bevor die restlichen Berechnungen im Ausdruck vorgenommen werden, um die korrekte Reihenfolge der Rechenschritte einzuhalten.", "relatedTopics": [ "punkt-vor-strichrechnung", "bruchrechnung" - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise1.pdf b/webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise1.pdf rename to webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise1.pdf diff --git a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise2.pdf b/webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise2.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise2.pdf rename to webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise2.pdf diff --git a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise3.pdf b/webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise3.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise3.pdf rename to webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise3.pdf diff --git a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise4.pdf b/webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise4.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/schriftliches-dividieren/exercise4.pdf rename to webseite/config/subjects/mathe/topics/schriftliches-dividieren/downloads/exercise4.pdf diff --git a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/image.png b/webseite/config/subjects/mathe/topics/schriftliches-dividieren/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/image.png and /dev/null differ diff --git a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/properties.json b/webseite/config/subjects/mathe/topics/schriftliches-dividieren/properties.json index 2443f26..c3c5623 100644 --- a/webseite/config/subjects/mathe/topics/schriftliches-dividieren/properties.json +++ b/webseite/config/subjects/mathe/topics/schriftliches-dividieren/properties.json @@ -4,8 +4,5 @@ "description": "Schriftliches Dividieren ist eine Methode zur schrittweisen Aufteilung einer Zahl durch eine andere, wobei man die Teilschritte nacheinander schriftlich notiert, um das Ergebnis systematisch zu berechnen.", "relatedTopics": [ "schriftliches-multiplizieren" - ], - "files": [ - "exercise1.pdf", "exercise2.pdf", "exercise3.pdf", "exercise4.pdf" ] } \ No newline at end of file diff --git a/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/exercise1.pdf b/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/downloads/exercise1.pdf similarity index 100% rename from webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/exercise1.pdf rename to webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/downloads/exercise1.pdf diff --git a/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/image.png b/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/image.png deleted file mode 100644 index a111ca4..0000000 Binary files a/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/image.png and /dev/null differ diff --git a/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/properties.json b/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/properties.json index 04215f4..f09d59a 100644 --- a/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/properties.json +++ b/webseite/config/subjects/mathe/topics/schriftliches-multiplizieren/properties.json @@ -4,8 +4,5 @@ "description": "Schriftliches Multiplizieren ist eine Rechenmethode, bei der zwei Zahlen schrittweise multipliziert werden, indem man die einzelnen Stellen der Zahlen nacheinander verrechnet, die Teilergebnisse notiert und am Ende addiert, um das Gesamtergebnis zu erhalten.", "relatedTopics": [ "schriftliches-dividieren" - ], - "files": [ - "exercise1.pdf" ] } \ No newline at end of file diff --git a/webseite/header.php b/webseite/header.php new file mode 100644 index 0000000..2596d1c --- /dev/null +++ b/webseite/header.php @@ -0,0 +1,392 @@ + + + + +isLoggedIn()) { + ?> +
+ + + +isLoggedIn()) { + ?> + + + + +Passwort wurde erfolgreich geändert.
+ +