Moodle
  1. Moodle
  2. MDL-29296

After upgrading Continue button on last lesson page gives error "Could not find lesson pages"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.4, 2.1.1, 2.2
    • Fix Version/s: 2.0.5, 2.1.2
    • Component/s: Lesson
    • Labels:
    • Testing Instructions:
      Hide

      As admin:

      1. Restore the attach lesson file. (see attachment)
      2. attempt the lesson and make sure that you could reach the end of lesson without getting any error.
      Show
      As admin: Restore the attach lesson file. (see attachment) attempt the lesson and make sure that you could reach the end of lesson without getting any error.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      18839

      Description

      Steps to reproduce:
      1. Go to the last page of lesson on demo.moodle.net (http://demo.moodle.net/mod/lesson/view.php?id=1364&pageid=450)
      2. Click Continue button.

        Issue Links

          Activity

          Hide
          Artem Andreev added a comment -

          I've searched usage of get_next_page. It used only twice. Returned value always used only for getting id. In one case false interpreted as LESSON_EOL. So I've done some simple refactoring.

          Show
          Artem Andreev added a comment - I've searched usage of get_next_page. It used only twice. Returned value always used only for getting id. In one case false interpreted as LESSON_EOL. So I've done some simple refactoring.
          Hide
          Michael de Raadt added a comment -

          Thanks for reporting that and providing a solution.

          Show
          Michael de Raadt added a comment - Thanks for reporting that and providing a solution.
          Hide
          Rossiani Wijaya added a comment -

          attaching sample lesson from http://demo.moodle.net

          Show
          Rossiani Wijaya added a comment - attaching sample lesson from http://demo.moodle.net
          Hide
          Ankit Agarwal added a comment -

          Hi Rossie,
          Code looks good to me. A few things:-
          ->In case we want to refactor the code to return ID, it might be a good idea (may be not?) to rename the function to something like get_next_pageid ?
          ->It might be good idea to refactor just in the master and use the functions as they are in Stable?(just in-case any contributed plugins might be using these functions?)
          Thanks
          Ankit

          Show
          Ankit Agarwal added a comment - Hi Rossie, Code looks good to me. A few things:- ->In case we want to refactor the code to return ID, it might be a good idea (may be not?) to rename the function to something like get_next_pageid ? ->It might be good idea to refactor just in the master and use the functions as they are in Stable?(just in-case any contributed plugins might be using these functions?) Thanks Ankit
          Hide
          Sam Hemelryk added a comment -

          Thanks Rosie - this has been integrated now

          Show
          Sam Hemelryk added a comment - Thanks Rosie - this has been integrated now
          Hide
          Andrew Davis added a comment -

          This needs testing instructions. Should have been picked up by the developer, the peer reviewer and the integration reviewer. tisk tisk.

          Show
          Andrew Davis added a comment - This needs testing instructions. Should have been picked up by the developer, the peer reviewer and the integration reviewer. tisk tisk.
          Hide
          Rajesh Taneja added a comment -

          Works Great
          Thanks for fixing this Rossie.

          Show
          Rajesh Taneja added a comment - Works Great Thanks for fixing this Rossie.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          git repositories have been updated with your awesome changes, thanks! Closing.

          Show
          Eloy Lafuente (stronk7) added a comment - git repositories have been updated with your awesome changes, thanks! Closing.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: