I have developed a building block which is accessible as course tool. Can I use this building block as a module in BB.
Thanks in advance!!!
Similar to the way in which you will have defined your course tool, just add a module-defs section to your bb-manifest.xml file to also define it as a module. For example, here is the entry I use for my BasicLTI building block:
<module-defs> <module-type ext-ref="basiclti-module" title="plugin.module.name" uicreatable="true"> <jsp-dir>module</jsp-dir> <jsp> <admin>admin.jsp</admin> <view>view.jsp</view> </jsp> </module-type> </module-defs>
Thankyou Stephen for your reply.
I added the content you mentioned in BB and now my building block is available for selection purpose in module.
Following error comes up whenever I try to do preview of my module.
java.io.FileNotFoundException: The requested resource (/webapps/bb-sample-bb_bb60/module/) is not available at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:756) at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:425) at javax.servlet.http.HttpServlet.service(HttpServlet.java:635) at
When building block accessed through course tool, it does not give any error.
Any help appreciated.
That probably just means that you have not placed your jsp files in a directory named module as in the example I quoted.
I placed the jsp files in module directory and my module is working now. Thankyou!!!
I was able to create module based on my existing building block.
But, when I try to view this module in my course, what i see is just the title of the building block.
And, when I try to edit content for this module, I can see the functionality of my building block is working fine.
The module should display the output of your jsp page (or whatever URL you have associated with the module). So I would check that your code is returning the content you expect to appear.
I tried to verify the code change performed for modifying this course tool - building block to a module and cannot see any issues. And, am able to create module in BB based on this module B2. But, when I preview this module, it does not work(rather displays just the title) whereas when I try to edit content for that module, it does display my jsp page correctly.
Below is the code snipprt from bb-manifest.xml:-
<module-type ext-ref="trainingcourse-module" title="plugin.TrainingCourse" uicreatable="true">
Also, have added these.jsp files in directory /WebContent/module/
Are there any additional changes required which you think I might have missed. Any suggestions/pointers.
I am able to view my module correctly now in Blackboard course.
My course tool has two pages where I ask user to confirm one first page and on the next page based on the click it creates training course. But, somehow I am not able to replicate same in my module type building block.
In my module, only the first page is displayed and it doesn't navigate to the second page and errors out. Is there any way through which we can have same functionality as module like the way we have for the course tool.
Perhaps your link has an incorrect URL which is not pointing to your B2? Remember that the content of a module is being injected into a Learn page - it is not a standalone URL from your B2, so you will probably want to use an Ajax request if you want the link to just replace the content of the module and not the whole page.
Thanks Stephen for your reply.
For my issue, where it was throwing error when I navigated from first jsp page to another jsp page in module b2 ,modifying .jsp file path as as /webapps/<vendor ID>-<plugin handle>-<schema name>/search-results.jsp worked.(picked it from your reply for another query in community). I can view my b2 as module now just like my course tool.
I had an additional query, when I view my module b2 on the first jsp page, Blackboard banner appears along with the tabs in the module. Is there any way through which this embedding can be removed?
Glad to hear you have it working now. To prevent the banner from appearing just make sure your jsp page does not generate one. For a module all you should/need to return is a code snippet as it is injected into an existing Learn page. That is, just the HTML you would include between the body tags.
Retrieving data ...