Moodle

Print View Button on all moodle pages

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.8.1
  • Fix Version/s: None
  • Component/s: Accessibility
  • Labels:
    None
  • Environment:
    All pages
  • Affected Branches:
    MOODLE_18_STABLE

Description

Need a print view button so that when users print they don't get all the headers and footers of the current theme. without such a button users are discouraged from having content within moodle. they tend to prefer to keep content as attachments that print as 'clean' copies. Need this feature to encourage teacher to build content INTO such activities as wikis, web pages etc. where they are searchable rather than as mere attachments and lists of files.
Currnently about to try a patch from Peter Lieverdink peter@cc.com.au.

Issue Links

Activity

Hide
Nick Freear added a comment -

Hi, thanks for this idea.
I agree we want the ability to pages in Moodle without headers, footers (though I can imagine some Moodle's needing a copyright statement) and probably blocks - strictly speaking this may be usability, but is not accessibility.

I think that print style sheets may be the way to go, see this Meyer article from September 2002 (plus 2 later ones on ALA),
http://www.alistapart.com/articles/goingtoprint/

Wikipedia is the best exemplar of print style sheets I know,
http://en.wikipedia.org/wiki/Wikipedia:Questions
http://en.wikipedia.org/skins-1.5/common/commonPrint.css

This does not rely on a button - simply try printing the short example WP page above - you should see the main content minus the sidebar and header. Note, I've tested in Win/Firefox 2 and Opera, but not yet in IE as I currently can't print anything from IE!

(Wikipedia does have a 'printable version' link in the "Toolbox" section in the sidebar,
http://en.wikipedia.org/w/index.php?title=Wikipedia:Questions&printable=yes )

Show
Nick Freear added a comment - Hi, thanks for this idea. I agree we want the ability to pages in Moodle without headers, footers (though I can imagine some Moodle's needing a copyright statement) and probably blocks - strictly speaking this may be usability, but is not accessibility. I think that print style sheets may be the way to go, see this Meyer article from September 2002 (plus 2 later ones on ALA), http://www.alistapart.com/articles/goingtoprint/ Wikipedia is the best exemplar of print style sheets I know, http://en.wikipedia.org/wiki/Wikipedia:Questions http://en.wikipedia.org/skins-1.5/common/commonPrint.css This does not rely on a button - simply try printing the short example WP page above - you should see the main content minus the sidebar and header. Note, I've tested in Win/Firefox 2 and Opera, but not yet in IE as I currently can't print anything from IE! (Wikipedia does have a 'printable version' link in the "Toolbox" section in the sidebar, http://en.wikipedia.org/w/index.php?title=Wikipedia:Questions&printable=yes )
Hide
Nick Freear added a comment -

Hi, sorry the patch above includes a print style sheet,
— moodle/theme/print.css 1970-01-01 00:00:00.000000000 +0000
+++ moodle+print/theme/print.css ...

I think a better location would be moodle/theme/standard/print.css, then theme designers can override as for other style sheets.
(FYI, here is Alistapart's short print style sheet,
http://alistapart.com/css/print.css
included with a "media" attribute,
<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" /> )
Nick

Show
Nick Freear added a comment - Hi, sorry the patch above includes a print style sheet, — moodle/theme/print.css 1970-01-01 00:00:00.000000000 +0000 +++ moodle+print/theme/print.css ... I think a better location would be moodle/theme/standard/print.css, then theme designers can override as for other style sheets. (FYI, here is Alistapart's short print style sheet, http://alistapart.com/css/print.css included with a "media" attribute, <link rel="stylesheet" type="text/css" href="/css/print.css" media="print" /> ) Nick
Hide
Stephen Digby added a comment -

Don't understand how to implement these changes/patches/style sheets on moodle.
Hope that the feature can be included in moodle release ASAP

Show
Stephen Digby added a comment - Don't understand how to implement these changes/patches/style sheets on moodle. Hope that the feature can be included in moodle release ASAP
Hide
Ann Adamcik added a comment -

This shouldn't require any library changes.

In theme/standard, add the following line to meta.php:

<link rel="stylesheet" type="text/css" media="print" href="<?php echo $CFG->httpswwwroot ?>/theme/standard/print.css" />

Create a print.css file:

#header, #footer, .navbar {
display: none;
}

/* fix for printing long tables in Firefox */
table, td {
height: 100%;
}

Other themes can add custom print stylesheets by including local meta.php and print.css files in their theme directory.

Show
Ann Adamcik added a comment - This shouldn't require any library changes. In theme/standard, add the following line to meta.php: <link rel="stylesheet" type="text/css" media="print" href="<?php echo $CFG->httpswwwroot ?>/theme/standard/print.css" /> Create a print.css file: #header, #footer, .navbar { display: none; } /* fix for printing long tables in Firefox */ table, td { height: 100%; } Other themes can add custom print stylesheets by including local meta.php and print.css files in their theme directory.

People

Vote (9)
Watch (6)

Dates

  • Created:
    Updated: