Commit 6d55191b authored by Jakob Moser's avatar Jakob Moser
Browse files

Don't import currentState in snakeoil.mjs

parent 6f641a26
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
/** Library providing a false sense of security **/

import { currentState } from "./state.mjs"

/**
 * Return a hand-in token, which is a gibberish string using which the GT can 
 * verify the student successfully completed the pool test
 * @returns The hand-in token
 */
export function getHandInToken() {
export function getHandInToken(currentState) {
    /*
     * Hello!
     *
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ function initActionLinks() {
    document.querySelectorAll("[data-action]").forEach(el => {
        const handler = {
            "hand-in": function () {
                alert("Bitte schreibe eine Mail an die GT mit dem folgenden Token als Inhalt: " + getHandInToken())
                alert("Bitte schreibe eine Mail an die GT mit dem folgenden Token als Inhalt: " + getHandInToken(currentState))
            },
            "begin": function () {
                document.body.classList.remove("overlay-shown")