Unable to create new questionnaire from template

Unable to create new questionnaire from template

by Richard Crawford -
Number of replies: 4
We seem to be unable to create a new questionnaire from an existing template.  While we can edit the template, if we try to create a new questionnaire with that template, we receive an error message saying, "The survey does not exist".

We are using Moodle 1.5.2.


Average of ratings: -
In reply to Richard Crawford

Re: Unable to create new questionnaire from template

by Markus Mostert -

We have the same problem (also using  Moodle 1.5.2 + (2005060222)). Despite the error message, copies of the template questionnaire are added to the list of template / public questionnaires to choose from every time you try to create a new questionnaire. Is there a way to delete these copy questionnaires?

Markus

In reply to Markus Mostert

Re: Unable to create new questionnaire from template

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi Markus -

If you use the latest version of the questionnaire module, available at the downloads page, that problem is fixed. Additionally, there is now a cron task that will clean up any 'orphaned' questionnaires.

mike
In reply to Richard Crawford

Re: Unable to create new questionnaire from template - RESOLVED

by Richard Crawford -
The reason we were unable to create a new survey from a template was the presence of a single apostrophe (') in the "info" field of the template survey's entry in the questionnaire_survey table.  I went in and removed the apostrophe directly using phpMyAdmin and I can now create surveys using that template.  I suspect that other people who are getting the same error might have the same problem, and the same resolution should work for them.

This resolution is really a workaround, though.  The insert_record function call in the survey_copy function in

mod/questionnaire/phpESP/admin/include/function/survey_copy.inc

at about line 46 should not be bombing because of the apostrophe.  Is there a way to fix this?
In reply to Richard Crawford

Re: Unable to create new questionnaire from template - RESOLVED

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
It is probably fixed in the latest version. You are using an older version. The latest one no longer has a 'phpESP' directory.

mike