Great, thank you Vy.
Your answer shows another important aspect about using the YUI libraries.
Is the "Ajax" option meant to switch all YUI functionality like "Drag & Drop", "Dialogues", "Animation" etc. or just the "Drag & Drop course?
1) The option disables the general use of YUI on a user base. Development of YUI enhanced interfaces will be hindered. Developers are forced to create alternate solutions without YUI support. This is not possible and economically realistic in some areas.
2) The option disables YUI only for the "Drag & Drop" course.
From the actual discussion I am not sure if the difference is clear and planed? I vote for 2). I will need to continue using a workaround for the YUI library for Moodle 1.7 with the actual option.
Do you know a way to check if some YUI libraries are already loaded? If people - like me - start to use their own loading routines Moodle possibly gets into trouble with double loaded YUI files.
Can you think about a function collecting all YUI load calls and build one call from it?
Some background: In the moment I use different php files for every YUI functionality. Each should call only those YUI files it needs. Actually I have to call all YUI libraries together somewhere. And this call may conflict with the "Drag & Drop" course YUI loading functions.
In header.php I reference only those functionality files I want to use in the theme. This gives me greater flexibility in combining different functionality. YUI supports this way, In Moodle problems may arise.
I've added a check in ajaxenabled() in lib/ajax/ajaxlib.php. The function now returns true if ajax is enabled for the site and the user is not logged in. If a user is logged in, then we check whether the user wants ajax.