Hi All,
when your making a theme in moodle its more than likely you'll be using :
echo $OUTPUT->course_content_header();
echo $OUTPUT->main_content();
echo $OUTPUT->course_content_footer();
The stuff around that is generally what you change, and that makes it really easy to break js....
For example :
echo $OUTPUT->course_content_header();
echo $OUTPUT->main_content();
echo $OUTPUT->course_content_footer();
currently spits out something like :
<div class="course-content"> {stuff} </div>
but nothing with #region-main, #page-content, #page etc - which are examples of actual hook used by the javascript in core, and can be really easily changed in a theme.
For core js like drag n drop and whatever else would it be sensible to suggest the hooks :
e.g.
REGIONMAIN : 'some element identifier'
were always hooks that were actually the stuff spat out by those core output renderers?
I'm not in any way suggesting wrapping more and more divs around content generated by core output renderers, just that it might be less fragile if the hooks used by core js were the same as those output by core renderers, rather than those you can easily change in a theme.
As always, thoughts welcome.