Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-10027

Survey complains that I have not completed the survey when I have.


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.8.2, 1.9
    • 1.8
    • Survey
    • None
    • I know this happens in IE 6 and 7. I have not tested other browsers.
    • MySQL, Microsoft SQL

      When you complete a survey that includes radio buttons, it seems to have a javascript problem that causes it to think you haven't selected an option. I selected "almost always" for everything and it said I had some still unanswered. I looked a little at the code and noticed that the array sizes for the radio groups are not consistent. They should all be 6 but some are 7. I suspect it has something to do with naming of the input tags in those radio groups. The naming convention looks like q1 (question 1) and each of it's options are q11 (question 1, option 1), q12 (question 1, option 2), and so on... It is suspicious that the problem starts happening on question 11. Suddenly the array sizes are 7 instead of 6, so I think that perhaps a fix needs to be made to the inputs and on the back end to pick them up properly. If I had more time, I would look into it myself. The bottom line is that it is the checkform function tries the following code:

      if(q11[5].checked == true) error = true;

      ...and it fails because for some reason, by selecting almost always on that field puts statement to true and q11.length is 7 instead of 6.

            dougiamas Martin Dougiamas
            pcross Phillip Cross
            Nobody Nobody
            0 Vote for this issue
            0 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.