Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var getAnswer = function(a, b, c) {
- return {
- equal: true,
- messages: []
- }
- };
- window.dmKAS.compare = getAnswer;
- window.dmKAS.compareMany = getAnswer;
- var submitAnswer = function() {
- min = $('body > app-root > student > div.main.container > problem > problem-toolbar > div.col-md-9.student-progress.paper-shadow > span:nth-child(1) > span:nth-child(1) > b').html();
- min = parseFloat(min.substring(2, min.length));
- score = $('body > app-root > student > div.main.container > problem > problem-toolbar > div.col-md-9.student-progress.paper-shadow > span:nth-child(1) > span:nth-child(2)').html();
- score = parseFloat(score.substring(6, score.length));
- console.log('min ', min);
- console.log('score ', score);
- if (score < min) {
- console.log(score + ' is less than ' + min + ', going to next problem.');
- $('#next-problem-student').trigger('click');
- //Click Submit
- $('submit-button:visible').children().trigger('click');
- setTimeout(function() {
- $('body > modal-overlay > bs-modal-container > div > div > modal-content > modal-footer > div > button.btn.btn-primary').trigger('click')
- }, 2500);
- $('#next-problem-student').trigger('click');
- } else {
- console.log(score + ' is greater than ' + min + ', going back.');
- $('body > app-root > student > div.main.container > problem > problem-toolbar > div:nth-child(1) > back-button > button').trigger('click')
- }
- };
- interval = setInterval(submitAnswer, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement