Index: openacs-4/packages/courses/www/cc-admin/watch-association.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/courses/www/cc-admin/watch-association.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/courses/www/cc-admin/watch-association.tcl 8 Feb 2005 23:07:53 -0000 1.4 +++ openacs-4/packages/courses/www/cc-admin/watch-association.tcl 9 Feb 2005 22:54:02 -0000 1.5 @@ -8,15 +8,23 @@ { return_url "" } course_id:notnull course_key:notnull + { course_name "" } } -set page_title "[_ courses.watch_assoc]" -set context [list [list course-list "[_ courses.course_list]"] "[_ courses.watch_assoc]"] +if { [string equal $return_url "index"] } { + set context [list [list ../course-info?course_id=$course_id&course_key=$course_key&course_name=$course_name "[_ courses.one_course_info]"] "[_ courses.watch_assoc]"] +} else { + set context [list [list course-list "[_ courses.course_list]"] "[_ courses.watch_assoc]"] +} +set page_title "[_ courses.watch_assoc]" set user_id [ad_conn user_id] -# Check if users has admin permission to edit course_catalog -permission::require_permission -party_id $user_id -object_id $course_id -privilege "admin" +# Allows that an unregiser user watch this page +if { ![string equal $user_id "0"] } { + # Check if users has admin permission to edit course_catalog + permission::require_permission -party_id $user_id -object_id $course_id -privilege "admin" +} db_multirow relations relation { }