mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Added some logging on certain exceptions
This commit is contained in:
parent
6ec179fdf9
commit
ac20abbb69
1 changed files with 11 additions and 5 deletions
16
main.js
16
main.js
|
@ -22,8 +22,7 @@
|
||||||
|
|
||||||
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 =
|
const lastChangeLog = ''; // TODO
|
||||||
'- Passzív mód: ha bepipálod a menü gomb alatt, akkor nem tölti be minden alkalommal a kérdéseket (csak csendben vár).\n - Pár lényeges bugfix\n - Ha találkoztok bugokkal, 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!
|
||||||
|
@ -522,6 +521,7 @@ class ResultsPageModell {
|
||||||
currQuestion = this.GetCurrQuestion(i);
|
currQuestion = this.GetCurrQuestion(i);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
currQuestion = "REEEEEEEEEEEEEEEEEEEEE"; // this shouldnt really happen sry guys
|
currQuestion = "REEEEEEEEEEEEEEEEEEEEE"; // this shouldnt really happen sry guys
|
||||||
|
Log("Unable to get question in GetQuestionFromResult");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1055,7 +1055,9 @@ var AlertOnNoQuestion = (i) => {
|
||||||
try {
|
try {
|
||||||
if (i >= data.length)
|
if (i >= data.length)
|
||||||
document.getElementById("HelperMenuButton").style.background = "yellow";
|
document.getElementById("HelperMenuButton").style.background = "yellow";
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
Log("Unable to get helper menu button");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//: }}}
|
//: }}}
|
||||||
|
@ -1068,7 +1070,9 @@ function HandleUI(url, count, subjCount) {
|
||||||
try // try, cus im suspicious
|
try // try, cus im suspicious
|
||||||
{
|
{
|
||||||
newVersion = GM_info.script.version !== GM_getValue("lastVerson");
|
newVersion = GM_info.script.version !== GM_getValue("lastVerson");
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
Log("Some weird error trying to set new verison");
|
||||||
|
}
|
||||||
var greetMsg = ""; // message to show at the end
|
var greetMsg = ""; // message to show at the end
|
||||||
var timeout = null; // the timeout. if null, it wont be hidden
|
var timeout = null; // the timeout. if null, it wont be hidden
|
||||||
// no new version, nothing loaded
|
// no new version, nothing loaded
|
||||||
|
@ -1292,7 +1296,9 @@ function GetImageFormResult(i) {
|
||||||
temp = JSON.stringify(imgURL);
|
temp = JSON.stringify(imgURL);
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
} catch (e) {}
|
} catch (e) {
|
||||||
|
Log("Couldn't get images from result");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// saves the current quiz. questionData contains the active subjects questions
|
// saves the current quiz. questionData contains the active subjects questions
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue