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

[IMP] website_slides: display comments of correct answers in submitted quiz #162180

Conversation

khpa-odoo
Copy link
Contributor

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

@robodoo
Copy link
Contributor

robodoo commented Apr 17, 2024

Pull request status dashboard.

@C3POdoo C3POdoo added the RD research & development, internal work label Apr 17, 2024
@khpa-odoo khpa-odoo force-pushed the master-imp-elearning-add-comments-to-submitted-quiz-khpa branch 2 times, most recently from 8dad059 to 47a3233 Compare April 19, 2024 06:57
Copy link
Contributor

@ibo-odoo ibo-odoo left a 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"/>
Copy link
Contributor

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.

Copy link
Contributor

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'}">
Copy link
Contributor

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"/>
Copy link
Contributor

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']"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here for this.

@khpa-odoo khpa-odoo force-pushed the master-imp-elearning-add-comments-to-submitted-quiz-khpa branch from 47a3233 to ab63283 Compare April 25, 2024 06:01
@khpa-odoo
Copy link
Contributor Author

@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')">
Copy link
Contributor

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.

@khpa-odoo khpa-odoo force-pushed the master-imp-elearning-add-comments-to-submitted-quiz-khpa branch from ab63283 to 5bdae2b Compare April 25, 2024 11:01
@khpa-odoo
Copy link
Contributor Author

@ibo-odoo Applied the changes 👍

@khpa-odoo khpa-odoo force-pushed the master-imp-elearning-add-comments-to-submitted-quiz-khpa branch from 5bdae2b to 57e5d30 Compare April 25, 2024 11:18
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
@khpa-odoo khpa-odoo force-pushed the master-imp-elearning-add-comments-to-submitted-quiz-khpa branch from 57e5d30 to 41eb80a Compare April 25, 2024 11:21
@khpa-odoo khpa-odoo changed the title [IMP] website_slides: add comments of correct answers in submitted quiz [IMP] website_slides: display comments of correct answers in submitted quiz Apr 25, 2024
@awa-odoo awa-odoo marked this pull request as ready for review June 3, 2024 09:30
@awa-odoo
Copy link
Contributor

awa-odoo commented Jun 3, 2024

@robodoo r+

@C3POdoo C3POdoo requested a review from a team June 3, 2024 09:45
robodoo pushed a commit that referenced this pull request Jun 3, 2024
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>
@robodoo robodoo closed this Jun 3, 2024
@robodoo robodoo added the 17.4 label Jun 3, 2024
meji-odoo pushed a commit to odoo-dev/odoo that referenced this pull request Jun 6, 2024
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
17.4 RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants