Moodle
  1. Moodle
  2. MDL-37483

Access errors should return to the current course page rather than the home page

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4, 2.5
    • Fix Version/s: 2.4.2
    • Component/s: Groups, Roles / Access
    • Labels:
    • Testing Instructions:
      Hide

      1/ create course with some activity and enrol some user
      2/ open second browser and login as that user and go to course
      3/ now hide the activity, copy the activity url
      4/ paste the activity url into the student browser and verify redirect
      5/ repeat with activity on the frontpage

      Show
      1/ create course with some activity and enrol some user 2/ open second browser and login as that user and go to course 3/ now hide the activity, copy the activity url 4/ paste the activity url into the student browser and verify redirect 5/ repeat with activity on the frontpage
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w02_MDL-37483_m25_redirect
    • Rank:
      47123

      Description

      If a user includes an internal link (e.g. 'click here to go to the next activity) that fails because the user does not have access (e.g. due to group members only or activity hiding) they can an error and get bounced to the front page.

      It would be more elegant if the redirect to the current course page - less frightening for the users.

        Activity

        Hide
        Mary Cooch added a comment -

        Yes I agree; this would be convenient for all levels of users.

        Show
        Mary Cooch added a comment - Yes I agree; this would be convenient for all levels of users.
        Hide
        Howard Miller added a comment -

        Thinking about it a little more, any error that results in redirect($CFG->wwwroot) could do with a little finesse. It would be better to consider the context and go to the appropriate place (rarely the home page).

        Show
        Howard Miller added a comment - Thinking about it a little more, any error that results in redirect($CFG->wwwroot) could do with a little finesse. It would be better to consider the context and go to the appropriate place (rarely the home page).
        Hide
        Ray Lawrence added a comment -

        +1

        Show
        Ray Lawrence added a comment - +1
        Hide
        Petr Škoda added a comment -

        Hi, please do not confuse groupings and "group members only". I like this idea, I suppose the only potential problem might be infinite redirect in the course context.

        Show
        Petr Škoda added a comment - Hi, please do not confuse groupings and "group members only". I like this idea, I suppose the only potential problem might be infinite redirect in the course context.
        Hide
        Howard Miller added a comment -

        Yep - that was just a (badly expressed) example. Indeed, there would need to be some sort of check that displaying the course page wasn't the cause of the error.

        Show
        Howard Miller added a comment - Yep - that was just a (badly expressed) example. Indeed, there would need to be some sort of check that displaying the course page wasn't the cause of the error.
        Hide
        Petr Škoda added a comment -

        to integrators: feel free to cherry pick

        Show
        Petr Škoda added a comment - to integrators: feel free to cherry pick
        Hide
        Petr Škoda added a comment -

        Thanks for the report.

        Show
        Petr Škoda added a comment - Thanks for the report.
        Hide
        Howard Miller added a comment -

        Thanks Petr... a very swift resolution

        Show
        Howard Miller added a comment - Thanks Petr... a very swift resolution
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated (24 & master), thanks!

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated (24 & master), thanks!
        Hide
        Jason Fowler added a comment -

        Worked perfectly

        Show
        Jason Fowler added a comment - Worked perfectly
        Hide
        Dan Poltawski added a comment -

        Hurray! We did it! Thanks to all the reporters, testers, user and watchers for a bumper week of Moodling!

        Show
        Dan Poltawski added a comment - Hurray! We did it! Thanks to all the reporters, testers, user and watchers for a bumper week of Moodling!

          People

          • Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: