Adding Wikipedia search to Moodle

Name

Wikipedia Block

Module Type

Block

Author

David Horat

Released

2006

Maintained

Actively

Languages

Chinese, Dutch, English, Finnish, French, German, Greek, Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish, Swedish (for logo image by-line)

Compliance

Good

Documentation

Readme.txt file

Errors

None

This is a simple block that collects a query for Wikipedia and directs the user to a Wikipedia entry in the appropriate language. Languages are determined automatically from the user's language settings.

Getting ready

Install the Wikipedia Block directory into the /moodle/blocks/ directory and visit the Notifications page. As there are no settings, you won't see the normal message stating tables have been established for the block.

How to do it...

Turn editing on and add the block from the Blocks list.

How to do it...

The block should show a logo with a by-line in the user's chosen language, and the language below the search query text box should also default to that language. The preceding screenshot of the block shows what appears when Dutch is the user's preferred language. The language drop-down list below the search block can be changed to see Wikipedia entries in different languages. The default for unknown languages is English.

How to do it...

When the button labeled with a ">" is clicked, the query is passed to Wikipedia and the resulting entry should be in the selected language.

By default, Wikipedia entries appear in the current tab or browser window, displacing the Moodle page. You might want to change this so entries appear in a new tab or browser window. Unfortunately there is no setting for this (or anything else about the block) so in order to make this change, you have to delve into the block's code.

Open the file block_wikipedia.php and look for the following line.

$form = '<form action="http://www.wikipedia.org/search-redirect.php" id="searchform">';

Add a target attribute to the tag to direct searches to a new tab or browser window.

$form = '<form action="http://www.wikipedia.org/search-redirect.php" id="searchform" target="_blank">';

There's more...

Here are some pedagogical applications for the Wikipedia block:

  • Asking students to compare Wikipedia entries in different languages as part of a language course
  • Allowing students to find royalty free images for projects
  • Allowing students to look up episode information for their favorite TV show

See also

  • Wikipedia easy links filter
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.35.122