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

Public profile page gives block move error on customising this page

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      In this test you will be trying to move blocks using the Ajax drag & drop feature. Do not edit blocks or turn Javascript off to move them.

      1. Login as a normal user
      2. Go to your dashboard/my home
      3. Confirm that you can customise the page and move blocks around
        • You have to stop editing to confirm that it worked
      4. Go to your site profile
      5. Confirm that you can customise the page and move blocks around
        • You have to stop editing to confirm that it worked
      6. Confirm that you CAN NOT move your blocks on:
        • My private files
        • My preferences
      7. Login as admin
      8. Confirm that you can customise someone's site profile
      9. Confirm that you can customise the default profile page, and dashboard page of users. And that your modifications take effect.
      Show
      In this test you will be trying to move blocks using the Ajax drag & drop feature. Do not edit blocks or turn Javascript off to move them. Login as a normal user Go to your dashboard/my home Confirm that you can customise the page and move blocks around You have to stop editing to confirm that it worked Go to your site profile Confirm that you can customise the page and move blocks around You have to stop editing to confirm that it worked Confirm that you CAN NOT move your blocks on: My private files My preferences Login as admin Confirm that you can customise someone's site profile Confirm that you can customise the default profile page, and dashboard page of users. And that your modifications take effect.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-47450-master
    • Sprint:
      Team Beards Sprint 9

      Description

      As a normal logged in user (authenticated user), I navigate to my user profile page (Public profile, user/profile.php) and then click on the 'Customise this page' button. I then try to re-arrange the order of the blocks by dragging by mouse. At this point I get this javascript error message:

      Sorry, but you do not currently have permissions to do that ([[editblock]])
      URL: http://jb23347.vledev2.open.ac.uk/m2/lib/ajax/blocks.php?courseid=1&pagelayout=mypublic&pagetype=user-profile
      Debug info: Error code: nopermissions
      Stack trace:

      • line 1539 of /lib/blocklib.php: moodle_exception thrown
      • line 124 of /lib/ajax/blocks.php: call to block_manager->process_url_move()

      Interestingly the button 'Reset page to default' appears after the error message is dismissed, but the blocks have not moved to the desired new positions. Blocks can be moved by editing their weight in the block edit pages, it is just the dragging by mouse feature that is generating the error.

      The capability moodle/user:manageownblocks which should allow the user to move blocks on their own profile page is set to allow for Authenticated user on this site (default I think anyway).

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Sep/15