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.
Retrieving data ...