• Resolved uvireuvire

    (@uvireuvire)


    Hi,

    I’m using %QUESTION_ANSWER_INCORRECT% currently the results coming up as:

    Question: RANDOM QUESTION
    Answer Provided: aaaaaaaaa
    Correct Answer: bbbbbbbb
    Comments Entered: cccccccc

    Is there any way that I can disable “Correct Answer and Comment Entered” I would like people to see only their answer and the question which they have failed on.

    Question: RANDOM QUESTION
    Answer Provided: aaaaaaaaa

    I spend hours looking through the plugin files to remove it “Correct Answer and Comment Entered” or at least hide it with CSS but it just doesn’t work.

    I manage to hide:

    Answer Provided: aaaaaaaaa
    Correct Answer: bbbbbbbb
    Comments Entered: cccccccc

    so it only show the QUESTION where you failed I used CSS but this will hide the answe provided as well hmmm…

    I appreciate some pro developer to help out ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    Use %QUESTIONS_ANSWERS% template variable instead of the %QUESTION_ANSWER_INCORRECT% variable on the result page because you can customize the former variable as per your needs.

    By default, this template variable has 3 fields: Answer Provided, Correct Answer and User Comments.

    For this, go to ‘Text’ tab for the quiz settings and search for the below section I mentioned in the image. Just use, %QUESTION% & %USER_ANSWER% template variable in the textarea. You can choose from the allowed variables listed on the sidebar.

    https://drive.google.com/file/d/1C0c_ZZhtHqyUmKftxVf1dRdYGrdAv3aV/view?usp=sharing

    Regards,
    Kriti

    Thread Starter uvireuvire

    (@uvireuvire)

    Hello Kriti ??

    Thank you for your reply that is very usefull and good to know. The problem with this is that I wouldn’t want to show all the questions that the user has answered but only the questions that are classified as incorrect. Is there any way to disable or hide “Correct Answer and User Comments” from default? I tried to locate the file within the plugin and perhaps take some code out that will remove these two fields or apply CSS to take it off?

    Example of what I have done:

    div class=”q-a-div”>%QUESTION_ANSWER_INCORRECT%</div>

    I wrapped this with a div class and used the CSS for:

    .q-a-div {
    border: 1px solid red;
    padding: 8px;
    }

    .q-a-div,
    span {
    text-decoration: none;
    color: green;
    }

    .q-a-div,
    p {
    text-decoration: none;
    color: #008CBA;
    }

    .q-a-div,
    text {
    text-decoration: none;
    color: #c4ff0e;
    }

    Just through to share this, might help some people with a little bit of styling I will try to use Jquery or Java Script to (hide or remove specific text “Correct Answer and User Comments” within the DIV) and hopefully this will help.

    I will be ok from now on and if I do find a solution I will share on this forum ??

    Many thanks for your help anyway,

    Example link to show you what this look like:
    EXAMPLE

    • This reply was modified 4 years, 10 months ago by uvireuvire.

    Hi,

    I am sorry but customising Question_Answer_Incorrect variable is not possible right now. Please do share a workaround with us also if you find the solution to it.

    Regards,
    Kriti

    Thread Starter uvireuvire

    (@uvireuvire)

    Hi,

    I manage to customise the Question_Answer_Incorrect and remove the “Correct Answer and User Comments” please find solution below:

    OUTCOME EXAMPLE

    Example where to place the code:
    https://ibb.co/mRJbbLZ

    <script>
    
    const div = document.querySelector('.qsm-results-page');
    div.innerHTML = div.innerHTML.replace(/(Correct Answer: %CORRECT_ANSWER%|Comments Entered: %USER_COMMENTS%)/gi, '');
    
    </script>

    Place the code into:
    quiz-master-next/php/classes/class-qsm-results-pages.php

    PS: This could work as potential new feature, you can basically remove any text from the result page or customize anything within the result page.

    • This reply was modified 4 years, 10 months ago by uvireuvire.

    Thank you for sharing this valuable piece of information.

    Regards,
    Kriti

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘%QUESTION_ANSWER_INCORRECT%’ is closed to new replies.