I'm a new Canvas admin and am trying to figure if I can annotate iFrame URLs with user information. I have a survey that I'd like to embed in a Canvas page; the first question is hidden and ideally would populate with the student's Canvas user ID. Theoretically, the HTML content of the page would look like the following, but the portion in pink would be dynamic to the viewing user's ID. Is this something that (1) is doable in Canvas and (2) someone with limited API/LTI knowledge would be able to easily implement? Thanks!
<iframe src="https://survey.clicktools.com/app/survey/go.jsp?iv=3vo8w3wtc10a5&q1=user_id" width="100%" height="600"></iframe></p>
Solved! Go to Solution.
Hi Shanna --
You could write an LTI tool that would accomplish something similar. When a user clicks on a link to an LTI tool that's installed in an LMS, the LMS generates an HTTP POST request to the tool. This is called the LTI launch request, and it passes a bunch of different parameters from the LMS to the tool, including the user ID. You could write a very simple LTI tool that receives these parameters and then redirects the user to the clicktools URL with the user ID appended, and the survey would get loaded in an iframe inside of Canvas. The pros of this approach are that you'd be using a stable, standard protocol to receive the user ID from Canvas. The cons are that the code would be more complicated to write, and you'd need to have a server on which to run it (and all of the complexity that comes along with that).