Index: openacs-4/packages/ae-portlet/lib/ae-portlet-chunk-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ae-portlet/lib/ae-portlet-chunk-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ae-portlet/lib/ae-portlet-chunk-oracle.xql 4 Feb 2006 14:42:12 -0000 1.1 @@ -0,0 +1,26 @@ + + + +oracle8.1.6 + + + + select cri.item_id as assessment_id, + crr.title, + crr.description, + acs_object.name(apm_package.parent_id(crf.package_id)) as parent_name, + (select site_node.url(site_nodes.node_id) + from site_nodes + where site_nodes.object_id = crf.package_id) as url, + crf.package_id + from as_assessments asa, cr_items cri, cr_revisions crr, cr_folders crf + where crr.revision_id = asa.assessment_id + and crr.revision_id = cri.latest_revision + and cri.parent_id = crf.folder_id + and crf.package_id in ([join $list_of_package_ids ", "]) + and (asa.start_time < current_timestamp or asa.start_time is null) + order by package_id, lower(crr.title) + + + + Index: openacs-4/packages/ae-portlet/lib/ae-portlet-chunk-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ae-portlet/lib/ae-portlet-chunk-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ae-portlet/lib/ae-portlet-chunk-postgresql.xql 4 Feb 2006 14:35:48 -0000 1.1 @@ -0,0 +1,32 @@ + + + +postgresql7.1 + + + + select cr.item_id as assessment_id, cr.title, cr.description, a.password, + to_char(a.start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time, + to_char(a.end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time, + to_char(now(), 'YYYY-MM-DD HH24:MI:SS') as cur_time, + cf.package_id, p.instance_name as community_name, + sc.node_id as comm_node_id, sa.node_id as as_node_id, a.anonymous_p, + a.assessment_id as assessment_rev_id + from as_assessments a, cr_revisions cr, cr_items ci, cr_folders cf, + site_nodes sa, site_nodes sc, apm_packages p + where a.assessment_id = cr.revision_id + and cr.revision_id = ci.live_revision + and ci.parent_id = cf.folder_id + and cf.package_id in ([join $list_of_package_ids ", "]) + and sa.object_id = cf.package_id + and sc.node_id = sa.parent_id + and p.package_id = sc.object_id + and exists (select 1 + from as_assessment_section_map asm, as_item_section_map ism + where asm.assessment_id = a.assessment_id + and ism.section_id = asm.section_id) + order by lower(p.instance_name), lower(cr.title) + + + + Index: openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.adp 4 Feb 2006 14:35:48 -0000 1.1 @@ -0,0 +1,8 @@ + + +

+
+ #ae-portlet.lt_NOTE_This_is_an_admin# +

+ + \ No newline at end of file Index: openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.tcl 4 Feb 2006 14:35:48 -0000 1.1 @@ -0,0 +1,127 @@ +# packages/ae-portlet/lib/ae-portlet-chunk.tcl +# +# Anonymous evaluations +# +# @author Roel Canicula (roel@solutiongrove.com) +# @creation-date 2006-02-04 +# @arch-tag: f64c2881-4fe2-4fb6-998e-18f660ab5f8c +# @cvs-id $Id: ae-portlet-chunk.tcl,v 1.1 2006/02/04 14:35:48 roelc Exp $ + +foreach required_param {list_of_package_ids} { + if {![info exists $required_param]} { + return -code error "$required_param is a required parameter." + } +} +foreach optional_param {} { + if {![info exists $optional_param]} { + set $optional_param {} + } +} + +set user_id [ad_conn user_id] +set dotlrn_admin_p [dotlrn::admin_p -user_id $user_id] + +set community_id [dotlrn_community::get_community_id] + +set groupby community_name + +if { $community_id eq "" } { + set groupby_list { + label "[_ ae-portlet.Class]" + type multivar + values { { "[_ ae-portlet.Class]" { {groupby community_name} } } } + } +} else { + set groupby_list [list] +} + +template::list::create \ + -name assessments \ + -multirow assessments \ + -page_flush_p 1 \ + -html { width 100% } \ + -pass_properties { package_admin_p } \ + -no_data "#ae-portlet.lt_No_evaluations_presen#" \ + -elements { + title { + label "" + link_url_col assessment_url + } + actions { + label "" + display_template { + + + #ae-portlet.Finish_Evaluation# + + + #ae-portlet.Edit_Your_Response# | #ae-portlet.View_Your_Response# + + + + #ae-portlet.Take_Evaluation# + +
#ae-portlet.Anonymous# #assessment.yes#/#assessment.no##assessment.yes#/#assessment.no# + #assessment.no##assessment.yes# + + | #ae-portlet.Unpublish# | #ae-portlet.Edit_Evaluation# | #ae-portlet.Results# + + } + } + } \ + -groupby $groupby_list + +set status_clause "and not ci.live_revision is null" +db_multirow -extend { edit_response_url view_url edit_url assessment_url status_url anonymous_url edit_url results_url } assessments answered_assessments {} { + + set base_url [site_node::get_url_from_object_id -object_id $package_id] + set package_admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege "admin"] + + set assessment_url [export_vars -base ${base_url}assessment { assessment_id }] + set edit_response_url [export_vars -base ${base_url}assessment { assessment_id session_id }] + set view_url [export_vars -base ${base_url}session { assessment_id session_id }] + set status_url [export_vars -base ${base_url}asm-admin/toggle-status { assessment_id {return_url [ad_return_url]} }] + set anonymous_url [export_vars -base ${base_url}asm-admin/toggle-anonymous { {assessment_id $assessment_rev_id} {return_url [ad_return_url]} }] + + set edit_url [export_vars -base ${base_url}asm-admin/assessment-form { assessment_id }] + set results_url [export_vars -base ${base_url}sessions { assessment_id }] +} + +if { $community_id ne "" } { + set package_id [dotlrn_community::get_package_id $community_id] + set package_admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege "admin"] + if { $package_admin_p } { + set base_url [site_node::get_url_from_object_id -object_id $package_id] + + template::list::create \ + -name unpublished_assessments \ + -multirow unpublished_assessments \ + -page_flush_p 1 \ + -html { width 100% } \ + -pass_properties { package_admin_p } \ + -actions [list "#assessment.New_Assessment#" ${base_url}asm-admin/assessment-form "#assessment.New_Assessment#"] \ + -no_data "[_ ae-portlet.lt_No_unpublished_evalua]" \ + -elements { + title { + label "" + link_url_col assessment_url + } + actions { + label "" + display_template { + #ae-portlet.Anonymous# #assessment.yes#/#assessment.no##assessment.yes#/#assessment.no# | #ae-portlet.Publish# | #ae-portlet.Edit_Evaluation# | #ae-portlet.Results# + } + } + } + + set status_clause "and ci.live_revision is null" + db_multirow -extend { edit_url assessment_url status_url anonymous_url edit_url results_url } unpublished_assessments answered_assessments {} { + set assessment_url [export_vars -base ${base_url}assessment { assessment_id }] + set status_url [export_vars -base ${base_url}asm-admin/toggle-status { assessment_id {return_url [ad_return_url]} }] + set anonymous_url [export_vars -base ${base_url}asm-admin/toggle-anonymous { {assessment_id $assessment_rev_id} {return_url [ad_return_url]} }] + + set edit_url [export_vars -base ${base_url}asm-admin/assessment-form { assessment_id }] + set results_url [export_vars -base ${base_url}sessions { assessment_id }] + } + } +} \ No newline at end of file Index: openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ae-portlet/lib/ae-portlet-chunk.xql 4 Feb 2006 14:35:48 -0000 1.1 @@ -0,0 +1,27 @@ + + + + + + select cr.item_id as assessment_id, cr.title, cr.description, + cf.package_id, p.instance_name as community_name, + sc.node_id as comm_node_id, sa.node_id as as_node_id, + s.session_id, s.completed_datetime, a.anonymous_p, + a.assessment_id as assessment_rev_id + from as_assessments a left join as_sessions s on (a.assessment_id = s.assessment_id + and s.subject_id = :user_id), + cr_revisions cr, cr_items ci, cr_folders cf, + site_nodes sa, site_nodes sc, apm_packages p + where a.assessment_id = cr.revision_id + and cr.revision_id = ci.latest_revision + and ci.parent_id = cf.folder_id + and cf.package_id in ([join $list_of_package_ids ", "]) + and sa.object_id = cf.package_id + and sc.node_id = sa.parent_id + and p.package_id = sc.object_id + $status_clause + order by lower(p.instance_name), lower(cr.title) + + + + Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/ae-portlet/www/ae-portlet-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/ae-portlet/www/ae-portlet-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/ae-portlet/www/ae-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ae-portlet/www/ae-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/ae-portlet/www/ae-portlet.adp 4 Feb 2006 13:49:38 -0000 1.2 +++ openacs-4/packages/ae-portlet/www/ae-portlet.adp 4 Feb 2006 14:35:48 -0000 1.3 @@ -1,12 +1,5 @@ - - -

-
- #ae-portlet.lt_NOTE_This_is_an_admin# -

- - +   Index: openacs-4/packages/ae-portlet/www/ae-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ae-portlet/www/ae-portlet.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ae-portlet/www/ae-portlet.tcl 4 Feb 2006 14:01:39 -0000 1.4 +++ openacs-4/packages/ae-portlet/www/ae-portlet.tcl 4 Feb 2006 14:35:48 -0000 1.5 @@ -8,116 +8,8 @@ } -properties { } -set user_id [ad_conn user_id] array set config $cf set shaded_p $config(shaded_p) -set list_of_package_ids $config(package_id) -set user_id [ad_conn user_id] -set dotlrn_admin_p [dotlrn::admin_p -user_id $user_id] - -set community_id [dotlrn_community::get_community_id] - -set groupby community_name - -if { $community_id eq "" } { - set groupby_list { - label "[_ ae-portlet.Class]" - type multivar - values { { "[_ ae-portlet.Class]" { {groupby community_name} } } } - } -} else { - set groupby_list [list] -} - -template::list::create \ - -name assessments \ - -multirow assessments \ - -page_flush_p 1 \ - -html { width 100% } \ - -pass_properties { package_admin_p } \ - -no_data "#ae-portlet.lt_No_evaluations_presen#" \ - -elements { - title { - label "" - link_url_col assessment_url - } - actions { - label "" - display_template { - - - #ae-portlet.Finish_Evaluation# - - - #ae-portlet.Edit_Your_Response# | #ae-portlet.View_Your_Response# - - - - #ae-portlet.Take_Evaluation# - -
#ae-portlet.Anonymous# #assessment.yes#/#assessment.no##assessment.yes#/#assessment.no# - #assessment.no##assessment.yes# - - | #ae-portlet.Unpublish# | #ae-portlet.Edit_Evaluation# | #ae-portlet.Results# - - } - } - } \ - -groupby $groupby_list - -set status_clause "and not ci.live_revision is null" -db_multirow -extend { edit_response_url view_url edit_url assessment_url status_url anonymous_url edit_url results_url } assessments answered_assessments {} { - - set base_url [site_node::get_url_from_object_id -object_id $package_id] - set package_admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege "admin"] - - set assessment_url [export_vars -base ${base_url}assessment { assessment_id }] - set edit_response_url [export_vars -base ${base_url}assessment { assessment_id session_id }] - set view_url [export_vars -base ${base_url}session { assessment_id session_id }] - set status_url [export_vars -base ${base_url}asm-admin/toggle-status { assessment_id {return_url [ad_return_url]} }] - set anonymous_url [export_vars -base ${base_url}asm-admin/toggle-anonymous { {assessment_id $assessment_rev_id} {return_url [ad_return_url]} }] - - set edit_url [export_vars -base ${base_url}asm-admin/assessment-form { assessment_id }] - set results_url [export_vars -base ${base_url}sessions { assessment_id }] -} - -if { $community_id ne "" } { - set package_id [dotlrn_community::get_package_id $community_id] - set package_admin_p [permission::permission_p -party_id $user_id -object_id $package_id -privilege "admin"] - if { $package_admin_p } { - set base_url [site_node::get_url_from_object_id -object_id $package_id] - - template::list::create \ - -name unpublished_assessments \ - -multirow unpublished_assessments \ - -page_flush_p 1 \ - -html { width 100% } \ - -pass_properties { package_admin_p } \ - -actions [list "#assessment.New_Assessment#" ${base_url}asm-admin/assessment-form "#assessment.New_Assessment#"] \ - -no_data "[_ ae-portlet.lt_No_unpublished_evalua]" \ - -elements { - title { - label "" - link_url_col assessment_url - } - actions { - label "" - display_template { - #ae-portlet.Anonymous# #assessment.yes#/#assessment.no##assessment.yes#/#assessment.no# | #ae-portlet.Publish# | #ae-portlet.Edit_Evaluation# | #ae-portlet.Results# - } - } - } - - set status_clause "and ci.live_revision is null" - db_multirow -extend { edit_url assessment_url status_url anonymous_url edit_url results_url } unpublished_assessments answered_assessments {} { - set assessment_url [export_vars -base ${base_url}assessment { assessment_id }] - set status_url [export_vars -base ${base_url}asm-admin/toggle-status { assessment_id {return_url [ad_return_url]} }] - set anonymous_url [export_vars -base ${base_url}asm-admin/toggle-anonymous { {assessment_id $assessment_rev_id} {return_url [ad_return_url]} }] - - set edit_url [export_vars -base ${base_url}asm-admin/assessment-form { assessment_id }] - set results_url [export_vars -base ${base_url}sessions { assessment_id }] - } - } -} \ No newline at end of file +set list_of_package_ids $config(package_id) \ No newline at end of file Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/ae-portlet/www/ae-portlet.xql'. Fisheye: No comparison available. Pass `N' to diff?