This tutorial will walk you through the creation of a custom XBlock. It will allow to display a video in a course, using oEmbed, and record when the student finishes watching it.
First, grab the source code for XBlock at https://github.com/edx/XBlock :
$ git clone https://github.com/edx/XBlock.git
$ cd XBlock
Follow the instructions in README.md
to get the workbench server up and running. Once you're done, you should be able to visit http://127.0.0.1:8000/
For the rest of the tutorial, continue to http://opencraft.com/doc/edx/xblock/tutorial.html