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

Display a message rather than an error when viewing an empty book

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3.3
    • Component/s: Book
    • Labels:
    • Testing Instructions:
      Hide
      1. Goto a course and create a new book resource.
      2. Donot add any new chapters (Not even the first chapter)
      3. Login as student and access the book resource
      4. Make sure you get a notice msg but no error and backtrace is not generated
      5. Append something like &chapterid=5 to the url
      6. Make sure you get an error msg
      Show
      Goto a course and create a new book resource. Donot add any new chapters (Not even the first chapter) Login as student and access the book resource Make sure you get a notice msg but no error and backtrace is not generated Append something like &chapterid=5 to the url Make sure you get an error msg
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull Master Branch:
      MDL-33646-master

      Description

      When a student accesses a book that does not yet have content, the following error message is displayed.

      Error reading chapter of book.
       
      More information about this error
       
      Debug info: 
      Error code: errorchapter
      Stack trace:
      line 467 of \lib\setuplib.php: moodle_exception thrown
      line 91 of \mod\book\view.php: call to print_error()

      It would be better if a message was displayed such as "No content has been added to this book yet."

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    12/Nov/12