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.23 -r1.24 --- openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 24 May 2002 01:58:45 -0000 1.23 +++ openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 30 May 2002 22:04:59 -0000 1.24 @@ -14,94 +14,82 @@ # details. # -# -# Procs for initializing DOTLRN basic system -# Copyright 2001 OpenForce, inc. -# Distributed under the GNU GPL v2 -# -# August 20th, 2001 -# - ad_library { - Procs for initializing basic dotLRN + initialize dotLRN @author ben@openforce.net @creation-date 2001-08-18 + @version $Id$ } -# We check to see if dotLRN has been installed, and if so, if permissions -# have been granted - ns_log notice "dotlrn-init: starting..." # if installed if {[dotlrn::is_instantiated]} { set portal_package_key [portal::package_key] set portal_mount_point [portal::automount_point] - - # we now mount new-portal at the automount point if it's not already mounted, of course + + # we now mount new-portal at the automount point if it's not already mounted, of course if {[site_nodes::mount_count -package_key $portal_package_key] == 0} { - + ns_log notice "dotlrn-init: $portal_package_key being automounted at /$portal_mount_point" - + dotlrn::mount_package \ -parent_node_id [site_node_id "/"] \ -package_key $portal_package_key \ -url $portal_mount_point \ -directory_p "t" } - db_transaction { - + ns_log notice "dotlrn-init: dotlrn is instantiated, about to call dotlrn_applet::init" # this may seems strange, but init the applets first # initialize the applets subsystem (ooh, I'm using big words - ben) if {![dotlrn_applet::is_initalized]} { dotlrn_applet::init } - + # 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 foreach applet [dotlrn_community::list_applets] { # Callback on all applets dotlrn_community::applet_call $applet "AddApplet" [list] } - + ns_log notice "dotlrn-init: dotlrn is instantiated, about to call dotlrn::init" - + if {![dotlrn::is_initialized]} { dotlrn::init } - + ns_log notice "dotlrn-init: about to call dotlrn_class:init" - + if {![dotlrn_class::is_initialized]} { dotlrn_class::init } - + ns_log notice "dotlrn-init: about to call dotlrn_club::init" - + if {![dotlrn_club::is_initialized]} { dotlrn_club::init } - + ns_log notice "dotlrn-init: done with dotlrn_club::init" - + # Grantee set grantee_id [dotlrn::get_users_rel_segment_id] set package_id [dotlrn::get_package_id] - + # Grant the permission permission::grant -party_id $grantee_id -object_id $package_id -privilege "dotlrn_browse" - + # check read permission on dotLRN for all users set grantee_id [dotlrn::get_users_rel_segment_id] permission::grant -party_id $grantee_id -object_id $package_id -privilege "read" } } - # Make sure that privacy is turned on acs_privacy::privacy_control_set 1