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

Improve mod_data link processing for backup



      mod_data is used as a highly customizable activity. Courses and presets are widely shared between users.

      To hide some of the parts that might confuse from the students, trainers often set direct links to pages that allow to add an entry or something similar.

      If you do a course backup, these links do not completely get processed by the backup to link to the new id of the database or entry. This leads to an unnecessary manual workload for the trainers.


      Steps to reproduce:

      1. Create a course and a database activity.
      2. Choose "Image gallery preset" (this is just to speed up the test, behavior is the same for every database).
      3. Go to the "New entry" page and copy the url up to the part "?d=.." ("https://.../mod/data/edit.php?d=1")
      4. Add a label including a link to that page.
      5. Do a course backup including at least the database and the label.
      6. Restore the backup to a new course (this also happens if you restore to an existing course).
      7. Click the link in the label. It will point to the database activity in the "old" course instead of the new one.


      Expected behavior:

      The link should be processed by backup/restore to point to the restored database activity (as other links, e.g. to view.php do).


      Proposed solution:

      Add new rules to backup / restore in mod_data to match at least the most widely used functions.

            Unassigned Unassigned
            stefan.hanauska Stefan Hanauska
            0 Vote for this issue
            5 Start watching this issue


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