Index: openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 3 Dec 2001 11:41:33 -0000 1.4 +++ openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 4 Dec 2001 20:53:53 -0000 1.5 @@ -17,32 +17,34 @@ } -# We go through all Applets and make sure they are added. -# The applet_add proc in the dotlrn_applet contract is for one-time -# init of each applet NOTE: this applet_add proc _must_ be able to be -# called repeatedly since this script is eval'd at every server startup -# - aks - -foreach applet [dotlrn_community::list_applets] { - # Callback on all applets - dotlrn_community::applet_call $applet "AppletAdd" [list] -} - # We check to see if dotLRN has been installed, and if so, if permissions # have been granted -set main_package_id [dotlrn::get_package_id] # if installed -if {![empty_string_p $main_package_id]} { +if {[dotlrn::is_instantiated]} { # Grantee set grantee_id [dotlrn::get_full_users_rel_segment_id] + set package_id [dotlrn::get_package_id] + # Grant the permission - if {![ad_permission_p -user_id $grantee_id $main_package_id dotlrn_browse]} { - ad_permission_grant $grantee_id $main_package_id dotlrn_browse + if {![ad_permission_p -user_id $grantee_id $package_id dotlrn_browse]} { + ad_permission_grant $grantee_id $package_id dotlrn_browse } + + # We go through all Applets and make sure they are added. + + # The applet_add proc in the dotlrn_applet contract is for one-time + # init of each applet NOTE: this applet_add proc _must_ be able to be + # called repeatedly since this script is eval'd at every server startup + # - aks + + foreach applet [dotlrn_community::list_applets] { + # Callback on all applets + dotlrn_community::applet_call $applet "AddApplet" [list] + } } # Make sure that privacy is turned on