diff --git a/controllers/LibraryController.inc b/controllers/LibraryController.inc index a37618ae..b6c77079 100644 --- a/controllers/LibraryController.inc +++ b/controllers/LibraryController.inc @@ -62,19 +62,25 @@ $character = SeminaryRoleController::$character; // Get Quest topics + $totalQuestcount = 0; + $totalCharacterQuestcount = 0; $questtopics = $this->Questtopics->getQuesttopicsForSeminary($seminary['id']); foreach($questtopics as &$questtopic) { // Get Quest count $questtopic['questcount'] = $this->Questtopics->getQuestCountForQuesttopic($questtopic['id']); + $totalQuestcount += $questtopic['questcount']; // Get Character progress $questtopic['characterQuestcount'] = $this->Questtopics->getCharacterQuestCountForQuesttopic($questtopic['id'], $character['id']); + $totalCharacterQuestcount += $questtopic['characterQuestcount']; } // Pass data to view $this->set('seminary', $seminary); + $this->set('totalQuestcount', $totalQuestcount); + $this->set('totalCharacterQuestcount', $totalCharacterQuestcount); $this->set('questtopics', $questtopics); } diff --git a/locale/de_DE/LC_MESSAGES/The Legend of Z.mo b/locale/de_DE/LC_MESSAGES/The Legend of Z.mo index e4ce1818..bbbde6ff 100644 Binary files a/locale/de_DE/LC_MESSAGES/The Legend of Z.mo and b/locale/de_DE/LC_MESSAGES/The Legend of Z.mo differ diff --git a/locale/de_DE/LC_MESSAGES/The Legend of Z.po b/locale/de_DE/LC_MESSAGES/The Legend of Z.po index c85999cc..8ada359f 100644 --- a/locale/de_DE/LC_MESSAGES/The Legend of Z.po +++ b/locale/de_DE/LC_MESSAGES/The Legend of Z.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: The Legend of Z\n" -"POT-Creation-Date: 2014-04-21 21:12+0100\n" -"PO-Revision-Date: 2014-04-21 21:12+0100\n" +"POT-Creation-Date: 2014-04-21 21:42+0100\n" +"PO-Revision-Date: 2014-04-22 00:29+0100\n" "Last-Translator: \n" "Language-Team: \n" "Language: de_DE\n" @@ -147,17 +147,17 @@ msgstr "Platz" msgid "You achieved %d of %d Achievements so far" msgstr "Du hast bislang %d von insgesamt %d Errungenschaften erreicht" -#: views/html/achievements/index.tpl:66 views/html/characters/character.tpl:39 +#: views/html/achievements/index.tpl:61 views/html/characters/character.tpl:39 #: views/html/seminarybar/index.tpl:28 #, php-format msgid "achieved at: %s" msgstr "erhalten am: %s" -#: views/html/achievements/index.tpl:77 +#: views/html/achievements/index.tpl:72 msgid "Secret Achievement" msgstr "Geheime Errungenschaft" -#: views/html/achievements/index.tpl:82 +#: views/html/achievements/index.tpl:77 msgid "Continue playing to unlock this secret Achievement" msgstr "Spiele weiter, um diesen geheimen Erfolg freizuschalten" @@ -319,6 +319,20 @@ msgstr "registriere dich" msgid "Questtopics" msgstr "Themen" +#: views/html/library/index.tpl:10 +#, php-format +msgid "Library description, %s, %s" +msgstr "" +"Hier findest du alle Themen aus der Vorlesung „%s“ und die passenden Quests " +"zum Nachschlagen und Wiederholen. Dein Fortschritt in „%s“ beeinflusst den " +"Umfang der Bibliothek, spiele also regelmäßig weiter und schalte so Quest " +"für Quest alle Inhalte frei." + +#: views/html/library/index.tpl:12 +#, php-format +msgid "Total progress: %d %%" +msgstr "Gesamtfortschritt: %d %%" + #: views/html/menu/index.tpl:2 views/html/users/create.tpl:1 #: views/html/users/delete.tpl:1 views/html/users/edit.tpl:1 #: views/html/users/index.tpl:1 views/html/users/login.tpl:1 @@ -362,15 +376,15 @@ msgstr "Questgruppe" #: views/html/quests/create.tpl:27 msgid "XPs" -msgstr "" +msgstr "XPs" #: views/html/quests/create.tpl:34 msgid "Entry text" -msgstr "" +msgstr "Einstiegstext" #: views/html/quests/create.tpl:36 msgid "Wrong text" -msgstr "" +msgstr "Text für falsche Antwort" #: views/html/quests/create.tpl:37 views/html/quests/quest.tpl:55 msgid "Task" @@ -428,7 +442,7 @@ msgstr "Lösung von %s" #: views/html/quests/submissions.tpl:15 msgid "submitted" -msgstr "eingereicht am %s um %s Uhr" +msgstr "eingereicht" #: views/html/seminaries/create.tpl:7 msgid "New seminary" diff --git a/models/SeminariesModel.inc b/models/SeminariesModel.inc index 251ade4f..554f3d10 100644 --- a/models/SeminariesModel.inc +++ b/models/SeminariesModel.inc @@ -49,7 +49,7 @@ { // Get seminaries return $this->db->query( - 'SELECT id, created, created_user_id, title, url, description, seminarymedia_id '. + 'SELECT id, created, created_user_id, title, url, course, description, seminarymedia_id '. 'FROM seminaries '. 'ORDER BY created DESC' ); @@ -66,7 +66,7 @@ public function getSeminaryById($seminaryId) { $seminary = $this->db->query( - 'SELECT id, created, created_user_id, title, url, description, seminarymedia_id '. + 'SELECT id, created, created_user_id, title, url, course, description, seminarymedia_id '. 'FROM seminaries '. 'WHERE id = ?', 'i', @@ -91,7 +91,7 @@ public function getSeminaryByUrl($seminaryUrl) { $seminary = $this->db->query( - 'SELECT id, created, created_user_id, title, url, description, seminarymedia_id '. + 'SELECT id, created, created_user_id, title, url, course, description, seminarymedia_id '. 'FROM seminaries '. 'WHERE url = ?', 's', diff --git a/views/html/library/index.tpl b/views/html/library/index.tpl index df59a4bd..2dd6cd09 100644 --- a/views/html/library/index.tpl +++ b/views/html/library/index.tpl @@ -7,11 +7,11 @@
Hier findest du alle Themen aus der Vorlesung "Wissensrepräsentation" und die passenden Quests zum Nachschlagen und Wiederholen. Dein Fortschritt in "Die Legende von Zyren" beeinflusst den Umfang der Bibliothek, spiele also regelmäßig weiter und schalte so Quest für Quest alle Inhalte frei.
+=sprintf(_('Library description, %s, %s'), $seminary['course'], $seminary['title'])?>
Gesamtfortschritt: 77%
+=sprintf(_('Total progress: %d %%'), ($totalQuestcount > 0) ? $numberFormatter->format(round($totalCharacterQuestcount/$totalQuestcount*100)) : 0) ?>