Moodle
  1. Moodle
  2. MDL-5650

WEBCT IMPORT does NOT work for any question type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.7
    • Fix Version/s: 1.7.3
    • Component/s: Questions
    • Labels:
      None
    • Environment:
      All
    • Rank:
      28159

      Description

      The import process exit at line 320 when :TYPE: indicating the start of the first question (generally line 2 or 3) is found

      if (eregi(^:(TYPE/EOF):,$line)) {

      // New Question or End of File

      the code test for question components which are not found and exit. One simple way to correct this is to check that we are at least after the second line and replace by

      if (eregi(^:(TYPE/EOF):,$line) and $nLineCounter > 2)

      This will work also for files containing more than one question.

      We need also to convert to utf8 before doing the analysis.

      I propose the function utf8_encode_array() applied to $lines the array of $line.It is not in the current libs.

      This was applied to french questions with accents that are not correctly decode without the utf8 conversion.

      see the quizz forum for details and files

        Issue Links

          Activity

          Hide
          Martin Dougiamas added a comment -

          From Pierre Pichet (pichet.pierre at uqam.ca) Friday, 11 August 2006, 04:56 AM:

          This is related to the quizz posting

          http://moodle.org/mod/forum/discuss.php?d=49673

          and the more complete solution is explained in

          http://moodle.org/mod/forum/discuss.php?d=46755

          Show
          Martin Dougiamas added a comment - From Pierre Pichet (pichet.pierre at uqam.ca) Friday, 11 August 2006, 04:56 AM: This is related to the quizz posting http://moodle.org/mod/forum/discuss.php?d=49673 and the more complete solution is explained in http://moodle.org/mod/forum/discuss.php?d=46755
          Hide
          Pierre Pichet added a comment -

          A first solution has been worked on, exluding calculated questions.
          As WebCT use windows-1252, the conversion windows-1252 to utf-8 is done by format.php as long as then iconv library is working in the server php installation.
          More tests needed.
          WebCT has general feedback and comments fields that should be managed correctly.
          As nothing is working on 1.6 and further, a partial solution is better than nothing so this will probably be put in the code.
          I will discuss it with Howard.

          Show
          Pierre Pichet added a comment - A first solution has been worked on, exluding calculated questions. As WebCT use windows-1252, the conversion windows-1252 to utf-8 is done by format.php as long as then iconv library is working in the server php installation. More tests needed. WebCT has general feedback and comments fields that should be managed correctly. As nothing is working on 1.6 and further, a partial solution is better than nothing so this will probably be put in the code. I will discuss it with Howard.
          Hide
          Pierre Pichet added a comment -

          Finally as a better code even if it not the best, is a good thing, I CVS the modifications to 1,7 1,8 and head.

          Show
          Pierre Pichet added a comment - Finally as a better code even if it not the best, is a good thing, I CVS the modifications to 1,7 1,8 and head.
          Hide
          Pierre Pichet added a comment -

          Adding calculated question import and fixing some feedback problems. The modifications will be ported down to 1.6 after some testing.
          As my university UQÀM will use 1.6.3 for the next year , there is an interest in porting to 1.6.

          Show
          Pierre Pichet added a comment - Adding calculated question import and fixing some feedback problems. The modifications will be ported down to 1.6 after some testing. As my university UQÀM will use 1.6.3 for the next year , there is an interest in porting to 1.6.
          Hide
          Pierre Pichet added a comment -

          Almost closing this as the code for calculated questions has been merged to 1.6 and 1.8, 1.7 will be done soon.

          Show
          Pierre Pichet added a comment - Almost closing this as the code for calculated questions has been merged to 1.6 and 1.8, 1.7 will be done soon.
          Hide
          Pierre Pichet added a comment -

          and merge from 1.6 to actual head (1.9)

          Show
          Pierre Pichet added a comment - and merge from 1.6 to actual head (1.9)

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: