February 2010
M T W T F S S
« Nov    
1234567
891011121314
15161718192021
22232425262728

Fixing Drop Down Menus

Posted by Malcolm on November 24th, 2009 — Posted in Errors, NG, Version 9

In some of my new Release 9 building blocks, I’ve been plagued with a problem where the drop down menus work in Firefox and Safari, but display the menus in the wrong location in Internet Explorer. This can make them impossible to use! I have chatted to some of the CSS gurus at Blackboard and seen others post about this on edugarage. In desparation I submitted a ticket to our Blackboard Technical Support Manager (Garry Harper).

Garry has just emailed me back to say that he has found the answer. If I add  the following to the top of the page, it forces IE into a strict mode of page interpretation and the menus work:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
“http://www.w3.org/TR/html4/strict.dtd”>

By default the JSPs I’d created with netbeans either had no DTD declaration or used a transitional rather than strict DTD.

Fantastic, I owe Garry a beer or two for this :-)

Unavailable icons

Posted by Malcolm on October 8th, 2009 — Posted in Progress, NG

For years I have been frustrated with custom content types I have created, because when they are set as unavailable they don’t display a greyed out icon like the normal ones do. I thought there was a missing manifest entry that would fix it (aside: don’t get me started on missing manifest entries) but it turns out (at least in release 9) that it’s much simpler than that!

Assume that your content type has an icon imaginatively called icon50.png at present

  1. Rename this icon icon50_on.png
  2. Create a copy greyscale it, tweak the gamma, etc. until it is a pale shadow of it’s formal self and save it as icon50_non.png

Ensure your manifest entry points to the new file (icon50_on.png) and you’re in business.

I’m pretty sure it works for other types e.g. icon50_on.gif as well :-)

Persisting Groups

Posted by Malcolm on May 26th, 2009 — Posted in NG, API

Having played with the GUI I knew there had been some changes to Groups in Blackboard Release 9, but I didn’t expect the APIs to have been altered so radically.

I have a tool that allows the user to create a group and set whether discussion boards, email, etc. is available to group members. This used to be very easy:

Group group = new Group();
group.setTitle("A Group");
group.setIsDiscussionBoardAvailable(true);
// set a few other things including the courseId
groupDbPersister.persist(group);

but oh no, not in NG - this persister creates a group, but doesn’t save the availability data for tools. The only thing in the documentation was a passing reference to a CourseGroupManager in the entry for Group.clearAvailableTools() method.  After a lot of digging it appears you need to use this:

CourseGroupManager cgMger = CourseGroupManagerFactory.getInstance();
cgMgr.persistGroup(group);

Hope that saves someone else a few hours of frustration :-)

It’s the little things

Posted by Malcolm on May 26th, 2009 — Posted in Getting Started, NG, API

I’ve just started looking at some Bb 7 code I wrote for my Sign-up tool, which adds a custom content type.
I am updating it to run in Release 9 (NG) and wanted to change the tool slightly so that the name of the content item becomes a link to the content’s view.jsp page.

I banged my head against a wall using the attractive setUrl() method, before I remembered that this is only used by custom Bb  external link type content items. A quick dig around some of the examples on the OSCELOT projects site showed me the way - you simply enter the title not as plain text, but wrapped in anchor HTML tags. That does the trick, though it screws up the new NG “Edit this” controls, which now show the anchor text as well as the title.

Oh well, nothing’s perfect :-)

Using JavaBeans

Posted by Malcolm on January 23rd, 2008 — Posted in Progress, netBeans

I’ve been experimenting with JavaBeans, trying to add them to my code to make it more component-based and get over the stateless nature of JSPs. After a week of experiments and some very helpful comments from Mark O’Neil (Dartmouth, USA) and Marios Stamoulos (Newcastle College, UK) I finally have some working code - a portal module that uses a bean to store values :-). The sample code (Session Detective) can be found here:

source SessionDetective.war

