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

Book: Improve print output

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.6, 2.7.1, 2.7.2, 2.8.1, 2.8.2, 2.8.7, 3.2.3, 3.3, 3.7
    • Fix Version/s: 3.7
    • Component/s: Book
    • Testing Instructions:
      Hide

      Test in Boost and Clean.

      1. Log in as Admin.
      2. Create a Course,
      3. Create a Book resource.
      4. Create several chapters and several subchapters.
      5. Go back to the Book resource page.
      6. In the Book settings cog, click on the "Print book" link.
        1. make sure sure the book print output has been improved and it inherits the current theme's css styles (ex. font style).
      7. Go back to the Book resource page.
      8. In the Book settings cog, click on the "Print this chapter" link.
        1. make sure sure the book chapter print output has been improved and it inherits the current theme's css styles (ex. font style).
      9. Go back to the Book resource page.
      10. Access one of the Book's subchapters.
      11. In the Book settings cog, click on the "Print this chapter" link.
        1. make sure sure the title of the parent chapter is also displayed in the print chapter view.**
      Show
      Test in Boost and Clean. Log in as Admin. Create a Course, Create a Book resource. Create several chapters and several subchapters. Go back to the Book resource page. In the Book settings cog, click on the "Print book" link. make sure sure the book print output has been improved and it inherits the current theme's css styles (ex. font style). Go back to the Book resource page. In the Book settings cog, click on the "Print this chapter" link. make sure sure the book chapter print output has been improved and it inherits the current theme's css styles (ex. font style). Go back to the Book resource page. Access one of the Book's subchapters. In the Book settings cog, click on the "Print this chapter" link. make sure sure the title of the parent chapter is also displayed in the print chapter view. **
    • Workaround:
      Hide

      Themes can override these styles by using more specific styles to override e.g. the Snap theme uses SCSS like this:

      // Print style guide for book
      #page-mod-book-print {
          font-size: 18px !important;
          font-family: $font-family-serif !important;
      }
      

      Show
      Themes can override these styles by using more specific styles to override e.g. the Snap theme uses SCSS like this: // Print style guide for book #page-mod-book-print {     font-size: 18px !important;     font-family: $font-family-serif !important; }
    • Affected Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_37_STABLE
    • Pull Master Branch:
      MDL-43385-master

      Description

      At present printing a book is controlled by hard coded CSS (see https://moodle.org/mod/forum/discuss.php?d=220147#p972743) and defaults to Times Roman and can be pretty ugly, while the book display is controlled by he theme.
      Suggest: provide a way for the user to control the way a book prints (eg font, styles), maybe from the way the book appears.

        Attachments

        1. before-boost-book-chapter-print.png
          before-boost-book-chapter-print.png
          91 kB
        2. before-boost-book-print.png
          before-boost-book-print.png
          251 kB
        3. before-clean-book-chapter-print.png.png
          before-clean-book-chapter-print.png.png
          88 kB
        4. before-clean-book-print.png
          before-clean-book-print.png
          237 kB
        5. boost-book-chapter-print.png
          boost-book-chapter-print.png
          103 kB
        6. boost-book-print.png
          boost-book-print.png
          208 kB
        7. clean-book-chapter-print.png
          clean-book-chapter-print.png
          94 kB
        8. clean-book-print.png
          clean-book-print.png
          198 kB
        9. screenshot-1.png
          screenshot-1.png
          126 kB

          Issue Links

            Activity

              People

              • Votes:
                28 Vote for this issue
                Watchers:
                26 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  20/May/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 31 minutes
                  31m