mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Object stringify on results overview page
This commit is contained in:
parent
9e6401ba63
commit
cb2ace5d06
1 changed files with 15 additions and 4 deletions
19
main.js
19
main.js
|
@ -20,9 +20,14 @@
|
||||||
|
|
||||||
------------------------------------------------------------------------- */
|
------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* TODO
|
||||||
|
* remove stuff like "b. answer", "c. answer" ....
|
||||||
|
* */
|
||||||
|
|
||||||
var data; // all data, which is in the resource txt
|
var data; // all data, which is in the resource txt
|
||||||
var addEventListener; // add event listener function
|
var addEventListener; // add event listener function
|
||||||
const lastChangeLog = 'Néhány szerkezeti átalakítás, és bugfix. Ha valami elromlott akkor pls report, thanx';
|
const lastChangeLog =
|
||||||
|
'Néhány szerkezeti átalakítás, és bugfix. Ha valami elromlott akkor pls report, thanx';
|
||||||
const serverAdress = "https://qmining.tk/";
|
const serverAdress = "https://qmining.tk/";
|
||||||
|
|
||||||
// forcing pages for testing. unless you test, do not set these to true!
|
// forcing pages for testing. unless you test, do not set these to true!
|
||||||
|
@ -1325,13 +1330,19 @@ function ShowSaveQuizDialog(addedQ, allQ, allOutput, output, sendSuccess, sentDa
|
||||||
m: msg,
|
m: msg,
|
||||||
isSimple: true
|
isSimple: true
|
||||||
}, null, function() {
|
}, null, function() {
|
||||||
var towrite = '<h3>' + sentData.subj + '<br>TXT-ben nem szereplő kérdések: ' + addedQ + '/' + allQ + '</h3><br>' +
|
var towrite = '<h3>' + sentData.subj + '<br>TXT-ben nem szereplő kérdések: ' + addedQ + '/' +
|
||||||
|
allQ + '</h3><br>' +
|
||||||
output.replace(/\n/g, '<br>') + '<br><h3>Összes kérdés/válasz:</h3>' + allOutput.replace(
|
output.replace(/\n/g, '<br>') + '<br><h3>Összes kérdés/válasz:</h3>' + allOutput.replace(
|
||||||
/\n/g, '<br>');
|
/\n/g, '<br>');
|
||||||
|
|
||||||
var useNetDB = GM_getValue("useNetDB");
|
var useNetDB = GM_getValue("useNetDB");
|
||||||
if (useNetDB != undefined && useNetDB == 1)
|
if (useNetDB != undefined && useNetDB == 1) {
|
||||||
towrite += "</p>Elküldött adatok:</p> " + sentData;
|
try {
|
||||||
|
towrite += "</p>Elküldött adatok:</p> " + JSON.stringify(sentData);
|
||||||
|
} catch (e) {
|
||||||
|
towrite += "</p>Elküldött adatok:</p> " + sentData;
|
||||||
|
}
|
||||||
|
}
|
||||||
document.write(towrite);
|
document.write(towrite);
|
||||||
document.close();
|
document.close();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue