Error message

  • Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /users/fisherde/public_html/
  • Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2394 of /users/fisherde/public_html/

Blackboard - A Blackboard Toolkit

  • Posted on: 6 November 2014
  • By: Ashley


The ease and power of the JSHack building block left our institution with an ever growing list of hacks, but these mostly fell under similar umbrellas, and were doing very similar tasks. This led to the creation of a toolkit, functions available across to other hacks, which enabled us a central point to manage how things did their stuff.


Previously with our creations, we were writing them from scratch for the most part, and in doing so were reinventing the wheel multiple times, if we needed to create a little 'just-in-time' message for people, in the event of maintenance to a cloud service, or the unavailability of certain options within a course, we needed to write the base operations time and time again.

The first tool available in our toolkit allows us to, as simply as "Notification(document.getElementById('target'), 'alert alert-info', 'Information', 'This option is not available currently', 'icon-info-sign);" create a message box for the user.

The Function:

function Notification(target, classes, title, text, icon){
        // Working
            var classDefines;
            var buildContainer = "<div style='margin-top:8px;' class='"+classes+"'>";
            buildContainer += "<div class='"+icon+" icon-3x pull-left'> </div>"
            buildContainer += "<H4>"+title+"</H4><p style='text-align:justify;'>"+text+"</p></div>";
            target.innerHTML += buildContainer;

All it is doing for us is building some simple HTML, however we have significantly reduced the work required to turnaround a new message significantly by creating the toolkit. In all, there are 7 tools in the kit, however other functions are being assessed, to see whether we can bring more and more into it.