Skip to main content

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.

  1. On your course page, navigate to the lab you want (under the Labs tab) and click "Embed"

image

  1. Copy the JSON configuration provided

image

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

image

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

image

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

image

  1. After naming your plugin as desired, click on the item to edit it

  2. Click on the "Choose Plugin" button and select "Pop Up Template"

image

image

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

image

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

image

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

image

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:

  1. In Coursera, go to the week and unit you want your lab to be in and add a new App Item.

image

  1. 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:

  1. On your course page, navigate to the lab you want (under the Labs tab) and click "Embed"

image

  1. Copy the the Lab's Launchg Url by clicking on the Copy button.

image

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

image

  1. Click on Add app

image

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

image

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

image

  1. 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).

image

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, .sqlite or .sqlite3 SQLite database of 50 MB or less.
  • Datasette shows the database under its file name without the extension, so chinook.db appears as chinook. Links in your instructions such as /chinook/albums use 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 _, so Film Locations.db appears as Film_Locations.
  • For a lab where learners build their own tables, upload an empty database. A 0-byte .db file 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:

  1. Download the database from the sn_asset_library_sqlite_db_url address.
  2. Rename the downloaded file to the file name at the end of sn_labs_filepath. For sn_labs_filepath=/labs/datasette/lab.db, name it lab.db. Datasette names the database after this file, so the links in your instructions keep working.
  3. Upload it to the lab in Author Workbench, as in Step 1.
  4. 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.