Translating answers and feedbacks

Created on 30 July 2013, over 11 years ago
Updated 6 September 2024, 4 months ago

Hello,

The answers and feedback in quiz module are not translatable by t(), for my website i kinda solved that issue for the answers by overriding the multichoice-alternative.tpl.php in my custom theme, but for the feedbacks it's not that easy!

I override the theme_multichoice_response($variables) in my template.php and used a t() there, but to make this work i have to open every feedback page, and in my case i have 3 quizzes each quiz have 10 to 12 questions each question have 3 answers and each answer have a feedback, so i had to use another way.

In the quiz_question.module i added this code:

foreach ($question->alternatives as $feedback) {
    $feedback['feedback_if_chosen'] = t($feedback['feedback_if_chosen']);
  }

in the end of the quiz_question_report_form($question, $showpoints, $showfeedback, $allow_scoring = FALSE) function, at least now just by doing a quick tour on the questions the t() will work on all feedbacks. i know this is not the best solution i hope you guys help with another one.

Thanks

✨ Feature request
Status

Closed: outdated

Version

4.0

Component

Code - Multichoice

Created by

πŸ‡―πŸ‡΄Jordan issa.haddadin

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.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    With D7 approaching EOL soon I've started the process of triaging the D7queue here. Since there hasn't been any movement on this was going to close out but wanted to see if anyone wanted to pick up.

  • Status changed to Closed: outdated 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Since there hasn't been a follow up going to close out

Production build 0.71.5 2024