mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Added elearning unideb
This commit is contained in:
parent
603f77c81f
commit
b1e4f997c5
2 changed files with 13 additions and 16 deletions
|
@ -22,10 +22,9 @@
|
||||||
// @name Moodle/Elearning/KMOOC test help
|
// @name Moodle/Elearning/KMOOC test help
|
||||||
// @version DEVEL
|
// @version DEVEL
|
||||||
// @description Online Moodle/Elearning/KMOOC test help
|
// @description Online Moodle/Elearning/KMOOC test help
|
||||||
// @author Yout
|
// @author You
|
||||||
// @match https://elearning.uni-obuda.hu/*
|
// @match https://elearning.uni-obuda.hu/*
|
||||||
// @match https://qmining.frylabs.net/*
|
// @match https://qmining.frylabs.net/*
|
||||||
// @match http://qmining.frylabs.net/*
|
|
||||||
// @match file:///*
|
// @match file:///*
|
||||||
// @grant GM_getResourceText
|
// @grant GM_getResourceText
|
||||||
// @grant GM_info
|
// @grant GM_info
|
||||||
|
@ -35,9 +34,8 @@
|
||||||
// @grant GM_xmlhttpRequest
|
// @grant GM_xmlhttpRequest
|
||||||
// @grant GM_openInTab
|
// @grant GM_openInTab
|
||||||
// @require file:///{ELÉRÉSI ÚT IDE}
|
// @require file:///{ELÉRÉSI ÚT IDE}
|
||||||
// @namespace https://greasyfork.org/users/153067
|
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
(function() {
|
;(function () {
|
||||||
console.log('done')
|
console.log('done')
|
||||||
})();
|
})()
|
||||||
|
|
|
@ -46,12 +46,13 @@
|
||||||
// : Script header {{{
|
// : Script header {{{
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Moodle/Elearning/KMOOC test help
|
// @name Moodle/Elearning/KMOOC test help
|
||||||
// @version 2.1.3.0
|
// @version 2.1.3.1
|
||||||
// @description Online Moodle/Elearning/KMOOC test help
|
// @description Online Moodle/Elearning/KMOOC test help
|
||||||
// @author MrFry
|
// @author MrFry
|
||||||
// @match https://elearning.uni-obuda.hu/*
|
// @match https://elearning.uni-obuda.hu/*
|
||||||
// @match https://exam.elearning.uni-obuda.hu/*
|
// @match https://exam.elearning.uni-obuda.hu/*
|
||||||
// @match https://mooc.unideb.hu/*
|
// @match https://mooc.unideb.hu/*
|
||||||
|
// @match https://elearning.unideb.hu/*
|
||||||
// @match https://itc.semmelweis.hu/moodle/*
|
// @match https://itc.semmelweis.hu/moodle/*
|
||||||
// @match https://moodle.gtk.uni-pannon.hu/*
|
// @match https://moodle.gtk.uni-pannon.hu/*
|
||||||
// @match https://oktatas.mai.kvk.uni-obuda.hu/*
|
// @match https://oktatas.mai.kvk.uni-obuda.hu/*
|
||||||
|
@ -59,7 +60,7 @@
|
||||||
// @match https://szelearning.sze.hu/*
|
// @match https://szelearning.sze.hu/*
|
||||||
// @match https://moodle.kre.hu/*
|
// @match https://moodle.kre.hu/*
|
||||||
// @match https://moodle.pte.hu/*
|
// @match https://moodle.pte.hu/*
|
||||||
// @match https://portal.kgk.uni-obuda.hu/
|
// @match https://portal.kgk.uni-obuda.hu/*
|
||||||
// @noframes
|
// @noframes
|
||||||
// @match https://qmining.frylabs.net/*
|
// @match https://qmining.frylabs.net/*
|
||||||
// @run-at document-start
|
// @run-at document-start
|
||||||
|
@ -896,7 +897,6 @@
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const state = node.getElementsByClassName('state')[0]
|
const state = node.getElementsByClassName('state')[0]
|
||||||
// TODO: what if in english
|
|
||||||
if (state && state.innerText === 'Hibás') {
|
if (state && state.innerText === 'Hibás') {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -1114,15 +1114,14 @@
|
||||||
if (prevLength !== kkerdesElements.length) {
|
if (prevLength !== kkerdesElements.length) {
|
||||||
prevLength = kkerdesElements.length
|
prevLength = kkerdesElements.length
|
||||||
clearAllMessages()
|
clearAllMessages()
|
||||||
console.log('PL', prevLength, 'NL', kkerdesElements.length)
|
|
||||||
if (determineCurrentSite() === 'TEST') {
|
if (determineCurrentSite() === 'TEST') {
|
||||||
console.info('Handling quiz')
|
log('Handling quiz')
|
||||||
handleKGKQuiz(url)
|
handleKGKQuiz(url)
|
||||||
} else if (determineCurrentSite() === 'RESULT') {
|
} else if (determineCurrentSite() === 'RESULT') {
|
||||||
console.info('Handling results')
|
log('Handling results')
|
||||||
HandleKGKResults(url)
|
HandleKGKResults(url)
|
||||||
} else {
|
} else {
|
||||||
console.info('Handling UI')
|
log('Handling UI')
|
||||||
HandleUI()
|
HandleUI()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1144,7 +1143,7 @@
|
||||||
questions: [
|
questions: [
|
||||||
{
|
{
|
||||||
Q: simplifyKGKQuestionString(questionNode.innerText),
|
Q: simplifyKGKQuestionString(questionNode.innerText),
|
||||||
subj: 'asd',
|
subj: 'AVR',
|
||||||
data: { type: 'simple' },
|
data: { type: 'simple' },
|
||||||
possibleAnswers: answerNodes.map((node) => {
|
possibleAnswers: answerNodes.map((node) => {
|
||||||
return node.innerText
|
return node.innerText
|
||||||
|
@ -1370,7 +1369,7 @@
|
||||||
matchString: 'canvas',
|
matchString: 'canvas',
|
||||||
testPage: {
|
testPage: {
|
||||||
match: (url) => {
|
match: (url) => {
|
||||||
return true // TODO :insert real url
|
return false // TODO :insert real url
|
||||||
},
|
},
|
||||||
action: (url) => {
|
action: (url) => {
|
||||||
handleCanvasQuiz(url)
|
handleCanvasQuiz(url)
|
||||||
|
@ -1386,7 +1385,7 @@
|
||||||
},
|
},
|
||||||
default: {
|
default: {
|
||||||
match: (url) => {
|
match: (url) => {
|
||||||
return true // TODO :insert real url
|
return false // TODO :insert real url
|
||||||
},
|
},
|
||||||
action: (url) => {
|
action: (url) => {
|
||||||
HandleUI(url)
|
HandleUI(url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue