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

Report columns containing custom fields not setting correct context

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0
    • 4.0.1
    • 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

    Description

      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)

      Attachments

        Activity

          People

            pholden Paul Holden
            pholden Paul Holden
            David Matamoros David Matamoros
            Ilya Tregubov Ilya Tregubov
            Gladys Basiana Gladys Basiana
            Carlos Castillo, David Matamoros, Mikel Martín Corrales, Paul Holden
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              9/May/22

              Time Tracking

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