Error importing WebCT quiz

Error importing WebCT quiz

per Zane Edwards -
Nombre de respostes: 10
I am trying to import WebCT's quiz and am getting the following error:
\
1 error(s) detected
  • Too few :ANSWER, :Lx, :Rx statements for question line 0. You must define at last 2 possible answers
1 warning(s) detected
  • Missing question label after line 0
So no matter what, changing the question, I get it. I am using 1.6.
What am I missing? I uploaded a question that I tried.
Mitjana de qualificacions: -
En resposta a Zane Edwards

Re: Error importing WebCT quiz

per John Creed -
Below is what I found out with this and how I got the import to run correctly. Seems to be a few errors in the code that does the WebCT import

line 265 - question/format/webct/format.php
commented out this line.
//        $question = $this->defaultquestion();
it was causing the check on line 322 here
if (isset($question)) {  
to always be true since this was always defined
but the check on line 344
if (sizeof($question->answer) < 1) {
was always 0 as 0 question/answers where read first time thru

this led me to a problem that I fixed here

line 110 - question/type/multichoice/questiontype.php
was
    if (!insert_record("question_multichoice", $options)) {
now
    if (insert_record("question_multichoice", $options) === 0) {
the insert_record function returns the ID of the inserted record so the first check was always failing when it actually inserted OK

i saw this in a few other areas so it may be a problem elsewhere but we were only using multiple choice quesitons
En resposta a John Creed

Re: Error importing WebCT quiz

per Michael Joyner -
Yes, that fixes my serious problem here, trying to get ready for the new semester, last thing I need is for webct imports to fail for new faculty just introduced to the system!
En resposta a Zane Edwards

Re: Error importing WebCT quiz

per Eduardo Hernandez -
Hello, we are also getting the same errors. It is very, very strange, as in Moodle 1.6 Beta versions, it was working OK for us. Trist
En resposta a Eduardo Hernandez

Re: Error importing WebCT quiz

per Howard Miller -
Imatge Core developers Imatge Documentation writers Imatge Particularly helpful Moodlers Imatge Peer reviewers Imatge Plugin developers
Strange! I am not aware that anything was changed between Beta and release.

However, I will take a look and let you know asap.
En resposta a Howard Miller

S'ha suprimit aquest missatge del fòrum

El contingut del missatge al fòrum s'ha suprimit i ja no hi podeu accedir.
En resposta a S'ha esborrat l'usuari

Re: Error importing WebCT quiz

per Howard Miller -
Imatge Core developers Imatge Documentation writers Imatge Particularly helpful Moodlers Imatge Peer reviewers Imatge Plugin developers
Pierre,

I'm sorry - I'm struggling to follow your discussion. Do you by an chance have a coded solution to this. I'm more concerned about having a fix right now rather than understanding why it is broken - too much other stuff to catch up with Somrient

Your help will be very much appreciated.
En resposta a Howard Miller

S'ha suprimit aquest missatge del fòrum

El contingut del missatge al fòrum s'ha suprimit i ja no hi podeu accedir.
En resposta a S'ha esborrat l'usuari

S'ha suprimit aquest missatge del fòrum

El contingut del missatge al fòrum s'ha suprimit i ja no hi podeu accedir.
En resposta a Howard Miller

S'ha suprimit aquest missatge del fòrum

El contingut del missatge al fòrum s'ha suprimit i ja no hi podeu accedir.