Index: openacs-4/packages/assessment/assessment.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/assessment.info,v diff -u -N -r1.36.2.2 -r1.36.2.3 --- openacs-4/packages/assessment/assessment.info 10 Jun 2005 18:53:30 -0000 1.36.2.2 +++ openacs-4/packages/assessment/assessment.info 4 Jul 2005 15:26:16 -0000 1.36.2.3 @@ -7,22 +7,23 @@ f f - + Eduardo Perez Ureta - Assessment package that will replace the survey, - quizz, complex survey, poll and other data collection packages + Assessment package that will replace the survey, + quizz, complex survey, poll and other data collection packages that OpenACS currently supports. - 2005-03-03 + 2005-07-04 E-LANE Create assessments and evaluate. 0 - + + Index: openacs-4/packages/assessment/sql/postgresql/assessment-item-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/postgresql/assessment-item-create.sql,v diff -u -N -r1.16.2.1 -r1.16.2.2 --- openacs-4/packages/assessment/sql/postgresql/assessment-item-create.sql 4 Jul 2005 15:02:23 -0000 1.16.2.1 +++ openacs-4/packages/assessment/sql/postgresql/assessment-item-create.sql 4 Jul 2005 15:26:16 -0000 1.16.2.2 @@ -125,17 +125,3 @@ sort_order integer ); --- File Upload Answers -create table as_item_fu_answers ( - choice_id integer - constraint as_item_fu_answers_id_pk - primary key - constraint as_item_fu_answers_id_fk - references cr_revisions(revision_id), - answer_id integer - constraint as_item_fu_answers_parent_id_fk - references as_item_type_fu(as_item_type_id), - file_id integer - constraint as_item_fu_file_id_fk - references cr_revisions(revision_id) -); Index: openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.11-0.12.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.11-0.12.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/sql/postgresql/upgrade/upgrade-0.11-0.12.sql 4 Jul 2005 15:28:31 -0000 1.1.2.1 @@ -0,0 +1,26 @@ +alter table as_item_data add column file_id integer constraint as_item_data_file_id_fk references cr_revisions(revision_id); +insert into as_item_types_map (item_type, display_type) values ('fu', 'f'); + +-- File Upload Item +create table as_item_type_fu ( + as_item_type_id integer + constraint as_item_type_fu_as_item_type_id_pk + primary key + constraint as_item_type_fu_as_item_type_id_fk + references cr_revisions(revision_id) +); + +-- File Upload Display Type +create table as_item_display_f ( + as_item_display_id integer + constraint as_item_display_f_as_item_display_id_pk + primary key + constraint as_item_display_f_as_item_display_id_fk + references cr_revisions(revision_id), + -- field to specify other stuff like textarea dimensions + html_display_options varchar(50), + -- an abstraction of the real size value in "small","medium","large" + abs_size varchar(10), + -- the orientation between the "question part" of the Item (the title/subtext) and the "answer part" (beside-left, beside-right, bellow, above) + item_answer_alignment varchar(20) +); Index: openacs-4/packages/assessment/tcl/as-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/as-install-procs.tcl,v diff -u -N -r1.30.2.5 -r1.30.2.6 --- openacs-4/packages/assessment/tcl/as-install-procs.tcl 4 Jul 2005 15:02:23 -0000 1.30.2.5 +++ openacs-4/packages/assessment/tcl/as-install-procs.tcl 4 Jul 2005 15:26:16 -0000 1.30.2.6 @@ -247,7 +247,7 @@ content::folder::register_content_type -folder_id $folder_id -content_type {as_item_display_ta} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_items} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_section_display_types} -include_subtypes t - content::folder::register_content_type -folder_id $folder_id -content_type {as_item_fu_answers} -include_subtypes t + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_type_fu} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_item_type_display_f} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_sections} -include_subtypes t @@ -374,6 +374,23 @@ content::type::attribute::new -content_type {as_items} -attribute_name {field_name} -datatype {string} -pretty_name {Item Field Name} -column_spec {varchar(500)} } + 0.11 0.12 { + #File Upload new type + content::type::new -content_type {as_item_type_fu} -supertype {content_revision} -pretty_name {Assessment Item Type File Upload} -pretty_plural {Assessment Item Type File Upload} -table_name {as_item_type_fu} -id_column {as_item_type_id} + content::type::new -content_type {as_item_display_f} -supertype {content_revision} -pretty_name {Assessment Item Display File} -pretty_plural {Assessment Item Display File} -table_name {as_item_display_f} -id_column {as_item_display_id} + + # File Upload display type + content::type::attribute::new -content_type {as_item_display_f} -attribute_name {html_display_options} -datatype {string} -pretty_name {HTML display Options} -column_spec {varchar(50)} + content::type::attribute::new -content_type {as_item_display_f} -attribute_name {abs_size} -datatype {string} -pretty_name {Abstraction Real Size} -column_spec {varchar(20)} + content::type::attribute::new -content_type {as_item_display_f} -attribute_name {box_orientation} -datatype {string} -pretty_name {Box Orientation} -column_spec {varchar(20)} + + # File Upload registration + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_type_fu} -include_subtypes t + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_type_display_f} -include_subtypes t + + + } + } }