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

Bulk User Actions with TextArea Profile Field Download issue

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.3.4, 2.4.4
    • BACKEND
    • Administration
    • MOODLE_23_STABLE, MOODLE_24_STABLE

    Description

      In order for bulk download of users to work when there is a text area user profile field a change is needed to the textarea.

      First, create a User Profile Field of type "textarea".
      Then, go to:
      Site Admin > Users > Accounts > Bulk User Actions

      Select a collection of users, then go to "With selection of users..." > Download
      And pick the Excel type

      The current core functionality will download as:
      profile_field_comments
      Array
      Array
      Array
      Array
      Array
      Array

      Instead of the content of the text area. If you make the following change to
      /user/profile/field/textarea/field.class.php
      It resolves the issue (commented line is the current code, and the line below it is the proposed replacement)

      function edit_load_user_data($user) {
      if ($this->data !== NULL) {
      $this->data = clean_text($this->data, $this->dataformat);
      //$user->{$this->inputname} = array('text'=>$this->data, 'format'=>$this->dataformat);
      $user->{$this->inputname} = $this->data;
      }
      }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              clalande Chris Lalande
              David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: