Home > DOULS, Development, Gadgets > Open Forum search gadget

Open Forum search gadget

December 21st, 2011 Jason Platts

The Open Forum search Google gadget gives students the opportunity to find help/information across some public OU resources based on keyword search.

Grab of the OU Open forum search gadget

OU Open forum search gadget

The gadget integrates with two key OU sites:

  1. OpenLearn –open educational resources
  2. Platform – OU community.

Within the gadget the user can enter search terms and then has the option to chose which resources will be searched:

  1. OpenLearn Learning Space Forum
  2. Platform Forums
  3. All of OpenLearn and Platform.

The main technical challenge for this gadget was the need to connect to different sites and access search information that is returned in a number of formats. Each of the three search options uses the same approach to request the search data (OpenSocial API http methods) but interpret the search results differently depending on the type of data returned. All three search types are fully accessed and controlled from within the gadget using JavaScript – there is no server-side code associated with the gadget.

Searching Learning Space forum

The Learning Space forum is hosted on a Moodle site and uses the OU ForumNG module to provide the forum functionality. Searching a single forum is straight-forward as there is a specific search page that expects parameters of the forum id and search terms in order to return appropriate results. The gadget requests this page expecting text (html) back as a response. The request is cached for an hour to prevent excessive load on the requested site.

In order to display the search results from the HTML returned by the forum search the page is “screen-scraped” by the gadget. The search page returned is cleaned and added into the gadget DOM into a hidden “buffer” element. From this certain nodes containing the search results are lifted, re-formatted and then inserted into the gadget search results area.

Searching Platform

Platform is the OU community site and is hosted on a Drupal site. Platform forums are searched using AJAX to return JSON results. The gadget mirrors this functionality, caching the request for an hour to prevent excessive load on the requested site. There are two types of forum that can be searched, the gadget uses a batch method to simultaneously request results from both of these.

As results are returned in JSON data format it is fairly straight-forward to interpret this and use to display the results within the gadget results area.

Currently the Platform search only returns matches based on forum titles, not content. Ideally, if possible, if the search returned matches against content this would be more accurate and mirror the functionality of the Learning Space search.

Searching multiple site content

Searching multiple sites and returning a result set provided a challenge as these results need to be amalgamated and “ranked” according to relevance to the search terms. This would be extremely complex to develop; so the gadget utilises a custom Google search for this search option.

The custom search is configured to search across several public facing OU sites:

The advantages of using Google custom search to provide this search option are:

  • It can be configured to include extra sites as required
  • Uses standard Google search technology to index and search sites, and rank results
  • Free
  • Provides analytics
  • Provides an API.

The gadget uses the API provided by Google to request search results. This returns data in JSON format. Within the request the detail returned can be configured so that only the minimal data is returned to improve performance.

Unfortunately, the API will only process 100 requests per day under the no-fee model. To work around this limitation the gadget will detect when the daily limit is exceeded (as this information is returned with the API response) and in this case a fallback of presenting a link to a Google search page is used.

The functionality of this gadget differs quite significantly from the original requirements that were suggested from the visioning stage. Originally, the intention had been to produce a gadget that had a list of known open forum resources that a student could discover through recommendation based on a tag cloud; students would also be able to recommend resources to be added with a specified tag – these would then be “certified” before inclusion. Unfortunately, it was not possible to realise this original vision as there would be significant development required to produce this functionality. Also, institutionally there would be an overhead to maintain this list of “certified” forums i.e. if a Facebook group were recommended this would need to be checked periodically to ensure all material within it were appropriate.

The search open forum gadget is technically simpler and could be easily updated to include more resource sites at a later date. In addition, by searching OU sites that are already moderated there is no need to explicitly check content.

Categories: DOULS, Development, Gadgets Tags:
Comments are closed.