Citing Fez repository documents in Moodle

Today I wrote a text filter for Moodle 2.2 which will help Moodle teachers and admins cite documents from a Fez digital repository. Fez is a digital repository written by University of Queensland library staff for the university’s digital assets and for use as an open access research repository.

The best fit in Moodle for a digital repository such as Fez would be through a repository plugin, but the Moodle repository API assumes that you only want either a file, or a URL. I think there’s room for the API to be able to return a snippet of HTML as well – of an appropriately formatted link to the document in question. For instance, it would not be enough to simply present a URL, such as

Link to a document

it would instead be really nice to be able to have the repository plugin return a <div> element, with a formatted citation, such as:

Taylor, William (2005) (FAB_15_2_095) Lest We Forget: the Shrine of Remembrance, its redevelopment and the heritage of dissent. Fabrications : The Journal of the Society of Architectural Historians, Australia and New Zealand, 15 2: 95-112.

This would also apply to other repositories – it would be nice if the Flickr, Picasa and YouTube repository plugins could return a thumbnail of the image or video instead of just the URL. Until that happy day arrives however, we can use a filter instead. After installing the filter, we tell it which Moodle content formats we would like it to parse, and the base URL for our Fez repository:

Fez text filter settings in Moodle
Fez text filter settings in Moodle

Then, in our content, we insert a search term or a Fez document PID into a placeholder using double curlies, e.g.

Inserting a Fez document into Moodle content
Inserting a Fez document into Moodle content using a placeholder.

Which when we save, and have the Fez filter enabled, will produce a nicely presented citation:

Fez document citation in Moodle
A Fez document citation displayed in Moodle.

It would not be very difficult to convert this into a repository plugin that simply returns the URL to the document, or to extend or clone this filter to talk to other digital repositories, such as EPrints, DSpace or Fedora.

TODO: add a setting to control how many search results you want to display.

LCA in Brisbane

Hopefully I’m going to Brisbane in a week or two for LCA 2011. This would be fine except for the worst flooding in Queensland in over a hundred years. The organisers are still saying (at time of writing) that everything’s fine because the venue, Queensland University of Technology, is sufficiently above the river. I’m a bit skeptical myself, so indulge my urge to paraphrase: “Hey – the streets that aren’t still inundated will be buried in two feet of silt, you’ll need a gondola to get around, the power might be out, the sewer might be overflowing, most of the hotels will have been seconded for evacuees, snakes have followed all the rats into basements and attics, but hey, QUT is above the water-line so there’s no problem! Mind one of the crocodiles wandering around in the parks doesn’t EAT YOUR LEGS OFF”

Don’t get me wrong, I’d love to go, and I’m hoping to meet up with a bunch of Brizzy friends and conduct some business with folks at University of Queensland while I’m there, but I don’t hold out much hope, and I don’t fancy getting eaten alive by crocodiles, snakes, giant ants or zillions of mosquitoes.

Salmon cakes

Here’s how I made yummy salmon fish cakes out of last night’s leftovers.

  • 275 g cooked salmon, bones and skin removed, flaked
  • 275 g leftover potato bake, stovies, frittata etc. (or use mashed potato with a little grated cheese)
  • 1 egg
  • a little chopped red – e.g. red pepper, chilli
  • a little chopped green – e.g. fresh herbs, rocket, spinach, green beans
  • 1 tsp paprika and/or chilli powder
  • salt and pepper
  • flour

Bung it all in the processor and pulse until combined (but not puréed). Turn into a bowl and fold in enough flour to make a soft, not firm but not sloppy, mix.

For the crumb mix:

  • 2-3 tbsp pumpkin seeds
  • 1 tbsp cumin seeds

Grind to a coarse powder in a processor or mortar.

Roll the mix into patties and dust in a little of the crumb mix. Shallow fry in hot oil until golden. Since the ingredients are already cooked the mix only needs to heat through; they won’t take long! Serve immediately.

Why I’m not on Facebook any more

Dearest friends of mine,

You may have noticed I’ve dropped off the Facebook radar. Apart from finding it to be a gigantic time-waster, their increasing evilness with private data is a concern, as this link shows:
http://mattmckeon.com/facebook-privacy/

