LimeSurvey Plugin that allows LimeSurvey to act as an LTI provider for tools such as Moodle, Canvas and openEdX. LimeSurvey will have access to the LMS course name and course and student identifier and allow the completion of a survey. This plugin can also be used to return a grade/score/result back to the LMS based on a LimeSurvey expression. Therefore this plugin can be used to administer an exam or quiz in LimeSurvey which calculates a score and returns it automatically to the LMS.
Download the zip from the releases page and extract to your plugins folder. You can also clone directly from git: go to your plugins directory and type
git clone --recursive https://github.com/adamzammit/LTIPlugin.git LTIPlugin
- LimeSurvey version 3.x, 4.x, 5.x
- Surveys need to be activated, with a participant table set up with at least 4 attributes avaiable, 6 attributes if you want to return a grade/result (the plugin will use the first 4 or 6 attributes for LTI related data)
- If your LTI Provider is running on HTTPS, then LimeSurvey must run over HTTPS also
- Visit the "Plugin manager" section in your LimeSurvey installation under "Configuration"
- Confirm the LTI attributes match the system you wish to use (examples are given for OpenEdX and Canvas, also you can use Debug mode if you want to discover these yourself for testing in your own system)
- Save the settings
- Activate the plugin
- Visit the "Global settings" section, tab called "Security" in your LimeSurvey installation under "Configuration"
- Ensure "IFrame embedding allowed:" is set to "Allow"
- Activate an existing or new survey
- Visit "Simple plugin settings" for the survey and choose "Settings for plugin LTIPlugin"
- A random key and password should be generated - save the settings then a URL to access should be displayed (otherwise a message will be displayed notifying of the requirements for the LTI plugin as above)
- Use the URL listed and the key and secret generated to set up your LMS to use LimeSUrvey as an LTI Provider (see below for examples)
- By default a course participant will be able to complete the survey only once, and will return to the previous point of completion when visiting the survey again if not completed. If you want them to be able to complete multiple times for the same unit - please set "Allow a user in a course to complete this survey more than once" to "Yes"
- If you want to return a grade/score back to the LMS - enter a text or expression in the return result box. You can just put the number 1 if you want 100% returned on completion, otherwise you can use any valid LimeSurvey expression to send a calculated value (this could be used to send back a score on an exam for example). The value should always be a floating point number between 0.0 and 1.0
Note: See the included file "example-survey-return-assessment-value.lss" to see how you can return the result of an assessment using the plugin
- Edit your course
- In your course, visit "Settings" then the tab "Apps", then "View App Configurations", then click on the green "+_App" button
- Choose "Manual entry" for your configuration type
- Name the app
- Copy the consumer key, secret and Launch URL from the LimeSurvey LTIPlugin settings page (under Simple plugins in your LimeSurvey survey)
Now that the application is configured, you can:
- Add a new item to a module in your course, and choose "External Tool" then the name of your app and don't forget to "publish"
- If you add as an "Assignment" and you have the return result set in LimeSurvey simple plugin settings, the score will be returned
If you have recieved a "CSRF Token" error in LimeSurvey you may need to check the box "Load in a new tab" when editing the item in Canvas
- Add a new "Activity or resource"
- Choose "External Tool"
- The "Tool URL" is the URL that appears on the "Settings for plugin LTI Plugin" page for your survey
- Click on "Show more" under "General"
- The "Consumer key" is the key that appears on the LTI plugin settings page
- The "Shared secret" is the secret that appears on the LTI plugin settings page
- Edit your course in OpenEdX "Studio"
- In your course, visit "Settings" then "Advanced Settings"
- Ensure "Advanced Module List" contains:
["lti_consumer"]
- Ensure "LTI Passports" contains:
["limesurvey:KEY:SECRET"]
(Where KEY and SECRET are replaced with the key and secret generated in the configuration step above - this will also be able to be copied and pasted from the LTIPlugin settings in LimeSurvey) 5. Save the Advanced Settings
If you have recieved a "CSRF Token" error in LimeSurvey you may need to set "LTI Launch Target" to "New Window" in OpenEdX to overcome this.
- Add a new "Unit"
- Choose "Advanced" as the Component (if "Advanced" doesn't appear, check your Configuration settings as above)
- Click on "LTI Consumer"
- Click on "Edit"
- Enter a display name - this can be anything you choose
- The "LTI ID" should be:
limesurvey
- The "LTI URL" is the URL that appears on the "Settings for plugin LTI Plugin" page for your survey
- Other settings can remain as default
- Click "Save" and you will now be able to access LimeSurvey from within
If you discover any security related issues, please email adam@acspri.org.au instead of using the issue tracker.
PR's are welcome!
You are free to use/change/fork this code for your own products (licence is GPLv3), and I would be happy to hear how and what you are using it for!