Index: openacs-4/packages/assessment/www/assessment-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/assessment-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/www/assessment-postgresql.xql 15 Sep 2004 19:47:48 -0000 1.1 @@ -0,0 +1,16 @@ + + + postgresql7.4 + + + + SELECT as_itemsx.as_item_id, as_itemsx.name, as_itemsx.title, 'radiobutton' as presentation_type + FROM as_itemsx + WHERE as_item_id = as_item_section_map.as_item_id + AND as_sectionsx.section_id = as_assessment_section_map.section_id + AND as_assessment_section_map.assessment_id = as_assessments.assessment_id + AND as_assessmentsx.assessment_id = :assessment_id + + + + Index: openacs-4/packages/assessment/www/assessment.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/assessment.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/www/assessment.adp 15 Sep 2004 19:47:48 -0000 1.1 @@ -0,0 +1,38 @@ + +Assessment +@context;noquote@ + + + + +
   + Items + + + + + + +
@items.rownum@.- +
@items.title@ + +
+
+ + @formgroup.widget;noquote@ + @formgroup.label;noquote@ +
+
+
+ + + +
+
+ +
+ +
+Show assessments +Upload files +
Index: openacs-4/packages/assessment/www/assessment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/assessment.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/www/assessment.tcl 15 Sep 2004 19:47:48 -0000 1.1 @@ -0,0 +1,26 @@ +ad_page_contract { + @author eperez@it.uc3m.es + @creation-date 2004-09-13 +} -query { + assessment_id:notnull +} -properties { + context:onevalue +} + +set context [list "Show Items"] + +as_session_new -assessment_id $assessment_id -subject_id [ad_conn user_id] + +ad_form -name show_item_form -action process-response -html {enctype multipart/form-data} -form { + { assessment_id:text {value $assessment_id} } +} + +#For each item: +db_multirow items query_all_items {} { + #If there is an item + if {![empty_string_p $as_item_id]} { + add_item_to_form show_item_form $as_item_id + } +} + +ad_return_template Index: openacs-4/packages/assessment/www/process-response.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/process-response.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/www/process-response.adp 15 Sep 2004 19:47:48 -0000 1.1 @@ -0,0 +1,7 @@ + +Response Submitted +@context_bar;noquote@ +
+

Response submitted Correcly!

+
+ Index: openacs-4/packages/assessment/www/process-response.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/Attic/process-response.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/www/process-response.tcl 15 Sep 2004 19:47:48 -0000 1.1 @@ -0,0 +1,18 @@ +ad_page_contract { + + Insert user response into database. + This page receives an input for each item named + response_to_item.$item_id + + @author eperez@it.uc3m.es + @date 2004-09-12 +} { + assessment_id:integer + response_to_item:array,optional,multiple,html +} + +set context_bar [list] + +foreach response_to_item_id [array names response_to_item] { + as_item_data_new -session_id [as_session__get_session_id_from_user_assessment -subject_id [ad_conn user_id] -assessment_id $assessment_id] -item_id $response_to_item_id -choice_id_answer $response_to_item($response_to_item_id) +}