Greetings everyone,
I've been asked to use Blackboard to distribute a very important link but only to specific users. The list goes over 1,000 different users and they want me to add it at the entry page level. Creating a module for the link is not the problem, but do I tell Blackboard just show it to these thousand students. Oh I almost forgot, each link is unique to each individual.
I've thought about using a secondary role, however, since each link is personalized to each individual student that would be too much work.
Any ideas?
For anyone interested, Mary Jane and I are doing a little behind the scenes testing. The design is simple enough - insert the unique key value into an unused user attribute and then pull it out of the user context with a little javascript. In more detail:
Populating the Data
Getting it back out
Some nice to haves left over from another project:
Tracking Use = If you've seen some of the older documentation about Template variables, you might have run across the "launch_external.jsp" page in Learn. By sending users "through" this page, you can capture these click events in your activity logs. The page is here: "/webapps/blackboard/launch_external.jsp?" and it takes the argument "target=(URI encoded url)". The first part of the code below gets the current location so it can build the link to the launch_external.jsp.
Hiding the value from users - in my previous project, I was a passing a bunch of values that were not particularly sensitive, but I didn't want to expose them to the users. So I used an "on click" type function applied to a custom class (smartLink) to build the link dynamically. I kept it in this example so users wouldn't easily see their Survey ID.
In summary, when a user clicks on a any link with the class of smartLink the code will:
Example:
Assume my Company value is "ABC123DEF456"...
If I create a link <a class="smartLink" href="https://someplace.youknow.com">Click Here</a>
When the user clicks on the link they will pass through the launch_external.jsp and wind up at https://someplace.youknow.com/ABC123DEF456
The code
if (!window.location.origin) {
window.location.origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? (':' + window.location.port) : '');
}
var pathToLaunch = window.location.origin + "/webapps/blackboard/launch_external.jsp?target=";
var companyKey = "${context.user.company}"
var qString = "/" + companyKey;
$$('.smartLink').invoke('observe', 'click', function(event) {
var el = $(Event.element(event));
var origAppLink = el.href;
var newAppLink = origAppLink + qString;
var fullNewPath = pathToLaunch + encodeURIComponent(newAppLink);
el.href = "javascript:void(0);";
window.open(fullNewPath);
location.reload();
});
Deployment options.
There are several ways you could make the script available for your html input. Two of them are: