Moodle
  1. Moodle
  2. MDL-1182

WebCT Quiz Import: Fails to un-escape colons

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: Quiz
    • Labels:
      None
    • Environment:
      All
    • Database:
      Any
    • Affected Branches:
      MOODLE_12_STABLE
    • Rank:
      10140

      Description

      WebCT files escape any colons - they convert them from : to \:.

      When they're imported into Moodle, the slashes aren't taken off. They should be.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 04:28 PM:

        Do all versions of WebCT do this escaping?

        From Dan Stowell (d.stowell at ucl.ac.uk) Thursday, 25 March 2004, 05:03 PM:

        Yes, as far as I'm aware. I've worked with versions 3.5, 3.8, and 4.0 and they all do.

        Colons are used as field separators, so it does make sense that they escape them when used normally. This isn't documented though, since as far as I know there's no complete specification for the format.

        It's a big problem whenever you use a URL in a quiz, since the colon that comes after http gets escaped and causes all your links to fail!

        From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 09:30 PM:

        Can you please send me a sample data file (attach it here, please).

        From Dan Stowell (d.stowell at ucl.ac.uk) Thursday, 25 March 2004, 09:49 PM:

        OK, I've exported three questions from WebCT 4.0 (the live version used here). Each of them uses colons here and there.

        I have just gone through the routine of trying to import the questions into Moodle. On first pass I get the following errors:

        1 error(s) detected

        Too few :ANSWER, :Lx, :Rx statements for question line 53. You must define at last 2 possible answers

        3 warning(s) detected

        Image not available at line 11 (). The filename will be ignored

        Image not available at line 37 (). The filename will be ignored

        Image not available at line 57 (). The filename will be ignored

        • I don't understand the meaning of the first error but the second batch (the problem with images) has been referred to in a separate bug report.

        If I use Wordpad to edit out the :IMAGE: lines (which are causing the second problem) and to delete the last question entirely (which seems to cause the first problem) then I can successfully import the remaining two questions, except that the colons are still preceded by backslashes when they shouldn't be.

        From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 11:00 PM:

        I've fixed the colons, but the last question is still a problem, and that is because the ANSWER line is a different format for shortanswer questions than other types ...

        From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 11:18 PM:

        OK, I've solved Shortanswers too now. All go for 1.2.1

        From Dan Stowell (d.stowell at ucl.ac.uk) Thursday, 25 March 2004, 11:39 PM:

        Fantastic. Will look forward to downloading it....

        Show
        Martin Dougiamas added a comment - From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 04:28 PM: Do all versions of WebCT do this escaping? From Dan Stowell (d.stowell at ucl.ac.uk) Thursday, 25 March 2004, 05:03 PM: Yes, as far as I'm aware. I've worked with versions 3.5, 3.8, and 4.0 and they all do. Colons are used as field separators, so it does make sense that they escape them when used normally. This isn't documented though, since as far as I know there's no complete specification for the format. It's a big problem whenever you use a URL in a quiz, since the colon that comes after http gets escaped and causes all your links to fail! From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 09:30 PM: Can you please send me a sample data file (attach it here, please). From Dan Stowell (d.stowell at ucl.ac.uk) Thursday, 25 March 2004, 09:49 PM: OK, I've exported three questions from WebCT 4.0 (the live version used here). Each of them uses colons here and there. I have just gone through the routine of trying to import the questions into Moodle. On first pass I get the following errors: 1 error(s) detected Too few :ANSWER, :Lx, :Rx statements for question line 53. You must define at last 2 possible answers 3 warning(s) detected Image not available at line 11 (). The filename will be ignored Image not available at line 37 (). The filename will be ignored Image not available at line 57 (). The filename will be ignored I don't understand the meaning of the first error but the second batch (the problem with images) has been referred to in a separate bug report. If I use Wordpad to edit out the :IMAGE: lines (which are causing the second problem) and to delete the last question entirely (which seems to cause the first problem) then I can successfully import the remaining two questions, except that the colons are still preceded by backslashes when they shouldn't be. From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 11:00 PM: I've fixed the colons, but the last question is still a problem, and that is because the ANSWER line is a different format for shortanswer questions than other types ... From Martin Dougiamas (martin at moodle.com) Thursday, 25 March 2004, 11:18 PM: OK, I've solved Shortanswers too now. All go for 1.2.1 From Dan Stowell (d.stowell at ucl.ac.uk) Thursday, 25 March 2004, 11:39 PM: Fantastic. Will look forward to downloading it....
        Hide
        Michael Blake added a comment -

        assign to a valid user

        Show
        Michael Blake added a comment - assign to a valid user

          People

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

            Dates

            • Created:
              Updated:
              Resolved: