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

possible enhancements to sync_metacourse

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 2.0
    • Component/s: Roles / Access
    • Labels:
      None
    • Database:
      Any
    • Affected Branches:
      MOODLE_17_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I think all the hard work can be done with a couple of database queries. The attached file is a reimplementation.

      This certainly runs without errors on Postgres. From reading the docs, I believe MySQL will undersand the two queries, but I have not had time to test yet. I see no reason why other databases should not cope with this SQL.

      I think it is doing the right thing, but it would definitely be good if people could code review this.

      It runs 10 or 100 times faster than the old code on some of our big metacourses. Manually assigning or unassigning a role in a child course went from 25 seconds to 1.5 on one of our courses. (For OU people, that was courseid 1111 on learnacct.)

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            timhunt Tim Hunt
            Tester:
            Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10