openacs-4/.../tcl/dotlrn-bm-procs.tcl (+8 -8)
95 95
96 96         bm_portlet::add_self_to_page -portal_id $portal_id -package_id $package_id
97 97
98 98         return $package_id
99 99     }
100 100
101 101     ad_proc -public remove_applet_from_community {
102 102         community_id
103 103     } {
104 104         remove the bulk-mail applet from a dotlrn community
105 105     } {
106 106         set portal_id [dotlrn_community::get_admin_portal_id -community_id $community_id]
107 107         set package_id [dotlrn_community::get_applet_package_id \
108 108             -community_id $community_id \
109 109             -applet_key [applet_key] \
110 110         ]
111 111
112 112         bm_portlet::remove_self_from_page -portal_id $portal_id -package_id $package_id
113 113     }
114 114
115       ad_proc -public add_user {
  115     ad_proc -private add_user {
116 116         user_id
117 117     } {
118 118         one time user-specific init
119 119     } {
120 120         # noop
121 121     }
122 122
123       ad_proc -public remove_user {
  123     ad_proc -private remove_user {
124 124         user_id
125 125     } {
126 126         one time user-specific removal
127 127     } {
128 128         # noop
129 129     }
130 130
131       ad_proc -public add_user_to_community {
  131     ad_proc -private add_user_to_community {
132 132         community_id
133 133         user_id
134 134     } {
135 135         add a user to a community
136 136     } {
137 137         # noop
138 138     }
139 139
140       ad_proc -public remove_user_from_community {
  140     ad_proc -private remove_user_from_community {
141 141         community_id
142 142         user_id
143 143     } {
144 144         remove a user from a community
145 145     } {
146 146         # noop
147 147     }
148 148
149       ad_proc -public add_portlet {
  149     ad_proc -private add_portlet {
150 150         portal_id
151 151         args
152 152     } {
153 153         a helper proc to add the underlying portlet to the given portal.
154 154     } {
155 155         # since this is admin portal-only, noop here
156 156     }
157 157
158       ad_proc -public remove_portlet {
  158     ad_proc -private remove_portlet {
159 159         portal_id
160 160         args
161 161     } {
162 162         a helper proc to remove the underlying portlet from the given portal.
163 163     } {
164 164         # since this is admin portal-only, noop here
165 165     }
166 166
167 167     ad_proc -public clone {
168 168         old_community_id
169 169         new_community_id
170 170     } {
171 171         clone this applet's content from the old community to the new one
172 172     } {
173 173         add_applet_to_community $new_community_id
174 174     }
175 175
176       ad_proc -public change_event_handler {
  176     ad_proc -private change_event_handler {
177 177         community_id
178 178         event
179 179         old_value
180 180         new_value
181 181     } {
182 182         listens for the following events:
183 183     } {
184 184     }
185 185
186 186     ad_proc -public get_package_id {
187 187     } {
188 188         returns the package_id of the dotlrn-bm package
189 189     } {
190 190         return [db_string select_package_id {
191 191             select min(package_id)
192 192             from apm_packages
193 193             where package_key = 'dotlrn-bm'
194 194         }]
195 195     }
196 196