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

Report columns containing custom fields not setting correct context

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 4.0.1
    • 4.0
    • Report builder
    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to Courses > Course custom fields in site administration
      3. Create a new category if one doesn't already exist
      4. Create a field of each type:
        • Checkbox
        • Date and time
        • Dropdown menu
        • Short text
        • Text area
      5. Create a new course
        • Ensure all custom course fields are filled in
        • Ensure the text area field has an embedded image (use Insert or edit image)
      6. Navigate to Reports in user menu
      7. Create new report
        • Report source: Courses
        • Include default setup: No
      8. Add the Course > Course full name column
      9. Add each of your custom course fields as columns
      10. Confirm each column shows correct output
      11. Confirm the text area column shows embedded image
      Show
      Log in as admin Navigate to Courses > Course custom fields in site administration Create a new category if one doesn't already exist Create a field of each type: Checkbox Date and time Dropdown menu Short text Text area Create a new course Ensure all custom course fields are filled in Ensure the text area field has an embedded image (use Insert or edit image ) Navigate to Reports in user menu Create new report Report source: Courses Include default setup: No Add the Course > Course full name column Add each of your custom course fields as columns Confirm each column shows correct output Confirm the text area column shows embedded image

      When displaying custom fields (e.g. those from a course) in a report, we need to select the field context in order to format it

      We need the appropriate context specifically for the textarea custom field type to format it's output correctly: https://github.com/moodle/moodle/blob/f62cd4484e98b928b8f26d98022f25e48fd36464/customfield/field/textarea/classes/data_controller.php#L174-L177 (e.g. rewriting pluginfile URLs)

        1. Screenshot_2022-04-11 74479.png
          19 kB
          Paul Holden
        2. MDL-74479_Screenshot.png
          86 kB
          Gladys Basiana

            pholden Paul Holden
            pholden Paul Holden
            David Carrillo David Carrillo
            Ilya Tregubov Ilya Tregubov
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 20 minutes
                1h 20m

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