I'm also interested in this.
I'm a teaching assistant for an introductory R class now, and I've been transitioning the professor's course notes to interactive learnr tutorials.
We've also been using swirl lessons I've written, with the students submitting a swirl log file via a Google form.
As is, I'm looking at moving from swirl to Datacamp for a variety of reasons, chief among them are the better interface and easier tracking.
However, ultimately, it would be nice to be able to eliminate any dependencies on external platforms.
If I figure out a clean solution I'll let you know.