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

Include user details in records exported from Database activity

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7, 2.4
    • Fix Version/s: 2.4
    • Labels:
      None
    • Database:
      Any
    • Testing Instructions:
      Hide

      In a course with at least one student enrolled, log in as teacher or admin and do the following:

      • Create a database activity with approval activated
      • Add one text field ("Test Text")
      • Add the standard list templates
      • Create one database entry
      • Log in as the student, create another database entry
      • Log back in as teacher, open the database export screen
      • Select all four boxes "Test Text", "Include user details", "Include time added/modified", "Include approval status"
      • Click "Export"

      VERIFY: Output data contains columns as follows:

      • Test Text
      • User (filled with user fullname)
      • Username
      • Email
      • Time added
      • Time modified
      • Approval (must be 0 for the student's entry and 1 for the teacher's entry)

      Do the above export steps for CSV format as well as ODS format.

      Show
      In a course with at least one student enrolled, log in as teacher or admin and do the following: Create a database activity with approval activated Add one text field ("Test Text") Add the standard list templates Create one database entry Log in as the student, create another database entry Log back in as teacher, open the database export screen Select all four boxes "Test Text", "Include user details", "Include time added/modified", "Include approval status" Click "Export" VERIFY: Output data contains columns as follows: Test Text User (filled with user fullname) Username Email Time added Time modified Approval (must be 0 for the student's entry and 1 for the teacher's entry) Do the above export steps for CSV format as well as ODS format.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      When records are exported from the Database, only the user-defined fields are exported. User details that may be shown in 'View list' mode using ##user## are not exported.

      These patches add an option to the export page to include the user details (full name and email address) as the first two fields in the output file.

        Gliffy Diagrams

          Attachments

          1. data.php.patch
            0.8 kB
          2. database.png
            database.png
            45 kB
          3. export_form.php.patch
            1 kB
          4. export.php.patch
            2 kB

            Issue Links

              Activity

                People

                • Votes:
                  4 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12