It looks like the portal tab page uses a different session from any future JSP calls that break out of the portal (i.e. display their content on a full page, still within the frameset). Thus there is session affinity once out of the portal, but not between the portal and subsequent pages. This kind of thwarts what I was hoping to do, but is useful to know. I’m going to contact Blackboard to confirm this…

NetBeans 6.0

Posted by Malcolm on January 16th, 2008 — Posted in Getting Started, netBeans

The release version of NetBeans 6.0 has arrived. I tried an early build, but hit a few problems and decided to wait. Things look good now - with some nice additions such as built in support for Subversion and a better interface for international properties files (you can now see all language variants at once!).

I was thrown at first as it now doesn’t have the Web Application or Tomcat plugins installed by default. Indeed you now have to install Tomcat separately too. This does make it a smaller download and I suppose not everyone needs Tomcat, but sadly for Building Block developers it means a little more work getting set up compared with Version 5.5.

I’m working on an updated install guide for Mac and Windows users. It will be released via OSCELOT (www.oscelot.org).

Posted by Malcolm on November 29th, 2007 — Posted in Getting Started, Errors

I came across this blog today which has a great introduction to analysing Exceptions in the stack trace. It is written from a general Java programming perspective, but is very applicable to Building Block developers too.

edugarage

Posted by Malcolm on October 25th, 2007 — Posted in Getting Started

edugarage

Try not to choke on the name, but Blackboard have launched their revamped Building Block Developers’ Site - eduGarage (www.edugarage.com). It is wiki based and so users can contribute materials too. Credit must go to the Blackboard team - the site is well laid out. Finally it is easy to locate the SDKs with one click from a Bb website. It looks like in the future sample code and new tutorials will be added. There’s also links to community resources such as this blog (thanks) and the OSCELOT website (www.oscelot.org). The only scary thing is the smallprint at the foot of the wiki.

BreadcrumbBar environment field

Posted by Malcolm on April 12th, 2007 — Posted in Getting Started, Version 7

I can never remember what the valid environment values are when you create a new breadcrumb bar using the <bbUI:breadcrumbBar> tag. I left it empty by mistake (it’s hard to show nothing, so I’ve used some red brackets). Blackboard came unexpectedly to the rescue, reporting this error:

[i.e. nothing] is an unsupported environment.Supported environments are: portal, course, quick, ctrl_panel, sys_admin, quick
So there you have it (although I don’t think quick should be there twice :-))

Note though there other handles which appear to work, e.g. admin_plugin_manage which gives you
ADMINISTRATOR PANEL > BUILDING BLOCKS >

If you want to see them all and can access the underlying database, this SQL query will list them:
SELECT INTERNAL_HANDLE FROM NAVIGATION_ITEM ORDER BY INTERNAL_HANDLE
Knowing what they do requires a crystal ball, or at least to be able to think like Blackboard…

Version numbering

Posted by Malcolm on April 5th, 2007 — Posted in Getting Started

I have been experimenting with version numbering. Originally I updated the version number after every small change, and re-installed the building block. This means you know everything has been updated, but has some nasty side effects. If your building block contains modules, then any modules defined in the manifest will have been deleted and you will have to create them again. That get’s tedious. I’m not sure what happens to modules that you’ve added later as “instances” of a custom module type declared in your building block. If you are lucky they may stay, but I wouldn’t bet on it.  If your building block is a course tool and people have added menu items pointing at the tool, then they will disappear from every course if you update the building block. I have plenty of emails from angry or confused staff to prove this point :-(

Thus I’ve been investigating two other routes. If you have sufficient privileges on your Blackboard server, you can just use scp or ftp to overwrite the files you’ve changed (e.g. a couple of JSPs and maybe a class). You’ll need to restart the server for this to take effect, but any related modules and course links will stay. You just risk a bit of instability until the restart if certain JSPs haven’t been called before and your server tries to run with a mix of old and new code!

The other option is not to update the version number and re-install the building block. This time you get a warning, but the building block remains available (so you keep modules and menu links). This works if you are just changing JSPs but will not update classes.

Thus I don’t think that there is a single fool-proof way to update the code and keep your old stuff . Choose the most appropriate compromise for your needs :-)