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

Exception is thrown if you try to download responses from a survey activity with no responses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Survey
    • Labels:
    • Testing Instructions:
      Hide

      Create a survey activity, click on 'download results'.

      You should get a message saying "Nobody has yet completed this survey".

      As a student complete the survey.

      As teacher/admin you should now be able to download survey results.

      Show
      Create a survey activity, click on 'download results'. You should get a message saying "Nobody has yet completed this survey". As a student complete the survey. As teacher/admin you should now be able to download survey results.
    • Affected Branches:
      MOODLE_27_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE, MOODLE_27_STABLE
    • Pull Master Branch:
      MDL-46036_survey
    • Story Points:
      5
    • Sprint:
      FRONTEND Sprint 12

      Description

      I suspect we should be handling there being no data to download in a more graceful way.

      Create a survey activity, click on 'download results' and pick excel. The following is displayed.

      There are no answers for this survey yet.

      More information about this error

      Debug info:
      Error code: cannotfindanswer
      Stack trace:
      line 463 of /lib/setuplib.php: moodle_exception thrown
      line 138 of /mod/survey/download.php: call to print_error()

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              andyjdavis Andrew Davis
              Reporter:
              andyjdavis Andrew Davis
              Peer reviewer:
              Frédéric Massart
              Integrator:
              Dan Poltawski
              Tester:
              Adrian Greeve
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Jul/14