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

Report download (e.g. quiz responses) truncates response text after less-than sign

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 4.0.6
    • Libraries, Quiz
    • MOODLE_400_STABLE

      When downloading student quiz responses (under quiz settings:responses:download as csv/json), if the student response text contains a < sign in conjunction with some other characters, then the text of their response gets truncated from the < sign onwards.

      For example, if the student's answer is (read italicised text only please):

      if inputs["enemy_distance"]<10: return "Attack"

      then it gets downloaded as

      if inputs["enemy_distance"]

      i.e. losing everything after and including the < sign.

      Another example I saw:

      if random.random()<mutation_probability got truncated to if random.random()

      Some counterexamples I saw:

      if random.random()>mutation_probability did not get truncated (i.e.greater than sign not affected)
      if random.random() < mutation_probability did not get truncated (i.e. space before less than sign made bug disappear).

       

      Note that the full text displays correctly in the quiz settings:responses screen.  It's only when I download the text as csv or json that the bug manifests itself.  These bugs affected the CodeRunner question-type answers, but may affect other question types too?

       

            Unassigned Unassigned
            MichaelF Michael Fairbank
            Votes:
            14 Vote for this issue
            Watchers:
            15 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m

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