Updating Calculated question gives Error: mdb->get_record() found more than one record!

Updating Calculated question gives Error: mdb->get_record() found more than one record!

Peter Halverson -
回帖数:7

Hello,

I recently migrated from the free iteach.org moodle server to a server on Hostgator.com

After this migration, I am getting this error, repeated dozens of times, every time I edit/update a calculated question:

Error: mdb->get_record() found more than one record!

    * line 1309 of /lib/dml/moodle_database.php: call to debugging()
    * line 1269 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
    * line 1249 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
    * line 1039 of /question/type/calculated/questiontype.php: call to moodle_database->get_record()
    * line 414 of /question/type/calculated/datasetitems_form.php: call to qtype_calculated->comment_on_datasetitems()
    * line 218 of /question/question.php: call to question_dataset_dependent_items_form->set_data()

The new system is Moodle 2.2.1 (Build: 20120109)

The old system was Moodle 2.0.3+ (Build: 20110623)

A few other comments:  The calculated questions seem to be fully functional, and the editing process seems to work.  But getting all these errors doesn't "feel" good.  Should I be worried?

Is there some way to make these errors go away?  Surgery on the moodle database?

I did have some problems with running out of memory during the restore process.  I had to restore my course in small "chunks".

Right now cron.php is not working.  Could this cause the trouble? (Seems unlikely to me.)

Thanks in advance,

Peter Halverson

回复Peter Halverson

本讨论区帖子已移除

本讨论区帖子的内容已移除,无法再访问。
回复删除的用户

本讨论区帖子已移除

本讨论区帖子的内容已移除,无法再访问。
回复删除的用户

本讨论区帖子已移除

本讨论区帖子的内容已移除,无法再访问。
回复删除的用户

本讨论区帖子已移除

本讨论区帖子的内容已移除,无法再访问。
回复删除的用户

Re: Updating Calculated question gives Error: mdb->get_record() found more than one record!

Peter Halverson -

Hi again,

I think you have nailed the problem.  When I change the units that used to be

N 1      Newton 1      Newtons 1

to be

N 1      Newton 1.001      Newtons 1.002

the problem goes away.

Whew!  I feel much relieved.   I presume, this is not a life-threatening bug, and that my investment in Moodle is not at risk.

Thanks!!!!

Peter Halverson

回复删除的用户

Re: Updating Calculated question gives Error: mdb->get_record() found more than one record!

Peter Halverson -

Hello/Bounjour Pierre,

Yes...  I am attaching an xml file which contains two questions that cause the problem.

I do use units, and yes, they do have repeating magnitudes.  For example

Newton 1    N 1  Newtons 1

Many thanks for researching this.

Peter Halverson