Moodle and overlib 4.10

There's an odd bug with our installation of Moodle 1.9.x which comes up occasionally.

"overLIB 4.10 or later is required for the CSS style plugin"

This seems to be caused when one of the javascript files fails to load properly, and then gets stuck in the users browser cache.  

Clearing the users browser cache normally fixes the problem. In one case last year, it was simpler to to force to to refresh from the server side, and so I temporarily added a dummy version parameter to the end of the line in lib/javascript.php which loads overlib.js to become eg. overlib.js?update=1. A cleaner way to do this, depending on how your etags are configured, might be to update the last modified date on the file in question - so "touch lib/overlib/overlib.js" might also help.

Debugging a Promethian ActivBoard

Learned a few tricks today while trying to debug problems with a Promethian ActiveBoard 2+.  The board was not responding to any pens.  After a short time discovered that the "pen" was a Wacom digitiser stylus, so tracked down a real Promethian pen.  

The board was being recognised in the ActivManager hardware section, but the pen movement and touch was having no effect.

Restarted the PC.

Updated to the latest version of ActivInspire, and also separately updated to latest ActivDriver.

Turned off the projector, waited for cool down red light to stop flashing.  Power cycled the board by unplugging, waiting 20 seconds and plugging back in again. 

Disconnected the USB cable, waited for one minute and plugging back in again.

Two useful tricks learned:  

1. To escape from the calibration when pen is not working, right click on your mouse.

2. Our ActivBoard 2+ works after a fashion while in standby mode (button is red).  The pen works, but the tracking is erratic and lines are a bit jaggy when the power button is on red/standby.  Make sure that the board is turned on with green light showing.

Activboard-standby-secret

Knowledgebase:

http://uk.prometheankb.com/display/4/kb/article.aspx?aid=313911&n=1&docid=16844&tab=search

 

 

Deleting pages from books and other Drupal gotchas

There is a significant differance between the behaviour of the drupal edit books admin pages and the drupal menus admin pages.  Specifically the delete link does very different things.

Drupal -> Admin -> Menus -> Menuname (edit)

drupal-book-gotcha

Drupal -> Admin -> Books -> Bookname (edit order and titles)

drupal-menu-gotcha

The delete buttons on the lists of items in these two core drupal module do very different things.  Clicking delete in the edit list in the book module deletes the node, whereas clicking on delete in the menu module just deletes the menu item and leaves the node in place.

 

 

Update on Blackboard and Firefox 3.6 - Badly formatted request issue

I posted earlier on a problem with  Firefox 3.5/6, caching and etags headers and Blackboard 7.3. 

The issue appears the second time they click on the xid-9999 redirect which is shown when a file resource appears in a content list.  The message is 

400 BADLY FORMATTED REQUEST, Tomcat / Apache error message

Possble solution - have apache intercept and rewrite the headers for urls in this format.  Check that mod_headers is enabled in apache and add the following to the apache config file.



<LocationMatch "/bbcswebdav/xid-*">
    Header unset If-Modified-Since
    Header unset If-None-Match
</LocationMatch>


   

Blackboard and Firefox 3.6 - Badly formatted request

Came across an odd problem with Blackboard 7.3 server and Firefox 3.6.  It seems that our users who have upgraded to Firefox 3.6 are encountering a problem when they view web resource linked using xid-9999 type urls. 

The first time someone clicks on an item linked to a file resource in a content list it appears normally.

But the second time they try to click on the link to the resource, they see:

400 BADLY FORMATTED REQUEST, Tomcat / Apache error message

It appers that the crux of the problem is how Firefox 3.6 responds to caching and etags headers.

One workaround for now is to clear your cache using Firefox / Preferences / Advanced / Network / Clear Now

Update: posted a proposed solution using apache to clean up the requests

Here's the long version......

We're using Blackboard v7.3.230.0 running on Tomcat 5.5.26 on Apache 1.3. 

The linked items use a perminant url in the formal /xid-98788.  Requests for this page are then redirected to the current version of the file in the content collection.  I notice that the server returns an etag and expires header even on the 302 temporary redirect responses.  It does not include nocache headers and it uses the same dummy etag for every response, and an expires header in +24 hours.

When Firefox 3.6 requests the /xid-99999 resource it includes the etag and an if-modified-since header based on the previous last modified date.

The Blackboard / Tomcat server doesn't seem to like these headers and throws a 400 Badly formatted request error.

 

The first time Firefox 3.6 requests the page

GET http://vision.hw.ac.uk/bbcswebdav/xid-310314_2

The response is:

302 Moved Temporarily

Response headers include:



Date: Fri, 12 Mar 2010 14:33:41 GMT
X-Blackboard-product: Blackboard Academic Suite&#8482; 7.3.230.0
Cache-Control: public
<strong>Etag: bb-cache-1</strong>
<strong>Last-Modified: Thu, 13 Nov 2008 18:16:31 GMT</strong>
<strong>Expires: Sat, 12 Mar 2011 14:33:41 GMT</strong>
Content-Disposition: filename="index.htm", filename="index.htm", filename="index.htm", filename="index.htm", filename="index
.htm"
Location: http://vision.hw.ac.uk/bbcswebdav/courses/COURSENAME/somedir/ufp1/index.htm
Content-Length: 0
Keep-Alive: timeout=15, max=96
Connection: Keep-Alive
Content-Type: application/octet-stream;charset=UTF-8


