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

Add timemodified to course_sections database table

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2, 3.3
    • Fix Version/s: 3.4
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide
      Test 1
      1. Install a fresh copy of Moodle from the integration branch.
      2. Confirm the 'course_sections' table contains a 'timemodified' column with the same attributes as the 'timemodified' column in the course table.
      Test 2
      1. Install a fresh copy of Moodle from the stable branch and confirm that 'course_sections' table does not have 'timemodified' column.
      2. Create a course.
      3. Change to the integration branch and perform the upgrade as admin.
      4. Confirm the 'course_sections' table contains a 'timemodified' column with the same attributes as the 'timemodified' column in the course table.
      5. Check that the value of 'timemodified' column for every section is equal to 0.
      Test 3
      1. On latest integration log in as Admin.
      2. Create a course "TestCourse" and visit it.
      3. Create a backup for "TestCourse".
      4. Note the 'timemodified' values in the 'course_sections' table.
      5. Navigate to course restore area.
      6. Choose to restore the course as a new course.
      7. Check that 'timemodified' values is the same (or only different because of apply_date_offset()).
      Test 4
      1. Take a backup of a course from Moodle 3.3.
      2. Restore this backup in integration.
      3. Check that 'timemodified' values in the 'course_sections' table for the sections in the restored course are set to 0 (except for section 0 which gets generated).
      Test 5
      1. Create a course.
      2. Check the 'timemodified' column in 'course_sections' is accurate for the sections in that course.
      3. Edit a section.
      4. Confirm the 'timemodified' column was updated in the database for that section.
      Test 6
      1. Create a course with availability enabled.
      2. Edit a course section and add a restrict access date.
      3. Take note of the 'timemodified' column in the 'course_sections' table.
      4. In the course administration reset the course and choose a course start date that is different than the current one.
      5. Confirm the 'timemodified' column in the 'course_sections' table was updated for that section.
      Test 7
      1. Ensure unit tests are passing.
      Show
      Test 1 Install a fresh copy of Moodle from the integration branch. Confirm the 'course_sections' table contains a 'timemodified' column with the same attributes as the 'timemodified' column in the course table. Test 2 Install a fresh copy of Moodle from the stable branch and confirm that 'course_sections' table does not have 'timemodified' column. Create a course. Change to the integration branch and perform the upgrade as admin. Confirm the 'course_sections' table contains a 'timemodified' column with the same attributes as the 'timemodified' column in the course table. Check that the value of 'timemodified' column for every section is equal to 0. Test 3 On latest integration log in as Admin. Create a course "TestCourse" and visit it. Create a backup for "TestCourse". Note the 'timemodified' values in the 'course_sections' table. Navigate to course restore area. Choose to restore the course as a new course. Check that 'timemodified' values is the same (or only different because of apply_date_offset()). Test 4 Take a backup of a course from Moodle 3.3. Restore this backup in integration. Check that 'timemodified' values in the 'course_sections' table for the sections in the restored course are set to 0 (except for section 0 which gets generated). Test 5 Create a course. Check the 'timemodified' column in 'course_sections' is accurate for the sections in that course. Edit a section. Confirm the 'timemodified' column was updated in the database for that section. Test 6 Create a course with availability enabled. Edit a course section and add a restrict access date. Take note of the 'timemodified' column in the 'course_sections' table. In the course administration reset the course and choose a course start date that is different than the current one. Confirm the 'timemodified' column in the 'course_sections' table was updated for that section. Test 7 Ensure unit tests are passing.
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55548_master

      Description

      We don't store the last time a section was modified, at least I couldn't find it. This is blocking MDL-55303

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

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