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

Implement AMD module for user preference manipulation

XMLWordPrintable

    • MOODLE_35_STABLE, MOODLE_400_STABLE
    • MOODLE_403_STABLE
    • Hide

      Mostly covered by existing Behat scenarios:

      1. My overview block
      2. Timeline block (plus other "Persistent X" scenarios)
      3. Content bank

      Online users block

      1. Log in as admin
      2. Navigate to dashboard
      3. Turn edit mode on
      4. Add Online users block
      5. Press Hide my online status from other users in the Online users block
      6. Reload the page
      7. Confirm the "eye closed" icon is still shown to indicate hidden online status
      8. Press Show my online status from other users in the Online users block
      9. Reload the page
      10. Confirm the "eye open" icon is still shown to indicate visible online status

      Assignment grading

      1. Create new users
      2. Create a course
      3. Enrol user in course as a student
      4. Add an Assignment activity to the course
      5. Press Grade in the assignment activity
      6. Press Change filters icon in navigation bar
      7. Set Filter to "Draft"
      8. Confirm you see No users selected
      9. Set Filter to "Not submitted"
      10. Confirm you see users name
      Show
      Mostly covered by existing Behat scenarios: My overview block Timeline block (plus other "Persistent X" scenarios) Content bank Online users block Log in as admin Navigate to dashboard Turn edit mode on Add Online users block Press Hide my online status from other users in the Online users block Reload the page Confirm the "eye closed" icon is still shown to indicate hidden online status Press Show my online status from other users in the Online users block Reload the page Confirm the "eye open" icon is still shown to indicate visible online status Assignment grading Create new users Create a course Enrol user in course as a student Add an Assignment activity to the course Press Grade in the assignment activity Press Change filters icon in navigation bar Set Filter to "Draft" Confirm you see No users selected Set Filter to "Not submitted" Confirm you see users name

      Currently to update a user preference from Javascript requires using the M.util.set_user_preference() call. 

      This uses a ajax script that returns "OK" if the update was sent (but not if it was saved) and also returns HTML if the request fails for any reason.

      This is not very ajax-y.

      I propose a new core/preferences AMD module that will at least provide a matching set implementation.

            pholden Paul Holden
            mhughes2k Michael Hughes
            Andrew Lyons Andrew Lyons
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 8 minutes
                6h 8m

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