HEX
Server: Apache
System: Linux webm010.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: iestorre (46869)
PHP: 8.0.30
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/iestorre/moodleAW/moodle03/course/yui/formatchooser/formatchooser.js
YUI.add('moodle-course-formatchooser', function(Y) {
    var FORMATCHOOSER = function() {
        FORMATCHOOSER.superclass.constructor.apply(this, arguments);
    }

    Y.extend(FORMATCHOOSER, Y.Base, {
        initializer : function(params) {
            if (params && params.formid) {
                var updatebut = Y.one('#'+params.formid+' #id_updatecourseformat');
                var formatselect = Y.one('#'+params.formid+' #id_format');
                if (updatebut && formatselect) {
                    updatebut.setStyle('display', 'none');
                    formatselect.on('change', function() {
                        updatebut.simulate('click');
                    });
                }
            }
        }
    });

    M.course = M.course || {};
    M.course.init_formatchooser = function(params) {
        return new FORMATCHOOSER(params);
    }
}, '@VERSION@', {requires:['base', 'node', 'node-event-simulate']});