Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-34696 enrol improvements 2.4 META
  3. MDL-35061

add more custom fields into enrol table

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide

      1/ do fresh install - nothing new expected
      2/ do upgrade from 2.3 - new fields expected

      I suppose that CI is going to compare the structure after upgrade automatically. No other testing should be necessary, the enrol code was designed to cope with any number of custom parameters.

      Show
      1/ do fresh install - nothing new expected 2/ do upgrade from 2.3 - new fields expected I suppose that CI is going to compare the structure after upgrade automatically. No other testing should be necessary, the enrol code was designed to cope with any number of custom parameters.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w35_MDL-35061_m24_enrolfields

      Description

      The problem is that some plugins need more information storage. There are two solutions:

      1/ either add new table such as enrol_self which joins the current enrol table - easier to implement, better for performance, 100% BC
      2/ deprecate custom fields in enrol table and start creating extra tables for each enrol plugin that contains instance info - cleaner solution, major backwards compatibility problems, caching problems

      Historically I implemented 1/ during the migration from 1.9 because I wanted to move the enrol info away from course table and this was the safest way. At that time it also significantly helped with performance because the core can prefetch the enrol instance records and pass them around.

      I have discussed this with Eloy and I guess we agree that we should do 1/ now and delay the decision for 2/ later.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                skodak Petr Skoda
                Reporter:
                skodak Petr Skoda
                Integrator:
                Eloy Lafuente (stronk7)
                Tester:
                Eloy Lafuente (stronk7)
                Participants:
                Component watchers:
                Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

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