| 
    
  
    |   | 25:
          Re:  Re:  Moodle tool adapter, error editing activity 
 | In response to 24 | 07/06/09 05:34 PM |  |  
  
    | 
      Hey Dave,
 It looks like the neccessary changes on the moodle code for the tools has not been made... Each moodle tool used for the tool adapters requires a few small changes - these changes do not affect the normal operation of the tool, but just provide some hooks to talk to the lams server... Can you find within your moodle code the lamsframes.php file? Ernie has recently done these changes, but they have not been committed to the cvs yet, so we cant give you a full changelog. However you could have a look at the changed files in full and do a comparison between your source and Ernie's and merge the changes. Perhaps using a program like winmerge or meld for linux. You can get the full source code here http://downloads.lamsinternational.com/moodle-soe.tgz Luke
       
        Posted by Luke Foxton
       |  | 
    
    
      |  | 
    
    
      | 
    
  
    |   | 27:
          Re:  Re:  Re:  Moodle tool adapter, error editing activity 
 | In response to 25 | 07/08/09 05:44 AM |  |  
  
    | 
      Wait :)
 I think this is a problem on the LAMS side. It is not making any requests back to mooodle, and moodle is sending the customCSV information now. If I look in the Moodle access logs I am not seeing any incoming requests. So this is what LAMS is doing 74.76.1.174 - mdl_sgadmin [06/Jul/2009:10:55:41 -0500] "GET /lams/tool/mdchce10/nullcourse/lamsframes.php?lamsUpdateURL=http%253A%252F%252Flamsdev.solutiongrove
 .com%252Flams%252F%252Ftool%252Fmdchce10%252F%252Fauthoring.do%253Fdispatch%253D
 updateContent%2526toolContentID%253D2538&dest=course%2Fmodedit-lams.php§ion=
 68&add=choice&course=7 HTTP/1.1" 302 -
 74.76.1.174 - mdl_sgadmin [06/Jul/2009:10:55:41 -0500] "GET /lams/errorpages/404
 .jsp HTTP/1.1" 200 1092
 which ends up at a file not found page.
       
        Posted by Dave Bauer
       |  | 
    
    
      | 
    
  
    |   | 28:
          Re:  Re:  Re:  Moodle tool adapter, error editing activity 
 | In response to 25 | 07/08/09 06:49 AM |  |  
  
    | 
      Ok i guess this is the issue here: 
