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/moodleMGGL/mod/survey/survey.js
M.mod_survey = {};

M.mod_survey.init = function(Y) {
    if (document.getElementById('surveyform')) {
        var surveyform = document.getElementById('surveyform');
        Y.YUI2.util.Event.addListener('surveyform', "submit", function(e) {
            var error = false;
            if (document.getElementById('surveyform')) {
                var surveyform = document.getElementById('surveyform');
                for (var i=0; i < surveycheck.questions.length; i++) {
                    var tempquestion = surveycheck.questions[i];
                    if (surveyform[tempquestion['question']][tempquestion['default']].checked) {
                        error = true;
                    }
                }
            }
            if (error) {
                alert(M.str.survey.questionsnotanswered);
                Y.YUI2.util.Event.preventDefault(e);
                return false;
            } else {
                return true;
            }
        });
    }
};