Database Upgrade Failure when Installing Plugin

Database Upgrade Failure when Installing Plugin

από Keith Sorbo -
Αριθμός απαντήσεων: 3

I have installed a number of plugins with no problems on my 3.9rc1 Moodle installaltion.

After copying the content of quizaccess_honestycheck_moodle31_2014111200.zip to mod/quiz/accessrule, running the Moodle notification, all dependencies show green, when I click install, it hangs when it reaches the update database screen with the following error:

quizaccess_honestycheck
XML database file errors found
Informasi selanjutnya mengenai kesalahan ini
×Debug info: Errors found in XMLDB file: PATH attribute does not match file directory: mod/quiz/accessrule/honestycheck/db
Error code: ddlxmlfileerror
×Stack trace:
line 354 of /lib/ddl/database_manager.php: ddl_exception thrown
line 370 of /lib/ddl/database_manager.php: call to database_manager->load_xmldb_file()
line 654 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file()
line 1917 of /lib/upgradelib.php: call to upgrade_plugins()
line 711 of /admin/index.php: call to upgrade_noncore()
I should note that the  folder mod/quiz/accessrule/honestycheck/db exists and the install.xml file is world readable.

I have posted in the git repository for the plugin. (https://github.com/moodleou/moodle-quizaccess_honestycheck/issues/7 ) The author suggests it is an installation problem. 

I have tried installing via direct copy and using the git clone command. I get the same error. 

Here is my directory listing after copying the plugin:

root@ubuntu-s-1vcpu-1gb-sgp1-01:/var/www/html/moodle# ll mod/quiz/accessrule/
total 68
drwxr-xr-x 12 www-data www-data 4096 Jun 23 19:32 ./
drwxr-xr-x 13 www-data www-data 4096 Jun 9 16:42 ../
-rwxr-xr-x 1 www-data www-data 13276 Jun 9 16:42 accessrulebase.php*
drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 delaybetweenattempts/
drwxr-xr-x 8 root root 4096 Jun 23 19:32 honestycheck/ drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 ipaddress/ drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 numattempts/
drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 offlineattempts/
drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 openclosedate/
drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 password/
drwxr-xr-x 8 www-data www-data 4096 Jun 9 16:42 seb/
drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 securewindow/
drwxr-xr-x 5 www-data www-data 4096 Jun 9 16:42 timelimit/
-rwxr-xr-x 1 www-data www-data 600 Jun 9 16:42 upgrade.txt*


Μέσος όρος βαθμολογίας: -
Σε απάντηση σε Keith Sorbo

Re: Database Upgrade Failure when Installing Plugin

από Leon Stringer -
Φωτογραφία Core developers Φωτογραφία Particularly helpful Moodlers

"After copying the content of quizaccess_honestycheck_moodle31_2014111200.zip to mod/quiz/accessrule" – why are you using such an old version? The current version on the plugin page is quizaccess_honestycheck_moodle38_2018080900.zip.

The old version, 2014111200, is not compatible with Moodle 3.9 and will fail to install with the error you're reporting.

The current version, 2018080900, should install correctly.

You say you've tried a Git clone, are you certain that extracted to the expected location? The command would probably be:

# cd mod/quiz/accessrule
# git clone https://github.com/moodleou/moodle-quizaccess_honestycheck.git honestycheck

You can verify if the plugin version is correct by checking line 2 of honestycheck/db/install.xml. If it says (different section underlined):

<XMLDB PATH="mod/quiz/accessrule/plagiarismcheckbox/db" VERSION="20111003" COMMENT="XMLDB file for Moodle mod/quiz/accessrule/plagiarismcheckbox"

it's the old, incompatible version. If it says:

<XMLDB PATH="mod/quiz/accessrule/honestycheck/db" VERSION="20111003" COMMENT="XMLDB file for Moodle mod/quiz/accessrule/plagiarismcheckbox"

It's the correct version.

Σε απάντηση σε Leon Stringer

Re: Database Upgrade Failure when Installing Plugin

από Keith Sorbo -
Thanks so much for your assistance.

I was using an old version.

Unfortunately the link available on the plugin page leads to the 2014 version. The only way I was able to get the 20189 version was to clone the plugin from the git repository.