Moodle
  1. Moodle
  2. MDL-30018

Quiz Duplication With Carriage Return Results in a Fatal Error

    Details

    • Database:
      PostgreSQL
    • Testing Instructions:
      Hide

      NOTE where I say '^M' you must insert a carriage return character into the field, on my OS this is achieved when I type ctrl-m

      1/ Create a new quiz with default settings
      2/ Add a multiple choice question to the quiz

      • Question Name: 'Duplication Problems'
      • Choice 1:
        Answer: 'An answer with this: ^M newline'
        Grade: 100%
      • Choice 2:
        Answer: 'Another answer'
        Grade: 0%
        3/ Go to course page and press the x2 button
        4/ Continue with duplicate of quiz

      Expected result
      -----------------
      Quiz is Duplicated

      Actual Result
      -------------
      error/error_question_answers_missing_in_db

      Show
      NOTE where I say '^M' you must insert a carriage return character into the field, on my OS this is achieved when I type ctrl-m 1/ Create a new quiz with default settings 2/ Add a multiple choice question to the quiz Question Name: 'Duplication Problems' Choice 1: Answer: 'An answer with this: ^M newline' Grade: 100% Choice 2: Answer: 'Another answer' Grade: 0% 3/ Go to course page and press the x2 button 4/ Continue with duplicate of quiz Expected result ----------------- Quiz is Duplicated Actual Result ------------- error/error_question_answers_missing_in_db
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
    • Rank:
      19561

      Description

      When attempting to duplicate a quiz using the x2 button the duplication fails. I thought this might be MDL-29432, but it doesn't seem to match any of the rules in that bug.

      When I attempt to replicate the issue on my local machine by backing up and restoring the whole course this works fine and I can't replicate the issue. I have access to the live data which might be useful to replicate and fix this issue.

      error/error_question_answers_missing_in_db
      
      More information about this error
      
      Stack trace:
      line 159 of /backup/moodle2/restore_qtype_plugin.class.php: restore_step_exception thrown
      line 131 of /backup/util/plan/restore_structure_step.class.php: call to restore_qtype_plugin->process_question_answer()
      line 103 of /backup/util/helper/restore_structure_parser_processor.class.php: call to restore_structure_step->process()
      line 125 of /backup/util/xml/parser/processors/grouped_parser_processor.class.php: call to restore_structure_parser_processor->dispatch_chunk()
      line 91 of /backup/util/helper/restore_structure_parser_processor.class.php: call to grouped_parser_processor->postprocess_chunk()
      line 148 of /backup/util/xml/parser/processors/simplified_parser_processor.class.php: call to restore_structure_parser_processor->postprocess_chunk()
      line 92 of /backup/util/xml/parser/processors/progressive_parser_processor.class.php: call to simplified_parser_processor->process_chunk()
      line 169 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
      line 253 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->publish()
      line ? of unknownfile: call to progressive_parser->end_tag()
      line 158 of /backup/util/xml/parser/progressive_parser.class.php: call to xml_parse()
      line 137 of /backup/util/xml/parser/progressive_parser.class.php: call to progressive_parser->parse()
      line 105 of /backup/util/plan/restore_structure_step.class.php: call to progressive_parser->process()
      line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
      line 148 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
      line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
      line 302 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
      line 90 of /course/modduplicate.php: call to restore_controller->execute_plan()
      
      1. 0001-PREPCL-560-Fix-for-question-answer-carriage-return-r.patch
        2 kB
        Tyler Bannister
      2. Revised-Fix-for-question-answer-carriage-return.patch
        2 kB
        Tyler Bannister

        Issue Links

          Activity

          Hide
          Tim Hunt added a comment -

          I would guess that this is due to bad data in your DB.

          Can you track down which question id this is? Try something like

          SELECT * FROM mdl_question q WHERE qtype IN ('shortanswer', 'multichoice', ...)
          AND NOT EXIST (SELECT * FROM mdl_question_answers qa WHERE qa.question = q.id)

          Show
          Tim Hunt added a comment - I would guess that this is due to bad data in your DB. Can you track down which question id this is? Try something like SELECT * FROM mdl_question q WHERE qtype IN ('shortanswer', 'multichoice', ...) AND NOT EXIST (SELECT * FROM mdl_question_answers qa WHERE qa.question = q.id)
          Hide
          Dan Poltawski added a comment - - edited

          I can't find anything the quiz without answer. The quiz which is causing the error has multiple multichoice questions and an essay question. The essay question doesn't have answer records (which I assume is correct behaviour).

          The site originated from 2.1 so shouldn't have suffered from bad data migration for previous versions.

          Show
          Dan Poltawski added a comment - - edited I can't find anything the quiz without answer. The quiz which is causing the error has multiple multichoice questions and an essay question. The essay question doesn't have answer records (which I assume is correct behaviour). The site originated from 2.1 so shouldn't have suffered from bad data migration for previous versions.
          Hide
          Tim Hunt added a comment -

          If we can't reproduce the issue, then it is very hard to know how to proceed. I can only suggest that you keep poking around in the live databsae. Or, clone the whole site to a test server, so you can add debugging to the code to diagnose what is going on.

          Show
          Tim Hunt added a comment - If we can't reproduce the issue, then it is very hard to know how to proceed. I can only suggest that you keep poking around in the live databsae. Or, clone the whole site to a test server, so you can add debugging to the code to diagnose what is going on.
          Hide
          Dan Poltawski added a comment -

          I have the site on the test server and can debug to my hearts content. Will need to get my head around the code first

          Show
          Dan Poltawski added a comment - I have the site on the test server and can debug to my hearts content. Will need to get my head around the code first
          Hide
          Dan Poltawski added a comment -

          So set $DB->set_debug(true) reveals the query is:

          SELECT id
                                FROM mdl_question_answers
                               WHERE question = $1
                                 AND answer = $2
          [array (
            0 => '104',
            1 => '<div>
          <p>asked late in the interview</p>
          </div>',
          )]
          <hr />
          
          Show
          Dan Poltawski added a comment - So set $DB->set_debug(true) reveals the query is: SELECT id FROM mdl_question_answers WHERE question = $1 AND answer = $2 [array ( 0 => '104', 1 => '<div> <p>asked late in the interview</p> </div>', )] <hr />
          Hide
          Dan Poltawski added a comment -
          lumoodle=# select * from mdl_question_answers where question =104;
           id  | question |                   answer                   | answerformat | fraction  | feedback | feedbackformat 
          -----+----------+--------------------------------------------+--------------+-----------+----------+----------------
           325 |      104 | <div>\r                                   +|            1 | 1.0000000 |          |              1
               |          | <p>asked late in the interview</p>\r      +|              |           |          | 
               |          | </div>                                     |              |           |          | 
           326 |      104 | <div>\r                                   +|            1 | 0.0000000 |          |              1
               |          | <div>\r                                   +|              |           |          | 
               |          | <p>asked early in the interview</p>\r     +|              |           |          | 
               |          | </div>\r                                  +|              |           |          | 
               |          | </div>                                     |              |           |          | 
           327 |      104 | <p>avoided</p>                             |            1 | 0.0000000 |          |              1
           328 |      104 | <p>interspersed with factual questions</p> |            1 | 0.0000000 |          |              1
          (4 rows)
          
          Show
          Dan Poltawski added a comment - lumoodle=# select * from mdl_question_answers where question =104; id | question | answer | answerformat | fraction | feedback | feedbackformat -----+----------+--------------------------------------------+--------------+-----------+----------+---------------- 325 | 104 | <div>\r +| 1 | 1.0000000 | | 1 | | <p>asked late in the interview</p>\r +| | | | | | </div> | | | | 326 | 104 | <div>\r +| 1 | 0.0000000 | | 1 | | <div>\r +| | | | | | <p>asked early in the interview</p>\r +| | | | | | </div>\r +| | | | | | </div> | | | | 327 | 104 | <p>avoided</p> | 1 | 0.0000000 | | 1 328 | 104 | <p>interspersed with factual questions</p> | 1 | 0.0000000 | | 1 (4 rows)
          Hide
          Tim Hunt added a comment -

          That is starting to look horribly suspicious.

          Show
          Tim Hunt added a comment - That is starting to look horribly suspicious.
          Hide
          Dan Poltawski added a comment -
          2011-11-01 12:06:24 GMT LOG:  duration: 0.010 ms  execute <unnamed>: SELECT id
                                        FROM mdl_question_answers
                                       WHERE question = $1
                                         AND answer = $2
          2011-11-01 12:06:24 GMT DETAIL:  parameters: $1 = '104', $2 = '<div>
                  <p>asked late in the interview</p>
                  </div>'
          
          Show
          Dan Poltawski added a comment - 2011-11-01 12:06:24 GMT LOG: duration: 0.010 ms execute <unnamed>: SELECT id FROM mdl_question_answers WHERE question = $1 AND answer = $2 2011-11-01 12:06:24 GMT DETAIL: parameters: $1 = '104', $2 = '<div> <p>asked late in the interview</p> </div>'
          Hide
          Dan Poltawski added a comment -

          Found the same in another question

          Show
          Dan Poltawski added a comment - Found the same in another question
          Hide
          Dan Poltawski added a comment -

          In fact most of the questions in that quiz had the problematic character returns. Once they were gone things worked fine

          Show
          Dan Poltawski added a comment - In fact most of the questions in that quiz had the problematic character returns. Once they were gone things worked fine
          Hide
          Tim Hunt added a comment -

          So, do you think some sort of "\r\n" -> "\n", or "\r" -> '' on import/restore is a good solution?

          Presumably this is a fairly generic backup/restore issue, not just Questions. Adding Eloy for his wisdom.

          Show
          Tim Hunt added a comment - So, do you think some sort of "\r\n" -> "\n", or "\r" -> '' on import/restore is a good solution? Presumably this is a fairly generic backup/restore issue, not just Questions. Adding Eloy for his wisdom.
          Hide
          Dan Poltawski added a comment -

          I can replicate this issue, updating test instructions

          Show
          Dan Poltawski added a comment - I can replicate this issue, updating test instructions
          Hide
          Dan Poltawski added a comment -

          Tim: Its the data within the exsiting question in the DB which has carriage returns in it. I think backup is stripping them as backup & then restore is not affected

          Show
          Dan Poltawski added a comment - Tim: Its the data within the exsiting question in the DB which has carriage returns in it. I think backup is stripping them as backup & then restore is not affected
          Hide
          Tim Hunt added a comment -

          OK, so perhaps it is a HTML editor or input cleaning issue. Anyway, hopefully Eloy can advise.

          Show
          Tim Hunt added a comment - OK, so perhaps it is a HTML editor or input cleaning issue. Anyway, hopefully Eloy can advise.
          Hide
          Tyler Bannister added a comment -

          We've run into a similar problem with one of our customers, several questions with carriage returns are causing the restore process to fail for various courses.

          The HTML editor does allow the insertion of carriage returns into a question answer, in fact, it even automatically inserts the carriage returns when using a Linux client to access a Linux server.

          Show
          Tyler Bannister added a comment - We've run into a similar problem with one of our customers, several questions with carriage returns are causing the restore process to fail for various courses. The HTML editor does allow the insertion of carriage returns into a question answer, in fact, it even automatically inserts the carriage returns when using a Linux client to access a Linux server.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Would be great to get confirmation about how the same activity duplication behaves if you, simply, comment out, from backup/util/xml/xml_writer.class.php, line 264:

          $content = preg_replace("/\r\n|\r/", "\n", $content); // Normalize line&return=>line
          

          That's not a proper fix but can show us if that's the cause. Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Would be great to get confirmation about how the same activity duplication behaves if you, simply, comment out, from backup/util/xml/xml_writer.class.php, line 264: $content = preg_replace( "/\r\n|\r/" , "\n" , $content); // Normalize line& return =>line That's not a proper fix but can show us if that's the cause. Ciao
          Hide
          Dan Poltawski added a comment -

          Attached backup file of test course with problem question

          Show
          Dan Poltawski added a comment - Attached backup file of test course with problem question
          Hide
          Dan Poltawski added a comment -

          Ah I didn't notice your comment above!

          Show
          Dan Poltawski added a comment - Ah I didn't notice your comment above!
          Hide
          Dan Poltawski added a comment -

          Seems to still be ok on backup/restore if I comment out that line.

          Show
          Dan Poltawski added a comment - Seems to still be ok on backup/restore if I comment out that line.
          Hide
          Tyler Bannister added a comment -

          An additional note: To replicate this problem with a backup, the question must be shared. So if you backup from a category and restore to the same category the question must be assigned to either the category pool or the site level pool. It's the question de-duplication code that's triggering the error.

          Commenting out line 264 in backup/util/xml/xml_writer.class.php doesn't seem to fix the problem. It looks like carriage return is dropped when the xml file is read in. I did confirm that carriage return was output into the file when that line was commented out, but was still unable to restore from the file.

          Show
          Tyler Bannister added a comment - An additional note: To replicate this problem with a backup, the question must be shared. So if you backup from a category and restore to the same category the question must be assigned to either the category pool or the site level pool. It's the question de-duplication code that's triggering the error. Commenting out line 264 in backup/util/xml/xml_writer.class.php doesn't seem to fix the problem. It looks like carriage return is dropped when the xml file is read in. I did confirm that carriage return was output into the file when that line was commented out, but was still unable to restore from the file.
          Hide
          Tyler Bannister added a comment -

          As far as I can tell, carriage returns are stripped out by the xml_parse function. I did a test by restoring an XML file with an answer with a carriage return in it. I visually confirmed the presence of the carriage return in the XML file, but during the restore process when the file is being parse, and the cdata is put into the data accumulator for the parser, the carriage return is no longer present.

          I inserted a print statement into progressive_parser.class.php and I printed out the line with both newlines and carriage returns replaced by different placeholders. The newline was kept, the carriage return was stripped.

          I think this means the bug has to be fixed in the restore_qtype_plugin.class.php class when the answers are compared. Fixing the html editor so that it doesn't insert carriage returns will only partially solve the problem since it could still allow carriage returns to be inserted by an import function and wouldn't do anything fix backups already made with carriage returns in them.

          This means instead of the current database query to find the answer that matches the data, all of the answers for the question will have to be fetched, cleaned, and then compared against the answer from the XML file.

          Show
          Tyler Bannister added a comment - As far as I can tell, carriage returns are stripped out by the xml_parse function. I did a test by restoring an XML file with an answer with a carriage return in it. I visually confirmed the presence of the carriage return in the XML file, but during the restore process when the file is being parse, and the cdata is put into the data accumulator for the parser, the carriage return is no longer present. I inserted a print statement into progressive_parser.class.php and I printed out the line with both newlines and carriage returns replaced by different placeholders. The newline was kept, the carriage return was stripped. I think this means the bug has to be fixed in the restore_qtype_plugin.class.php class when the answers are compared. Fixing the html editor so that it doesn't insert carriage returns will only partially solve the problem since it could still allow carriage returns to be inserted by an import function and wouldn't do anything fix backups already made with carriage returns in them. This means instead of the current database query to find the answer that matches the data, all of the answers for the question will have to be fetched, cleaned, and then compared against the answer from the XML file.
          Hide
          Tyler Bannister added a comment -

          I've attached a simple patch to fix the carriage return problem.

          Show
          Tyler Bannister added a comment - I've attached a simple patch to fix the carriage return problem.
          Hide
          Tim Hunt added a comment -

          Thanks for working on this, but: Code review comments:

          1. $DB->get_records always returns an array, so the if (is_array test should go.

          2. $newitemid = 0; should be closer to the loop that sets it.

          3. We are going to restore each answer one after another, therefore doing

          $params = array('question' => $newquestionid);
          $answers = $DB->get_records('question_answers', $params, '', 'id, answer'); 
          

          once for each answer is horribly inefficient. How ease is to to do that once per question?

          4. By the way, I would inline $params there. Fewer local variables are better (within reason).

          5. Where do the specific details of the cleaning come from? What is our guarantee that that is identical to what happens in the backup code (at some arbitrary date in the future).

          Show
          Tim Hunt added a comment - Thanks for working on this, but: Code review comments: 1. $DB->get_records always returns an array, so the if (is_array test should go. 2. $newitemid = 0; should be closer to the loop that sets it. 3. We are going to restore each answer one after another, therefore doing $params = array('question' => $newquestionid); $answers = $DB->get_records('question_answers', $params, '', 'id, answer'); once for each answer is horribly inefficient. How ease is to to do that once per question? 4. By the way, I would inline $params there. Fewer local variables are better (within reason). 5. Where do the specific details of the cleaning come from? What is our guarantee that that is identical to what happens in the backup code (at some arbitrary date in the future).
          Hide
          Tyler Bannister added a comment -

          On issue #3, it's not very easy. We'd either have to rewrite the question/answer handling functions so that questions are not handled individually or use static or instance variables to cache the results from the first lookup.

          On issue #5, the details of the cleaning come from the protected function xml_safe_utf8 in backup/util/xml/xml_writer.class.php.

          Show
          Tyler Bannister added a comment - On issue #3, it's not very easy. We'd either have to rewrite the question/answer handling functions so that questions are not handled individually or use static or instance variables to cache the results from the first lookup. On issue #5, the details of the cleaning come from the protected function xml_safe_utf8 in backup/util/xml/xml_writer.class.php.
          Hide
          Tyler Bannister added a comment -

          I've attached an updated fix with the is_array removed and the $newitemid holder moved closer to the loop.

          Show
          Tyler Bannister added a comment - I've attached an updated fix with the is_array removed and the $newitemid holder moved closer to the loop.
          Hide
          Tim Hunt added a comment -

          The code is now technically OK, I think. It really needs a backup and restore expert (hello Eloy) to comment on whether the approach is sound.

          Show
          Tim Hunt added a comment - The code is now technically OK, I think. It really needs a backup and restore expert (hello Eloy) to comment on whether the approach is sound.
          Hide
          Mike Churchward added a comment -

          Hi Eloy... This has become a big issue with us. Can this be accelerated?

          Show
          Mike Churchward added a comment - Hi Eloy... This has become a big issue with us. Can this be accelerated?
          Hide
          Tyler Bannister added a comment -

          Hi Eloy, I've run into this issue with a few different customers now and I think my patch may also resolve some other bugs like MDL-26442. So do you have an opinion to share on my fix for the issue?

          Show
          Tyler Bannister added a comment - Hi Eloy, I've run into this issue with a few different customers now and I think my patch may also resolve some other bugs like MDL-26442 . So do you have an opinion to share on my fix for the issue?
          Hide
          Mike Churchward added a comment -

          I upgraded this issue to critical. In all released versions of Moodle 2, when restores are done with questions in the defined state, the restores fail. This is preventing people from being able to migrate their courses.

          Show
          Mike Churchward added a comment - I upgraded this issue to critical. In all released versions of Moodle 2, when restores are done with questions in the defined state, the restores fail. This is preventing people from being able to migrate their courses.
          Hide
          Mike Churchward added a comment -

          I believe MDL-26442 is the same issue.

          Show
          Mike Churchward added a comment - I believe MDL-26442 is the same issue.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Hi Tyler, Mike, Tim, Dan (and Michael, thanks for pointing me to this),

          While the solution is correct... I really think that it would be better to add Tyler's loop+normalization as a fallback alternative, if the direct/simpler/quicker get_field() fails. How does it sound?

          Here there is the candidate for my idea:

          https://github.com/stronk7/moodle/compare/MDL-30018

          IMPORTANT: Also, in order to get more and more matches and less &%$&%$ in the DB... couldn't we be performing that xml_safe_utf8() normalization. I'm a bit concerned that this exact problem is susceptible to be happening in a lot of places where we perform text matching. Perhaps something to discuss @ HQ, because that would be a global thing to add to all forms or so.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Hi Tyler, Mike, Tim, Dan (and Michael, thanks for pointing me to this), While the solution is correct... I really think that it would be better to add Tyler's loop+normalization as a fallback alternative, if the direct/simpler/quicker get_field() fails. How does it sound? Here there is the candidate for my idea: https://github.com/stronk7/moodle/compare/MDL-30018 IMPORTANT: Also, in order to get more and more matches and less &%$&%$ in the DB... couldn't we be performing that xml_safe_utf8() normalization. I'm a bit concerned that this exact problem is susceptible to be happening in a lot of places where we perform text matching. Perhaps something to discuss @ HQ, because that would be a global thing to add to all forms or so. TIA and ciao
          Hide
          Rob added a comment -

          Hi Eloy,

          I tested your patch, and it clears the error. That said, importing or restoring a quiz with system level questions still takes a great deal of time. I left for lunch after 20 minutes of waiting. The import completed successfully before I got back to the office.

          Thank you for the time and effort put in to fixing this and MDL-26442.

          Show
          Rob added a comment - Hi Eloy, I tested your patch, and it clears the error. That said, importing or restoring a quiz with system level questions still takes a great deal of time. I left for lunch after 20 minutes of waiting. The import completed successfully before I got back to the office. Thank you for the time and effort put in to fixing this and MDL-26442 .
          Hide
          Tim Hunt added a comment -

          I looked at Eloy's patch. I am not claiming to be qualified to comment, but it looks OK to me.

          Performance is a problem. The answer would seem to be some sort of caching.

          Show
          Tim Hunt added a comment - I looked at Eloy's patch. I am not claiming to be qualified to comment, but it looks OK to me. Performance is a problem. The answer would seem to be some sort of caching.
          Hide
          Tyler Bannister added a comment -

          Eloy, the candidate looks good to me.

          Show
          Tyler Bannister added a comment - Eloy, the candidate looks good to me.
          Hide
          Martin Dougiamas added a comment -

          This seems to have a good patch with some peer review. I'm submitting it for integration.

          Please fix the git fields if required.

          Show
          Martin Dougiamas added a comment - This seems to have a good patch with some peer review. I'm submitting it for integration. Please fix the git fields if required.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The integration of this issue has been delayed to next week because the integration period is over (Monday, Tuesday) and testing must happen on Wednesday.

          This change to a more rigid timeframe on each integration/testing cycle aims to produce a better and clear separation and organization of tasks for everybody.

          This is a bulk-automated message, so if you want to blame somebody/thing/where, don't do it here (use git instead) :-D :-P

          Apologizes for the inconvenient, this will be integrated next week. Thanks for your collaboration & ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The integration of this issue has been delayed to next week because the integration period is over (Monday, Tuesday) and testing must happen on Wednesday. This change to a more rigid timeframe on each integration/testing cycle aims to produce a better and clear separation and organization of tasks for everybody. This is a bulk-automated message, so if you want to blame somebody/thing/where, don't do it here (use git instead) :-D :-P Apologizes for the inconvenient, this will be integrated next week. Thanks for your collaboration & ciao
          Hide
          Sam Hemelryk added a comment -

          Thanks everyone, I've integrated Eloy's fix now.

          Show
          Sam Hemelryk added a comment - Thanks everyone, I've integrated Eloy's fix now.
          Hide
          David Monllaó added a comment -

          It passes; I've been able to replicate the problem with linux in 22 (mysql) and master (postgres) the activity duplication works as expected with the patch applied

          Show
          David Monllaó added a comment - It passes; I've been able to replicate the problem with linux in 22 (mysql) and master (postgres) the activity duplication works as expected with the patch applied
          Hide
          Rob added a comment -

          I just ran into error_question_match_sub_missing_in_db while importing a set of quizzes with Eloy's patch applied. This only happens in two courses. I was able to import the same quizzes into several other courses with not problem (except it took over 20 minutes). I am able to comment out the line in the matching question code that throws the error and then the import works as expected (except the slowness).

          Show
          Rob added a comment - I just ran into error_question_match_sub_missing_in_db while importing a set of quizzes with Eloy's patch applied. This only happens in two courses. I was able to import the same quizzes into several other courses with not problem (except it took over 20 minutes). I am able to comment out the line in the matching question code that throws the error and then the import works as expected (except the slowness).
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Gutta cavat lapidem, non vi sed saepe cadendo - Ovidio

          This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads).

          Thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Gutta cavat lapidem, non vi sed saepe cadendo - Ovidio This issue has been integrated upstream and is now available both via git and cvs (and in some hours, via mirrors and downloads). Thanks!

            People

            • Votes:
              7 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: