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

Error when exporting calculated questions containing feedback files

XMLWordPrintable

    • MOODLE_402_STABLE
    • MOODLE_402_STABLE
    • Hide
      1. Log in as admin
      2. Create a course
      3. Navigate to question bank
      4. Create new question of type "Calculated simple"
        • Enter name/text (content doesn't matter)
        • Answer 1 formula: {x}*2
        • Grade: 100%
        • Feedback: Upload a picture
      5. Press Blanks for 1 more answers
        • Answer 2 formula: {x}*3
        • Feedback: Upload a different picture
      6. Press Find the wild cards... button
      7. Press Generate
      8. Press Save changes
      9. From question listing, select Edit > Download as Moodle XML from the Actions column of your question
      10. Confirm there are no errors
      11. Open downloaded XML file
      12. Confirm presence of <file> element in XML for each answer
      Show
      Log in as admin Create a course Navigate to question bank Create new question of type "Calculated simple" Enter name/text (content doesn't matter) Answer 1 formula: {x}*2 Grade: 100% Feedback: Upload a picture Press Blanks for 1 more answers Answer 2 formula: {x}*3 Feedback: Upload a different picture Press Find the wild cards... button Press Generate Press Save changes From question listing, select Edit > Download as Moodle XML from the Actions column of your question Confirm there are no errors Open downloaded XML file Confirm presence of <file> element in XML for each answer

      Seems to be a regression from MDL-77328, given the $answer->feedbackfiles property was removed

      Trying to export a question type such as "Calculated simple" fails with the following error:

      Warning: Undefined property: stdClass::$feedbackfiles in /var/www/html/question/format/xml/format.php on line 1451
       
      Warning: Undefined property: stdClass::$feedbackfiles in /var/www/html/question/format/xml/format.php on line 1451
       
      Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/question/format/xml/format.php:1451) in /var/www/html/lib/filelib.php on line 2549
      

            pholden Paul Holden
            pholden Paul Holden
            Tim Hunt Tim Hunt
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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