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 -r1.10 -r1.11 --- openacs-4/packages/assessment/sql/postgresql/assessment-item-create.sql 28 Sep 2004 14:42:42 -0000 1.10 +++ openacs-4/packages/assessment/sql/postgresql/assessment-item-create.sql 30 Sep 2004 13:44:59 -0000 1.11 @@ -64,6 +64,31 @@ check (percent_score <= 100) ); +create table as_item_sa_answers ( + choice_id integer + constraint as_item_sa_answers_id_pk + primary key + constraint as_item_sa_answers_id_fk + references cr_revisions(revision_id), + answer_id integer + constraint as_item_sa_answers_parent_id_fk + references as_item_type_sa(as_item_type_id), + data_type varchar(20), + case_sensitive_p char(1) default 't' + constraint as_item_sa_answers_case_sensitive_p_ck + check (case_sensitive_p in ('t','f')), + -- this is where points are stored + percent_score integer + constraint as_item_sa_answers_percent_score_ck + check (percent_score <= 100), + compare_by varchar(20), + regexp_text varchar(20), + -- list with all answerbox ids (1 2 3 ... n) whose response will be tried to match against this answer. An empty field indicates the + -- answer will be tried to match against all answers. + allowed_answerbox_list varchar(20) +); + + create table as_messages ( message_id integer constraint as_messages_message_id_pk Index: openacs-4/packages/assessment/sql/postgresql/assessment-item-type-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/sql/postgresql/assessment-item-type-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/assessment/sql/postgresql/assessment-item-type-create.sql 30 Sep 2004 09:33:43 -0000 1.5 +++ openacs-4/packages/assessment/sql/postgresql/assessment-item-type-create.sql 30 Sep 2004 13:44:59 -0000 1.6 @@ -81,3 +81,29 @@ abs_size varchar(10), box_orientation varchar(10) ); + +create table as_item_type_sa ( + as_item_type_id integer + constraint as_item_type_sa_as_item_type_id_pk + primary key + constraint as_item_type_sa_as_item_type_id_fk + references cr_revisions(revision_id), + increasing_p char(1) default 'f' + constraint as_item_type_sa_increasing_p_ck + check (increasing_p in ('t','f')), + allow_negative_p char(1) default 'f' + constraint as_item_type_sa_allow_negative_p_ck + check (allow_negative_p in ('t','f')) +); + +create table as_item_display_ta ( + as_item_display_id integer + constraint as_item_display_ta_as_item_display_id_pk + primary key + constraint as_item_display_ta_as_item_display_id_fk + references cr_revisions(revision_id), + html_display_options varchar(50), + abs_size varchar(20), + acs_widget varchar(20), + item_answer_alignment varchar(20) +); Index: openacs-4/packages/assessment/tcl/install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/tcl/Attic/install-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/assessment/tcl/install-procs.tcl 30 Sep 2004 09:36:49 -0000 1.8 +++ openacs-4/packages/assessment/tcl/install-procs.tcl 30 Sep 2004 13:45:00 -0000 1.9 @@ -17,7 +17,7 @@ } { content::type::create_type -content_type {as_item_choices} -supertype {content_revision} -pretty_name {Assessment Item Choice} -pretty_plural {Assessment Item Choices} -table_name {as_item_choices} -id_column {choice_id} -content::type::create_type -content_type {as_item_sa_answers} -supertype {content_revision} -pretty_name {Assessment Item Answer} -pretty_plural {Assessment Item Answer} -table_name {as_item_sa_answers} -id_column {answer_id} +content::type::create_type -content_type {as_item_sa_answers} -supertype {content_revision} -pretty_name {Assessment Item Answer} -pretty_plural {Assessment Item Answer} -table_name {as_item_sa_answers} -id_column {choice_id} content::type::create_type -content_type {as_item_type_mc} -supertype {content_revision} -pretty_name {Assessment Item Type Multiple Choice} -pretty_plural {Assessment Item Type Multiple Choice} -table_name {as_item_type_mc} -id_column {as_item_type_id} content::type::create_type -content_type {as_item_type_oq} -supertype {content_revision} -pretty_name {Assessment Item Type Open Question} -pretty_plural {Assessment Item Type Open Question} -table_name {as_item_type_oq} -id_column {as_item_type_id} content::type::create_type -content_type {as_item_type_sa} -supertype {content_revision} -pretty_name {Assessment Item Type Short Answer} -pretty_plural {Assessment Item Type Short Answer} -table_name {as_item_type_sa} -id_column {as_item_type_id} @@ -54,6 +54,11 @@ content::type::create_attribute -content_type {as_item_display_sa} -attribute_name {abs_size} -datatype {string} -pretty_name {Abstraction Real Size} -column_spec {varchar(20)} content::type::create_attribute -content_type {as_item_display_sa} -attribute_name {box_orientation} -datatype {string} -pretty_name {Box Orientation} -column_spec {varchar(20)} +content::type::create_attribute -content_type {as_item_display_ta} -attribute_name {html_display_options} -datatype {string} -pretty_name {HTML display Options} -column_spec {varchar(50)} +content::type::create_attribute -content_type {as_item_display_ta} -attribute_name {abs_size} -datatype {string} -pretty_name {Abstraction Real Size} -column_spec {varchar(20)} +content::type::create_attribute -content_type {as_item_display_ta} -attribute_name {acs_widget} -datatype {string} -pretty_name {ACS Templating Widget} -column_spec {varchar(20)} +content::type::create_attribute -content_type {as_item_display_ta} -attribute_name {item_answer_alignment} -datatype {string} -pretty_name {Item Answer Alignment} -column_spec {varchar(20)} + content::type::create_attribute -content_type {as_item_type_mc} -attribute_name {increasing_p} -datatype {boolean} -pretty_name {Increasing} -column_spec {char(1)} content::type::create_attribute -content_type {as_item_type_mc} -attribute_name {allow_negative_p} -datatype {boolean} -pretty_name {Allow Negative} -column_spec {char(1)} content::type::create_attribute -content_type {as_item_type_mc} -attribute_name {num_correct_answers} -datatype {number} -pretty_name {Number of Correct Answers} -column_spec {integer} @@ -71,6 +76,21 @@ content::type::create_attribute -content_type {as_item_choices} -attribute_name {percent_score} -datatype {number} -pretty_name {Percent Score} -column_spec {integer} content::type::create_attribute -content_type {as_item_choices} -attribute_name {sort_order} -datatype {number} -pretty_name {Sort Order} -column_spec {integer} +content::type::create_attribute -content_type {as_item_type_sa} -attribute_name {increasing_p} -datatype {boolean} -pretty_name {Increasing} -column_spec {char(1)} +content::type::create_attribute -content_type {as_item_type_sa} -attribute_name {allow_negative_p} -datatype {boolean} -pretty_name {Allow Negative} -column_spec {char(1)} + +content::type::create_attribute -content_type {as_item_sa_answers} -attribute_name {answer_id} -datatype {number} -pretty_name {Parent ID} -column_spec {integer} +content::type::create_attribute -content_type {as_item_sa_answers} -attribute_name {data_type} -datatype {string} -pretty_name {Data Type} -column_spec {varchar(20)} +content::type::create_attribute -content_type {as_item_sa_answers} -attribute_name {case_sensitive_p} -datatype {boolean} -pretty_name {Case Sensitive} -column_spec {char(1)} +content::type::create_attribute -content_type {as_item_sa_answers} -attribute_name {percent_score} -datatype {number} -pretty_name {Percent Score} -column_spec {integer} +content::type::create_attribute -content_type {as_item_sa_answers} -attribute_name {compare_by} -datatype {string} -pretty_name {Comparasion} -column_spec {varchar(20)} +content::type::create_attribute -content_type {as_item_sa_answers} -attribute_name {regexp_text} -datatype {string} -pretty_name {Regexp} -column_spec {varchar(20)} +content::type::create_attribute -content_type {as_item_sa_answers} -attribute_name {allowed_answerbox_list} -datatype {string} -pretty_name {Allowed Answerbox List} -column_spec {varchar(20)} + +content::type::create_attribute -content_type {as_item_type_oq} -attribute_name {default_value} -datatype {string} -pretty_name {Default Value} -column_spec {varchar(500)} +content::type::create_attribute -content_type {as_item_type_oq} -attribute_name {feedback_text} -datatype {string} -pretty_name {Feedback Text} -column_spec {varchar(500)} + + content::type::create_attribute -content_type {as_items} -attribute_name {subtext} -datatype {string} -pretty_name {Item Subtext} -column_spec {varchar(500)} content::type::create_attribute -content_type {as_items} -attribute_name {field_code} -datatype {string} -pretty_name {Item Field Code} -column_spec {varchar(500)} content::type::create_attribute -content_type {as_items} -attribute_name {definition} -datatype {string} -pretty_name {Item Definition} -column_spec {varchar(500)} @@ -152,8 +172,14 @@ set folder_id [content::folder::new -name {as_items} -package_id $package_id ] content::folder::register_content_type -folder_id $folder_id -content_type {as_item_choices} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_item_type_mc} -include_subtypes t + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_sa_answers} -include_subtypes t + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_type_sa} -include_subtypes t + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_type_oq} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_item_display_rb} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_item_display_cb} -include_subtypes t + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_display_tb} -include_subtypes t + content::folder::register_content_type -folder_id $folder_id -content_type {as_item_display_sa} -include_subtypes t + 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_sections} -include_subtypes t content::folder::register_content_type -folder_id $folder_id -content_type {as_assessments} -include_subtypes t