Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Button EXPLANATION
(1 viewing) (1) Guest
component
Go to bottomPage: 12
TOPIC: Button EXPLANATION
#61418
Button EXPLANATION 6 Years, 6 Months ago Karma: 2
Hello!
On my site in the quiz settings I use the parameter "SHOWEXPLANATION - YES"
When you activate this setting, a "Show Correct Answer" button appears in the questions.
When you click it, a table appears with the correct answers and an explanation (if any)

I want to modify the code for this page to get the following:

1. After clicking on the "Show Correct Answer" button, output only the explanation, without tables of answers.
2. When the explanation is displayed, the other answer button to the question should be inactive or hidden, because pressing it will still result in an error. in this dialogue one can not make a choice.

What changes should I make in the code? Can you help me with this?
Thank you.
The administrator has disabled public write access.
 
#61428
Re:Button EXPLANATION 6 Years, 6 Months ago Karma: 747
Hello,

It requires modification of <joomla_directory>/components/com_ariquiz/assets/questions.js file.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#61429
Re:Button EXPLANATION 6 Years, 6 Months ago Karma: 2
I already understood this, but what code should I change?
My file questions.js is any custom and unpacked (you sent it to me).
Last Edit: 2017/10/03 21:30 By stepan39.
The administrator has disabled public write access.
 
#61431
Re:Button EXPLANATION 6 Years, 6 Months ago Karma: 747
See "_showCorrectAnswer" method.

Regards,
ARI Soft
The administrator has disabled public write access.
 
#61432
Re:Button EXPLANATION 6 Years, 6 Months ago Karma: 2
&#1054;&#1082;.

On 1 task everything turned out, I commented out the lines
Code:

'details': Q.statistics.getStatistics(result, true, true, this.extraParams),
'resultMessage': result.IsCorrect ? LM.getMessage('COM_ARIQUIZ_RESULT_CORRECTANSWER') : LM.getMessage('COM_ARIQUIZ_RESULT_INCORRECTANSWER'),
'resultClass': result.IsCorrect ? 'aq-answer-correct' : 'aq-answer-incorrect',



Will you help me solve 2 task?

2. When the explanation is displayed, the other answer button to the question should be inactive or hidden, because pressing it will still result in an error. in this dialogue one can not make a choice.
The administrator has disabled public write access.
 
#61446
Re:Button EXPLANATION 6 Years, 6 Months ago Karma: 747
If you want to disable all questions except a question with explanation, you can add a CSS class to quiz container element (for example aq-has-explanation) and add the following CSS rule:

Code:


.aq-has-explanation .aq-question-panel:not(.aq-show-answer) .aq-question-panel-content::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: block;
    content: " ";
}



Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 12