AnsweredAssumed Answered

How do you create Course urls from List<CourseMembership> objects???

Question asked by ulib621 on Mar 7, 2017
Latest reply on Mar 8, 2017 by ulib621

Hi Everyone,


I've managed to create a list of Courses associated to an individual user. Something along these lines,

List<CourseMembership> sResults = mLoader.loadByUserId(userId);

What I'm trying top do now, using BBNG tags,  is output  the contents of the sResults list with a link to the individual Courses - which I think is reasonable.

How do I do this???




My attempts so far are here in this section of BBNG code >


<bbNG:inventoryList className=""



        description="List of  modules returned"

        emptyMsg="No enrolled Modules">


            <bbNG:listElement name="Module" label="MODULE" isRowHeader="true">

                <a href="/webapps/portal/frameset.jsp?                  tab_tab_group_id=_3_1&url=%2Fwebapps%2Fblackboard%2Fexecute%2Flauncher%3Ftype%3DCourse%26id%3D<%=listRecord.getCourseId()%>%26url%3D">

                           <%=listRecord.getCourseId()%>   </a>    




It produces this >


But notice in the line where I'm generating the HREF,  what I actually need in the URL is the 'key' part of getCourseId() i.e. in teh URL i need to isolate



_307_1 etc


How do I isolate the key part of CourseId in code & do you know an alternative way to generate mu link URL?



Bets Regards,