-
Improvement
-
Resolution: Won't Fix
-
Minor
-
None
-
2.0
-
MOODLE_20_STABLE
There is alot of stuff that is using JavaScript (JS) in Moodle these days, including some pretty important bits like the navigation.
Unfortunately every new bit of JS that gets added represents another point of failure for Moodle users.
Presently one bit of JS near the beginning that breaks has the potential to break all other JS that follows it. Like a flimsy deck of cards.
There must be a way to help reduce these problems, incoulate Moodle from the JS bug if you will.
The first thing to spring to mind to me is to wrap each indivual JS routing bring printed by Moodle within a try...catch to that if a specific routine fails it doesn't take the following routines with it.
Basically just work out where $PAGE->requires->yui_module and others output and then wrap the output.
This would at least be a start.
Anyway what does everyone else think, does anyone have any further/better ideas.
Cheers
Sam