-
Notifications
You must be signed in to change notification settings - Fork 23.2k
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
[IMP] website_slides: display comments of correct answers in submitted quiz #162180
[IMP] website_slides: display comments of correct answers in submitted quiz #162180
Conversation
8dad059
to
47a3233
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khpa-odoo Left few comments.
Note - Can achieve this using a JS file, but will likely encounter increased code complexity and some sort of code duplication. However, for now, will stick with the provided fix.
@@ -27,10 +27,12 @@ | |||
</label> | |||
<span t-esc="answer.text_value"/> | |||
</a> | |||
<t t-if="widget.slide.completed and answer.is_correct" t-set="correct_answer_comment" t-value="answer.comment"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need some specific name for t-set
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@khpa-odoo My bad. correct_answer_comment
would be better.
</t> | ||
<div class="o_wslides_quiz_answer_info list-group-item list-group-item-info d-none"> | ||
<div t-attf-class="o_wslides_quiz_answer_info list-group-item list-group-item-info #{ correct_answer_comment ? '' : 'd-none'}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove white space
<i class="fa fa-info-circle"/> | ||
<span class="o_wslides_quiz_answer_comment ms-2"/> | ||
<span t-if="correct_answer_comment" t-esc="correct_answer_comment"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to add a new span here. And use t-out
.
@@ -527,10 +527,12 @@ | |||
</label> | |||
<span t-esc="answer['text_value']"/> | |||
</a> | |||
<t t-if="slide_completed and answer['is_correct']" t-set="correct_answer_comment" t-value="answer['comment']"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here for this.
47a3233
to
ab63283
Compare
@ibo-odoo Applied the changes 👍 |
</t> | ||
<div class="o_wslides_quiz_answer_info list-group-item list-group-item-info d-none"> | ||
<div t-att-class="'o_wslides_quiz_answer_info list-group-item list-group-item-info %s' % ('' if comment_on_correct_answer else 'd-none')"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be better to use t-attf here.
ab63283
to
5bdae2b
Compare
@ibo-odoo Applied the changes 👍 |
5bdae2b
to
57e5d30
Compare
This commit enhances the user experience by making comments or explanations for correct answers of a quiz always accessible even after the quiz has been completed. This change is made in order to facilitate the users to review the comments later at anytime. Task-3847997
57e5d30
to
41eb80a
Compare
@robodoo r+ |
This commit enhances the user experience by making comments or explanations for correct answers of a quiz always accessible even after the quiz has been completed. This change is made in order to facilitate the users to review the comments later at anytime. Task-3847997 closes #162180 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit enhances the user experience by making comments or explanations for correct answers of a quiz always accessible even after the quiz has been completed. This change is made in order to facilitate the users to review the comments later at anytime. Task-3847997 closes odoo#162180 Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This PR enhances the user experience by making comments or explanations for correct answers of a quiz
always accessible even after the quiz has been completed.
This change is made in order to facilitate the users to review the comments later at anytime.
Task-3847997