Index: openacs-4/packages/anon-eval/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/anon-eval/www/index.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/anon-eval/www/index.adp 4 Feb 2006 13:42:03 -0000 1.2
+++ openacs-4/packages/anon-eval/www/index.adp 4 Feb 2006 14:36:25 -0000 1.3
@@ -4,9 +4,4 @@
-
-
-
- #anon-eval.Answered_Evaluations#
-
-
+
\ No newline at end of file
Index: openacs-4/packages/anon-eval/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/anon-eval/www/index.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/anon-eval/www/index.tcl 4 Feb 2006 13:42:03 -0000 1.3
+++ openacs-4/packages/anon-eval/www/index.tcl 4 Feb 2006 14:36:25 -0000 1.4
@@ -15,70 +15,4 @@
set package_id [ad_conn package_id]
set folder_id [as::assessment::folder_id -package_id $package_id]
set user_id [ad_conn user_id]
-set admin_p [permission::permission_p -privilege admin -object_id [ad_conn package_id]]
-
-#if { $admin_p } {
-# ad_return_complaint 1 "[_ anon-eval.permission_denied]"
-# ad_script_abort
-#}
-
-# create a list with all open assessments
-template::list::create \
- -name assessments \
- -multirow assessments \
- -key assessment_id \
- -elements {
- title {
- label "[_ anon-eval.Open_Evaluations]"
- display_template {@assessments.title@}
- }
- } -main_class {
- narrow
- }
-
-# get the information of all open assessments
-template::multirow create assessments assessment_id title description assessment_url
-db_foreach open_asssessments {} {
- if {([empty_string_p $start_time] || $start_time <= $cur_time) && ([empty_string_p $end_time] || $end_time >= $cur_time)} {
- if {[empty_string_p $password]} {
- set assessment_url [export_vars -base "assessment" {assessment_id}]
- } else {
- set assessment_url [export_vars -base "assessment-password" {assessment_id}]
- }
- template::multirow append assessments $assessment_id $title $description $assessment_url
- }
-}
-
-# create a list with all answered assessments and their sessions
-template::list::create \
- -name sessions \
- -multirow sessions \
- -key assessment_id \
- -elements {
- title {
- label "[_ assessment.Assessments]"
- display_template {@sessions.title@}
- }
- edit {
- display_template {
}
- }
- view {
- display_template {}
- }
-
- } -main_class {
- narrow
- }
-
-# get the information of all assessments store in the database
-
-db_multirow -extend { session_id } sessions answered_asssessments {} {
- as::assessment::data -assessment_id $assessment_id
- set assessment_rev_id $assessment_data(assessment_rev_id)
- set session_id [db_string last_session {select max(session_id) as session_id from as_sessions where assessment_id = :assessment_rev_id and subject_id = :user_id}]
-
-}
-
-set admin_p [ad_permission_p $package_id create]
-
-ad_return_template
+set admin_p [permission::permission_p -privilege admin -object_id [ad_conn package_id]]
\ No newline at end of file