Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Answer is highlighted #64

Open
fishingman opened this issue Jan 8, 2015 · 3 comments
Open

Answer is highlighted #64

fishingman opened this issue Jan 8, 2015 · 3 comments
Labels

Comments

@fishingman
Copy link

In slickquiz.js,

preventUnanswered: true,
tryAgainText: 'tryagain',
perQuestionResponseMessaging: true,

Is set as, after finished answer the quiz, and are solved again quiz, if nothing was answer without selecting a choice, will somehow correct answer is highlighted.
We appreciate your prompt attention to this matter.

default

1

2

4

@fishingman fishingman changed the title Answer is highlighted 【BUG】Answer is highlighted Jan 8, 2015
@jewlofthelotus
Copy link
Owner

@fishingman can you confirm that you have the latest version of SlickQuiz? v1.5.20? It would say at the top of the slickquiz.js file.

@jewlofthelotus jewlofthelotus changed the title 【BUG】Answer is highlighted Answer is highlighted Jan 14, 2015
@fishingman
Copy link
Author

I was able to confirm the version of Slickquiz.
Version of slickquiz that bug has occurred is the latest 1.5.20.

@louposk
Copy link

louposk commented Apr 16, 2015

You can move the following lines of code:

// Collect the answers submitted
                var selectedAnswers = [];
                answerSelects.each( function() {
                    var id = $(this).attr('id');
                    selectedAnswers.push(parseInt(id.replace(/(.*\_question\d{1,}_)/, ''), 10));
                });


                 if (plugin.config.preventUnanswered && selectedAnswers.length === 0) {
                    alert(plugin.config.preventUnansweredText);
                    return false;
                }

after this (around line 429):

answerLIs.addClass(incorrectResponseClass);

This one, first check if the option is check and if it passes then it collects the true answers.
This worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants