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

Unable evaluate a Hidden course via to Switch role to Student

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.4.3
    • 3.4 regressions, 3.4.2, 3.5
    • Roles / Access
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE
    • MDL-61956-master
    • Hide
      1. Login as admin and create a new course with "Course visibility" set to "Hide"
      2. Enrol a user A as a teacher in this course
      3. Logout
      4. Login as user A and open this course
      5. Open your user menu and click "Switch role to..."
      6. Switch the role to a role that does not have the 'moodle/course:viewhiddencourses' capability (usually student)
      7. Confirm that the role switching works
      8. Open your user menu again and click "Return to my normal role" to switch back to your own role
      9. Turn editing on
      10. Add the "Calendar" block to the course
      11. Switch the role to student again
      12. Confirm that the course page loads with the calendar block.
      13. Confirm that you don't see the error with the notice "Sorry, but you do not currently have permissions to do that (View hidden courses)"
      14. Switch back to your normal role.
      15. Delete the block "Calendar" from the course
      16. Add the block "Upcoming events"
      17. Switch the role to student again
      18. Confirm that the course page loads with the calendar block.
      19. Confirm that you don't see the error with the notice "Sorry, but you do not currently have permissions to do that (View hidden courses)"
      Show
      Login as admin and create a new course with " Course visibility " set to " Hide " Enrol a user A as a teacher in this course Logout Login as user A and open this course Open your user menu and click " Switch role to... " Switch the role to a role that does not have the 'moodle/course:viewhiddencourses' capability (usually student) Confirm that the role switching works Open your user menu again and click " Return to my normal role " to switch back to your own role Turn editing on Add the "Calendar" block to the course Switch the role to student again Confirm that the course page loads with the calendar block. Confirm that you don't see the error with the notice "Sorry, but you do not currently have permissions to do that (View hidden courses)" Switch back to your normal role. Delete the block "Calendar" from the course Add the block "Upcoming events" Switch the role to student again Confirm that the course page loads with the calendar block. Confirm that you don't see the error with the notice "Sorry, but you do not currently have permissions to do that (View hidden courses)"

      In our 3.2 instance I can go to a hidden course (Visible=Hide) as a Teacher and Switch role to Student to evaluate my course.  When emulating a student I can explore the course fully even though it is technically 'hidden'. 

      In 3.4 we have found that trying to switch role to a Student in a hidden course produces the error message 'Sorry, but you do not currently have permissions to do that (View hidden courses) '.  So it is now enforcing the Student role much more literally inside of the hidden course and no emulation is possible.

      1. Go to a course where you have the Teacher role.
      2. Via Edit Settings set the Visible setting to Hide
      3. Via the User menu select Switch role to
      4. Select the Student role from the list
      5. Instead of being able to explore the course as a student you will see ' 'Sorry, but you do not currently have permissions to do that (View hidden courses) '. 

            lucaboesch Luca Bösch
            skjackson1 Sandra Jackson
            Kathrin Osswald Kathrin Osswald
            Jun Pataleta Jun Pataleta
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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