swirldev/swirl — pull request #110 by ncarchedi (2014-03-15 21:00:16+00:00)
Title: DON'T MERGE: "test" mode for course authors

Added a `test` method for some of the menu functions to accommodate content authors wanting to give their new lesson a test run. The goal is to go into the lesson immediately, bypassing all menus and exiting swirl when the lesson is over. The way I've done it here may not be ideal, but it's a little tricky since many of our functions (e.g. `resume.default()`) have side effects (i.e. assignments to `e`), therefore making it difficult to reproduce behavior by writing a new method (e.g. `resume.test()`).

To demo, type `swirl("test", test_course="Intro to R", test_lesson="Vectors")`. Ultimately, this function call will happen behind the scenes from the content authoring GUI.