Upgrading qtype_algebra : DDL sql execution error

Upgrading qtype_algebra : DDL sql execution error

by Miro Iliaš -
Number of replies: 5

Hello,

as admin, I just tried to upgrade the qtype_algebra question in Moodle 3.5, but got this error below.


Any help, please ? 

qtype_algebra

×Debug info: Duplicate entry '28364' for key 'mdl_qtypalgevari_que_uix'
CREATE UNIQUE INDEX mdl_qtypalgevari_que_uix ON mdl_qtype_algebra_variables (questionid)
Error code: ddlexecuteerror
×Stack trace:
  • line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown
  • line 1070 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure()
  • line 756 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr()
  • line 119 of /question/type/algebra/db/upgrade.php: call to database_manager->add_key()
  • line 632 of /lib/upgradelib.php: call to xmldb_qtype_algebra_upgrade()
  • line 1857 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 694 of /admin/index.php: call to upgrade_noncore()

Attachment qtype-upgrade.png
Average of ratings: -
In reply to Miro Iliaš

Re: Upgrading qtype_algebra : DDL sql execution error

by Jean-Michel Védrine -

Hello Miro Iliaš,

Thanks for reporting,

I made a stupid mistake declaring a foreign key unique in my upgrade file.

I will release a corrected version as soon as possible.

I hope not too many people have already done the upgrade. Hopefully the fixed version will correct the problem for them (I hope).

In the meantime, if you have not already upgraded, please wait for the new version.

In reply to Jean-Michel Védrine

Re: Upgrading qtype_algebra : DDL sql execution error

by Jean-Michel Védrine -

I have released version 1.92 that should fix the problem.

I tried to reproduce as well as I can Miro's present situation to see if version 1.92 fix the problem for people that already tried to upgrade to version 1.91 but it is difficult for me to be sure of that.

For people that are still at an algebra version anterior to 1.9, the upgrade to 1.92 should work without any problem. My only concern is for people that are at 1.9 or 1.91 versions.

I suggest that:

  • Miro try to upgrade and report if the problem is fixed for his Moodle install
  • Other algebra users wait for the result of this test to upgrade.
I apologize for the inconvenience this may have caused.
Average of ratings: Useful (4)
In reply to Jean-Michel Védrine

Re: Upgrading qtype_algebra : DDL sql execution error

by Miro Iliaš -

Thanks ! Upgrading to  1.92 fixed the problem.


We can close this thread as solved.

In reply to Miro Iliaš

Re: Upgrading qtype_algebra : DDL sql execution error

by Jean-Michel Védrine -

Thanks a lot for the report.

So I think that all people in interested in the new features of the algebra question can safely upgrade to version 1.92

In reply to Jean-Michel Védrine

Re: Upgrading qtype_algebra : DDL sql execution error

by Bernat Martinez -

Good work, Jean-Michel

However you initially stated 

  • There is only one variable allowed in each algebra subquestion (this is the most important limitation unfortunately, I am still trying to allow several variables but I face some difficulties)

It seems it is NOW working with several variables

Average of ratings: Useful (1)