Forum LAMS for Tech-Heads - General Forum: Error in moodle integration when course name has ' in it.


 
You may request notification for Error in moodle integration when course name has ' in it..
Search: 

1: Error in moodle integration when course name has ' in it.
12/29/08 11:00 AM
[ Reply | Forward ]
If a course name has an apostrophe in it, the SOAP call fails in the javascript since the apostrophe is not escaped!

We are using Lams 2.1.1.

Looks like this should be escaped in the code the returns the soap results.

Posted by Dave Bauer

2: Re: Error in moodle integration when course name has ' in it.
In response to 1 12/29/08 11:18 AM
[ Reply | Forward ]
Specifically the lams_learning_design.title is the database column that contains the data that needs to be esacped. Overall all the data in the SOAP response that will be output as the javascript variable command need to be escaped.

Posted by Dave Bauer

3: Re: Error in moodle integration when course name has ' in it.
In response to 1 01/02/09 05:42 PM
[ Reply | Forward ]
Hi Dave,

I think there's a new method in which you don't even need to use SOAP (sort of a direct REST like call instead).

We'll get back to you on Monday.

Thanks,

Ernie

Posted by Ernie Ghiglione

4: Re: Error in moodle integration when course name has ' in it.
In response to 1 01/05/09 12:11 AM
[ Reply | Forward ]
Thanks Dave.

We will escape it in the LAMS side.

http://bugs.lamsfoundation.org/browse/LDEV-2073

I believe you managed to escape this on the other end as well, right?

Posted by Ernie Ghiglione

5: Re: Error in moodle integration when course name has ' in it.
In response to 1 01/05/09 06:30 AM
[ Reply | Forward ]
Nope i could not figure it out since the javascript returned already contains ' it's hard to tell which you need to escape. I just changed the names in the database as a workaround.

Posted by Dave Bauer

6: Re: Re: Error in moodle integration when course name has ' in it.
In response to 5 01/07/09 09:56 PM
[ Reply | Forward ]
Hey David

Can I ask you what version of LAMS and the moodle module you are using, sofar I have not been able to reproduce this problem.

Which table and fields did you modify in your workaround?

Luke

Posted by Luke Foxton

9: Re: Re: Re: Error in moodle integration when course name has ' in it.
In response to 6 01/07/09 10:27 PM
[ Reply | Forward ]
Lams 2.1.1

Moodle 1.9.3

Lams2 moodle activity 2006092601

We can't upgrade that moodle activity due to the version of PHP which doesn't work with the newer one.

Posted by Dave Bauer

10: Re: Re: Re: Re: Error in moodle integration when course name has ' in it.
In response to 9 01/08/09 11:40 AM
[ Reply | Forward ]
Dave,

What version of PHP are you running?

We have changed the lams moodle mod to use the simplest function to read/parse XML so it would work with PHP 4 too.

If your PHP version can use the xmlize.php stuff, then you should be able to use it no problems.

And I'm pretty sure that xmlize is part of the default moodle libs, so it should work with older versions of PHP4.

Thanks,

Ernie

Posted by Ernie Ghiglione

7: Re: Re: Error in moodle integration when course name has ' in it.
In response to 5 01/07/09 09:59 PM
[ Reply | Forward ]
Here is a screenshot with the latest version of LAMS and the moodle integration module

Posted by Luke Foxton

Attachments:
8: Re: Re: Error in moodle integration when course name has ' in it.
In response to 5 01/07/09 10:03 PM
[ Reply | Forward ]
Dave,

There has been some changes to the moodle module. You can see them here in fisheye. Specifically, have a look at the lib.php file.

Thanks

Posted by Ernie Ghiglione

11: Re: Re: Re: Error in moodle integration when course name has ' in it.
In response to 8 03/11/09 09:18 AM
[ Reply | Forward ]
Ernie, are these changes in any release yet?

Posted by Dave Bauer

12: Re: Re: Re: Re: Error in moodle integration when course name has ' in it.
In response to 11 03/15/09 05:09 PM
[ Reply | Forward ]
Hi Dave,

Yes, just checkout the lamstwo module for Moodle and you should be good to go. See CVS details. Get it directly from head

Thanks,

Ernie

Posted by Ernie Ghiglione

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum