Printing a database

Printing a database

Erin Livengood -
回帖数:10
I am creating my lesson plans for the year in a database and would like to be able to print the entries (5/page) is there any way to do this.

Erin
回复Erin Livengood

Re: Printing a database

Itamar Tzadok -
There are many ways neither of which is straightforward unless of course you display all the information in the list view and print this web page. Alternatively, you can enable the RSS of the database, set the RSS template to display the entry as you want it in the printout and then open the RSS page and print it. Alternatively you can do something more complex than these two ways, and I'd be happy to explain what and how if neither one of the above works for you. 微笑
回复Itamar Tzadok

Re: Printing a database

Erin Livengood -
Thanks Itamar I reset the RSS template to display the entries the way I want however I am having trouble figuring out how to view the RSS page.

Erin
回复Erin Livengood

Re: Printing a database

Itamar Tzadok -
You should enable the RSS for the database in the database settings by selecting a number of RSS articles to show (up to 50 without hacking the code) and then you should be able to see in the database page an icon rss.gif which you can click to open the feed in your browser. 微笑
回复Erin Livengood

Re: Printing a database

filippo simeoni -

I'am italian and my inglish isn't good;

but I'am searching one way for printing a record of database whitout internet esplorer mask.

Thanks

回复filippo simeoni

Re: Printing a database

Frank Ralf -
Hi Filippo,

If I understand you correctly you want to print a single database record from the browser without all that other brother stuff? That could be achieved using a special CSS style sheet for printing. I will have a closer look at the problem.

There's also an Italian forum if you prefer using your mother tongue: http://moodle.org/course/view.php?id=23

Cheers,
Frank
回复Frank Ralf

Re: Printing a database

Frank Ralf -
You can use the following CSS to hide all the unnecessary items:

div#header, div.navbar, div#footer, div.tabtree, div.paging {
display: none !important;
}

The easiest and most flexible way to apply the CSS without actually changing any CSS file of your Moodle installation is using the Firefox extension "Stylish" (http://docs.moodle.org/en/Themes_FAQ#Stylish).

See Stylish for screenshots how it should look.

hth
Frank
回复Frank Ralf

Re: Printing a database

Aruna Dayanatha -

I used the above code in the CSS section,and enabled the RSS as well to test the prinitng option of the Database record.

I am not sure if its due to these actions, how ever, I cannot access the tabs in the database ativity. Only the Database list viw is displayed.

Plese let me know ho could I get the tabs back on.

回复Aruna Dayanatha

Re: Printing a database

Frank Ralf -
Hi Aruna,

You have to make sure the CSS is only applied to the print view of the page, see http://docs.moodle.org/dev/Print_style for details.

hth
Frank
回复Frank Ralf

Re: Printing a database

Aruna Dayanatha -

Dear Frnk,

I may have made a mistake. I have applied some CSS setting to remove unnecessary elemets from the view. I have simply added the CSS to the List view Template.

Now, the issues is How would I break in to this. I mean to the CSS window and adjust it. Is there a place, I mean a databasefield that stores the CSS code inside the moodle database.

回复Aruna Dayanatha

Re: Printing a database

Frank Ralf -
Ah, I understand.

Try entering the URL directly into your browser's address field, e.g.

http://localhost/moodle/mod/data/templates.php?d=2&mode=listtemplate

(You probably will have to change the id in the URL to match the id of your database.)

hth
Frank