Index: openacs-4/packages/assessment/www/asm-admin/toggle-publish.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/asm-admin/toggle-publish.xql,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/assessment/www/asm-admin/toggle-publish.xql 23 Mar 2007 16:35:56 -0000 1.1.2.1 +++ openacs-4/packages/assessment/www/asm-admin/toggle-publish.xql 8 Apr 2007 17:16:03 -0000 1.1.2.2 @@ -12,7 +12,9 @@ -- group sections with item_counts, then select those sections with 0 items select title from (select asm.section_id, count(ism.as_item_id) as count, cr.title - from cr_items i, cr_revisions cr, as_assessment_section_map asm left join as_item_section_map ism using (section_id) + from cr_items i, cr_revisions cr, + as_assessment_section_map asm left join as_item_section_map ism + on asm.section_id = ism.section_id where i.item_id=:assessment_id and asm.assessment_id=i.latest_revision and cr.revision_id = asm.section_id @@ -26,4 +28,4 @@ update cr_items set publish_status = (case when publish_status is null or publish_status <> 'live' then 'live' else null end) where item_id=:assessment_id - \ No newline at end of file +