Skip to content
Snippets Groups Projects
Commit 06bdb5aa authored by Philip Kaluđerčić's avatar Philip Kaluđerčić :u7121:
Browse files

Generate links to report problems

parent 51eedfc9
No related branches found
No related tags found
No related merge requests found
......@@ -2,11 +2,13 @@
// ./LICENSE for more details.
"use strict";
const version = "$Id: quiz.js,v 1.12 2024/01/18 11:19:07 oj14ozun Exp oj14ozun $";
const version = "$Id: quiz.js,v 1.13 2024/01/18 11:22:51 oj14ozun Exp oj14ozun $";
const js_version = document.getElementById("js-version");
js_version.innerHTML = version;
const gitlab_base = "https://gitlab.cs.fau.de/oj14ozun/sp-quiz";
const answers = document.getElementById("answers");
const text = document.getElementById("text");
const media = document.getElementById("media");
......@@ -15,6 +17,7 @@ const info = document.getElementById("info");
const info_toggle = document.getElementById("info-toggle");
const action = document.getElementById("action");
const stats = document.getElementById("stats");
const report = document.getElementById("report");
const class_list = document.documentElement.classList;
......@@ -161,6 +164,11 @@ function next() {
// display question metadata
update_stats(q);
// update report button
let title = `Problem mit der Frage: "${text.innerText}" (${q.source})`;
let desc = "(Ersetze diesen Text mit einer Beschreibung des Problems)"
report.href = `${gitlab_base}/issues/new?issue[title]=${encodeURIComponent(title)}&issue[description]=${encodeURIComponent(desc)}`;
}
function submit() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment