Moodle

Page does not scroll to correct section after moving a resource

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Trivial Trivial
  • Resolution: Won't Fix
  • Affects Version/s: 1.9.2
  • Fix Version/s: None
  • Component/s: Course
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE

Description

When moving a resource or activity (with Ajax switched off), Moodle returns to the top of the page after the move is completed, so for long pages you then have to scroll back to find where you were.

This is a bug because the code tries to add the section anchor name to the URL, but fails because a variable is not set.

File: course/mod.php, v 1.127.2.2
Line: 310

redirect("view.php?id=$section->course#section-$sectionreturn");

This produces a URL with '#section-' at the end, because $sectionreturn is not defined.

This can be fixed by adding the following line immediately beforehand:

$sectionreturn = $section->section;

Activity

Hide
Michael de Raadt added a comment -

Thanks for reporting this issue.

We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported.

If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed.

Michael d;

lqjjLKA0p6

Show
Michael de Raadt added a comment - Thanks for reporting this issue. We have detected that this issue has been inactive for over a year has been recorded as affecting versions that are no longer supported. If you believe that this issue is still relevant to current versions (2.1 and beyond), please comment on the issue. Issues left inactive for a further month will be closed. Michael d; lqjjLKA0p6
Hide
Michael de Raadt added a comment -

I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

Show
Michael de Raadt added a comment - I'm closing this issue as it appears to have become inactive and is probably not relevant to a current supported version. If you are encountering this problem or one similar, please launch a new issue.

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: