Moodle

importing presets with field types that rely on \n (eg select options for both normal and multi select) don't work

Details

  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

we end up with one option containing all the text of all the other options, the new line is getting chomped at some point.

Issue Links

Activity

Hide
Penny Leach added a comment -

assigning back to moodlehq - this is happening from the xmlize function, not the database mod

Show
Penny Leach added a comment - assigning back to moodlehq - this is happening from the xmlize function, not the database mod
Hide
Penny Leach added a comment -

it seems as though passing 0 as the second argument to xmlize fixes this problem, but I'm not sure of the implications of this. adding eloy to comment.

Show
Penny Leach added a comment - it seems as though passing 0 as the second argument to xmlize fixes this problem, but I'm not sure of the implications of this. adding eloy to comment.
Hide
Katja Krüger added a comment -

I have the same problem on my production site but not local. For me it seems so as if it's a problem of php versions. With php 4.4.7 the problem occurs, with php 5.1.2 everything looks o.k.

Show
Katja Krüger added a comment - I have the same problem on my production site but not local. For me it seems so as if it's a problem of php versions. With php 4.4.7 the problem occurs, with php 5.1.2 everything looks o.k.
Hide
Jon Bolton added a comment -

Problem occurs for me using 1.9 Beta 2 (2007101503) running on Linux with Apache version 1.3.37 (Unix), PHP version 4.4.4, MySQL version 4.1.22-standard.

After downloading the Buzz preset from http://moodle.org/mod/forum/discuss.php?d=84050#p371801 and successfully importing it to my site, the options in the menu drop down fields are not shown as one per line, but as all options in one line with no line breaks, ie. Web articleNewspaper articleJournal articleThesisReportEssayBookMagazineRSS feedAudio/Video

Show
Jon Bolton added a comment - Problem occurs for me using 1.9 Beta 2 (2007101503) running on Linux with Apache version 1.3.37 (Unix), PHP version 4.4.4, MySQL version 4.1.22-standard. After downloading the Buzz preset from http://moodle.org/mod/forum/discuss.php?d=84050#p371801 and successfully importing it to my site, the options in the menu drop down fields are not shown as one per line, but as all options in one line with no line breaks, ie. Web articleNewspaper articleJournal articleThesisReportEssayBookMagazineRSS feedAudio/Video
Hide
Jon Bolton added a comment -

Addibg jonb as QA Assignee

Show
Jon Bolton added a comment - Addibg jonb as QA Assignee
Hide
Robert Allerstorfer added a comment -

I can confirm this nasty bug with the latest Moodle 1.9 under PHP 4 and that the attached patch solves it. It has been discussed a little bit at MDL-12439. I'm just wondering why it does not get committed.

Show
Robert Allerstorfer added a comment - I can confirm this nasty bug with the latest Moodle 1.9 under PHP 4 and that the attached patch solves it. It has been discussed a little bit at MDL-12439. I'm just wondering why it does not get committed.
Hide
Dongsheng Cai added a comment -

If set the second argument to 1 allows the parser to skip "space" characters in xml document. Default is 1, but in the phpdoc, it said default value is 0.

Robert, I committed the patch to 1.8, 1.9 and head ,please check if it works well, thank you very much.

Show
Dongsheng Cai added a comment - If set the second argument to 1 allows the parser to skip "space" characters in xml document. Default is 1, but in the phpdoc, it said default value is 0. Robert, I committed the patch to 1.8, 1.9 and head ,please check if it works well, thank you very much.
Hide
Robert Allerstorfer added a comment -

Dongsheng, thank you for committing, now it works well for me. I think this bug could then be closed.

Show
Robert Allerstorfer added a comment - Dongsheng, thank you for committing, now it works well for me. I think this bug could then be closed.
Hide
Eloy Lafuente (stronk7) added a comment -

Verified. Closing.

Thanks!

Show
Eloy Lafuente (stronk7) added a comment - Verified. Closing. Thanks!

Dates

  • Created:
    Updated:
    Resolved: