Index: openacs-4/packages/lab-report/sql/postgresql/lab-report-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/sql/postgresql/lab-report-create.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/lab-report/sql/postgresql/lab-report-create.sql 12 May 2006 01:34:34 -0000 1.2 +++ openacs-4/packages/lab-report/sql/postgresql/lab-report-create.sql 21 May 2006 05:29:44 -0000 1.3 @@ -105,6 +105,10 @@ constraint lr_section_content_section_id_fk references lrc_section (section_id) on delete cascade, + package_id integer + constraint lr_section_content_package_id_fk + references apm_packages (package_id) + on delete cascade, content text ); @@ -213,11 +217,13 @@ content_id, report_id, section_id, + package_id, content ) VALUES ( v_content_id, p_report_id, p_section_id, + p_package_id, p_content ); Index: openacs-4/packages/lab-report/www/edit-section-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/edit-section-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report/www/edit-section-postgresql.xql 12 May 2006 01:34:34 -0000 1.1 +++ openacs-4/packages/lab-report/www/edit-section-postgresql.xql 21 May 2006 05:29:44 -0000 1.2 @@ -3,7 +3,33 @@ postgresql7.4 + + + SELECT l.lab_id, l.name AS lab_name, l.instructor_id, + to_char(l.start_date, 'YYYY') AS year + FROM lrc_lab l, lrc_lab_student_map s + WHERE s.lab_id = l.lab_id + AND l.lab_id = :lab_id + AND s.user_id = :author_id + + + + + SELECT name AS template_name, description AS template_desc + FROM lrc_template + WHERE template_id = :template_id + + + + + + SELECT name AS section_name, description AS section_desc + FROM lrc_section + WHERE section_id = :section_id + + + UPDATE lr_section_content Index: openacs-4/packages/lab-report/www/edit-section.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/edit-section.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report/www/edit-section.tcl 12 May 2006 01:34:34 -0000 1.1 +++ openacs-4/packages/lab-report/www/edit-section.tcl 21 May 2006 05:29:44 -0000 1.2 @@ -61,6 +61,7 @@ } } -select_query { SELECT content FROM lr_section_content WHERE content_id = :content_id + AND package_id = :package_id } -edit_data { set modifying_user [ad_conn user_id] set modifying_ip [ad_conn peeraddr] Index: openacs-4/packages/lab-report/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/index.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report/www/index.tcl 11 May 2006 11:11:37 -0000 1.1 +++ openacs-4/packages/lab-report/www/index.tcl 21 May 2006 05:29:44 -0000 1.2 @@ -37,6 +37,6 @@ -privilege "lab_report_author"] set title [_ lab-report.labs] -set context [list $title] +set context "" ad_return_template Index: openacs-4/packages/lab-report/www/new-section-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/new-section-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report/www/new-section-postgresql.xql 12 May 2006 01:34:34 -0000 1.1 +++ openacs-4/packages/lab-report/www/new-section-postgresql.xql 21 May 2006 05:29:44 -0000 1.2 @@ -9,6 +9,7 @@ FROM lr_section_content WHERE report_id = :report_id AND section_id = :section_id + AND package_id = :package_id Index: openacs-4/packages/lab-report/www/new-section.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/new-section.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report/www/new-section.tcl 12 May 2006 01:34:34 -0000 1.1 +++ openacs-4/packages/lab-report/www/new-section.tcl 21 May 2006 05:29:44 -0000 1.2 @@ -27,6 +27,7 @@ set content_id [package_instantiate_object \ -var_list [list [list report_id $report_id] \ [list section_id $section_id] \ + [list package_id $package_id] \ [list author_id $author_id]] \ lr_section_content] } Index: openacs-4/packages/lab-report/www/view-report-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/view-report-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/lab-report/www/view-report-postgresql.xql 12 May 2006 01:34:34 -0000 1.2 +++ openacs-4/packages/lab-report/www/view-report-postgresql.xql 21 May 2006 05:29:44 -0000 1.3 @@ -27,7 +27,7 @@ SELECT s.section_id, s.name AS section_name, s.description AS section_desc, c.content FROM lrc_section s LEFT OUTER JOIN lr_section_content c - ON (s.section_id = c.section_id) + ON (s.section_id = c.section_id AND c.package_id = :package_id) WHERE s.template_id = :template_id ORDER BY s.section_id Index: openacs-4/packages/lab-report/www/view-report.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/view-report.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/lab-report/www/view-report.adp 12 May 2006 01:34:34 -0000 1.2 +++ openacs-4/packages/lab-report/www/view-report.adp 21 May 2006 05:29:44 -0000 1.3 @@ -27,7 +27,7 @@
  • -

    @sections.section_name@

    +

    @sections.section_name@

    @sections.content;noquote@
  • Index: openacs-4/packages/lab-report/www/view-section-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/view-section-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lab-report/www/view-section-postgresql.xql 12 May 2006 01:34:34 -0000 1.1 +++ openacs-4/packages/lab-report/www/view-section-postgresql.xql 21 May 2006 05:29:44 -0000 1.2 @@ -45,6 +45,7 @@ FROM lr_section_content WHERE report_id = :report_id AND section_id = :section_id + AND package_id = :package_id @@ -53,6 +54,7 @@ SELECT content_id, content from lr_section_content WHERE report_id = :report_id AND section_id = :section_id + AND package_id = :package_id Index: openacs-4/packages/lab-report/www/resources/lab-report.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lab-report/www/resources/lab-report.css,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/lab-report/www/resources/lab-report.css 12 May 2006 01:34:34 -0000 1.2 +++ openacs-4/packages/lab-report/www/resources/lab-report.css 21 May 2006 05:29:44 -0000 1.3 @@ -214,14 +214,15 @@ padding: 0; width: 100%; vertical-align: top; - line-height: 150%; + line-height: 130%; } div#report-container table tr td.content ul { margin: 0; padding: 0; list-style-type: none; font-family: verdana, arial, sans-serif; + font-size: small; } div#report-container table tr td.content ul li.description {