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

Option to include author information when importing entries into a database activity

XMLWordPrintable

    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • MDL-66496-master
    • Hide

      Setup:

      1. Login as a teacher
      2. Create a data instance
      3. Add a field and define templates (you should add ##user## to one
      4. Login as a student.
      5. Add some entries

      Test 1:

      1. Login as a teacher.
      2. Export the entries without user data.
      3. Import the same file.
      4. Check that the imported entries are authored by the teacher that imported the entries.

      Test 2:

      1. Login as a teacher.
      2. Export the entries with user data.
      3. Import the same file.
      4. Check that the imported entries are authored by the student.

      Test 3:

      1. Login as a teacher.
      2. Add another field called the same way as the Username field of one of the previous  tests.
      3. Export the entries with user data.
      4. Import the same file.
      5. Check that the imported entries are authored by the student.
      6. Check that the Username field of the entries is set correctly.

      Test 4:

      1. Login as a teacher.
      2. Add another field called the same way as the Username field of one of the previous  tests. (If not already done in Test 3)
      3. Export the entries without user data
      4. Import the same file
      5. Check that the imported entries are authored by the teacher.
      6. Check that the Username field of the entries is set correctly.

       

      Show
      Setup: Login as a teacher Create a data instance Add a field and define templates (you should add ##user## to one Login as a student. Add some entries Test 1: Login as a teacher. Export the entries without user data. Import the same file. Check that the imported entries are authored by the teacher that imported the entries. Test 2: Login as a teacher. Export the entries with user data. Import the same file. Check that the imported entries are authored by the student. Test 3: Login as a teacher. Add another field called the same way as the Username field of one of the previous  tests. Export the entries with user data. Import the same file. Check that the imported entries are authored by the student. Check that the Username field of the entries is set correctly. Test 4: Login as a teacher. Add another field called the same way as the Username field of one of the previous  tests. (If not already done in Test 3) Export the entries without user data Import the same file Check that the imported entries are authored by the teacher. Check that the Username field of the entries is set correctly.  

      Currently, when importing entries to a mod_data instance, it is possible to have the user metadata fields within the csv, but these fields are simply skipped.

      It would be nice, if the importer could use these fields, recognize the author of the entry and apply this information. I would suggest to use the username for the mapping to the user and use the same column names for identification as the exporter uses.

      About the corner cases:
      If no username is specified or the username does not belong to a valid user, the uploading user is used as an author.

      If a field is specified within the data instance, which has the same name as the Username field:

      1. And the uploaded file contains two username columns: The first is used for the username field and the second for the identification of the author.
      2. And the uploaded file contains only one username columns: The one entry is used for the username field. The uploading user is set as the author.

            justusdieckmann Justus Dieckmann
            tobias.reischmann Tobias Reischmann
            Jan Dageförde Jan Dageförde
            Andrew Lyons Andrew Lyons
            Janelle Barcega Janelle Barcega
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 46 minutes
                2h 46m

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