Printing a Database Record | Moodle v2.3

Printing a Database Record | Moodle v2.3

Napisane przez: Francois Evans ()
Liczba odpowiedzi: 6

The Database activity includes template settings for each record. Is it possible to retain that formatting to print out a record from a database? At the moment when I try, it prints out the whole web page (blocks & all).


The Database does export to Excel /Open Office spreadsheet, but I'm concerned that formatting will be lost. - Any advice?

W odpowiedzi na Francois Evans

Re: Printing a Database Record | Moodle v2.3

Napisane przez: Itamar Tzadok ()

You can add css (to the css tab of the activity) to clean up unwanted parts when using the browser's print option. See http://moodle.org/mod/forum/discuss.php?d=207434&parent=906542 for a related example of the css. You can also use the ##export## tag (with portfolios enabled site wide) to allow exporting an entry to html file. hth uśmiech

W odpowiedzi na Itamar Tzadok

Re: Printing a Database Record | Moodle v2.3

Napisane przez: Francois Evans ()

Thanks Itamar.

In the css example you've given at the web link: http://moodle.org/mod/forum/discuss.php?d=207434&parent=906542

...you say: You need to check the actual selectors in the designated page as they may differ between themes. (My emphasis.)

What is an 'actual selector in the designated page' mean and how should I programme this? Thanks again for your useful tips. wstydzi się

W odpowiedzi na Francois Evans

Re: Printing a Database Record | Moodle v2.3

Napisane przez: Itamar Tzadok ()

The selectors are those names which identify the page's html elements for css. For example div#page-header is a div element with id="page-header". If you have such an element on the page you can apply to it css by reference to that selector.

You can use firebug or your browser's web inspector to inspect the html and css of the designated page to find the selectors of the elements you want to hide in printing, and add the selectors to the @media print css rules.

See illustration of using firebug.

W odpowiedzi na Itamar Tzadok

Re: Printing a Database Record | Moodle v2.3

Napisane przez: Francois Evans ()

Got it! Thanks Itamar. uśmiech

F.

W odpowiedzi na Francois Evans

Re: Printing a Database Record | Moodle v2.3

Napisane przez: Frank Ralf ()
See http://docs.moodle.org/dev/Print_style and http://docs.moodle.org/dev/Stylish#Print_style_for_Database_records

hth
Frank


PS:
It's a shame that this documentation is now buried in the Dev Docs smutny