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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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:

      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.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            aav 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
            aav 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
            salvetore Michael de Raadt added a comment -

            Thanks for reporting that and providing a solution.

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

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

            Show
            rwijaya Rossiani Wijaya added a comment - attaching sample lesson from http://demo.moodle.net
            Hide
            ankit_frenz 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_frenz 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
            samhemelryk Sam Hemelryk added a comment -

            Thanks Rosie - this has been integrated now

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Rosie - this has been integrated now
            Hide
            andyjdavis 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
            andyjdavis 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
            rajeshtaneja Rajesh Taneja added a comment -

            Works Great
            Thanks for fixing this Rossie.

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

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

            Show
            stronk7 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:
                  Fix Release Date:
                  10/Oct/11