Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64465

Incorrect context passed to format_string in some question types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.5.5, 3.6.3
    • 3.5.3, 3.6.1, 3.7
    • Questions
    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • Hide
      1. Create a quiz with a matching questions, where the match answers use the mutlilang filter. (e.g. choice '<span lang="en" class="multilang">Cat</span> <span lang="fr" class="multilang">Chat</span>'
      2. At system level, set Multilang filter to be 'Off, but available', and apply to 'content and headings'.
      3. At the system level setĀ filter_multilang_force_old to 'Off'
      4. In Quiz context, set Multilang filter to 'On'.
      5. View the quiz.
      6. Verify that the multilang finter has worked on the choices - only one word in English should be shown.
      Show
      Create a quiz with a matching questions, where the match answers use the mutlilang filter. (e.g. choice '<span lang="en" class="multilang">Cat</span> <span lang="fr" class="multilang">Chat</span>' At system level, set Multilang filter to be 'Off, but available', and apply to 'content and headings'. At the system level setĀ filter_multilang_force_old to 'Off' In Quiz context, set Multilang filter to 'On'. View the quiz. Verify that the multilang finter has worked on the choices - only one word in English should be shown.

      While lookin into MDL-61286 I noticed that several question types call format_string with the wrong context. Questions belong (via question categories) to a particular context. However, they may be displayed in a different context, and it is the context where they are being displayed that should be used to control filters.

      (E.g. a question from the couse question bank may be displayed in a quiz. It is the quiz context that should be used for format_string. This is probably not the best example to show why this is importnat.)

            timhunt Tim Hunt
            timhunt Tim Hunt
            Damyon Wiese Damyon Wiese
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 32 minutes
                32m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.