mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Changed test mode notification style
This commit is contained in:
parent
2297c37f10
commit
1a710fcd42
1 changed files with 6 additions and 4 deletions
10
main.js
10
main.js
|
@ -37,7 +37,7 @@ const motdShowCount = 3; /* Ammount of times to show motd */
|
||||||
var motd = "";
|
var motd = "";
|
||||||
var lastestVersion = "";
|
var lastestVersion = "";
|
||||||
|
|
||||||
const minMatchAmmount = 15; /* Minimum ammount to consider that two questions match during answering */
|
const minMatchAmmount = 60; /* Minimum ammount to consider that two questions match during answering */
|
||||||
const minResultMatchPercent = 99; /* Minimum ammount to consider that two questions match during saving */
|
const minResultMatchPercent = 99; /* Minimum ammount to consider that two questions match during saving */
|
||||||
const lengthDiffMultiplier = 10; /* Percent minus for length difference */
|
const lengthDiffMultiplier = 10; /* Percent minus for length difference */
|
||||||
|
|
||||||
|
@ -637,12 +637,12 @@ class MiscPageModell {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//: }}}
|
|
||||||
|
|
||||||
var QPM = new QuestionsPageModell();
|
var QPM = new QuestionsPageModell();
|
||||||
var RPM = new ResultsPageModell();
|
var RPM = new ResultsPageModell();
|
||||||
var MPM = new MiscPageModell();
|
var MPM = new MiscPageModell();
|
||||||
|
|
||||||
|
//: }}}
|
||||||
|
|
||||||
//: Main function {{{
|
//: Main function {{{
|
||||||
function Main() {
|
function Main() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
@ -691,7 +691,7 @@ function Main() {
|
||||||
console.timeEnd('main');
|
console.timeEnd('main');
|
||||||
|
|
||||||
if (forceTestPage || forceResultPage || forceDefaultPage)
|
if (forceTestPage || forceResultPage || forceDefaultPage)
|
||||||
alert("TEST MODE");
|
document.getElementById("scriptMessage").style.background = "green";
|
||||||
}
|
}
|
||||||
//: }}}
|
//: }}}
|
||||||
|
|
||||||
|
@ -1042,6 +1042,7 @@ function NLoad(resource, cwith) {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: move this
|
||||||
AlertOnNoQuestion(i);
|
AlertOnNoQuestion(i);
|
||||||
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -1627,6 +1628,7 @@ function ShowMessage(msgItem, timeout, funct) {
|
||||||
mainDiv.style.top = (startFromTop) + 'px';
|
mainDiv.style.top = (startFromTop) + 'px';
|
||||||
mainDiv.style.left = (window.innerWidth - width) / 2 + 'px';
|
mainDiv.style.left = (window.innerWidth - width) / 2 + 'px';
|
||||||
mainDiv.style.opacity = "0.9"; // setting starting opacity
|
mainDiv.style.opacity = "0.9"; // setting starting opacity
|
||||||
|
mainDiv.setAttribute("id", "scriptMessage");
|
||||||
var matchPercent = msgItem[0][0].p;
|
var matchPercent = msgItem[0][0].p;
|
||||||
if (isSimpleMessage) {
|
if (isSimpleMessage) {
|
||||||
var simpleMessageParagrapg = document.createElement("p"); // new paragraph
|
var simpleMessageParagrapg = document.createElement("p"); // new paragraph
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue