Tool adapter tools follow the same tool contract as all the other native tools which come packaged with LAMS, with a few slight variations. As with these native tools, a tool adapter tool must have author, learner and monitor interfaces, as well managing user and collaborative content through several tool sessions. The main difference when it comes to tool-adapter tools is that the content is and business logic for the tool is all managed by the external LMS tool.
The tool adapter tool is (in simple terms) a gateway that points the user to the correct page and content on the external server based on their role and the content they ask for. For example when the teacher opens a tool adapter author page, they are merely redirected to the tool's authoring page on the external server and when the user is done, they click the finish button and the external LMS returns the user to LAMS having saved their content. Of-course it is not as simple as this statement may seem, but that covers the general idea of the tool adapter. In the later sections there are detailed explanations of how it all works and how to create your own tool adapter tools
Tool adapter tools need to have an external server mapping, because the external tool almost always needs to know user and course information before it will save any content, also there needs to be an authenticated session or the user will not see anything. So the sequence of events goes something like this:
- A user called "Bill" starts from external LMS "Moodle" logged in as a teacher
- User clicks on the LAMS "Open Author" link which is controlled by the integration.
- A request is made to LAMS to open author for a user, LAMS looks for a user called "Bill" from the list of "Moodle" users, if it cannot find one, it creates one on the fly.
- User is authenticated in LAMS as "moodle_Bill".
- User drags a moodle forum tool in LAMS author onto the authoring frame and opens the authoring page for the tool.
- User is redirected to the moodle forum tool author page which is located on the external "Moodle" server.
- User's session credentials are maintained on external Server.
There are a couple of key points where the LAMS server will have to talk to the external integrated server in order for the tool adapter to work.
When you click on a tool in author, a popup window will take you to the tool's authoring page. This is the same deal with tool adapters, but instead of it being a locally generated page. It is a external page on an external server. So this begs the question: How does the tool know where to redirect to get the user to the external author page?
This is something that needs to be handled differently for each LMS, as each LMS manages its URLs differently. You might only have to append a content ID to the end of a non-changing URL, or maybe you might have to change the URL depending on what course this authoring sequence is to be made in. To handle this custom operation of each tool adapter, we have introduced the customCSV param which is passed from the external LMS through to all tool adapter tools. The customCSV is a comma-separated string that