Index: openacs-4/packages/assessment/www/sessions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/assessment/www/sessions.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/assessment/www/sessions.tcl 6 Oct 2004 12:55:26 -0000 1.7 +++ openacs-4/packages/assessment/www/sessions.tcl 17 Nov 2004 17:16:08 -0000 1.8 @@ -1,4 +1,9 @@ ad_page_contract { + + Lists the identifier of sessions, the name of subjects that took + this assessment, the name of assessment and the finish time + of assessment for an assessment. + @author Eduardo P�rez Ureta (eperez@it.uc3m.es) @creation-date 2004-09-03 } { @@ -12,8 +17,11 @@ set package_id [ad_conn package_id] +#get the user that take an assessment set subject_id [ad_conn user_id] +#Lists the identifier of sessions, the name of subjects that took this assessment, the name of assessment and the finished time +#of assessment for an assessment. template::list::create \ -name sessions \ -multirow sessions \ @@ -44,12 +52,14 @@ set admin_p [ad_permission_p $package_id admin] set assessment_id_multi $assessment_id +#if the user is admin he will display all sessions from all subjects if { $admin_p } { db_multirow -extend { item_url assessment_id } sessions sessions_of_assessment { } { set item_url [export_vars -base "session" {session_id}] set assessment_id $assessment_id_multi } +#if the user is not admin he will display only his sessions } else { db_multirow -extend { item_url assessment_id } sessions sessions_of_assessment_of_subject { } {