Result question getting bugfix

This commit is contained in:
YourFriendlyNeighborhoodDealer 2018-12-18 12:48:08 +01:00
parent 51ad5d7d4f
commit 7789c92f93
2 changed files with 3 additions and 1955 deletions

View file

@ -1033,7 +1033,7 @@ function HandleUI(url, count, subjCount) {
timeout = 5;
greetMsg = "Moodle/Elearning/KMOOC segéd v. " + GM_info.script.version + ". ";
if (GM_info.script.version != lastestVersion) {
if (lastestVersion != undefined && GM_info.script.version != lastestVersion) {
greetMsg += "Új verzió elérhető: " + lastestVersion + " ";
timeout = undefined;
}
@ -1147,7 +1147,7 @@ function ShowSaveQuizDialog(addedQ, allQ, allOutput, output, sendSuccess, sentDa
}
function SearchSameQuestion(questionData, quiz, i) {
var r = questionData.Search(quiz[i]);
var r = questionData.Search(quiz[i].Q);
return r.length == 0 ? -1 : r.length;
}
@ -1219,6 +1219,7 @@ function SaveQuiz(quiz, questionData) {
sentData.allData = quiz;
sentData.data = newQuestions;
sentData.subj = subj;
sentData.version = GM_info.script.version;
SendXHRMessage("datatoadd=" + JSON.stringify(sentData));
sendSuccess = true;
}