EduGarage Logo
Search:
Site Map
Upcoming Events:
Please e-mail us if you would like your webinar, conference, or get-together to be featured in this space.
Stay Informed:

Accessing the 'external' course ID (not the internal _12345_1)

rated by 0 users
Not Answered This post has 0 verified answers | 1 Reply | 1 Follower

Top 500 Contributor
2 Posts
Tim Galling posted on 15 Jun 2012 9:22 AM

Hi guys,

I'm new to building blocks but have set up eclipse and gone through the tutorials and all seems to be fine. I'm just trying to get at the course ID  which is set by our Student Records system in the feeds (not the one internally assigned in Bb). I've looked at the template variables and the one I need is this one @X@course.id@X@ although I haven't been able to suss our how to use blackboard.data.course.Course.getCourseId().

I've been able to use String strPk =   request.getParameter("course_id") ; but this returns the internal course ID.

If anyone can give me some code which will assign the 'external' course ID to a variable that would be a massive help.

I'm building a course tool so the code will be run by clicking the new tool from the Tools page within a course. This is set in the manifest and is working fine.

At the top of my .jsp I have the following:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<%@ page import="
        java.util.*,
        java.io.*,
        blackboard.persist.*,
        blackboard.base.*,
        blackboard.data.*,
        blackboard.data.course.*,
        blackboard.data.user.*,
        blackboard.persist.course.*,
        blackboard.persist.user.*,
        blackboard.platform.*,
        blackboard.platform.session.*,
        blackboard.platform.plugin.*"
%>
   
<%@ taglib uri="/bbNG" prefix="bbNG"%>
<%@ taglib uri="/bbUI" prefix="bbUI"%>
<%@ taglib uri="/bbData" prefix="bbData"%>

 

Many many thanks,

Tim

All Replies

Top 500 Contributor
2 Posts

ok, think I've got it....

<bbData:context id="ctx">

<%

Course thisCourse = ctx.getCourse();
String strExtCiD = thisCourse.getCourseId();
out.println( strExtCiD );

%>


</bbData:context>

Page 1 of 1 (2 items) | RSS
© 2006-2009 Blackboard Inc. All Rights Reserved. Blackboard, the Blackboard logo, and EduGarage are trademarks
or registered trademarks of Blackboard Inc. in the United States and/or other countries.