printer-friendly version of a quiz? is this possible?

printer-friendly version of a quiz? is this possible?

by Nyree Williams -
Number of replies: 11

Hello

Is there any way to make a print friendly / pdf version of each quiz?

I'm using the randomization funtion to produce different versions of the quiz but the students can't take the quiz online so it must be printable.

Is this possible?

thanks in advance

Nyree

Average of ratings: -
In reply to Nyree Williams

Re: printer-friendly version of a quiz? is this possible?

by Itamar Tzadok -

You can add to your theme @media css rules for the quiz page. Then if you set up the quiz with all questions on one page the students could use the browser's print option to print a clean version. You may need also to set the css to page break after one or two questions depending on their display size so that the printout will divide properly to pages. hth smile

In reply to Itamar Tzadok

Re: printer-friendly version of a quiz? is this possible?

by Emadof Tosen -

where to put @media in which css and which class

In reply to Emadof Tosen

Re: printer-friendly version of a quiz? is this possible?

by Itamar Tzadok -

See example at http://docs.moodle.org/dev/Print_style.

You can test locally in a quiz by adding a description question and in html mode adding the css inside a style tag:

<style type="text/css">
...
</style>

hth smile

In reply to Itamar Tzadok

Re: printer-friendly version of a quiz? is this possible?

by Nyree Williams -

Hello Itamar

Thanks for responding

I followed the example in the link but unfortunately it doesn't change the print style when I tested it on an existing quiz. I'm using  moodle2.3

Is there any other way to get a print friendly version of quizes?

Nyree

In reply to Nyree Williams

Re: printer-friendly version of a quiz? is this possible?

by Itamar Tzadok -

The example is css-wise outdated. You need to put there the right css selectors according to your theme. For instance the css should hide the quiz header by means of

div.tabtree, div#header, div.navbar,
div.headermenu, div.paging, div#footer,
div.datapreferences {
    display: none;
}

But the standard header selector has been changed to div#page-header in Moodle 2 themes and you need to change this css accordingly. If you use custom menu, you need to add to that list of selectors div#custommenu, etc. smile

Average of ratings: Useful (1)
In reply to Itamar Tzadok

Re: printer-friendly version of a quiz? is this possible?

by Nyree Williams -

Hello Itamar

I've been working on this all day, with some success,This is the css I've got so far:

but can anyone tell me how to get rid I rid of the grey borders / lines and shading? see attached image. Nothing is working!

Thanks very much

Nyree

Attachment print friendly.PNG
Average of ratings: Useful (1)
In reply to Nyree Williams

Re: printer-friendly version of a quiz? is this possible?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You nee to use Firebug (or the equivalent tool in your favourite web browser) to find out what CSS rule is causing those borders. Then override that rule to get rid of them.

Average of ratings: Useful (1)
In reply to Tim Hunt

Re: printer-friendly version of a quiz? is this possible?

by Nyree Williams -

Yes that's what I've been using, maybe there's a way to hide all the borders?

I can't remove the left hand margin either sad

I'll keep trying

Thanks anyway

Nyree

In reply to Nyree Williams

Re: printer-friendly version of a quiz? is this possible?

by Miro Iliaš -

Dear Nyree,

please did you find out how to remove the left border ?

I tried it with Firebug, but could not extent the text over the whole page, see the attachement.

Best, Miro

In reply to Itamar Tzadok

Re: printer-friendly version of a quiz? is this possible?

by Miro Iliaš -

Dear Itamar,

would you please give us a little more know-how about adjusting the css-layout of the quiz page-to-print ? I partially succeeded with simple removal of some objects with the firebug addon, but I was left with this big left border ( see the attachement in my post below).

Best, Miro

In reply to Nyree Williams

Re: printer-friendly version of a quiz? is this possible?

by Eoin Campbell -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

You could try using a plug-in I developed (Moodle2Word Word table import/export) which allows you export question banks to Word table format. The Word format tables are reasonably neatly laid out, and suitable for printing. However, all parts of the question are displayed by default. To re-format the questions as a quiz, you need to download and install a Word template which has a command to hide all the answers, feedback and other stuff you don't want appearing.

Note that a question bank is not the same as a random selection of questions for a quiz though.