Forum LAMS for Tech-Heads - General Forum: Re: LAMS MOODLE 3.0x Integration not working


 
Search: 

2: Re: LAMS MOODLE 3.0x Integration not working
In response to 1 05/19/16 09:49 PM
[ Reply | Forward ]
Hi Daniel,

I've done the necessary changes to make it work with Moodle 3.

Download the attached mod_lamslesson.zip and replace it and you should be alright.

Thanks,

Ernie

Posted by Ernie Ghiglione

3: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 2 05/20/16 10:57 AM
[ Reply | Forward ]
Thanx a lot for your quick answer and fix.

The new plugin installs fine but there is a bug.

I cannot "Open Lesson" from Moodle (However, "Update this LAMS Lesson" and "Monitor this lesson" works fine).

This is really weird. I'd say that the http request URL that is defined on the LAMS side is not working but then I cannot understand why monitoring or authoring should work.

http://tecfalms.unige.ch/moodle/mod/lamslesson/userinfo.php?ts=%timestamp%&un=%username%&hs=%hash%*rname%&hs=%hash%

In addition, the Moodle debugging shows the following in the LAMS screen:

Notice: Undefined property: stdClass::$displaydesign in /data/portails/moodle/moodle/mod/lamslesson/view.php on line 86

- greetings ! Daniel

Some info from the log file below:

---------------------------

2016-05-20 18:46:56,553 [http-0.0.0.0-8080-4:] ERROR org.lamsfoundation.lams.web.LoginRequestServlet - Authentication error:
org.lamsfoundation.lams.integration.security.AuthenticationException: Authentication failed!
at org.lamsfoundation.lams.integration.security.Authenticator.checkHash(Authenticator.java:64)Etat HTTP 401 - Login Failed - authentication error

type Rapport d'�tat

message Login Failed - authentication error

description La requ�te n�cessite une authentification HTTP (Login Failed - authentication error).
JBoss Web/2.1.3.GA
at org.lamsfoundation.lams.integration.security.Authenticator.authenticate(Authenticator.java:45)
at org.lamsfoundation.lams.web.LoginRequestServlet.doGet(LoginRequestServlet.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.lamsfoundation.lams.integration.security.SingleSignOn.invoke(SingleSignOn.java:91)
at org.lamsfoundation.lams.integration.security.LoginRequestValve.invoke(LoginRequestValve.java:71)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:662)
2016-05-20 18:46:56,554 [http-0.0.0.0-8080-4:] INFO org.lamsfoundation.lams.integration.security.LoginRequestValve - There are 0 headers in the response
2016-05-20 18:46:56,554 [http-0.0.0.0-8080-4:] INFO org.lamsfoundation.lams.integration.security.LoginRequestValve - LOGIN REQUEST DETECTED - BUT NO LOGIN IS CARRIED OUT
2016-05-20 18:49:46,135 [http-0.0.0.0-8080-4:] INFO org.lamsfoundation.lams.integration.security.LoginRequestValve - There are 1 headers in the response
2016-05-20 18:49:46,135 [http-0.0.0.0-8080-4:] INFO org.lamsfoundation.lams.integration.security.LoginRequestValve - Location = http://tecfalms.unige.ch:8080/lams/j_security_check?j_username=mdl_admin&j_password=c5235b8ba4c1fbf75e3e16d07c06f6d2dd9ee406
2016-05-20 18:49:46,151 [http-0.0.0.0-8080-4:] INFO org.lamsfoundation.lams.integration.security.LoginRequestValve - LOGIN REQUEST DETECTED - LOGIN SUCCESSFUL
2016-05-20 18:49:46,151 [http-0.0.0.0-8080-4:] INFO org.lamsfoundation.lams.integration.security.LoginRequestValve - character encoding of the request - null
2016-05-20 18:49:46,151 [http-0.0.0.0-8080-4:] INFO org.lamsfoundation.lams.integration.security.LoginRequestValve - Redirect URL - /lams/home.do?method=monitorLesson&lessonID=2211

The Jboss screen looks like this:
Etat HTTP 401 - Login Failed - authentication error

type Rapport d'�tat

message Login Failed - authentication error

description La requ�te n�cessite une authentification HTTP (Login Failed - authentication error).
JBoss Web/2.1.3.GA

Posted by Daniel Schneider

4: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 3 05/22/16 04:33 AM
[ Reply | Forward ]
Hi Daniel,

Yes, I saw that now.

Also, I found a few other bugs with LAMS latest and Moodle 3, so I'll be fixing them shortly.

Now, are you on LAMS 2.4? From the debian installer?

The reason I'm asking is because I probably need to give you a version of the LAMS-Moodle module that is specific for Moodle3 and your version of LAMS too.

Thanks,

Ernie

Posted by Ernie Ghiglione

5: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 4 05/22/16 05:14 AM
[ Reply | Forward ]
Hi Ernie

thanx for looking into this again :)

Yes I got 2.4 from the Debian installer (on Ubuntu 14LTS)

