Index: openacs-4/packages/assessment/tcl/as-assessment-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-assessment-procs-postgresql.xql,v diff -u -r1.12 -r1.13 --- openacs-4/packages/assessment/tcl/as-assessment-procs-postgresql.xql 2 Sep 2008 17:21:29 -0000 1.12 +++ openacs-4/packages/assessment/tcl/as-assessment-procs-postgresql.xql 22 Nov 2017 09:19:29 -0000 1.13 @@ -1,54 +1,7 @@ postgresql7.1 - - - - - select o.package_id, a.assessment_id as assessment_rev_id, cr.item_id as assessment_id, cr.title, ci.name, ci.publish_status, - cr.description, coalesce(o.creation_user, o2.creation_user) as creation_user, o.creation_date, a.instructions, a.run_mode, - a.anonymous_p, a.secure_access_p, a.reuse_responses_p, a.ip_mask, a.password, - a.show_item_name_p, a.entry_page, a.exit_page, a.consent_page, a.return_url, - a.start_time, a.end_time, a.number_tries, a.wait_between_tries, a.random_p, - a.time_for_response, a.show_feedback, a.section_navigation, a.creator_id, a.survey_p, a.type, cr.title as html_title - from as_assessments a, cr_revisions cr, cr_items ci, acs_objects o, acs_objects o2 - where ci.item_id = :assessment_id - and cr.revision_id = ci.latest_revision - and a.assessment_id = cr.revision_id - and o.object_id = ci.item_id - and o2.object_id = cr.revision_id - - - - - - - - select count(*) - from as_assessment_section_map m, as_session_sections s - left outer join as_section_data d on (d.section_id = s.section_id - and d.session_id = s.session_id) - where s.session_id = :session_id - and m.section_id = s.section_id - and m.assessment_id = :assessment_id - and d.points is null -and (select sum(i.points) from as_items i, as_item_section_map m where m.as_item_id=i.as_item_id and m.section_id = s.section_id) > 0 - - - - - - - select a.number_tries, a.wait_between_tries, a.ip_mask, a.password as as_password, - to_char(a.start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time, - to_char(a.end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time, - to_char(now(), 'YYYY-MM-DD HH24:MI:SS') as cur_time - from as_assessments a - where a.assessment_id = :assessment_id - - - - + @@ -58,19 +11,7 @@ - - - - select coalesce(sum(m.points), 0) as section_max_points, coalesce(sum(d.points), 0) as section_points - from as_assessment_section_map m, as_section_data d - where m.assessment_id = :assessment_id - and m.section_id = d.section_id - and d.session_id = :session_id - - - - update as_assessments set @@ -94,5 +35,5 @@ where assessment_id=:new_rev_id - +