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

Automatically-created future courses show up in the "Past Courses" section of the new Course Overview block

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.3, 3.4, 3.5
    • Fix Version/s: 3.3.5, 3.4.2
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      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 ensure "Course end date enabled by default" is checked (only Moodle 3.4 onwards)
      • Go to Site administration -> Courses -> Course default settings and ensure the "Course duration" is 365 

      Testing scenario 1

      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:

      • Course start date is set to the date when the cron job was executed and the sync took place
      • Moodle 3.3: Course end date is set to today's date and is disabled
      • Moodle 3.4 onwards: Course end date is set to today's date + one year and is enabled

      Testing scenario 2

      1) As an admin, go to Site administration -> Courses -> Course default settings and uncheck "Course end date enabled by default" (only Moodle 3.4 onwards).

      2) 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.

      3) From command line, execute "/usr/bin/php /path/to/moodle/enrol/database/cli/sync.php". Check the newly created course:

      • Course start date is set to the date when the cron job was executed and the sync took place
      • Course end date is set to today's date and is disabled

       

      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 ensure "Course end date enabled by default" is checked (only Moodle 3.4 onwards) Go to Site administration -> Courses -> Course default settings and ensure the "Course duration" is 365  Testing scenario 1 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: Course start date is set to the date when the cron job was executed and the sync took place Moodle 3.3: Course end date is set to today's date and is disabled Moodle 3.4 onwards: Course end date is set to today's date + one year and is enabled Testing scenario 2 1) As an admin, go to Site administration -> Courses -> Course default settings and uncheck "Course end date enabled by default" (only Moodle 3.4 onwards). 2) 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. 3) From command line, execute "/usr/bin/php /path/to/moodle/enrol/database/cli/sync.php". Check the newly created course: Course start date is set to the date when the cron job was executed and the sync took place Course end date is set to today's date and is disabled  
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-61081-master

      Description

      When our Moodle courses are automatically created by the Database enrollment module, they're created with a startdate of 0 and an enddate of the epoch. As a result, they all show up in the users' "Past Courses" until the dates are manually adjusted.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              farhan6318 Farhan Karmali
              Reporter:
              smily03 Chris Myers
              Peer reviewer:
              Sara Arjona (@sarjona)
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Zig Tan (Inactive)
              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:
              13 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                19/Mar/18