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
ok, think I've got it....
<bbData:context id="ctx"><%Course thisCourse = ctx.getCourse();String strExtCiD = thisCourse.getCourseId();out.println( strExtCiD );%></bbData:context>