I urge you all to boycott it as well. You can rescue your friends’ email addresses into Yahoo Hotmail or GMail before you leave, as explained here:
http://www.labnol.org/internet/export-email-addresses-from-facebook/12970/

Testing steaks

How do you know when your steaks are done? Here’s a handy rule of thumb.

My cousin’s a bit of a chef. Poke the steak with the index finger of your right hand. Now touch the thumb and index finger of your left hand together, and poke the fleshy bit of your palm at the base of your left thumb. That’s rare. Now touch the thumb and middle finger together, and poke the same bit again. That’s medium rare. Thumb and ring finger, that’s medium, and thumb and little finger for well done. (photo to follow)

Beef Stroganoff

Serves 2, Preparation time 30 mins max.
If you’ve got some mushrooms lying around that need eating, this one’s perfect. Even though the earliest Stroganoff recipes didn’t have them, so what? Here’s a hark back to the original, but with mushrooms, otherwise it’s just wrong.

Beef Stroganoff on potatoes and spinach
Beef Stroganoff on potatoes and spinach
  • 2-3 large brown field mushrooms
  • oil or lard for frying
  • 12 oz (400 g) beef, sirloin, topside or similar
  • 1 tbsp mustard seeds (or 2 tsp mustard powder)
  • 1 tbsp flour
  • salt and pepper
  • 1 glass of red wine (and one for the cook)
  • crême fraiche or sour cream (yoghurt if slimming)

Accompaniment:

  • 3-4 potatoes
  • 8 oz (250 g) spinach
  • 1 tomato, deseeded and diced as a garnish.

Cut the mushrooms into strips and fry in a casserole with a little oil. Cover to sweat for a few minutes. Meanwhile, Cut up the beef into thin strips. Grind up the mustard seeds (or use mustard powder) and combine with the flour, salt and pepper in a bowl, and toss the beef strips in it to coat with the mustard mixture. Fry the beef in a skillet until browned, then add to the casserole. Add the wine to the skillet and stir to pick up the flavours, and pour into the casserole. Add the crême fraiche and stir. Simmer on low for 10-15 minutes.

This should be enough time to slice the potatoes thinly and sauté in the skillet for a few minutes. Add the spinach, cover and sweat until the spinach is done.

Mound the potato mixture in the centre of the plate as a base, and pile the Stroganoff on top. Drizzle the gravy over with a spoon, and garnish with deseeded diced tomato.

Professional!

NZ Brass Band Championships 2009

Went to NZ Brass Band Champs in Napier at the weekend with Hutt City Brass. A good time had by all, and caught up with lots of folks. The marching was a particular highlight.

I always approach marching with raw dedication and enthusiasm.
I always approach marching with raw dedication and enthusiasm. Photo: Adrian Raven

Stupid Section 92 Amendments

Here in New Zealand we have to suffer a stupid Copyright Amendment Bill that makes changes to Copyright law that, conveniently for rights holders, removes a couple of hundred years’ worth of progress in the judicial system from an accusation of copyright infringement. Now, we are expected to believe, an accusation is enough, and an ISP will be liable if they don’t yank your internet connection, just in case. To top it off, there is no recourse whatsoever in the case of a mistaken accusation.

New Zealand's new Copyright Law presumes 'Guilt Upon Accusation' and will Cut Off Internet Connections without a trial. Join the black out protest against it!

Refried Beans (Frijoles Refritos)

Refried beans are awesome with salsa and yoghurt.

  • olive oil
  • 2-3 rashers of bacon, chopped
  • 2 cloves of garlic, diced
  • 1 tsp whole cumin seeds
  • 1 tsp chili powder or paprika (to taste)
  • salt and pepper
  • 2-3 dollops of Frijoles Negros (see recipe)

Heat some olive oil in a pan and add the chopped bacon, garlic, and spices and fry for a couple of minutes. Ladle in some beans from the pot and mash with a potato masher. Continue to fry and stir for a good 10 minutes, or until the beans begin to brown and stick to the pan.

Serve in tortilla with yoghurt and a good fresh salsa made from diced deseeded tomato, red pepper, chili, garlic, spring onion and lemon juice.

YUM