Progress (of a sort) with the e-Portfolio Templates widget

Since my last meeting with Louise, I’ve been working on the e-Portfolio Templates widget, specifically looking at customising it for her Legal Skills module. When the first instance of this is done, we’ll have our first use case scenario to test out. I have, however, come across a number of issues which I thought it’d be worth posting about. I only cover one here really and aim to look at others (if they remain issues) in future posts1.

A shot of Blackboard's VBTE...

The first issue I have is dynamically inserting content into each page of a student’s portfolio, automatically on their behalf. If we are to provide students with a structure for their portfolio, it’s not enough to provide them with a set of titled but blank pages (as I do in the demo video within the summary of the lunch meeting) — the pages need structure too. Blackboard’s e-portfolio tool allows (or requires that) users edit their pages through a Visual Text Box Editor (VBTE), with its own formatting toolbars. The VBTE in Blackboard is an rendered by an iframe within a form. To get readymade structures onto each page the widget needs to enter information into the iframe before the user does and, because we are building several templates at once, it needs to submit the form on their behalf too.

Unfortunately, the iframe in question loads after the rest of the page. If the tool is set to try and insert content right away, an error is produced effectively saying that the element could not be found or that a certain property of it does not exist. I can’t find a way (perhaps simply due to my lack of knowledge in this area) to hold off inserting the content until the iframe has loaded properly. Adding an onload event handler for example doesn’t seem to work.

The solution I’ve come up for now involves using a setTimeout call to delay the load by a second.  I am, by doing this, effectively hoping that the iframe will have loaded after a second’s delay. Perhaps this is okay — it proves that the widget can work in principle and even if the iframe’s content hasn’t loaded it’s enough that the element itself exists and isn’t producing an error — but it’s not a very elegant or efficient way of dealing with the problem.

Further to that, I’ve found that even after successfully getting the content into the iframe, submitting the form with a simple form.submit() call will not save it. Instead I have to simulate a click of the actual button “Submit” in Blackboard. Again, perhaps this is okay but it does seem a little messy.

So there has been progress but it’s been hampered by a few hiccoughs on the way.

Since my last meeting with Louise, I’ve been busy getting in touch with others she mentioned might be interested in the e-Portfolio Templates widget. I will post more on progress with piloting shortly, as well as the library I have been building to keep the basis of the widget platform agnostic.


1. I’ve refrained from posting on development of this widget previously because much of it was re-factoring code that was developed in another project and would have meant blogging an awful lot of not particularly interesting or necessarily relevant background information. And now I see that, as the tool that operates in a very different and hopefully much more useful way, I was probably right to do this. But it does mean I’m encountering issues I’ve not encountered before, either because they’re completely new or because of my increased awareness of standards. So this is, to borrow Karsten’s phrase, my first “geekcode” post. Sort of.

About Guy

I am currently Enhancement Officer (for Education Technologies) at the University of Reading. I am also studying for a Masters in Research at the University's School of Systems Engineering.
This entry was posted in e-Portfolio Templates, Plugin development and tagged . Bookmark the permalink.

1 Response to Progress (of a sort) with the e-Portfolio Templates widget

  1. karlund says:

    I thought of a solution to the insertion problem:

    There is an B2 class called blackboard.platform.plugin.PluginUtil which has a (undocumented) method getInsertToVtbePostUrl() which I use (and unfortunately have to use) to get information from a B2 into the Vtbe.

    If you had that Url you could post directly to the Vtbe. We could set up a simple B2 that returns that URL to your javascript.

    This solution has the obvious drawback that it will rely on said B2 being in the system in a consistent manner. I.e. each course using your code must install the B2 and change the URL to point to their “local” B2.

    Not sure if this solution is much better than yours actually…

Leave a Reply

Your email address will not be published. Required fields are marked *