Add an OpenDSA Exercise or Visualization to a Moodle Course


OpenDSA is an eTextbook project developed at Virginia Tech. OpenDSA materials include many visualizations and interactive exercises that support courses in a wide variety of Computer Science-related topics such as Data Structures and Algorithms (DSA), Formal and Programming Languages.

OpenDSA has hundreds of visualizations and exercises. Most algorithms and data structures are illustrated by interactive algorithm visualizations. Students could enter their own test cases to see how the algorithm or data structure works on that input, and they can control the pacing of the visualization.

A course instructor who is using the Moodle LMS can add individual OpenDSA materials directly into their Moodle courses. Below are detailed instructions on how to do this. Gradable exercises will report scores to your Moodle's gradebook.

To add one or more OpenDSA modules, exercises, or visualizations in your Moodle course, perform the following steps:

Step 1: Go to OpenDSA.org and create an account.

Step 2: Send an email to opendsa@cs.vt.edu and ask for instructor access.

Step 3: Once you are provided with the instructor access, you need to click on your email address at the top right corner of the page and you will be redirected to a page from where you can copy your consumer key and a shared secret as shown in the image below:

Step 4: Next, navigate to your course in Moodle and click on "Add an activity or resource".

Step 5: Select "External Tool" from the list and click "Add".

Step 6: Click on the "+" icon on the right of Preconfigured tool to add a new Tool Provider.

Step 7:

Step 8: Under "Privacy" settings, select "Always" for all three dropdowns.

Step 9: Click on "Show more..." and check "Content-Item Message". This enables instructors to select content (i.e. exercises) to be added to their courses.

Step 10: Once the above steps are completed, click "Save Changes" to add OpenDSA as a Tool Provider.

Step 11: Now you should be back on a previous page. Select OpenDSA from Preconfigured tool dropdown and click on "Select content". This will cause Moodle to send an LTI launch request to the Tool URL you set in Step 7. If the Select content button is disabled, or otherwise doesn't work, refresh the page.

Step 12: If this is your first time going through this process for your course, you will be asked to provide some information that OpenDSA can use to identify your course offering. Fill out the required fields and click "Submit".

Step 13: Once you do that, a tree view will be displayed listing the topics for modules, visualizations, and exercises that are available. To expand one of the categories click the arrow to the left of the folder icon. You will then see a collection of OpenDSA modules. If you want to add a module to your course, just click on the name of the module. Expanding a module by clicking the arrow to the left of its name will display the names of the exercises and visualizations contained within that module. If you want to add an individual exercise or visualization to your course, simply click on it.

Step 14: The Activity name and the Tool URL text fields will be automatically filled with the name and the URL that will be used to launch the resource.

Step 15: Select if you want this OpenDSA resources as graded or ungraded content by going to the "Grade" section. Select the type of the exercise from the "Type" dropdown. Finally, click "Save and return to course" or "Save and display" at the bottom of the page.

Step 16: The selected exercise should be now added to your course.

Step 17: The students will be able to view the OpenDSA exercise or visualization by clicking on it from the list of topics as shown above. One example of OpenDSA exercise is shown here:


If you added a graded content, in that case, once a student completes an assignment, his/her grade will be submitted to Moodle's gradebook as shown below: