## Activities: Questionnaire

mod_questionnaire
Maintained by Mike Churchward
Custom Survey Creation
10414 sites
143 fans

Create your own surveys using this tool.

SUPPORT DISCUSSION: http://moodle.org/mod/forum/view.php?id=2642

NOTE: If you are upgrading to Moodle 2.3 or greater, make sure you have upgraded the questionnaire module to the latest version of Moodle 2.2, in your Moodle 2.2 codebase before upgrading to Moodle 2.3 or greater.

DEVELOPERS NOTE - Questionnaire is tracked in Github at https://github.com/remotelearner/moodle-mod_questionnaire. Contact Mike Churchward if you want "push" access.

(originally based on phpESP)

/plugins/mod

### Contributors

Joseph Rézeau: Former co-maintainer

• Mon, Sep 3, 2018, 10:58 PM
Hello,
I made a questionnaire (Two sorts of questions : text and single response) which is deployed on a lot of courses (approximately 100). I must download every results on csv files. Is it possible to use an SQL request to recover all results ? If yes, have you a model ?
Thanks,
Alain
• Tue, Sep 18, 2018, 8:50 PM
Hi,

Thank you for this very useful plugin !

I have noticed the possibility to save a draft and resume answering to the questionnaire, though I wonder if it would be possible to add a functionnality that would allow users who have already saved a draft to make a whole new submission (while keeping their previous answers as a separate draft). As of now, the only choice that is left when one has already saved a draft is to "resume participation" (and it is impossible to start a new one).

However, the questionnaire model I have created will be filled by student advisors who will gather information from various students willing to apply for a program in our school. It may well happen that some students won't be able to provide full information to complete the questionnaire in one shot. Thus, I would like advisors to be able to start filling the information for student A (submission 1), save it as a draft, then fill in the full form for student B (submission 2) before resuming and completing the submission for student A (submission 1). I know this might sound quite challenging but nothing ventured, nothing gained !

Thanks for helping anyway !
Best,

Yannick
• Wed, Sep 19, 2018, 3:47 PM
Hello again,

I also wonder if it would be possible to add an "upload file" question type / field within questionnaires ? As a matter of fact, I would like users to be able to send a few PDF attachments while answering the questionnaire.

Thanks for reading and helping !
Best,

Yannick
• Mon, Sep 24, 2018, 11:01 AM
Hi Guys:

Moodle 3.4.2 Version - noted an issue on submitting forms in a LAMP setup.
The UNION ALL in the query Fails on MYSQL.

The error in DEBUG is: Illegal mix of collations for operation UNION
Line 2597 in /mod/questionnaire/questionnaire.class.php

The Query Built results in: "qrb.choise_id AS response" (This is an Integer field)
and in the union calls in different field: "qrt.response AS response" (This is a text field)

All tables are in the same collation, however comparing an integer to a text field results in this issue.

The solution we ended up using was a FIX my MYSQL databases only:
Adding this line above the $DB-.get_recordset_sql function: (line 2600)$allresponsessql = str_ireplace('qrb.choice_id AS response',
'qrb.choice_id COLLATE utf8_unicode_ci AS response', \$allresponsessql);

This resolved the issue for us, but perhaps the SQL needs to be built differently so that integer fields are not unioned against text fields.

Cheers
• Mon, Oct 15, 2018, 6:02 PM
Hi,

I have created a questionnaire model in the hope that its contents would automatically synchronize within the questionnaires using it as their source of contents.

However, I wonder why the "content options" field only appears once in the settings (when adding a new questionnaire) and then disappears : would it be possible to be able to keep changing the content options of a questionnaire even after it was first added in the course ?

Thanks for helping,
Best,

Yannick Vrolant
• Mon, Oct 15, 2018, 6:02 PM
Hi,

I have created a questionnaire model in the hope that its contents would automatically synchronize within the questionnaires using it as their source of contents.

However, I wonder why the "content options" field only appears once in the settings (when adding a new questionnaire) and then disappears : would it be possible to be able to keep changing the content options of a questionnaire even after it was first added in the course ?

Thanks for helping,
Best,

