When using Quizport to a) add a qedoc URL and when b) trying to upload/insert a HotPotatoes quiz I get the error message
"Could not insert record in database table: quizport_units"
What is that, how do I fix it
Hi Tom,
If you go to Site administration -> Modules -> activities -> QuizPort, what version number is written for QuizPOrt?
At the end of the following thread, is advice about how to get more info about why the quizport_units record cannot be added. Please try that and let us know what you find out.
thanks
Gordon
Hi,
I can't find a Quizport # in Moodle, but I downloaded the zip file yesterday and it is
quizport-module.0.9.x.zip
I added the line of code, now I get:
I can't find a Quizport # in Moodle, but I downloaded the zip file yesterday and it is
quizport-module.0.9.x.zip
I added the line of code, now I get:
Hi Tom. The quizport_units record could not be added:
Column 'allowresume' cannot be null
Column 'allowresume' cannot be null
Thanks Tom,
please could tell me your versions of PHP, MySQL and Moodle?
Using your favorite database administration tool (phpMyAdmin?) please could you tell me the "allowresume" field in the "quizport_units" table has a default value set?
thanks
Gordon
please could tell me your versions of PHP, MySQL and Moodle?
Using your favorite database administration tool (phpMyAdmin?) please could you tell me the "allowresume" field in the "quizport_units" table has a default value set?
thanks
Gordon
Hi,
> please could tell me your versions
MySQL database 5.0.67
PHP 4.4.9
Moodle 1.9.5+ (Build: 20090617)
> the "allowresume" field in the "quizport_units" table
Field.........Type.......Null.....Default.....Comments
allowresume ..tinyint(2).No.......1...................
output of table attached as CSV
Thanks,
Tom
> please could tell me your versions
MySQL database 5.0.67
PHP 4.4.9
Moodle 1.9.5+ (Build: 20090617)
> the "allowresume" field in the "quizport_units" table
Field.........Type.......Null.....Default.....Comments
allowresume ..tinyint(2).No.......1...................
output of table attached as CSV
Thanks,
Tom
Tom,
that's great info. Thanks a lot.
I am surprised that MySQL complains about a field being null when it also knows that the default is 1. On other sites I have worked on which use MySQL 5.0.51 it is not a problem.
I will try a few more tests and update the QuizPort module to always fill in the not null fields. Please give me a day or so to work on it. I will let you know when the new download is ready.
cheers
Gordon
that's great info. Thanks a lot.
I am surprised that MySQL complains about a field being null when it also knows that the default is 1. On other sites I have worked on which use MySQL 5.0.51 it is not a problem.
I will try a few more tests and update the QuizPort module to always fill in the not null fields. Please give me a day or so to work on it. I will let you know when the new download is ready.
cheers
Gordon
Yes, please notify me. And thanks for all your work. I'm excited that Glossary should work with this. That will help a lot.
Hi Tom,
please could you download the attached replacement for "mod/quizport/lib.php". I think it will fix the missing default values for the quizport_unit record.
You may still get errors when adding other records, so please send feedback as to how you get on. Once you have confirmed it works, I will add the modification to the main module.
thanks
Gordon
P.S. Please note that this download is meant just for Tom and others who are having a similar problem and wish to work with me to fix it. Everybody else need take no action
please could you download the attached replacement for "mod/quizport/lib.php". I think it will fix the missing default values for the quizport_unit record.
You may still get errors when adding other records, so please send feedback as to how you get on. Once you have confirmed it works, I will add the modification to the main module.
thanks
Gordon
P.S. Please note that this download is meant just for Tom and others who are having a similar problem and wish to work with me to fix it. Everybody else need take no action
Definite progress, it uploaded, I answered the Qs, click Check Answers, got 100%, clicked OK
but then I am presented with
http://www.bestenglish123.com/moodle/mod/quizport/attempt.php
SELECT qqa.id AS qqa_id,qqa.quizid AS qqa_quizid,qqa.userid AS qqa_userid,qqa.unumber AS qqa_unumber,qqa.qnumber AS qqa_qnumber,qqa.status AS qqa_status,qqa.penalties AS qqa_penalties,qqa.score AS qqa_score,qqa.duration AS qqa_duration,qqa.starttime AS qqa_starttime,qqa.endtime AS ...
full contents displayed.
Maybe there is an easy fix for this.
file attached
Also the Results show the Quiz as not being completed
but then I am presented with
http://www.bestenglish123.com/moodle/mod/quizport/attempt.php
SELECT qqa.id AS qqa_id,qqa.quizid AS qqa_quizid,qqa.userid AS qqa_userid,qqa.unumber AS qqa_unumber,qqa.qnumber AS qqa_qnumber,qqa.status AS qqa_status,qqa.penalties AS qqa_penalties,qqa.score AS qqa_score,qqa.duration AS qqa_duration,qqa.starttime AS qqa_starttime,qqa.endtime AS ...
full contents displayed.
Maybe there is an easy fix for this.
file attached
Also the Results show the Quiz as not being completed
Attempt | Grade | Status | Duration | Last access | |
---|---|---|---|---|---|
1 | 0 | Abandoned | Thu, 18 Jun 2009, 06:28 PM | ||
2 | 0 | Abandoned | Thu, 18 Jun 2009, 06:29 PM | ||
3 | 0 | Abandoned | Thu, 18 Jun 2009, 06:35 PM | ||
4 | 0 | In progress | Thu, 18 Jun 2009, 06:35 PM |
hi Tom,
your server is behaving like no other I have come across, so I must confess that at that moment I am mystified
Could I possibly come and have a look firsthand? Please contact me by private email: gordon at-sign kanazawa hyphen gu dot ac dot jp.
thanks
Gordon
your server is behaving like no other I have come across, so I must confess that at that moment I am mystified
Could I possibly come and have a look firsthand? Please contact me by private email: gordon at-sign kanazawa hyphen gu dot ac dot jp.
thanks
Gordon
Dear Tom,
thanks for giving me access to your server and allowing me to investigate the cause of the strange behavior of QuizPort.
In an nutshell, there were a several lines of PHP code in QuizPort that were not compatible with PHP4, which your server is using.
I have now fixed all the above problems and QuizPort is working on your server. Yay!
Of course, if you come across further problems, please don't hesitate to let me know.
best regards
Gordon
thanks for giving me access to your server and allowing me to investigate the cause of the strange behavior of QuizPort.
In an nutshell, there were a several lines of PHP code in QuizPort that were not compatible with PHP4, which your server is using.
- a couple of uses of html_entity_decode() which caused an alarming number of "cannot yet handle MBCS" messages
- several instances of the results of a function being assigned by reference:
e.g. $object = &$this->get_object() - a few lines which treat results of object methods as objects
e.g. $PAGE->get_requires()->yui_lib('yahoo')->asap();
I have now fixed all the above problems and QuizPort is working on your server. Yay!
Of course, if you come across further problems, please don't hesitate to let me know.
best regards
Gordon