Index: openacs-4/packages/assessment/lib/user-assessment.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/user-assessment.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/lib/user-assessment.adp 25 Nov 2004 11:17:49 -0000 1.1 @@ -0,0 +1,3 @@ + + + Index: openacs-4/packages/assessment/lib/user-assessment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/user-assessment.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/lib/user-assessment.tcl 25 Nov 2004 11:17:49 -0000 1.1 @@ -0,0 +1,48 @@ +#packages/assessment/lib/user-assessment.tcl +ad_page_contract { + + testing background + + @author Natalia P�rez (nperper@it.uc3m.es) + @creation-date 2004-11-24 +} { + +} -properties { +} -validate { +} -errors { +} + +#get community_id +set community_id [db_string get_assessment_package_id {select dotlrn_community_applets.community_id from dotlrn_community_applets where package_id=:package_id}] +set community_name [dotlrn_community::get_community_name $community_id] + +#set package_id $list_of_packages_ids +template::list::create \ + -name assessments \ + -multirow assessments \ + -pass_properties { package_id community_id } \ + -key assessment_id \ + -elements { + title { + label {[_ assessment.Assessment] ($community_name)} + link_url_eval {[site_node::get_url_from_object_id -object_id $package_id]assessment?[export_vars {assessment_id}]} + link_html { title {description} } + + } + session { + label {[_ assessment.Sessions]} + link_url_eval {[site_node::get_url_from_object_id -object_id $package_id]sessions?[export_vars {assessment_id}]} + } + } \ + -main_class { + narrow + } + + +foreach package $package_id { + db_multirow -extend { session } -append assessments asssessment_id_name_definition { } { + set session {Sessions} + } +} + +ad_return_template Index: openacs-4/packages/assessment/lib/user-assessment.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/lib/user-assessment.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/assessment/lib/user-assessment.xql 25 Nov 2004 11:17:49 -0000 1.1 @@ -0,0 +1,17 @@ + + + + + + + select asa.assessment_id, cri.name, crr.title, crr.description + from as_assessments asa, cr_items cri, cr_revisions crr, cr_folders crf + where crr.revision_id = asa.assessment_id + and crr.item_id = cri.item_id + and cri.parent_id = crf.folder_id + and crf.package_id = :package + order by lower(cri.name) + + + + Index: openacs-4/packages/assessment-portlet/www/assessment-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/assessment-portlet/www/assessment-portlet.adp 1 Nov 2004 22:24:45 -0000 1.2 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet.adp 25 Nov 2004 11:19:08 -0000 1.3 @@ -1,5 +1,12 @@ - + + + + + + + +   Index: openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 4 Nov 2004 23:24:25 -0000 1.4 +++ openacs-4/packages/assessment-portlet/www/assessment-portlet.tcl 25 Nov 2004 11:19:08 -0000 1.5 @@ -33,31 +33,6 @@ } } -template::list::create \ - -name assessments \ - -multirow assessments \ - -pass_properties { as_package_id } \ - -key assessment_id \ - -elements { - title { - label {[_ assessment.Assessment]} - link_url_eval {[site_node::get_url_from_object_id -object_id $as_package_id]assessment?[export_vars {assessment_id}]} - link_html { title {description} } - - } - session { - label {[_ assessment.Sessions]} - link_url_eval {[site_node::get_url_from_object_id -object_id $as_package_id]sessions?[export_vars {assessment_id}]} - } - } \ - -main_class { - narrow - } - -db_multirow -extend { session } assessments asssessment_id_name_definition {} { - set session {Sessions} -} - ad_return_template