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

Not scrolling back to section from which resource has been deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.9
    • Component/s: Course
    • Labels:
      None
    • Affected Branches:
      MOODLE_18_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      When deleting a resource from a section, upon confirmation of deletion you should find yourself back at the section you just deleted from. Instead, Moodle takes you back to the top of the page. The URL reveals the problem:

      e.g. http://host/moodle/course/view.php?id=6#section-

      The section number has not been passed back to /course/mod.php, which then has nothing to append to the call to view.php (on line 245 of mod.php).

      This can be fixed by adding this to /course/mod.php at line 472:

      $form->sr = $sectionreturn;

      and this to /course/mod_delete.html at line 9:

      <input type="hidden" name="sr" value="<?php p($form->sr) ?>" />

      Seems to work OK on my test server.

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            daveyboond Steve Bond
            Tester:
            Nobody Nobody
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              3/Mar/08