New block OpenBiblio

New block OpenBiblio

by koen roggemans -
Number of replies: 9
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
As my first programming experience ever, I created a new block for Moodle and OpenBiblio.

This block reads the database of OpenBiblio Open Source library software and pulls out which books an in Moodle logged-in user has borrowed and shows them with their due by date. Moodle needs to be able to read the OpenBiblio database and needs to know how to identify someone in that database. This data needs to be put in settings.php in the same folder. An example file is provided.

Comments and feedback welcome!

Code at http://download.moodle.org/download.php/plugins/blocks/openbiblio.zip and http://cvs.moodle.org/contrib/plugins/blocks/openbiblio

Average of ratings: Useful (1)
In reply to koen roggemans

Re: New block OpenBiblio

by James Keating -

nice work!  I have set this up on a test server and it is running perfectly smile  I would like to request a couple of skin deep improvements though.  How about the icon of what type of resource (video, book, cassette etc) you have displayed next to the name of the resource you have on loan? a little bit of colour would be nice too :D

thanks a lot, this will be really useful at my school!

James

In reply to James Keating

Re: New block OpenBiblio

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Hi James,

Glad you like it.
As for your request: time and my php knowledge are very limited. It would indeed be nice to have the overdue items is a colour and some icons would be nice too. As you can see in the guidelines, I would like the administration to be a lot more Moodle-like.
Hopefully some day some one with more knowledge, time or a stronger need for the improvements takes on the block and brings it further. After all, it is open source smile

I'll post here if I end up adding features to it off course.
In reply to koen roggemans

Re: New block OpenBiblio

by Globe College -
Any suggestion as to what we can enter in the "$libraryid = $USER->" field? I would like to use their email address (as this is also their login to their moodle) but the OpenBiblio system doesn't allow that their email address be their userid.

Any help as to how I can put their email there?

Thanks!
In reply to Globe College

Re: New block OpenBiblio

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
The string is only used to identify the user uniquely in Openbiblio. The users never need their account/ID in Openbiblio, only the administrators. So unless I understood you wrong, there is no need to use the emailadress.
We use a unique ID-number for the students (in the Moodle profile field ID-number) to put in OpenBiblio int the barcode number field.
In reply to koen roggemans

Re: New block OpenBiblio

by Globe College -
Thanks for the reply...

our only problem is that the login for our students on Moodle is their email address. In OpenBiblio, under "card number," you can't put in @ or . so I was hoping to be able to identify them by their email address entered in OpenBiblio.

Make sense?
In reply to koen roggemans

Re: New block OpenBiblio

by Globe College -
I'm so sorry - I had the advanced option hidden in the user profile on moodle. Now I see what you're saying!

Works great - thanks so much!! We're very excited about this plugin!
In reply to koen roggemans

How to make the OpenBiblio Block work on Moodle 2.0

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators

* Change the names of the language folders:
en_utf8 should be changed to en
nl_utf8 should be changed to nl

* Add the following line to the English language file:
$string['pluginname'] = 'OpenBiblio Block';

That's it.

Average of ratings: Useful (1)
In reply to koen roggemans

Re: New block OpenBiblio

by Martin Perumala -

hello, I installed both openbiblio and moodle block. I need to know what/where is the settings.php file. where is the example file. Could you help me pls.

In reply to Martin Perumala

Re: New block OpenBiblio

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators

Hi Martin,

Sorry, I missed your post - vote for http://tracker.moodle.org/browse/MDL-1626 wink

For the pre 2.x version, available in the old plugins database, the settings have to be made in moodle/blocks/block_openbiblio.php, which was a quick and dirty sollution. Examples are in that file and easy to find at the top.

There is a new version of the OpenBiblio block available in the new plugins database on http://moodle.org/plugins/view.php?plugin=block_openbiblio

All beginners issues of the previous version are solved:

  • updated for the Moodle 2.x branch
  • there is a settings page, so no fiddling in the code necessary
  • the page doesn't die anymore when the openbiblio database is not reachable
  • the error caused by a not-logged in user is caught, so the block can safely be put on the front page.

Kind regards

Koen