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

Conditional activity: A group or grouping condition will not be duplicated with activity when admin default setting for restore groups is set to 'no'

XMLWordPrintable

    • MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-62666-master
    • Hide
      1. Login as an admin
      2. Go to the Site administration / Courses / Backups / General restore defaults
      3. Untick restore | restore_general_groups and save the changes.
      4. Go to a course and create a group "Group 1"
      5. Create a grouping "Grouping 1" and add "Group 1" to this grouping
      6. Go back to the course home page
      7. Turn editing on
      8. Add an assignment (e.g. "Assignment with group condition")
      9. Add an access restriction to this "Group 1"
      10. Save and return to course
      11. Add another assignment (e.g. "Assignment with grouping condition)
      12. Add an access restriction to this "Grouping 1"
      13. Save and return to course
      14. Duplicate the Assignment with group condition
      15. Confirm that the group condition was duplicated
      16. Duplicate the Assignment with grouping condition
      17. Confirm that the grouping condition was duplicated
      Show
      Login as an admin Go to the Site administration / Courses / Backups / General restore defaults Untick restore | restore_general_groups and save the changes. Go to a course and create a group "Group 1" Create a grouping "Grouping 1" and add "Group 1" to this grouping Go back to the course home page Turn editing on Add an assignment (e.g. "Assignment with group condition") Add an access restriction to this "Group 1" Save and return to course Add another assignment (e.g. "Assignment with grouping condition) Add an access restriction to this "Grouping 1" Save and return to course Duplicate the Assignment with group condition Confirm that the group condition was duplicated Duplicate the Assignment with grouping condition Confirm that the grouping condition was duplicated

      Hi,
      we've encountered this bug.

      Steps to reproduce

      I'll start with the steps to reproduce because this will make it clear what happens:

      1. Login as an admin
      2. Go to the setting restore | restore_general_groups, disable it and save
      3. Go to a course and create a group "Group 1"
      4. Create a grouping "Grouping 1" and add "Group 1" to this grouping
      5. Go back to the course home page
      6. Turn editing on
      7. Add an assignment:
        Title e.g. "Assignment with group condition"
        Add an access restriction to this "Group 1"
      8. Save and return to course
      9. Add another assignment:
        Title e.g. "Assignment with grouping condition"
        Add an access restriction to this "Grouping 1"
      10. Save and return to course
      11. Duplicate Assignment with group condition
        => See that the group condition was not duplicated
      12. Duplicate Assignment with grouping condition
        => See that the grouping condition was not duplicated

      If you want to you can do the same steps with the setting restore | restore_general_groups enabled and you will have the result that the group and grouping condition will be duplicated as well.

      The problem here is that the admin setting which only sets default values has impacts in other places - for example in the duplicating function.
      The user cannot change this setting as the duplicating workflow does not present the user nay settings.

      Cause

      The cause is this function (for the group and grouping condition each):

      If the admin setting ist disabled (and groups are existent in the course), this function will always return a false value and therefore the groups condition will not be handled in the function update_after_restore.

      Possible solution(s)

      We can imagine 2 possible solutions:

      • Fix the function include_after_restore to check if we are operating on the same course and if there are groups to return a true
      • Or if the user triggers the duplication button, then all possible restore settings could be activated and ignore the admin settings at this point

      Best, Kathrin

            andrew_dc_hancox Andrew Hancox
            kosswa Kathrin Osswald
            Jun Pataleta Jun Pataleta
            David Monllaó David Monllaó
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.