09:00:40,568 [http-0.0.0.0-80-3:] DEBUG org.lamsfoundation.lams.tool.mdasgm.servi 
ce.MdlAssignmentService - Could not find the content with toolContentID:2547
 First can't find the content with toolcontentid 2547Where should I look for that? What database tables?
 09:00:40,620 [http-0.0.0.0-80-3:] DEBUG org.lamsfoundation.lams.web.action.LamsDispatchAction - Sending to moodle assignment edit page: nullcourse/lamsframes.php?
 &lamsUpdateURL=http%3A%2F%2Flamsdev.solutiongrove.com%2Flams%2F%2Ftool%2Fmdasgm10
 %2F%2Fauthoring.do%3Fdispatch%3DupdateContent%26toolContentID%3D2547&dest=mod%2Fa
 ssignment%2Fassignment_types.php§ion=68&add=assignment&course=7
 It tries to send to the moodle assignment edit page but the URL begins with "null" instead of the moodle integration server URL. The author environment is opened with the correct data afaict: customCSV=sgadmin,7,68,moodle&extlmsid=moodle as passed into the author page.
       
        Posted by Dave Bauer
       |  | 
    
    
      | 
    
  
    |   | 29:
          Re:  Re:  Re:  Re:  Moodle tool adapter, error editing activity 
 | In response to 28 | 07/08/09 07:18 AM |  |  
  
    | 
      Curiously the tool_content_id in question does exist:
 mysql> select * from lams_tool_content where tool_content_id = 2547;+-----------------+---------+
 | tool_content_id | tool_id |
 +-----------------+---------+
 |            2547 |      23 |
 +-----------------+---------+
 1 row in set (0.00 sec)
 
 
 Not sure where to go from there.
 
        Posted by Dave Bauer
       |  | 
    
    
      | 
    
  
    |   | 32:
          Re:  Re:  Re:  Re:  Re:  Moodle tool adapter, error editing activity 
 | In response to 29 | 07/08/09 02:20 PM |  |  
  
    | 
      I turned on SQL debugging in hibernate. No query is ever executed to get the object when I click so it looks like somewhere its caching a bogus object.
 I found this SQL where it creates the moodle assignment tool 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.SQL - update tl_mdasgm10_mdlassignment set create_date=?, update_date=?, define_later=?, content_in_use=?,
 run_offline=?, tool_content_id=?, ext_tool_content_id=?, ext_user_name=?, ext_co
 urse_id=?, ext_section=?, ext_lms_id=? where uid=?
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.jdbc.AbstractBatcher - prep
 aring statement
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.persister.entity.BasicEntit
 yPersister - Dehydrating entity: [org.lamsfoundation.lams.tool.mdasgm.model.MdlA
 ssignment#8]
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.type.TimestampType - bindin
 g '2009-07-08 16:29:19' to parameter: 1
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.type.TimestampType - bindin
 g null to parameter: 2
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.type.BooleanType - binding
 'false' to parameter: 3
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.type.BooleanType - binding
 'false' to parameter: 4
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.type.BooleanType - binding
 'false' to parameter: 5
 16:29:19,036 [http-0.0.0.0-80-2] DEBUG org.hibernate.type.LongType - binding '25
 56' to parameter: 6
 and its setting the tool_content_id when it inserts the tool. More from hibernate log 16:29:19,034 [http-0.0.0.0-80-2] DEBUG org.hibernate.pretty.Printer - org.lamsfoundation.lams.tool.mdasgm.model.MdlAssignment{uid=8, extToolContentId=null, cont
 entInUse=false, toolContentId=2556, extUsername=sgadmin, updateDate=null, runOff
 line=false, extLmsId=moodle, extCourseId=7, mdlAssignmentSessions=[], extSection
 =68, defineLater=false, createDate=2009-07-08 16:29:19}
 
        Posted by Dave Bauer
       |  | 
    
    
      |  | 
    
    
      |  | 
    
    
      |  | 
    
    
      | 
    
  
    |   | 34:
          Re:  Re:  Re:  Re:  Re:  Re:  Moodle tool adapter, error editing activity 
 | In response to 33 | 07/08/09 06:20 PM |  |  
  
    | 
      Hi.
 Opening author works fine.Then I drag a moodle tool into the workspace, say Moodle Assignment. That works ok.
 Then I double click on the tool to edit the content for that tool. It opens a new window and I get the 404 error message. I am getting the 404 error message because the URL its going to is nullcourse/lamsframes.php?lamsUpdateURL=http%253A%252F%252Flamsdev.solutiongrove.com%252Flams%252F%252Ftool%252Fmdchce10%252F%252Fauthoring.do%253Fdispatch%253D
 updateContent%2526toolContentID%253D2538&dest=course%2Fmodedit-lams.php§ion=
 68&add=choice&course=7
 null is there instead of the moodle server URL. This is caused I assume when it tried to get the tool_content_id but it can't.I'll attach the relevant lams.log.
 
        Posted by Dave Bauer
       |  | 
    
    
      | 
    
  
    |   | 35:
          Re:  Re:  Re:  Re:  Re:  Re:  Re:  Moodle tool adapter, error editing activity 
 | In response to 34 | 07/08/09 06:41 PM |  |  
  
    | 
      Aha!
 I think I know the problem now, sorry I should have noticed before. Since 2.3.1 there is a new field in the "Maintain Integrated Servers" area. When you click on your integrated server, there should be a new field simply asking for the external server url.... (See picture) Has this been set? As I said, we will be putting together a proper setup guide for the tool adapters soon, unfortunately for you, we're still ironing out the process, sorry about the difficulties so far. Luke
       
        Posted by Luke Foxton
       |  
  | Attachments: |  | 
    
    
      |  | 
    
    
      |  |