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

No Sections created in Database Enrolment when not using a Template course

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.3.6, 3.4.3
    • 3.3.4, 3.4.1
    • Enrolments
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MDL-61265-master
    • Hide

      Set up

      • Access as an admin.
      • Go to Site Administration -> Plugins -> Manage Enrol Plugins and enable external database.
      • Click settings next to "External Database" . Fill in the details for external database course sync.
      • Go to Site administration -> Courses -> Course default settings and change the "Number of sections" to 5.
      • Go to Site administration -> Courses -> Course default settings and ensure the "Format" is "Topics format".

      Testing scenario

      1) In the remote database, add a record that contains a value for course column that does not exists in Moodle, so that you can trigger creation of the course.

      2) From command line, execute "/usr/bin/php /path/to/moodle/enrol/database/cli/sync.php".

      • Check the newly created course has exatcly 5 sections. 
      Show
      Set up Access as an admin. Go to Site Administration -> Plugins -> Manage Enrol Plugins and enable external database. Click settings next to "External Database" . Fill in the details for external database course sync. Go to Site administration -> Courses -> Course default settings and change the "Number of sections" to 5. Go to Site administration -> Courses -> Course default settings and ensure the "Format" is "Topics format". Testing scenario 1) In the remote database, add a record that contains a value for course column that does not exists in Moodle, so that you can trigger creation of the course. 2) From command line, execute "/usr/bin/php /path/to/moodle/enrol/database/cli/sync.php". Check the newly created course has exatcly 5 sections. 

      When courses are created through Database Enrolment, with no Template course, no Sections (Topics) are created in the course. This is unlike creating a course manually where the site-wide configured default number of sections are created.

      Steps to reproduce:

      • Check Site Administration -> Courses -> Course Default Settings
        • Format: Topics Format
        • Number of Sections: 20 (or default 4, or any number greater than zero)
      • Set up Database Enrolment to create a new course on sync as per Database Enrolment: Creating Courses testing processes
        • Under Site Administration -> Plugins -> Enrolments -> External database, check:
          • Creation of new courses -> New Course Template: (empty)
      • Run Database Enrolment sync (CLI: php /path/to/moodle/enrol/database/cli/sync.php -v)

      Expected Result:

      • New course created with 20 empty sections

      Actual Result:

      • New course created with only the header section (section zero)

            sarjona Sara Arjona (@sarjona)
            tbigby Tony Bigby
            Carlos Escobedo Carlos Escobedo
            Andrew Lyons Andrew Lyons
            Zig Tan Zig Tan (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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