Yannick Vrolant
• Mon, Oct 15, 2018, 10:45 PM
Hi Yannick.
Content options are only present to initially populate the new questionnaire with existing content (or not). It wouldn't make sense to have it available after creation. What would the use case be for that? Please, discuss this in the questionnaire forum so others can be involved.
• Tue, Oct 16, 2018, 8:34 PM
Hi Mike,

Thanks for answering, here is a more detailed explanation of how we use the questionnaire activity (I will also post a message in the forum as suggested):

We work with dozens of student recruiters (agents) who are in charge of filling up the same model form, which means each separate agent should have access to one occurrence of this model form while not seeing the other agents' forms. It is always the same person who answers the questionnaire, (by the way, this is the reason why I had been asking earlier on whether it would be possible to save incomplete questionnaires before starting anew with another answer).
The thing is that when we want to edit the model, we then have to delete all the agents' forms before replacing them with the new updated version of the form.
It would be a real time-saver for us if we could synchronize all of these questionnaires at once whenever we modify the model.
I can understand this is not really the primary use that was initially intended for this plugin but do you think this is something possible ?

Thanks for helping,
Best,

Yannick
• Thu, Jan 17, 2019, 2:13 PM
Hi

I've upgraded the plugin to the latest version 3.5.3. I had initially enquired about its compatibility with the Mobile app. After upgrading, the plugin is still not compatible. Is it not yet ready to be used on the app? Any help would be greatly appreciated.

Thanks,
Ismail
• Mon, Feb 18, 2019, 6:40 PM
Hello,
I use plugin questionnaire on moodle (one by module -> +/- 100 questionnaires).
My question is : Is it possible to reset all responses from questionnaires in one shot (perhaps with a sql request ?) ?
Thanks,
Alain
• Wed, Mar 6, 2019, 11:39 AM
Can we export out the data for the survey done and the report will be in excel file format? like what the core moodle export option.?
• Wed, Mar 6, 2019, 11:40 PM
I responded to your forum post.
• Thu, Sep 26, 2019, 9:34 PM
This is a great plugin, but we recently had an incident where sensitive information in answers was shown to all the respondents. Here are a few suggestions:
1. There should be admin presets for the options in a questionnaire, regarding anonymity and whether the results should be shown to respondents.
2. Today those are by default set to show name and to show results after the respondent has answered the questions, which may lead to sensitive information from other respondents being show. So at least the core default settings should be set to most safety, that is being anonymous and never show results.
3. There should be an etiquette clearly telling the respondents whether the questionnaire is anonymous or not.

I have suggested those in the tracker, https://tracker.moodle.org/browse/CONTRIB-7852
• Thu, Oct 17, 2019, 9:16 PM
I am upgrading from Moodle 3.3.3 to Moodle 3.7.2
In Moodle 3.3.3, I was using mod_questionnaire '3.3.3 (Build - 2018013100)'', it has 'questionnaire_attempts' table in it. While Upgrading Moodle, I also upgraded my 'questionnaire' from 3.3.3 to '3.6.1 (Build - 2019052400)', about it is stated that it would work on Moodle 3.6 and Moodle 3.7 .
I am getting following error while loading my 'questionnaire', also posted here https://moodle.org/mod/forum/discuss.php?d=392394
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Table "questionnaire_attempts" does not exist
Debug info:
Error code: ddltablenotexist
Stack trace:
line 665 of /lib/dml/moodle_database.php: dml_exception thrown
line 1886 of /lib/dml/moodle_database.php: call to moodle_database->where_clause()
line 145 of /blocks/navbuttons/activityready.php: call to moodle_database->record_exists()
line 63 of /blocks/navbuttons/activityready.php: call to navbuttons_mod_questionnaire_showbuttons()
line 49 of /blocks/navbuttons/footer.php: call to navbuttons_activity_showbuttons()
line 1401 of /lib/outputrenderers.php: call to draw_navbuttons()
line 500 of /lib/outputrenderers.php: call to core_renderer->footer()
line 179 of /mod/questionnaire/view.php: call to plugin_renderer_base->__call() <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
• Mon, Oct 21, 2019, 10:24 PM
Hi Abdul. I responded in the forum.