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

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.4
    • Enrolments
    • MOODLE_23_STABLE
    • MOODLE_24_STABLE
    • w35_MDL-35061_m24_enrolfields
    • 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.

    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

              skodak Petr Skoda
              skodak Petr Skoda
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3/Dec/12