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

Wrong redirect when switching to another user as admin

XMLWordPrintable

    • Any
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-78173-403
    • Hide
      1. Log in as admin
      2. Navigate to Appearance > Navigation in site administration
      3. Set Start page for users to My courses and save
      4. Create a user
      5. From browse users page, view profile of new user
      6. Press Log in as
      7. On the subsequent page, press Continue
      8. Confirm you are redirected to the My courses page
      9. Log out
      10. Log back in as admin
      11. Create a course
      12. Enrol user as a student in course
      13. From course participants page, view profile of user
      14. Press Log in as
      15. On the subsequent page, press Continue
      16. Confirm you are redirected to the course page
      Show
      Log in as admin Navigate to Appearance > Navigation in site administration Set Start page for users to My courses and save Create a user From browse users page, view profile of new user Press Log in as On the subsequent page, press Continue Confirm you are redirected to the My courses page Log out Log back in as admin Create a course Enrol user as a student in course From course participants page, view profile of user Press Log in as On the subsequent page, press Continue Confirm you are redirected to the course page

      When switching to another user (Log in as)  to see the site from its perspective, moodle doesn't redirect to the start page which was set by the viewed user.

      Steps:

      As Admin

      • Site Administration -> Appereance -> Navigation -> Start page for users (defaulthomepage): Change to for example "My Courses"
      • Site Administration -> Users -> Browse list of users
        • Click on a user name
        • Under "Administration" click on "Log in as"
        • Follow the process

      Moodle redirects to the default page (parameter redirect=0 in address bar), ignoring the  prevoiusly set setting.

      If you login as the user vie the login page, the set start page is shown.

       

      The related file is course/loginas.php

       

      The problem resembles MDL-78408 but the changes don't help with this problem.

       

            pholden Paul Holden
            ipasanec Immanuel Pasanec
            Stevani Andolo Stevani Andolo
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 16 minutes
                1h 16m

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