Quiz admin can select mulitple view modes of question feedback

Created on 16 July 2021, about 3 years ago
Updated 26 August 2024, 12 days ago

Problem/Motivation

When quiz feedback is enabled in quiz settings to provide feedback after each question, the question text is rendered twice.

Steps to reproduce

Create quiz, add questions, add feedback to the quiz questions, enable feedback during the quiz. Start the quiz. You should get feedback after each question. The rendered view renders the question text twice. (See the screenshot).

Proposed resolution

The output is controlled in the alterBuild() function in the QuizResultAnswerViewBuilder.php file. It seems that the default view mode should be used to render the question, otherwise loop through custom view modes and use one of them to render it. It might be best to loop through custom view modes and if none are returned, use the default view mode.

Remaining tasks

Try a few different control structures. Test it out manually in quizzes.

User interface changes

Remove duplicated text from view.

API changes

Data model changes

πŸ“Œ Task
Status

Closed: works as designed

Version

6.0

Component

Code - Feedback/results

Created by

πŸ‡¬πŸ‡§United Kingdom andrew.farquharson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024