Forum LAMS for Tech-Heads - General Forum: Re: Re: Re: Re: Moodle tool adapter, error editing activity


 
Search: 

29: Re: Re: Re: Re: Moodle tool adapter, error editing activity
In response to 28 07/08/09 07:18 AM
[ Reply | Forward ]
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
[ Reply | Forward ]
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_md
lassignment 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.lamsfo
undation.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

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