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

Bulk User Actions with TextArea Profile Field Download issue

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.3.4, 2.4.4
    • Administration
    • MOODLE_23_STABLE, MOODLE_24_STABLE

      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;
      }
      }

            Unassigned Unassigned
            clalande Chris Lalande
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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