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

Add common module settings for course content download

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.10, 3.11
    • Fix Version/s: None
    • Component/s: Course
    • Testing Instructions:
      Hide

      Setup

      1. A course with multiple resources (folder, page, file) also add an activity like assignment or forum.

      Testing

      I suggest testing this in two separated windows side-by-side.
      You can be logged in as admin on both.

      Test new field is visible even if course content is disabled on course level
      1. On go to the course you have created and edit settings.
      2. Change Enable download course content field to No and save.
      3. On the course, edit settings of a resource.
      4. Expand Common module settings section.
      5. Make sure new field Enable download course content is still visible.
      Test new field is not visible if course content is disabled on site level
      1. On window 1 Go to Site administration > Courses > Download course content, disable Download course content feature and save.
      2. On window 2 go to the course, edit settings of a resource again.
      3. Make sure new field Enable download course content is not visible.
      4. On window 1 enable Download course content feature and save.
      5. On window 2 go to the course, edit settings of a resource again.
      6. Make sure new field Enable download course content is visible.
      Test default is set to "Yes" in nothing has been set
      1. On the course page, Turn editing mode on and click to add a new Folder resource.
      2. On the form expand Common module settings
      3. Make sure the new Enable download course module content is set to Yes
      4. Change the value to No and save.
      5. Edit the settings on the folder again.
      6. Make sure the Enable download course module content is set to No
      Content is not exported if setting is disabled on activity
      1. On window 1 set the field Enable download course module content to No and save.
      2. On window 2 click on the cog and then click Download course content.
      3. Open the zip file and make sure the resource you have edited hasn't been exported.
      4. On window 1 set the field Enable download course content to Yes and save.
      5. On window 2 download the course content again.
      6. Make sure the resource you have edited has been exported this time.
      7. Also make sure any of the other folder/page/file resources in the course (that you have not edited the Enable download course content settings for) are also exported (since that should be the default behaviour).
      Field should only be visible on supported activities
      1. On window 2 edit settings of an activity that does NOT support course content download like forum or assignment.
      2. Expand Common module settings
      3. Make sure the field Enable download course content is not visible.
      Field should be visible but not editable for users without configuredownloadcontent capability
      1. As admin go to Site administration > Users > Permissions > Define roles
      2. Edit manager role and unassign the moodle/course:configuredownloadcontent capability.
      3. Enrol a user in the course with the manager role.
      4. Log in as the manager user and go to the course.
      5. Edit or add a new resource.
        #-if you add new resource, the default value should be Yes.
      6. Make sure Enable download course module content field is visible but you are not able to edit.
      Show
      Setup A course with multiple resources (folder, page, file) also add an activity like assignment or forum. Testing I suggest testing this in two separated windows side-by-side. You can be logged in as admin on both. Test new field is visible even if course content is disabled on course level On go to the course you have created and edit settings . Change Enable download course content field to No and save. On the course, edit settings of a resource . Expand Common module settings section. Make sure new field Enable download course content is still visible. Test new field is not visible if course content is disabled on site level On window 1 Go to Site administration > Courses > Download course content, disable Download course content feature and save. On window 2 go to the course, edit settings of a resource again. Make sure new field Enable download course content is not visible. On window 1 enable Download course content feature and save. On window 2 go to the course, edit settings of a resource again. Make sure new field Enable download course content is visible. Test default is set to "Yes" in nothing has been set On the course page, Turn editing mode on and click to add a new Folder resource. On the form expand Common module settings Make sure the new Enable download course module content is set to Yes Change the value to No and save. Edit the settings on the folder again. Make sure the Enable download course module content is set to No Content is not exported if setting is disabled on activity On window 1 set the field Enable download course module content to No and save. On window 2 click on the cog and then click Download course content . Open the zip file and make sure the resource you have edited hasn't been exported. On window 1 set the field Enable download course content to Yes and save. On window 2 download the course content again. Make sure the resource you have edited has been exported this time. Also make sure any of the other folder/page/file resources  in the course (that you have not edited the Enable download course content settings for) are also exported (since that should be the default behaviour). Field should only be visible on supported activities On window 2 edit settings of an activity that does NOT support course content download like forum or assignment . Expand Common module settings Make sure the field Enable download course content is not visible. Field should be visible but not editable for users without configuredownloadcontent capability As admin go to Site administration > Users > Permissions > Define roles Edit manager role and unassign the moodle/course:configuredownloadcontent capability. Enrol a user in the course with the manager role. Log in as the manager user and go to the course. Edit or add a new resource. #-if you add new resource, the default value should be Yes. Make sure Enable download course module content field is visible but you are not able to edit.
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE
    • Pull from Repository:
    • Pull 3.11 Branch:
      MDL-69561-311
    • Pull Master Branch:
      MDL-69561-master
    • Story Points:
      3
    • Sprint:
      International 4.0 - Sprint 6, International 4.0 - Sprint 7, Internationals - 3.11 Sprint 1, Internationals - 3.11 Sprint 2, Internationals - 3.11 Sprint 3, Internationals - 3.11 Sprint 4, Internationals - 3.11 Sprint 5

      Description

      Add course settings for course content download:

      1. Enabled/disabled

      Add common module settings for course content download:

      1. Use course settings/Enabled/Disabled (Use course settings is default)

      Allow changes to the settings to be controlled by a new capability

      Need to ensure that an existing configuration is not modified by a user who does not have permission - i.e. privileged user sets it up with different settings, teacher updating the activity/course in other ways does not unset those values.

      New capability:
      Name: moodle/course:configurecontentexport
      Captype: write
      contextlevel: course
      archetype: editingteacher + manager = allow

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              lameze Simey Lameze
              Reporter:
              dobedobedoh Andrew Nicols
              Peer reviewer:
              Michael Hawkins
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 days, 1 hour, 4 minutes
                  4d 1h 4m