Aiken import fails when apostrophe is used at column 50

Aiken import fails when apostrophe is used at column 50

by Frank McCown -
Number of replies: 6

If I do an import with just a single question in the file (shown below and attached) that uses an apostrophe at column 50, the import fails with the error message: "Cannot insert question".

aaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyy's
A. test1
B. test2
ANSWER: A

However, if I move the apostrophe to column 49, it imports just fine.

This is not a UTF-8 issue as I've verified that's the file's encoding. I don't know what version of Moodle I'm using, but I assume it's relatively recent since my university uses it quite extensively.

My guess is this is a bug related to Moodle using the first 50 characters of the question as the title of the question when importing. Some programmers need to be severly flogged for this. wink

Average of ratings: -
In reply to Frank McCown

Re: Aiken import fails when apostrophe is used at column 50

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Well, that might be one approach to trying to motivate a programmer to fix the bug, I am not sure it is the most effective.

In reply to Tim Hunt

Re: Aiken import fails when apostrophe is used at column 50

by Frank McCown -

The "flogging" comment was made in jest, hence the wink emoticon. I'm a programmer too. smile

However, since this bug took me approximately 2 hours to find, some financial compensation would be nice. wink

In reply to Frank McCown

Re: Aiken import fails when apostrophe is used at column 50

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

MDL-28508

I expect this only affects Moodle 1.9 and older.

In reply to Tim Hunt

Re: Aiken import fails when apostrophe is used at column 50

by Frank McCown -

I was told we are using Moodle 1.9.11.

Looks like MDL-28508 says "Resolution:Unresolved". So I guess this hasn't been fixed yet?

In reply to Frank McCown

Re: Aiken import fails when apostrophe is used at column 50

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

If you really want to understand, you probably need to read http://docs.moodle.org/dev/Process

Where we are in the process is that I have coded the fix, and next Monday it should be reviewed, and if all goes well it should then be released in next Wednesday's 2.1.1+ weekly build.

In reply to Tim Hunt

Re: Aiken import fails when apostrophe is used at column 50

by Frank McCown -

Sounds good. Thanks for fixing this.