how to remove an answer raising an error

how to remove an answer raising an error

by Luca Pedocchi -
Number of replies: 3
Hi all. A student of mine answered a question in a questionnaire with a string instead of a number. Trying to resume the questionnaire she gets this error

Exception - Attempt to assign property "number" on string

I didn't find a way to fix it. Am I missing something? As an admin I can't find a place to remove the answers and restart the questionnaire, since it hasn't been submitted yet. Does someone have a suggestion?
Grazie
              Luca
Average of ratings: -
In reply to Luca Pedocchi

Re: how to remove an answer raising an error

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Luca,

Please give your versions of Moodle, Questionnaire and PHP on your site.

Your problem may be related to this bug report: CONTRIB-9206

In reply to Joseph Rézeau

Re: how to remove an answer raising an error

by Luca Pedocchi -
Thank you for the reply. Here they are:
- Moodle version: 4.2
- PHP version: 8.1.2.1.2.14
- Questionnaire version: 4.0.1 (Build - 2023051600) 2022092202
I'm going to have a look at the bug report.
Grazie
Luca
In reply to Luca Pedocchi

Re: how to remove an answer raising an error

by Luca Pedocchi -
I applied the fix suggested by Sascha Vogel in the CONTRIB-9206 bug report and it solved my problem. Grazie a tutti.
Luca