LTI === Adding the bot to your LMS -------------------------- To add this tool to your LMS, you need to run it on your own server, let's say example.com. Currently it is started by running ./bot.py runclient, which starts an OTR bot and the LTI server. The server can then be reached at example.com:5000. In your LMS, enter example.com:5000 as the launch URL for this LTI application. The "Consumer key" and "Shared secret" are in the settings file for your environment. In our :mod:`settings.development_sample` settings, find `PYLTI_CONFIG`. You can see that we added one consumer under "consumers", which has ``__consumer_key__`` as his consumer key, and ``__lti_secret__`` as his secret. It is recommended to change these defaults. Now it's time to add your bot to the plugins/apps in your LMS. Open EdX ++++++++ To add your bot to a course in Open EdX, follow these steps. 1. In Open EdX studio, go to *Settings* -> *Advanced Settings* 2. In *Advanced Module List*, enable the LTI module, by adding ``"lti"`` to the list. If you have no other modules enabled, the value of the text field will look like ``[ "lti" ]``. 3. In *LTI Passports*, add the otrbot. This is done by adding three colon (:) separated values to the list, in 1 string: ``"otrbot::"``. Make sure that you fill in ```` and ```` with the same values as you entered in the settings file. Now, in your course: 1. Add a unit, you will see that you can choose an "Advanced" module. Click that, and choose *LTI*. 2. Click the edit button of the LTI module. Here, fill in - **LTI URL**: example.com:5000 (replace example.com with the URL to your OTR bot machine). - **LTI ID**: otrbot - Take a look at the other settings. You might want to configure *Open in New Page* and *Display Name* as well. You should now be able to use the LTI otr-bot component Canvas ++++++ In canvas, follow these steps to add the bot to a course: - In your course, click Settings and then go to the Apps tab. - Click Add App - Choose "Manual entry" - The only fields that are currently relevant in Canvas are "Consumer key", "Shared secret" and "Launch URL". Follow your previously defined settings for the key and secret. The launch URL in our example is example.com:5000. Add a useful name in the "Name" field and keep the other fields empty. - Click the Submit button to save the app. Note that Canvas does not typically check any of the fields. To test the application, add the bot to an assignment. And to add the bot to an assignment: - Go to Courses -> Assignments - Click + Assignment to add a new assignment and add a new assignment. - Click the + next to your new assignment to add a sub-assignment. - Click "More options" to be able to add LTI components. - Write whatever you want in the screens, an Assignment name is required for the assignment to be saved. Be sure to add "Points" to the assignment if you want to be able to see grades. - Under "Submission Type" choose "External Tool" Insert example.com:5000 as the URL for the external tool. - Save the assignment. You will now see an example of the course page you just made, with the OTR bot screen that is provided through LTI. - Note that the OTR bot only supplies a grade if the assignment is viewed by a student: in the teacher environment, no grade will be passed back to Canvas. Class documentation ------------------- .. automodule:: otrbot.lti.lti :members: