Unable to install questionnaire- moodle 2.3.1

Unable to install questionnaire- moodle 2.3.1

by José Anacleto -
Number of replies: 15

Hello

I need help

I tried without sucess to install questionnaire. I'm working with the original database upgraded from 1.9 to 2.2. Questionnaire was updated flawless in moodle 2.2, but in the upgraded version (2.3) when i tried to install the module i've got the following error:

Thanks,

Jose Manuel

Attachment pscreen.jpg
Average of ratings: -
In reply to José Anacleto

Re: Unable to install questionnaire- moodle 2.3.1

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

Hi Jose,

Not sure how you proceed to upgrade your Questionnaire plugin. But from the mod/questionnaire/db/upgrade.php we can see that the "summary" field was renamed to "intro" about 4 years ago:

if ($oldversion < 2008070705) {
        /// Rename summary field to 'intro' to adhere to new Moodle standard.
        $table = new xmldb_table('questionnaire');
        $field = new xmldb_field('summary');
        $field->set_attributes(XMLDB_TYPE_TEXT, 'small', null, XMLDB_NOTNULL, null, null, null, null, 'name');
        $dbman->rename_field($table, $field, 'intro');

        /// Add 'introformat' to adhere to new Moodle standard.
        $field = new xmldb_field('introformat', XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, '0', 'intro');
        $dbman->add_field($table, $field);
        /// Set all existing records to HTML format.
        $DB->set_field('questionnaire', 'introformat', 1);
    }

In reply to José Anacleto

Re: Unable to install questionnaire- moodle 2.3.1

by Drew Blessing -

We are also seeing this issue.  We have the most recent download from the plugin repository and I can confirm that our database has the intro field not the summary field.  So, if the script modified the database to rename it it seems that the code is still requiring it...

In reply to Drew Blessing

Re: Unable to install questionnaire- moodle 2.3.1

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

@Drew,

What is the version number of the Questionnaire plugin that you are upgrading FROM and the version number of the Questionnaire plugin that you are upgrading TO ?

Joseph

In reply to Joseph Rézeau

Re: Unable to install questionnaire- moodle 2.3.1

by Stephen Carr -

I've run into the same issue. I did an upgrade from 1.99 to 2.2 and got the error (module number 2008060405 for the old version). It does rename summary to intro just fine (I looked at the table schema and summary is gone on the 2.2 database but was there in the 1.9 database). So, like someone else mentioned, the upgrade process still appears to want that summary field somehow and now it is gone (from being renamed)

Steve

In reply to Stephen Carr

Re: Unable to install questionnaire- moodle 2.3.1

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

@Stephen,

As I"m not a specialist of the database intricacies, I hope my fellow Questionnaire co-maintainer Mike will see this discussion and provide a solution.

ATB

Joseph

In reply to José Anacleto

Re: Unable to install questionnaire- moodle 2.3.1

by Andrew Steele -

I had this same issue.  Fortunately I had no active Questionnaires so I uninstalled the module and then reinstalled the newest version and all was well.

In reply to José Anacleto

Re: Unable to install questionnaire- moodle 2.3.1

by Chien Wen-chang -

drop_enum_from_field method in /mod/questionnaire/db/upgrade.php is deleted from Moodle version 2.3.

See http://docs.moodle.org/dev/Data_definition_API

/// To drop one enum (check constraint) from one field:
/// (note this function will be only available in Moodle 2.0 as it's needed
/// to drop any enum existing in previous Moodle releases). Will be out in Moodle 2.1
    $dbman->drop_enum_from_field($table, $field, $continue=true, $feedback=true)

In reply to Chien Wen-chang

Re: Unable to install questionnaire- moodle 2.3.1

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

@Chien,

Is this related to the problem at hand or is it another bug you are reporting?

Joseph

In reply to Joseph Rézeau

Re: Unable to install questionnaire- moodle 2.3.1

by Chien Wen-chang -

Yes, it is a bug.

drop_enum_from_field method can not used in Moodle 2.3.

But can used in Moodle 2.2.

In reply to Chien Wen-chang

Re: Unable to install questionnaire- moodle 2.3.1

by Eugen Neuber -

count_records and get_records are also 'unknown function' in 2.3.1

In reply to Chien Wen-chang

Re: Unable to install questionnaire- moodle 2.3.1

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

Unfortunately, the only path that will work in this case then is to make sure you upgrade the questionnaire to the Moodle 2.2 version before moving on to the Moodle 2.3 version. I believe this is a requirement of Moodle core as well.

mike

In reply to José Anacleto

Re: Unable to install questionnaire- moodle 2.3.1

by Just H -

Hi folks, same problem as per OP.

Trying to upgrade from module version 2008060402 to 2012070801.

Anyone know how to resolve it?

In reply to Just H

Re: Unable to install questionnaire- moodle 2.3.1

by Andrea Gregory (Gordon) -

Getting the same - is there a bug tracker for it?

Thanks

Andrea

In reply to Andrea Gregory (Gordon)

Re: Unable to install questionnaire- moodle 2.3.1

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

Hi Andrea,

I would report this in the bug tracker, but I am unable to reproduce the problem and consequently unable to describe it.

Do report it in http://tracker.moodle.org/browse/CONTRIB but please give a maximum of details about your procedure, database, versions used, etc.

Once you have created the bug report, please give us its reference in a message in this discussion.

Joseph