Moodle
  1. Moodle
  2. MDL-35887

Drag and Drop file does not honour activity completion defaults

    Details

    • Testing Instructions:
      Hide
      1. Log in as admin
      2. Navigate to Settings > Site administration > Advanced features
      3. Turn on the Advanced setting for "completion tracking"
      4. Navigate to a course
      5. Navigate to Settings > Edit settings > Student progress
      6. Set Completion tracking to "Enabled, control via (course) completion and activity settings"
      7. Save settings
      8. Drag and drop a file onto the course
      9. Edit the settings of the file
      • Expected result: The Completion tracking setting should be "Students can manually..."
      Show
      Log in as admin Navigate to Settings > Site administration > Advanced features Turn on the Advanced setting for "completion tracking" Navigate to a course Navigate to Settings > Edit settings > Student progress Set Completion tracking to "Enabled, control via (course) completion and activity settings" Save settings Drag and drop a file onto the course Edit the settings of the file Expected result: The Completion tracking setting should be "Students can manually..."
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull Master Branch:
      MDL-35887_dnd_completion
    • Rank:
      44652

      Description

      Files added by dragging onto a section do not take on the default setting "Students can manually mark..." for activity completion.

      Dragged files have progress tracking off regardless of site and course settings.

      Resources added by dragging onto the page should get the same default setting as adding the resource manually through the interface.

      Replication steps:

      1. Log in as admin
      2. Navigate to Settings > Site administration > Advanced features
      3. Turn on the Advanced setting for "completion tracking"
      4. Navigate to a course
      5. Navigate to Settings > Edit settings > Student progress
      6. Set Completion tracking to "Enabled, control via (course) completion and activity settings"
      7. Save settings
      8. Drag and drop a file onto the course
      9. Edit the settings of the file

      Expected result: The Completion tracking setting should be "Students can manually..."

      Actual result: The Completion tracking setting is "Do not indicate..."

        Activity

        Hide
        Michael de Raadt added a comment -

        Thanks for reporting that. I've changed some of the wording you used to clearly distinguish between activity completion and course completion, which are two different beasts. If I have misrepresented you, please let me know.

        I was able to replicate the problem and I have added some replication steps.

        Show
        Michael de Raadt added a comment - Thanks for reporting that. I've changed some of the wording you used to clearly distinguish between activity completion and course completion, which are two different beasts. If I have misrepresented you, please let me know. I was able to replicate the problem and I have added some replication steps.
        Hide
        Michael de Raadt added a comment -

        Davo: I've added you as a watcher on this issue as you were involved in the Drag and Drop implementation. Please feel free to contribute.

        Show
        Michael de Raadt added a comment - Davo: I've added you as a watcher on this issue as you were involved in the Drag and Drop implementation. Please feel free to contribute.
        Hide
        Davo Smith added a comment -

        I'll try and have a look at it, but I've got a few other things to work on today, so if anyone else gets in there first ...

        I suspect it will only involved a one or two line change.

        Show
        Davo Smith added a comment - I'll try and have a look at it, but I've got a few other things to work on today, so if anyone else gets in there first ... I suspect it will only involved a one or two line change.
        Hide
        Davo Smith added a comment -

        Hopefully this does what is needed, it checks that:

        • Completion is enabled
        • The particular module defaults to 'manual tracking'

        If both are true, then 'manual tracking' is enabled, otherwise 'no tracking' is set. This appears to match the default you would get from creating an activity from the chooser and accepting all the defaults.

        Show
        Davo Smith added a comment - Hopefully this does what is needed, it checks that: Completion is enabled The particular module defaults to 'manual tracking' If both are true, then 'manual tracking' is enabled, otherwise 'no tracking' is set. This appears to match the default you would get from creating an activity from the chooser and accepting all the defaults.
        Hide
        Damyon Wiese added a comment -

        Note for integrators:

        Clean cherrypick back to 23. 22 does not support dnd so not required.

        Show
        Damyon Wiese added a comment - Note for integrators: Clean cherrypick back to 23. 22 does not support dnd so not required.
        Hide
        Damyon Wiese added a comment -

        Thanks for working on this Davo,

        Peer review checklist:

        [Y] Syntax
        [Y] Output
        [Y] Whitespace
        [-] Language
        [-] Databases
        [N] Testing
        [-] Security
        [-] Documentation
        [Y] Git
        [Y] Sanity check

        Can you please convert that description to some testing instructions? This issue will be ready to go then.

        Show
        Damyon Wiese added a comment - Thanks for working on this Davo, Peer review checklist: [Y] Syntax [Y] Output [Y] Whitespace [-] Language [-] Databases [N] Testing [-] Security [-] Documentation [Y] Git [Y] Sanity check Can you please convert that description to some testing instructions? This issue will be ready to go then.
        Hide
        Sam Hemelryk added a comment -

        Thanks Davo, this has been integrated now.

        Show
        Sam Hemelryk added a comment - Thanks Davo, this has been integrated now.
        Hide
        Rossiani Wijaya added a comment -

        This is working as expected.

        Test passed.

        Show
        Rossiani Wijaya added a comment - This is working as expected. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        And your fantastic code has met core, hope they become good friends for a long period.

        Closing, thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - And your fantastic code has met core, hope they become good friends for a long period. Closing, thanks!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: