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

Availability shouldn't be changed when the user hasn't the right capability

XMLWordPrintable

    • MOODLE_403_STABLE
    • MOODLE_403_STABLE
    • MDL-80326-403
    • MDL-80326-main
    • Hide
      1. Login as admin.
      2. Go to Site administration > Advanced features and enable "Allow stealth activities".
      3. Create a course.
      4. Enrol editing teacher (t1).
      5. Add an activty to the course and change availability to Hidden.
      6. Edit Permissions and remove the following capability for the Teacher: "moodle/course:activityvisibility"
      7. Login as editing teacher (t1).
      8. Enable Edit mode.
      9. Ensure that the " Hidden from students" badge button below the activity name cannot be changed
      10. Login back as admin
      11. Ensure that the " Hidden from students" badge has the usual drop down menu
      Show
      Login as admin. Go to Site administration > Advanced features and enable "Allow stealth activities". Create a course. Enrol editing teacher (t1). Add an activty to the course and change availability to Hidden. Edit Permissions and remove the following capability for the Teacher: "moodle/course:activityvisibility" Login as editing teacher (t1). Enable Edit mode. Ensure that the " Hidden from students" badge button below the activity name cannot be changed Login back as admin Ensure that the " Hidden from students" badge has the usual drop down menu
    • 1
    • HQ2024 Sprint I1.1 Moppies

      Steps to reproduce it

      1. Login as admin.
      2. Go to Site administration > Advanced features and enable "Allow stealth activities".
      3. Create a course.
      4. Enrol editing teacher (t1).
      5. Add a module to the course and change availability to Hidden.
      6. Edit Permissions and remove the following capability for the Teacher: "moodle/course:activityvisibility"
      7. Login as editing teacher (t1).
      8. Enable Edit mode.
      9. Using the " Hidden from students" badge button below the activity name, change the availability to "Make available but don't show on course page".

      Expected result

      This badge button shouldn't let users change availability (because they don't have the right capability).

      Current result

      The following error is displayed: "Sorry, but you do not currently have permissions to do that (Hide/show activities)."

       

            laurent.david@moodle.com Laurent David
            sarjona Sara Arjona (@sarjona)
            Carlos Escobedo Carlos Escobedo
            Ferran Recio Ferran Recio
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 29 minutes
                3h 29m

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