edx/edx-platform — pull request #1316 by symbolist (2013-10-11 11:11:30+00:00)
Title: dashboard.html: Setup handlers before js for leanModal is loaded

https://edx-wiki.atlassian.net/browse/LMS-930

In dashboard.html event handlers are registered on the __unregister__ and __email settings__ links in the js_extra block. These copy the course id to the __unenroll__ and __email settings__ forms respectively.

The js_extra block is at the end of the page after lms-application.js and lms-modules.js and since the leanModal handlers are setup in lms-application.js in case the unregister or email settings button is clicked before the page finishes loading the course id is not copied to the form and results in an error.

This PR adds a js block which comes before the scripts and moves the dashboard.html js to this.

@singingwolfboy Is this a good way to do this?

![missing course number](https://f.cloud.github.com/assets/5305552/1313895/599206d8-3264-11e3-8507-c6254513fca3.png)