diff --git a/help/data_xample.js b/help/data_xample.js index 4446acd..2ffd418 100644 --- a/help/data_xample.js +++ b/help/data_xample.js @@ -3,7 +3,7 @@ async function createTemp() { await couchDB.set("users", { "turtle": { "password": "1234", - "level": 0, + "level": 4, "xp": 0, "avatar": null, "abilities": [], diff --git a/prof/auswertung.html b/prof/auswertung.html index 24bfd4f..43b77b2 100644 --- a/prof/auswertung.html +++ b/prof/auswertung.html @@ -263,13 +263,16 @@ async function init() { async function getXpPoints(elm, xp, name, pos) { elm.remove(); - playLevelSound(); const course = await couchDB.get("course:" + name); const data = course.result_history[pos]; data["got_xp"] = true; - await levelUpXP(couchDB, userData, xp); + if (await levelUpXP(couchDB, userData, xp)) { + playLevelSound(); + } else { + playXPSound(); + } await couchDB.set("course:" + name, course); } diff --git a/prof/uebersicht.html b/prof/uebersicht.html index d70f20a..60df47d 100644 --- a/prof/uebersicht.html +++ b/prof/uebersicht.html @@ -255,10 +255,14 @@ button.auswertung:hover {