The second time Firefox requests the page:

GET http://vision.hw.ac.uk/bbcswebdav/xid-310314_2

Unlike previous versiosn of Firefox eg. 3.0.17, in firefox 3.6, two extra request headers are sent -

 

<strong>If-Modified-Since: Thu, 13 Nov 2008 18:16:31 GMT</strong>
<strong>If-None-Match: bb-cache-1</strong>

Reponse is:

400_BADLY_FORMATTED_REQUEST

and includes these headers:

X-Blackboard-product: Blackboard Academic Suite&#8482; 7.3.230.0
Cache-Control: public
Etag: bb-cache-1
Last-Modified: Thu, 13 Nov 2008 18:16:31 GMT
Expires: Sat, 12 Mar 2011 14:49:32 GMT

Regular files in content collection as opposed to xid refereces are served up to Firefox 3.6 normally, so you may reload a page several times once you have been redirected, but using the link from the list of resources twice causes the problem.

GET http://vision.hw.ac.uk/bbcswebdav/courses/COURSENAME/somedir/index.html

Response 200 OK

Request headers include:

http://vision.hw.ac.uk/bbcswebdav/courses/B21UF_2009-2010/ultrafast/index.html

If-Modified-Since: Fri, 12 Mar 2010 15:31:17 GMT
If-None-Match: "227921-219620"

Response headers include

Pragma    no-cache
Cache-Control    no-cache
Etag    "227921-219620"
X-Blackboard-product    Blackboard Academic Suite&#8482; 7.3.230.0

Reposne headers include:

Pragma: no-cache
 Cache-Control: private
Etag: "227921-219620"
Last-Modified: Wed, 22 Apr 2009 11:23:27 GMT
Expires: Thu, 12 Mar 2009 14:49:25 GMT

Workaround for now - use another browser? Chrome, Safari.  Or in Firefox clear the cache when you see this issue.

Public courses from a noguest moodle

Our VLE is set.up primarily to give our students access to course resources, however it has been taken on by some research groups as collaboration space. Some of the groups are interested in making their areas public and allowing people without accounts access. The difficulty arrises because we want to be able to quickly change courses between 3 levels of access - closed : enrolled students and staff only preview : any student or staff has read only access public : open to external visitors as guest We presently use the 'guest' faculity to provide the preview access within a closed (no guest/google) moodle. Couple of options come to mind: 1. Close all courses to guest access, and then enable preview access using role overrides at category or course level. The enable public guest access. 2. Pinhole for specific courses by tweaking login and require_login() function. (If only there was a hook, or I was confident enough to install php pecl runkit) 3. Create a paralled networked moodle, where public courses can be hosted with different permissions Number 3 looks like the way we are going - a networked moodle means that we can give our internal users permissions to manage their courses, and also permit guest access or self registered users in a more public space.

Moodle and Mediafilter - disabling inline flash

So among the small things I've found out today is that moodle does some interesting things when you upload html pages and try to serve them through a moodle course. If the filter files configuration is on then the moodle text filters may rewrite things in the file, making smilies appear or adding the theme css and moodle javascripts eg. Ufo.js to the header of the file. It also means that if mediafilter is turned on, links like a href="something.swf" are automatically rewritten into an embedded flash object. Quick tip to disable this is to add a question mark onto the end of the filename. A href="something.swf?" will not be rewritten.

date/time value reaches 1234567890 tonight

Many computer systems represent date and time values by counting the number of seconds since a specific date and time. The commonly used UNIX date time value counts from 1 January 1970 00:00 GMT.  

At 23:31:30 GMT today (Friday 13 February 2009) the unix datetime value reaches the integer number 1234567890.

Frequently asked questions
Q1: Is there a website where I can see a countdown?

Q2: Will anything bad happen? 
A: Probably not.  We have another 29 years before we reach the maximum 32 bit value for this time, see wikipedia on the 2k38 problem

Q3: Is this important?
A: Not really[1], just a cool number.  

Q4: How do I turn a number into a local date/time?
A: date -r 1234567890

Q5: How do I find out what time it is in this form
A: date +%s

Q6: But I don't have  a unix machine?

--
[1]: Unless you wrote some code in the 80's or 90's and never imagined we'd still run your program, or have working computers after y2k and decided that 1234567890 was a nice number to represent something like 'end of file', or 'initiate self destruct sequence'.

Telescopic Text story

A nice little story about making a cup of tea by Joe Davis which uses javascript to expand and re-wite the story word by word.

Telescopic Text is a short story by Joe Davis. ...
Telescopic Text is a short story by Joe Davis. The story expands word by word. ....

I wonder if something similar might be a nice starter or exercise from writing in English?

My first thought was some kind of programming project to write a telescopic text editor. 

On second thought though, perhaps it is simpler to use a bit of paper.  Start with a sentence at the top of the page, and progressively rewrite adding or replacing words to make the story longer and longer, as exercise in drafting and rewriting.