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

Assignment cutoffdate and allowsubmissionfromdate are not exported

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.6, 3.4.3, 3.5.1, 3.6
    • Fix Version/s: 3.3.7, 3.4.4, 3.5.1
    • Component/s: Assignment, Privacy
    • Labels:
    • Testing Instructions:
      Hide
      • Make sure to have a course with students enrolled in it.
      1. Create an assignment.
      2. Create an override for a student.
        1. (in the settings menu) or under "Assignment administration > User overrides"
        2. Add a user override.
        3. Make sure to change all settings (Allow submission from, Due date, Cut-off date).
      3. From the command prompt run the attached script for the student that the override was created for. php testfinal.php --username={{put username here}}
      4. Check the output for the assignment in the overrides folder and check that the json file has dates for these three settings.
      Show
      Make sure to have a course with students enrolled in it. Create an assignment. Create an override for a student. (in the settings menu) or under "Assignment administration > User overrides" Add a user override. Make sure to change all settings (Allow submission from, Due date, Cut-off date). From the command prompt run the attached script for the student that the override was created for. php testfinal.php --username={{put username here }} Check the output for the assignment in the overrides folder and check that the json file has dates for these three settings.
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull 3.5 Branch:
      wip-MDL-62755-35
    • Pull Master Branch:
      wip-MDL-62755-master
    • Sprint:
      GDPR Followup Sprint 1

      Description

      https://github.com/moodle/moodle/blob/master/mod/assign/classes/privacy/provider.php#L478

                  if (!empty($overrides->cutoffdate)) {
                      $overrides->cutoffdate = transform::datetime($overrides->cutoffdate);
                  }
                  if (!empty($overrides->allowsubmissionsfromdate)) {
                      $overrides->allowsubmissionsfromdate = transform::datetime($overrides->allowsubmissionsfromdate);
                  }
                  if (!empty($data)) {
                      writer::with_context($context)->export_data([get_string('overrides', 'mod_assign')], $data);
                  }
      

      These are both updating $overrides instead of $data.

      Thanks to Dan Marsden for pointing this out.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jul/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 19 minutes
                19m