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

When editing a course, if you move an activity without the capacity "manageblocks" with Ajax, the icon "dragndrop" disappears

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Replication steps.

      1 Course with some modules 'Course 1'
      1 Teacher 'Teacher 1' enrolled in 'Course 1'

      1. Sign in as Teacher 1
      2. Navigate to Course 1
      3. Turn editing on
      4. Move a module via drag and drop
      5. Open the edit menu on a module and move it right
      6. Open the edit menu on a module and select hide
      7. Open the edit menu on the module from step 6 and select show
      8. Open the edit menu on the module from step 5 and move it left
      9. Confirm that you can still move the module after the Ajax request finishes
      10. Sign in as Admin
      11. Remove `moodle/site:manageblocks` from the edit teacher role
      12. Sign back in as Teacher 1
      13. Repeat steps 2-9
      Show
      Replication steps. 1 Course with some modules 'Course 1' 1 Teacher 'Teacher 1' enrolled in 'Course 1' Sign in as Teacher 1 Navigate to Course 1 Turn editing on Move a module via drag and drop Open the edit menu on a module and move it right Open the edit menu on a module and select hide Open the edit menu on the module from step 6 and select show Open the edit menu on the module from step 5 and move it left Confirm that you can still move the module after the Ajax request finishes Sign in as Admin Remove `moodle/site:manageblocks` from the edit teacher role Sign back in as Teacher 1 Repeat steps 2-9
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull 3.5 Branch:
    • Pull 3.6 Branch:
    • Pull Master Branch:
      MDL-60339-master

      Description

      Context : In a course with a the capacity to edit activities (moodle/course:manageactivities) but without the capacity to manage blocks (moodle/site:manageblocks).

      If you try to drag an activity (editing mode), the drag & drop icon disapears after dropping it (because the Ajax response believe the user can't edit).

      I think the problem come with the function "user_is_editing()" (lib/pagelib.php)

       

       

       

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                8 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 30 minutes
                  2h 30m