2.4.0.201204131000 I believe

- greetings - Daniel

Posted by Daniel Schneider

6: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 5 05/26/16 11:12 AM
[ Reply | Forward ]
PS (sorry to insist)

I'd be glad to have even a half-baked fix. I made the mistake of upgrading Moodle in our production system and not testing LAMS.

We gave our students LAMS sequences to create in two of our classes. While it's possible to look at these directly from LAMS, it's difficult to find out which of the multiple versions they create and deploy is the one to evaluate (Moodle leaves a copy, each time a sequence is redeployed)

- cheers ! Daniel

I certainly can survive our exam sessions without this patch, but I am a quite embarrassed for breaking our system and not testing the upgrade as I should have :(

Posted by Daniel Schneider

7: Re: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 6 05/26/16 08:06 PM
[ Reply | Forward ]
Hi Daniel,

No worries, I'll get on to this today.

As soon as I get it done, I'll email you the correct copy.

Cheers,

Ernie

Posted by Ernie Ghiglione

8: Re: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 6 05/26/16 10:14 PM
[ Reply | Forward ]
Hi Daniel,

Ok, so here's the LAMS-Moodle module that would work with LAMS version 2.4 and Moodle 3.x.

Let me know if you have any problems.

Thank you,

Ernie

Posted by Ernie Ghiglione

9: Re: Re: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 8 05/27/16 12:24 AM
[ Reply | Forward ]
Hi Ernie

thanx so much for looking into this !

But I am afraid that you packaged the wrong files.

The zip you pointed at has the same size as the one you created on May 20 and files inside look the same too.

http://lamscommunity.org/dotlrn/file-storage/view/dotlrn_fs_1348_root_folder/dotlrn_fs_1348_shared_folder/lams24-moodle3-lamslesson.zip

Unpacked, this zip looks the same, Moodle btw. doesn't recognize any changes and the bug is still there :)

schneide@tecfalx1:/data/portails/moodle/src$ ls -la lamslesson
total 132
drwxr-xr-x 7 schneide tecfa 4096 May 27 04:07 .
drwxr-xr-x 21 schneide tecfa 4096 May 27 07:58 ..
drwxr-xr-x 4 schneide tecfa 4096 May 20 03:01 backup
-rw-r--r-- 1 schneide tecfa 1639 May 20 03:01 callback.php
drwxr-xr-x 2 schneide tecfa 4096 May 20 03:01 CVS
drwxr-xr-x 3 schneide tecfa 4096 May 20 03:01 db
drwxr-xr-x 5 schneide tecfa 4096 May 20 03:01 lang
-rw-r--r-- 1 schneide tecfa 34189 May 22 10:26 lib.php
-rw-r--r-- 1 schneide tecfa 8584 May 20 03:01 mod_form.php
-rw-r--r-- 1 schneide tecfa 138 May 20 03:01 offset.php
drwxr-xr-x 3 schneide tecfa 4096 May 20 03:01 pix
-rw-r--r-- 1 schneide tecfa 1425 May 20 03:01 preview.js
-rw-r--r-- 1 schneide tecfa 2269 May 20 03:01 preview.php
-rw-r--r-- 1 schneide tecfa 4292 May 20 03:01 settings.php
-rw-r--r-- 1 schneide tecfa 3689 May 20 03:01 styles.css
-rw-r--r-- 1 schneide tecfa 1960 May 20 03:01 userinfo.php
-rw-r--r-- 1 schneide tecfa 5548 May 20 03:01 validate.js
-rw-r--r-- 1 schneide tecfa 256 May 20 03:01 verify.php
-rw-r--r-- 1 schneide tecfa 1369 May 20 03:13 version.php
-rw-r--r-- 1 schneide tecfa 7256 May 27 04:07 view.php

schneide@tecfalx1:/data/portails/moodle/src$ ls -la lamslesson-bad/
total 132
drwxr-xr-x 6 schneide tecfa 4096 May 19 15:55 .
drwxr-xr-x 21 schneide tecfa 4096 May 27 07:58 ..
drwxr-xr-x 3 schneide tecfa 4096 Feb 20 2015 backup
-rw-r--r-- 1 schneide tecfa 1639 Jan 7 2012 callback.php
drwxr-xr-x 2 schneide tecfa 4096 Feb 20 2015 db
drwxr-xr-x 4 schneide tecfa 4096 Feb 20 2015 lang
-rw-r--r-- 1 schneide tecfa 34176 Feb 20 2015 lib.php
-rw-r--r-- 1 schneide tecfa 8584 Dec 6 2014 mod_form.php
-rw-r--r-- 1 schneide tecfa 138 Dec 6 2014 offset.php
drwxr-xr-x 2 schneide tecfa 4096 Feb 20 2015 pix
-rw-r--r-- 1 schneide tecfa 1425 Jan 12 2012 preview.js
-rw-r--r-- 1 schneide tecfa 2269 Aug 15 2013 preview.php
-rw-r--r-- 1 schneide tecfa 4292 Dec 6 2014 settings.php
-rw-r--r-- 1 schneide tecfa 3689 Dec 6 2014 styles.css
-rw-r--r-- 1 schneide tecfa 1960 Mar 22 2012 userinfo.php
-rw-r--r-- 1 schneide tecfa 5548 Dec 6 2014 validate.js
-rw-r--r-- 1 schneide tecfa 256 Jan 10 2012 verify.php
-rw-r--r-- 1 schneide tecfa 1314 May 19 15:55 version.php
-rw-r--r-- 1 schneide tecfa 1275 Feb 20 2015 version.php~
-rw-r--r-- 1 schneide tecfa 7263 Feb 20 2015 view.php

Posted by Daniel Schneider

10: Re: Re: Re: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 9 05/27/16 04:40 AM
[ Reply | Forward ]
OOPS cancel my previous message.

This morning, before attending a meeting I quickly tested and indeed it failed (also moodle did not seem to notice that I changed the files).

But, now, after flushing the browser and server caches, the thing seems to work. Sorry, I shouldn't post when in a hurry.

So it all seems to be OK for now. If not I'll be back :)

- Daniel

PS: Message to all of you: If you install the new LAM-Moodle 3 connector, empting caches could help (can't say which one of Moodle, LAMS or webbrowser did the trick though ...)

Posted by Daniel Schneider

11: Re: Re: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 8 06/02/16 07:57 AM
[ Reply | Forward ]
Hi Ernie

Actually lesson creation is still broken or it broke by itself (can't remember if it actually did work). Since last week we only had to grade finalized sequences I forgot to test. But now students ran into this in another class:

When clicking on "Update this LAMS session", one has to wait a few minutes then get:

Call to LAMS failed: received no response or connection was refused. Please check that you have the correct LAMS server URL and that it is online.

error/lamslesson/restcallfail

Any ideas why this happens ?

- greetings ! - Daniel

In the apache log I can see the following:

[Thu Jun 02 15:47:18.395020 2016] [:error] [pid 5684] [client 129.194.30.22:41172] Default exception handler: Call to LAMS failed: received no response or connection was refused. Please check that you have the correct LAMS server URL and that it is online. Debug: \nError code: restcallfail\n* line 488 of /lib/setuplib.php: moodle_exception thrown\n* line 343 of /mod/lamslesson/lib.php: call to print_error()\n* line 92 of /mod/lamslesson/mod_form.php: call to lamslesson_get_sequences_rest()\n* line 194 of /lib/formslib.php: call to mod_lamslesson_mod_form->definition()\n* line 86 of /course/moodleform_mod.php: call to moodleform->__construct()\n* line 254 of /course/modedit.php: call to moodleform_mod->__construct()\n, referer: http://tecfalms.unige.ch/moodle/mod/lamslesson/view.php?id=8332


In the LAMS log:
lams.log
- nothing

local_host_access
129.194.7.79 - - [02/Jun/2016:15:42:16 +0200] "POST /lams//services/xml/LessonManager HTTP/1.1" 200 256 "-" "MoodleBot/1.0"
129.194.7.79 - - [02/Jun/2016:15:47:29 +0200] "POST /lams/services/getServerTime HTTP/1.1" 500 552 "-" "MoodleBot/1.0"

server.log:

2016-06-02 15:47:29,076 ERROR [org.apache.axis.EXCEPTIONS] (http-0.0.0.0-8080-4)
Generating fault class
AxisFault
faultCode: {http://xml.apache.org/axis/}Client.NoSOAPAction
faultSubcode:
faultString: no SOAPAction header!
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:no SOAPAction header!
at org.apache.axis.transport.http.AxisServlet.getSoapAction(AxisServlet.java:1013)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:678)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java\
:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSess\
ionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java\
:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Appli


Using:
LAMS 2.4
Ubuntu 14LTS

I also noticed that Moodle detects a huge lag which is strange since both Moodle and LAMS sit on the same machine and host.

LAMS time: 01-01-1970 01:00:00.000000
Moodle time:06-02-2016 15:47:29.000000
Offset: -24414587.48515 minutes

-- greetings ! Daniel

Posted by Daniel Schneider

12: Re: Re: Re: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 11 06/14/16 01:08 AM
[ Reply | Forward ]
Hi Daniel,

Sorry for the delay.

I tried to replicate the problem you were experiencing today but wasn't able to do.

Here's a little video I did to demonstrate.

Perhaps I'm doing something different?

Thanks,

Ernie

Posted by Ernie Ghiglione

13: Re: Re: Re: Re: Re: Re: Re: Re: Re: LAMS MOODLE 3.0x Integration not working
In response to 12 06/16/16 06:32 AM
[ Reply | Forward ]
Hi Ernie and thanx again for looking into this !

Ouch bad news. Your video demonstrates exactly what the integration should do. (In particular the towards the end, i.e. editing/selecting a LAMS lesson).

Can I do something to provide you with more data ?

- Daniel

Posted by Daniel Schneider

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