Coursera
Once you have created a lab, you then need to add it to your course via Coursera. When you are adding a lab to your course, you embed your lab into a unit of your course. This way, learners will naturally progress through the course, and complete your labs as they go.
Add an Instructional Lab to your Course
This section is only for instructional labs. If you wish to add a different lab type to your course, see the Add a (Non-Instructional) Lab to your Course section below.
As a Skills Network author, you can create "instructional labs". These are labs that include step by step instructions for working with tools external to Skills Network Labs, such as services on IBM Cloud.
HTML files will be automatically generated from instructional labs so they can be easliy embedded or linked to from your course. To embed an instructional lab in your course, follow the steps below.
- On your course page, navigate to the lab you want (under the
Labstab) and click "Embed"

- Copy the JSON configuration provided

- Close the pop-up and navigate to your Course Outline in the
Contenttab on your course page. Press the "Edit in Coursera" button to open the outline in Coursera

- Select the version of the course you want to add your instructional lab to

- Navigate to the week and unit you wish to add your instructional lab in, and insert an ungraded plugin

-
After naming your plugin as desired, click on the item to edit it
-
Click on the "Choose Plugin" button and select "Pop Up Template"


- After pressing "Continue", scroll down to the bottom of the page and select "Edit Configuration"

- Replace all existing content with the JSON you copied in step 2 and click "Save Configuration"

- Now, your instructional lab should appear in the plugin. You can now publish your changes, or view your instructional lab as a learner.

Add a (Non-Instructional) Lab to your Course
This section is only applicable for any lab type other than an instructional lab. If you wish to add an instructional lab to your course, see the Add an Instructional Lab to your Course section.
To add a (non-instructional) lab to your course in Coursera:
- In Coursera, go to the week and unit you want your lab to be in and add a new App Item.

- Add the following values to the corresponding fields within the App Item
| Launch URL | See the Lab Launch Url section below. |
| Consumer Key | See the LTI Credentials section below. |
| Secret | See the LTI Credentials section below. |
| Learner Privacy | Share learner ID, full name, and email address |
Lab Launch Url
The Lab Launch url can be easily found in Author Workbench on your course page. Just follow these steps:
- On your course page, navigate to the lab you want (under the
Labstab) and click "Embed"

- Copy the the Lab's Launchg Url by clicking on the
Copybutton.

- Now, go back to Coursera and click on
App Manageron the left side of your screen to create a new app name and configuration.

- Click on
Add app

- Now, select
LTI 1.1and enter the Coursera credentials you copied earlier from the Author Workbench.

- After clicking Continue, name your app and set your learner privacy preferences. Then select
Add App.

- You can return to your 'App Item,' publish your newly created lab, and then launch it.
LTI Credentials
The consumer key and secret can be found in Author Workbench on your course page. Navigate to the Advanced tab and and scroll to the LTI Credentials (Advanced Users Only) section. Here, you will be able to copy the consumer key and secret. If you are publishing your course to Coursera, please use the LTI Credential (Coursera) credentials. Otherwise, use LTI Credential (Skills Network / edX).

Add a Datasette Lab to your Course
A Datasette lab needs a SQLite database as well as its instructions. Author Workbench keeps the database with the lab version and sends it to the lab on every launch. Once your lab has a database, you add it to your course the same way as any other lab.
Step 1. Give your lab a database
When you create a Datasette lab, or a new version of one, upload your database in the Lab database (SQLite) field.
- The file must be a
.db,.sqliteor.sqlite3SQLite database of 50 MB or less. - Datasette shows the database under its file name without the extension, so
chinook.dbappears aschinook. Links in your instructions such as/chinook/albumsuse that name, so keep the same file name when you replace the database. - Use only letters, digits,
_and-in the file name. Author Workbench changes any other character to_, soFilm Locations.dbappears asFilm_Locations. - For a lab where learners build their own tables, upload an empty database. A 0-byte
.dbfile works. - A new version made from an existing one starts with a copy of its database, unless you upload a different file.
Each learner keeps their own copy of the database between launches, including any tables they change or add. Learners launching a version for the first time get its current database. When you replace a version's database, learners who launched that version before are asked whether to update their copy. If they update, their old copy is kept as a backup file and the new database replaces it.
Each version has its own copy. Learners who move to a new version start with that version's database, and the changes they made in the earlier version are not loaded.
To replace the database, open the lab's Versions tab, click Database on the version, and click Replace database. Draft and published launches of a version use the same file.
Step 2. Test the lab in Author Workbench
On the lab's Versions tab, click Test on the version, then Test Lab. Datasette opens with your tables next to the lab instructions.
Step 3. Add the lab to your course
Follow Add a (Non-Instructional) Lab to your Course. The Lab Launch Url in the Embed window already includes the database, so you do not add any custom parameters.
Step 4. Test the lab in your course
Publish the App Item in Coursera and launch the lab from it. This checks the course's own LTI settings, which the test in Author Workbench does not.
Datasette labs set up with custom parameters
A Datasette lab can also be added as an App Item that points at https://labs.cognitiveclass.ai/login/lti, with four custom parameters (sn_labs_tool, sn_labs_filepath, sn_asset_library_sqlite_db_url and sn_asset_library_instructions_url). Labs set up that way keep working. To move one to Author Workbench:
- Download the database from the
sn_asset_library_sqlite_db_urladdress. - Rename the downloaded file to the file name at the end of
sn_labs_filepath. Forsn_labs_filepath=/labs/datasette/lab.db, name itlab.db. Datasette names the database after this file, so the links in your instructions keep working. - Upload it to the lab in Author Workbench, as in Step 1.
- Update the App Item as in Add a (Non-Instructional) Lab to your Course, and delete the four custom parameters.
After the move, learners who used the lab before get a fresh copy of the database. Their earlier copy is still in their storage, but the lab no longer opens it. Move a lab between course runs if learners build their own tables in it.