I've got bad news for you Ken.
You are trying to work with tables based on the submit tool and code based on the noticeboard tool. Unfortunately, the column names across our tools aren't consistent enough to do that. So you have to pick one and stay with it for the data side.
The file db/sql/create_lams_tool_behaviourComposer.sql contains the tables for your tool. It defines tl_kkbc10_content as:
create table tl_kkbc10_content (
content_id bigint not null,
title varchar(64) not null,
instruction text,
define_later bit not null,
run_offline bit not null,
offline_instruction text,
online_instruction text,
content_in_use bit,
lock_on_finished bit,
primary key (content_id)
);
Now looking at BehaviourComposerContent.hbm.xml (which is the file that maps the tl_kkbc10_content table to a BehaviourComposerContent object, it expects the table to be something like
create table tl_kkbc10_content (
uid bigint not null,
content text,
creator_user_id bigint,
date_created date,
date_updated date,
define_later bit
force_offline bit
content_in_use bit
behaviourComposer_content_id bigint not null,
offline_instructions text,
online_instructions text,
title text,
primary key (uid)
);
I say like as I've just quickly hacked that up manually - it may not be valid code. My sql syntax tends to not be brillant 9:49pm at night!
Trying to take your existing database and align it with the code manually would take some time. I think it would be better to either use the database tables created from the rename of the noticeboard tool, or you would have to go back to the submit codebase again.
Is it possible for you to use the tables that were generated from the copy of the noticeboard tool. Only the create_lams_tool_behaviourComposer.sql and drop_lams_tool_behaviourComposer.sql shuold need to be replaced - the rest of the sql scripts are updated to other tables rather than defining the tool's tables.
I've attached a version of the two files, taken from what the rename tool produced and updated so the default tool content has your title and text. I haven't tested the code since I updated the title and text but hopefully I haven't typed anything wrong.
I could run the rename tool over submit again and send you that with the jsp's fixed up for the submit text replacement problems in the jsp files. But that won't be till tomorrow - I can't see me getting it done tonight. And then you will have lost another day.
Fiona
Posted by Fiona Malikoff