Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-5074

Questionnaire: divide by zero warning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.3
    • Fix Version/s: 2.6.3
    • Component/s: Module: Questionnaire
    • Labels:
      None
    • Plugin Version:
      2014033100
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE

      Description

      Set up a course which has multiple groups in it, at least one of which has no members.

      Set up a questionnaire to use "visible groups", and log in as a student and complete a response.

      Go to 'View all Responses' link

      • the Visible groups drop down displaying as All participants

      Select a group from the drop down ending in (0)

      • group is changed and there are no results displaying on the page

      Select the 'Your response' tab from the top

      • I see Warning code displaying between the survey name and the first table

      Warning: Division by zero in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3153 Notice: Undefined offset: 1 in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3325 Notice: Undefined offset: 2 in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3325 Notice: Undefined offset: 3 in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3325 Notice: Undefined offset: 4 in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3325 Notice: Undefined offset: 5 in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3325 Notice: Undefined offset: 6 in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3325 Notice: Undefined offset: 7 in /vle/www_root/mod/questionnaire/questionnaire.class.php on line 3325

      This is because it is impossible to compare your result with the results from a group that has no members.

      The same thing might happen if the group has members but no responses submitted - but I haven't tested that.

      I know some changes to groups have been done for 2.7.x, so I'm not sure if this issue will still be relevant on 2.7. It isn't critical, but nice to fix on the 2.6 branch anyway?

        Attachments

          Activity

            People

            • Assignee:
              rezeau Joseph Rézeau
              Reporter:
              jenny-gray Jenny Gray
              Tester:
              Jenny Gray
              Participants:
              Component watchers:
              Mike Churchward
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/May/14