I have created a LTI bridge to our survey tool Qualtrics.
I am using the external tool activity and have created a config file for the bridge so details can be set e.g. url to pass and some account details like lis_result_sourcedid
i would like to set some custom parameters e.g the survey id in the instructorcustomparameters feild and this to be populated in the file
I was look for some help on doing this if I set the survey id in the config file i can add it using $this->launchParams["survey_id"] i have created a function below to build the url need
public function launch()
{
// Any parameters that have been specified by the Tool Consumer can be passed to Qualtrics to allow for customization.
$urlParams = array(
"SID" => $this->launchParams["survey_id"]
);
foreach ($this->launchParams as $key => $val) {
if (Config::get("custom_pass_all") || in_array($key, Config::get("custom_pass_params")))
$urlParams[$key] = $val;
}
// Build the request to the Qualtrics endpoint.
$url = $this->launchParams["custom_qualtrics_url"];
$query = http_build_query($urlParams);
// Perform the redirect.
header("Location: " . $url . "?" . $query);
}
Any help or advice would be great