views.py
29.9 KB
-
Move Candy.js widget to its own iframe · 17865dd4
Moving the Jabber widget to its own iframe allows us to pop it out and in of the courseware. Refactoring more of the code (static assets, templates, etc.) keeps the Jabber app more self-contained so that it doesn't clutter up the main repo code. This code needs some Jasmine tests and view tests. It also needs some extra configuration in the settings and URLs files, namely: * Must add jabber/templates to MAKO_TEMPLATES * Must add jabber/static to STATICFILES_DIRS * Must add route for ?P<course_id>/chat to lms/urls.py Move Candy.js static assets to Jabber app Refactor the Candy.js static assets to the Jabber app to keep them out of the main codebase. This will help modularize the chat widget so that it's easier to just not include it by default, if desired. Move registered_for_course out of courseware.views The Jabber app needs to use this function, and it seems more fitting to import the function from a non-view module, like the courses module. So move that function there, and update imports and tests appropriately.
Nate Hardison committed