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

Duplicate a course multiple times.

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.6.1
    • Fix Version/s: None
    • Component/s: Course
    • Labels:
      None
    • Affected Branches:
      MOODLE_26_STABLE

      Description

      In working on integration with an external student database for a Catalyst client, I needed to take a template course and make multiple copies of it.
      The current duplicate_course function works by making a backup of a course and restoring it into the new course. This patch seeks to streamline the process a little for multiple courses by doing one backup and multiple restores from that backup.
      It looks like there is still much room for improvement - doing 1100 copies of an empty template took just over 2 hours on my development machine, with later copies taking much longer than earlier ones (O(n^2) algo somewhere?). If I find time, I'll try to see what can be done to improve things further.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              nigelccatalyst Nigel Cunningham
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: