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

Course startdate initially set to 0 when approving course requests

XMLWordPrintable

    • MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
    • MOODLE_33_STABLE, MOODLE_34_STABLE
    • MDL-37390-master
    • Easy
    • Hide

      Set up

      • Access as an admin
      • Go to Site Administration -> Courses -> Course request and ensure "Enable course requests" is checked
      • Go to Site administration -> Courses -> Course default settings and ensure "Course end date enabled by default" is checked
      • Go to Site administration -> Courses -> Course default settings and ensure the "Course duration" is 365 

      Testing scenario 1

      1. As a user, login to the site and navigate to the "All courses" page
      2. Request a course and fill in the details
      3. As an admin, go to Site Administration -> Courses -> Pending requests and approve the pending request for course
        • CHECK course start date is set to the date when the request was approved and course end date is set to today's date + one year
        • IMPORTANT: don't save course settings when approving it!!
      4. As an admin, go to Site administration -> Courses -> Course default settings and change the "Course duration" to 730 
      5. Login as the user who requested the course, go to the course settings.
        • CHECK course start date is set to the date when the request was approved and course end date is set to today's date + one year (because when the course was created, it was the default value for course creation)

      Testing scenario 2

      1. As an admin, go to Site administration -> Courses -> Course default settings and uncheck "Course end date enabled by default"
      2. As a user, login to the site and navigate to the "All courses" page
      3. Request a course and fill in the details
      4. As an admin, go to Site Administration -> Courses -> Pending requests and approve the pending request for course
        • CHECK course start date is set to the date when the request was approved and course end date is disabled
        • IMPORTANT: don't save course settings when approving it!!
      5. Login as the user who requested the course, go to the course settings.
        • CHECK course start date is set to the date when the request was approved and course end date is disabled
      Show
      Set up Access as an admin Go to Site Administration -> Courses -> Course request and ensure "Enable course requests" is checked Go to Site administration -> Courses -> Course default settings and ensure "Course end date enabled by default" is checked Go to Site administration -> Courses -> Course default settings and ensure the "Course duration" is 365  Testing scenario 1 As a user, login to the site and navigate to the "All courses" page Request a course and fill in the details As an admin, go to Site Administration -> Courses -> Pending requests and approve the pending request for course CHECK course start date is set to the date when the request was approved and course end date is set to today's date + one year IMPORTANT: don't save course settings when approving it!! As an admin, go to Site administration -> Courses -> Course default settings and change the "Course duration" to 730  Login as the user who requested the course, go to the course settings. CHECK course start date is set to the date when the request was approved and course end date is set to today's date + one year (because when the course was created, it was the default value for course creation) Testing scenario 2 As an admin, go to Site administration -> Courses -> Course default settings and uncheck "Course end date enabled by default" As a user, login to the site and navigate to the "All courses" page Request a course and fill in the details As an admin, go to Site Administration -> Courses -> Pending requests and approve the pending request for course CHECK course start date is set to the date when the request was approved and course end date is disabled IMPORTANT: don't save course settings when approving it!! Login as the user who requested the course, go to the course settings. CHECK course start date is set to the date when the request was approved and course end date is disabled

      Steps to reproduce

      • Approve a pending course request (course/pending.php)
      • Leave without saving changes in "Edit course settings" (course/edit.php)

      When approving a course request, some default settings are not set.
      For example, the course is created with mdl_course.startdate = 0.
      The start date gets set only when saving course settings.

      If the admin doesn't save course settings after approving a pending course request, the course's start date in the database is 1.1.1970 (startdate = 0)
      While this might work for moodle internally (Moodle shows today's date in edit course settings if startdate=0), it can create confusion for external systems.
      It would help if mdl_course.startdate timestamp was set to something more sensible, e.g. the course creation date when the course is created.

            farhan6318 Farhan Karmali
            schach Heiko Schach
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Helen Foster Helen Foster
            Votes:
            1 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

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