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/moodle01/report/participation/module.js
M.report_participation = {};

M.report_participation.init = function(Y) {

    Y.on('submit', function(e) {
            Y.one('#formactionselect').get('options').each(function() {
                if (this.get('selected') && this.get('value') == '') {
                    // no action selected
                    e.preventDefault();
                }
            });
            var ok = false;
            Y.all('input.usercheckbox').each(function() {
                if (this.get('checked')) {
                    ok = true;
                }
            });
            if (!ok) {
                // no checkbox selected
                e.preventDefault();
            }
        }, '#studentsform');

    Y.on('click', function(e) {
        Y.all('input.usercheckbox').each(function() {
            this.set('checked', 'checked');
        });
    }, '#checkall');

    Y.on('click', function(e) {
        Y.all('input.usercheckbox').each(function() {
            this.set('checked', '');
        });
    }, '#checknone');

    Y.on('click', function(e) {
        Y.all('input.usercheckbox').each(function() {
            if (this.get('value') == 0) {
                this.set('checked', 'checked');
            }
        });
    }, '#checknos');
};