I agree with Andrew, there might be themes that does not support dragdrop, to removing these buttons for them initially will be a shame.
Yes, I had some thoughts about this. What is missed in Moodle, is the way to determine if JS is actually enabled/supported by browser. We use the code that degrades nicely, which is good, but not sufficient in the cases like above.
The approach here could be to actually make browser informing server if it can handle JS. The flow of this process could be:
- On first Moodle page load. The renderer adds the js snippet that does ajax callback and refresh the page on success.
- The back-end which fetches ajax request, sets $SESSION->browserjsenabled = true;
- $SESSION->browserjsenabled can be used everywhere for checking that browser uses JS (e.g. in renderer for moveup/movedown buttons generation)
- If $SESSION->browserjsenabled has been set, renderer does not produce a callback snippet before session is expired again.