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

Let the admin control if the course end date form field in course settings is enabled by default

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Feature: Create one course manually

      Test A: Behavior in a fresh Moodle installation

      1. Set up a fresh Moodle instance
      2. Login as admin
      3. Go to Site administration -> Courses -> Course default settings
      4. Verify that the "Course end date enabled by default" checkbox is enabled
      5. Go to Site administration -> Courses -> Manage courses and categories
      6. Click "Create a new course"
      7. In the course settings form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration
      8. Add a course fullname and shortname
      9. Create the course
      10. Open the course settings again
      11. In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before.

      Test B: Course end date now disabled by default

      1. Login as admin
      2. Go to Site administration -> Courses -> Course default settings
      3. Disable the "Course end date enabled by default" checkbox
      4. Go to Site administration -> Courses -> Manage courses and categories
      5. Click "Create a new course"
      6. In the course settings form, you will see that the course end date is disabled (and preconfigured with today's date)
      7. Add a course fullname and shortname
      8. Create the course
      9. Open the course settings again
      10. In the course settings form, you will see that the course end date is still disabled.

      Test C: Course end date now enabled by default again

      1. Login as admin
      2. Go to Site administration -> Courses -> Course default settings
      3. Enable the "Course end date enabled by default" checkbox again
      4. Go to Site administration -> Courses -> Manage courses and categories
      5. Click "Create a new course"
      6. In the course settings form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration
      7. Add a course fullname and shortname
      8. Create the course
      9. Open the course settings again
      10. In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before.

      Feature: Course upload

      Test A: Behavior in a fresh Moodle installation

      1. Set up a fresh Moodle instance
      2. Login as admin
      3. Go to Site administration -> Courses -> Course default settings
      4. Verify that the "Course end date enabled by default" checkbox is enabled
      5. Go to Site administration -> Courses -> Upload courses
      6. Upload this code as a CSV file:

        shortname,fullname,category
        course1,Course upload test 1,1
        

      7. Click "Preview"
      8. In the following form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration
      9. Click "Upload courses"
      10. Click "Continue"
      11. Go /course/view.php?name=course1 (i.e. the newly created course)
      12. Open the course settings
      13. In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before.

      Test B: Course end date now disabled by default

      1. Login as admin
      2. Go to Site administration -> Courses -> Course default settings
      3. Disable the "Course end date enabled by default" checkbox
      4. Go to Site administration -> Courses -> Upload courses
      5. Upload this code as a CSV file:

        shortname,fullname,category
        course2,Course upload test 2,1
        

      6. Click "Preview"
      7. In the following form, you will see that the course end date is disabled (and preconfigured with today's date)
      8. Click "Upload courses"
      9. Click "Continue"
      10. Go /course/view.php?name=course (i.e. the newly created course)
      11. Open the course settings
      12. In the course settings form, you will see that the course end date is still disabled and set to the course end date which you have set it before.

      Test C: Course end date now enabled by default again

      1. Login as admin
      2. Go to Site administration -> Courses -> Course default settings
      3. Enable the "Course end date enabled by default" checkbox again
      4. Go to Site administration -> Courses -> Upload courses
      5. Upload this code as a CSV file:

        shortname,fullname,category
        course3,Course upload test 3,1
        

      6. Click "Preview"
      7. In the following form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration
      8. Click "Upload courses"
      9. Click "Continue"
      10. Go /course/view.php?name=course3 (i.e. the newly created course)
      11. Open the course settings
      12. In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before.
      Show
      Feature: Create one course manually Test A: Behavior in a fresh Moodle installation Set up a fresh Moodle instance Login as admin Go to Site administration -> Courses -> Course default settings Verify that the "Course end date enabled by default" checkbox is enabled Go to Site administration -> Courses -> Manage courses and categories Click "Create a new course" In the course settings form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration Add a course fullname and shortname Create the course Open the course settings again In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before. Test B: Course end date now disabled by default Login as admin Go to Site administration -> Courses -> Course default settings Disable the "Course end date enabled by default" checkbox Go to Site administration -> Courses -> Manage courses and categories Click "Create a new course" In the course settings form, you will see that the course end date is disabled (and preconfigured with today's date) Add a course fullname and shortname Create the course Open the course settings again In the course settings form, you will see that the course end date is still disabled. Test C: Course end date now enabled by default again Login as admin Go to Site administration -> Courses -> Course default settings Enable the "Course end date enabled by default" checkbox again Go to Site administration -> Courses -> Manage courses and categories Click "Create a new course" In the course settings form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration Add a course fullname and shortname Create the course Open the course settings again In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before. Feature: Course upload Test A: Behavior in a fresh Moodle installation Set up a fresh Moodle instance Login as admin Go to Site administration -> Courses -> Course default settings Verify that the "Course end date enabled by default" checkbox is enabled Go to Site administration -> Courses -> Upload courses Upload this code as a CSV file: shortname,fullname,category course1,Course upload test 1,1 Click "Preview" In the following form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration Click "Upload courses" Click "Continue" Go /course/view.php?name=course1 (i.e. the newly created course) Open the course settings In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before. Test B: Course end date now disabled by default Login as admin Go to Site administration -> Courses -> Course default settings Disable the "Course end date enabled by default" checkbox Go to Site administration -> Courses -> Upload courses Upload this code as a CSV file: shortname,fullname,category course2,Course upload test 2,1 Click "Preview" In the following form, you will see that the course end date is disabled (and preconfigured with today's date) Click "Upload courses" Click "Continue" Go /course/view.php?name=course (i.e. the newly created course) Open the course settings In the course settings form, you will see that the course end date is still disabled and set to the course end date which you have set it before. Test C: Course end date now enabled by default again Login as admin Go to Site administration -> Courses -> Course default settings Enable the "Course end date enabled by default" checkbox again Go to Site administration -> Courses -> Upload courses Upload this code as a CSV file: shortname,fullname,category course3,Course upload test 3,1 Click "Preview" In the following form, you will see that the course end date is enabled and preconfigured a date calculated with course start date + default course duration Click "Upload courses" Click "Continue" Go /course/view.php?name=course3 (i.e. the newly created course) Open the course settings In the course settings form, you will see that the course end date is still enabled and set to the course end date which you have set it before.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-58388-master

      Description

      With MDL-22078, Moodle 3.2 introduced the new course setting "course end date". However, this setting is only used for reporting up to now, tickets which will use the course end date for availability (like MDL-48762) or other nice things are still open. Thus, the use of this course setting is doubtful and misunderstandable in our point of view.

      As an admin, I can control the standard course length with the moodlecourse | courseduration setting and the course end date form field in the course setting is optional, but the form field is enabled by default in course/edit_form.php:

      $mform->addElement('date_selector', 'enddate', get_string('enddate'), array('optional' => true));
      

      So, if a manager or a teacher creates a course, he always has to check the course end date field and has to set it to the exact course end date which matches his course (as the global default length probably will not match all courses and as the setting field is prefilled with a course end date calculated _from today) or has to disable the course setting. There is no possibility in Moodle core for admins, managers or teachers to define "Don't bug me with course end dates if I can't make a real use of this setting".

      Therefore, we propose to make this form field optional = false in course settings at least or add an admin setting as a companion to moodlecourse | courseduration to control the standard status (enabled / disabled) of this form field.

        Attachments

          Activity

            People

            Assignee:
            abias Alexander Bias
            Reporter:
            abias Alexander Bias
            Peer reviewer:
            Jun Pataleta
            Integrator:
            Damyon Wiese
            Tester:
            David Mudrák (@mudrd8mz)
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
            Votes:
            13 Vote for this issue
            Watchers:
            18 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              13/Nov/17