Index: openacs-4/packages/dotlrn/catalog/dotlrn.de_DE.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/catalog/dotlrn.de_DE.ISO-8859-1.xml,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/catalog/dotlrn.de_DE.ISO-8859-1.xml 7 Nov 2002 13:13:26 -0000 1.2 +++ openacs-4/packages/dotlrn/catalog/dotlrn.de_DE.ISO-8859-1.xml 4 Dec 2002 09:51:03 -0000 1.3 @@ -5,7 +5,6 @@ Administrieren Neues Sprach Meine Kennwort �ndern - Hilfe Aktionen Einstellungen und @@ -37,7 +36,6 @@ Ausloggen Meine Pers�nliche Information Bearbeiten Mitglieder - Meine Startseite Neuer keine Nicht Registriert Index: openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml 21 Nov 2002 15:18:50 -0000 1.6 +++ openacs-4/packages/dotlrn/catalog/dotlrn.en_US.ISO-8859-1.xml 4 Dec 2002 09:51:03 -0000 1.7 @@ -1,5 +1,5 @@ - + A copy of @@ -34,6 +34,8 @@ Applets To Add Approve Archived + Are you sure? + Ask a question: Be sure Become this user! Biography: @@ -54,10 +56,15 @@ Community member Community's Name Configure Element + Configure %name% Confirm + Confirm: + Confirm Drop + Confirmation Control Panel Copy Create A New User + Create a Web Log Current Customize Layout Deactivate ... @@ -67,10 +74,11 @@ Delete Empty Department Description + Description: Don't Add Download + Drop Drop Membership - Drop &nbsp; Membership Edit Edit Properties Edit Term @@ -80,32 +88,32 @@ Email Members End Date End date: + Error sending mail Example File External URL + External URL: Extra Large Fields First Line + First Name First Names From Full Full Access General Information - Groups + General Site Help Guest? Guest? + Header Alternate Text Header Font Header Font Color Header Font Colors Header Font Size Header Font Sizes Header Fonts - Header Icon - Header Icon Alt Text - Header Icon Alt text - Header Logo + Header Icon Alt text Header Logo Alt Text Header Logo Item ID - Help ID: ID Invalid @@ -120,6 +128,7 @@ Last Visit: Last visit over Last visit under + Latest post: Limited Limited Access Mail Failed @@ -137,10 +146,12 @@ Memberships: Message My Communities + N/A Name Name / Email Needs Approval New + New Password: New Term New User No @@ -150,28 +161,32 @@ No classes No, don't delete it No groups to add to - No members No user found None Normal Not Allowed Note: + Nuke Nuke ... Nuke Users Open Or Pending Pending Approval + Personal Options Personal home page: Portrait: + Post to: Pretty Name Pretty Plural Preview + Public Web Log Recipient's Email Recipient's Last Name Referer Registration date: Reject + Request Membership Results Return URL Role @@ -185,7 +200,9 @@ Size SloanSpace Small + Sorry! Spam ... + Spam Community Spam Users Start Date Start date: @@ -200,7 +217,9 @@ To Type Unknown Term + Update Password User + User Admin Page User ID: User ID User Management @@ -217,7 +236,6 @@ Yes, delete You can specify colors by name You must create - You're adding You're editing You've chosen to add A member of the @@ -313,83 +331,148 @@ lime Login information: Logout + Add Members to Another Community Add Membership To Community Add These Users To A Group Add a new dotLRN user: + Add a new user to SloanSpace + Add %community_name% Members to Another Community Add members to another group Administrative Actions + An error occured while trying to add a user to a community. This error has been logged. + An error occured while trying to remove a user to a community. This error has been logged. Are you sure you want to delete the empty department + Be sure that the person does not already have a SloanSpace account under another email address. Duplicate accounts cause problems for everyone. To add a person with an existing account use <a href=members>Manage Membership</a>. Change my language setting Class Key (a short name, no spaces) Community's Web Address - E-mail address must be valid and unique - Edit My Notifications + Do you really want to remove the following members? + Do you really want to remove %num_users% users? + E-mail address must be valid and unique. <br>This user probably already has a SloanSpace account. <br>Try adding this user through <a href=members>Manage Membership</a>. + Edit My Notifications Edit My Personal Information Edit Pre-approved Email Servers + Edit department properties. Email suffixes listed here are used to automatically make dotLRN users of people that register with email addresses that match one of the values in this list. + Error Nuking %first_names% %last_name% (%email%) + Error adding user to community + Error removing user community + Error sending email to %email% from password-update-2.tcl First check the box of the users you want to add, next select their role, and finally submit the form. + Folder %folder_name% is empty Go back and try again + Help and Personal Configuration Here is the actual error message: Here you can create several users at once using a correctly formatted CSV (comma-separated values) file. You can create a spreadsheet and save it as a CSV file to import here. + If this person is a MIT or Sloan Student have him self-register at sloanspace.mit.edu so he will have a full access account. + If you wish to give guests full access to forums and surveys you may request that the site-wide admin change the status of your community. This option is not open to classes due to MIT privacy policy. + Information about other members of this community will not be available to this user. Interactive setting of dotLRN parameters + Join/Drop Classes or Communities Join/Drop a Class or Community Group Join the above criteria with Join the above criteria by Key (a short name, no spaces) Last Visit Over (in days) Last Visit Within (in days) + Make this user a site wide admin. Manage this user's portrait No, I don't want to archive this group. + Note: The script will continue to run even if you +close your browser. + Note: This process is expected to take %num_seconds% seconds. + Note: This process is expected to take %num_minutes% minutes. + Note: use this feature responsibly and <i>think</i> first. Note: you will have the option of adding these users to a group once they have been uploaded. + Nuke %first_names% %last_name% (%email%) + Please confirm that you want eliminate all traces of %first_names% +%last_name% (%email%) from the database. If you select "Yes", we'll +make an attempt. If we succeed, you'll be redirected to where you +were. If there is an error and we are unable to complete the removal, +we'll return an error message. + Please follow the following link to reset your password: + +%change_password_url% + + Please select a different name Pre-approved Email Servers Recipient's First Name + Return to where you were. Revert ONLY the Header Icon properties to defaults Revert all properties to defaults Save and use this header + Search dotLRN users for user: Sender's Email Address Some of the emails failed. Those users had random passwords generated for them, however. The best way to proceed is to have these users log in and ask them to click on 'I have forgotten my password'. The first line of the file + The following email was just sent from %system_name% + The following email was just sent from %system_name% + +Sent by: %system_owner% +Sent to: %email% +Subject: %subject% +Message: %body% The following members of The following variables can be used to insert user/community specific data: The group's data will not be modified, but the group will only be accessible to system administrators. The results of your search are: The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error: There was a bug in this page There was a bug in this page. Please report this problem. + There was an error sending email to %email%. + There was an error sending email to %system_owner%. There was an error trying to add your content. The most likely causes are that: This action will take approximately - This page will eventually include help + This action will take approximately <strong>%estimated_number_of_seconds%</strong> seconds. + This allows you to give a non-MIT person who is not a registered student access to this group. + This user is a site-wide admin. + This user is currently in state <i>%member_state%</i>. To allow this user access to dotLRN you must <br><a href="%approve_user_url%">approve and add to dotLRN</a> Update this user's password + Use this only for an officially registered student in this class who is <b>not</b> a MIT or Sloan student. + Web Log for %user_name% + Well, we tried to nuke the user, but there was an error. The most +likely case is that a reference to this user (user_id=%user_id%) +exists somewhere in the database schema. It's time to call your +programmers! (What others see about me: Year (e.g. 2003, 2003/2004) + You are about to delete %num_users% users. + You are adding <strong>%first_names% %last_name% (%email%)</strong> to %community_name%: You are not allowed to perform that action. You double-clicked the "Add" button on the previous page. You may now choose to + You need to confirm the password that you typed. (Type the same thing again.) You tried to upload a non-image file. Your Current Memberships Your dotLRN Workspace + Your password on %system_name% + Your passwords don't match! Presumably, you made a typo while entering one of them. Your search returned no results, please broaden your search criteria. You're asking to change the level of access of this user. This has strong repercussions. Are you user about this? , since these must be associated with Terms. - a secondary identifier for the user. + approve and add to dotLRN are not yet members of dotLRN properties for this user. emailing this user failed! Having trouble getting the look you want? Here's some tips If you misspell the font name or pick a font that a user doesn't have on her computer, the normal system font will be used. - This is what the header will look like + policy must be one of: open, needs approval, or closed + spam policy must be one of: all or members + <strong>%first_names% %last_name% (%email%)</strong> is a %existing_role% in %community_name%. You may select a new role below: + This is what the header title will look like This may take some time. Please be patient. this user is deleted and banned from the community. @@ -401,7 +484,6 @@ Members must - must be one of - MySpace navy new New @@ -411,6 +493,7 @@ Not-A-Member none set up Not a User + nuke of type olive optional, defaults to @@ -425,6 +508,7 @@ Thank you. Your registration request has been sent to the System Administrator reject required + revoke rrggbb search seconds. @@ -448,6 +532,7 @@ The format of this value is a comma-separated list of domains (usually preceded by the *@ string which match &lt;anything&gt;@&lt;email-domain&gt;). For example, you might use: + There are no users matching %search_text%. this user is deleted this user to dotLRN. to be able to create Index: openacs-4/packages/dotlrn/sql/oracle/communities-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/communities-create.sql,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/sql/oracle/communities-create.sql 9 Aug 2002 18:39:24 -0000 1.12 +++ openacs-4/packages/dotlrn/sql/oracle/communities-create.sql 4 Dec 2002 09:51:03 -0000 1.13 @@ -31,7 +31,6 @@ primary key, supertype constraint dotlrn_ct_supertype_fk references dotlrn_community_types (community_type), - constraint dotlrn_ct_type_supertype_un unique (community_type, supertype), pretty_name varchar2(100) constraint dotlrn_ct_pretty_name_nn not null, Index: openacs-4/packages/dotlrn/sql/oracle/custom-permissions.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/custom-permissions.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/sql/oracle/custom-permissions.sql 4 Dec 2002 09:51:03 -0000 1.2 @@ -0,0 +1,70 @@ +-- @author Don Baccus +-- @creation-date 2002-07-09 +-- +-- Return 't' if the party has admin privileges on the given group +-- This function is much faster than the general permissions permission_p +-- function as it takes advantage of the fact that we know the object +-- being checked is a group. This allows us to greatly simplify the relseg +-- check. + + +-- We also don't bother checking to see if "The Public" (all visitors) or +-- "Registered Users" are allowed to admin the dotLRN community because, well, +-- we know they aren't. + + +-- We also don't check to see if the group has the direct admin perm on +-- the object because dotLRN puts all group-level admins into a relational +-- segment with the 'admin' privilege on its parent group. + + +-- If you customize the dotLRN community datamodel and violate any of the +-- above assumptions, rewrite this function. + + +create or replace function dotlrn_community_admin_p ( + group_id groups.group_id%TYPE, + party_id parties.party_id%TYPE + ) return char + as + exists_p char(1); + begin + -- + -- direct permissions + select decode(count(*),0,'f','t') into exists_p + from dual where exists ( + select 'x' + from acs_object_grantee_priv_map + where object_id = dotlrn_community_admin_p.group_id + and grantee_id = dotlrn_community_admin_p.party_id + and privilege = 'admin'); + + + if exists_p = 'f' then + + + -- check to see if the user belongs to a rel seg that has + -- the admin priv on the object (in this case a group) + + + select decode(count(*), 0, 'f', 't') into exists_p + from dual where exists ( + select 'x' + from acs_object_grantee_priv_map ogpm, + rel_seg_approved_member_map rs + where rs.group_id = dotlrn_community_admin_p.group_id + and ogpm.object_id = rs.group_id + and ogpm.privilege = 'admin' + and ogpm.grantee_id = rs.segment_id + and rs.member_id = dotlrn_community_admin_p.party_id); + + + end if; + + + return exists_p; + + + end dotlrn_community_admin_p; +/ +show errors; \ No newline at end of file Index: openacs-4/packages/dotlrn/sql/oracle/dotlrn-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/dotlrn-create.sql,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/sql/oracle/dotlrn-create.sql 9 Aug 2002 18:39:24 -0000 1.18 +++ openacs-4/packages/dotlrn/sql/oracle/dotlrn-create.sql 4 Dec 2002 09:51:03 -0000 1.19 @@ -37,3 +37,4 @@ @@ main-portlet-create.sql @@ security-create.sql @@ user-extension-create.sql +@@ custom-permissions.sql Index: openacs-4/packages/dotlrn/sql/oracle/security-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/security-create.sql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/oracle/security-create.sql 9 Aug 2002 18:39:24 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/oracle/security-create.sql 4 Dec 2002 09:51:03 -0000 1.4 @@ -49,9 +49,13 @@ -- the ability to create a community type acs_privilege.create_privilege('dotlrn_create_community_type'); + -- the ability to spam a community + acs_privilege.create_privilege('dotlrn_spam_community'); + -- consistent permissions acs_privilege.add_child('dotlrn_edit_community', 'dotlrn_view_community'); acs_privilege.add_child('dotlrn_admin_community', 'dotlrn_edit_community'); + acs_privilege.add_child('dotlrn_admin_community', 'dotlrn_spam_community'); -- inheritance acs_privilege.add_child('create', 'dotlrn_create_community_type'); Index: openacs-4/packages/dotlrn/sql/oracle/security-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/oracle/security-drop.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/oracle/security-drop.sql 9 Aug 2002 18:39:24 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/oracle/security-drop.sql 4 Dec 2002 09:51:03 -0000 1.3 @@ -36,6 +36,7 @@ acs_privilege.remove_child('dotlrn_edit_community', 'dotlrn_view_community'); acs_privilege.remove_child('dotlrn_admin_community', 'dotlrn_edit_community'); + acs_privilege.remove_child('dotlrn_admin_community', 'dotlrn_spam_community'); delete from acs_permissions @@ -46,7 +47,8 @@ 'dotlrn_create_community_type', 'dotlrn_edit_community', 'dotlrn_view_community', - 'dotlrn_view_community_type'); + 'dotlrn_view_community_type', + 'dotlrn_spam_community'); acs_privilege.drop_privilege('dotlrn_admin_community'); acs_privilege.drop_privilege('dotlrn_admin_community_type'); @@ -56,6 +58,7 @@ acs_privilege.drop_privilege('dotlrn_edit_community'); acs_privilege.drop_privilege('dotlrn_view_community'); acs_privilege.drop_privilege('dotlrn_view_community_type'); + acs_privilege.drop_privilege('dotlrn_spam_community'); end; / Index: openacs-4/packages/dotlrn/sql/postgresql/communities-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/communities-create.sql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/communities-create.sql 9 Aug 2002 18:39:25 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/communities-create.sql 4 Dec 2002 09:51:03 -0000 1.4 @@ -34,7 +34,6 @@ supertype varchar(100) constraint dotlrn_ct_supertype_fk references dotlrn_community_types (community_type), - constraint dotlrn_ct_type_supertype_un unique (community_type, supertype), pretty_name varchar(100) constraint dotlrn_ct_pretty_name_nn not null, Index: openacs-4/packages/dotlrn/sql/postgresql/communities-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/communities-drop.sql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/communities-drop.sql 9 Aug 2002 18:39:25 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/communities-drop.sql 4 Dec 2002 09:51:03 -0000 1.4 @@ -26,7 +26,7 @@ -- @version $Id$ -- -\i communities-tree-drop.sql; +\i communities-tree-drop.sql drop view dotlrn_active_comms_not_closed; drop view dotlrn_active_communities; Index: openacs-4/packages/dotlrn/sql/postgresql/custom-permissions.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/custom-permissions.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/sql/postgresql/custom-permissions.sql 4 Dec 2002 09:51:03 -0000 1.2 @@ -0,0 +1,62 @@ +-- @author Don Baccus +-- @creation-date 2002-07-09 +-- +-- Ported from oracle 2002-08-10 davis@xarg.net +-- +-- Return 't' if the party has admin privileges on the given group +-- This function is much faster than the general permissions permission_p +-- function as it takes advantage of the fact that we know the object +-- being checked is a group. This allows us to greatly simplify the relseg +-- check. + +-- We also don't bother checking to see if "The Public" (all visitors) or +-- "Registered Users" are allowed to admin the dotLRN community because, well, +-- we know they aren't. + + +-- We also don't check to see if the group has the direct admin perm on +-- the object because dotLRN puts all group-level admins into a relational +-- segment with the 'admin' privilege on its parent group. + + +-- If you customize the dotLRN community datamodel and violate any of the +-- above assumptions, rewrite this function. + + +create or replace function dotlrn_community_admin_p (integer, integer) +returns char as ' + declare + p_group_id alias for $1; + p_party_id alias for $2; + begin + -- + -- direct permissions + if exists ( + select 1 + from acs_object_grantee_priv_map + where object_id = p_group_id + and grantee_id = p_party_id + and privilege = ''admin'') + then + return ''t''; + end if; + + -- check to see if the user belongs to a rel seg that has + -- the admin priv on the object (in this case a group) + + + if exists ( + select 1 + from acs_object_grantee_priv_map ogpm, + rel_seg_approved_member_map rs + where rs.group_id = p_group_id + and ogpm.object_id = rs.group_id + and ogpm.privilege = ''admin'' + and ogpm.grantee_id = rs.segment_id + and rs.member_id = p_party_id) + then + return ''t''; + end if; + + return ''f''; +end;' language 'plpgsql'; Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql 9 Aug 2002 18:39:25 -0000 1.9 +++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-create.sql 4 Dec 2002 09:51:03 -0000 1.10 @@ -36,3 +36,4 @@ \i main-portlet-create.sql \i security-create.sql \i user-extension-create.sql +\i custom-permissions.sql Index: openacs-4/packages/dotlrn/sql/postgresql/security-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/security-create.sql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/sql/postgresql/security-create.sql 9 Aug 2002 18:39:25 -0000 1.3 +++ openacs-4/packages/dotlrn/sql/postgresql/security-create.sql 4 Dec 2002 09:51:03 -0000 1.4 @@ -28,59 +28,68 @@ -- Security Setup for dotLRN -- privileges, privilege inheritance -- -begin; +create function inline0() +returns integer as ' +begin -- the ability to browse dotLRN in general - select acs_privilege__create_privilege('dotlrn_browse'); + perform acs_privilege__create_privilege(''dotlrn_browse''); -- the ability to even view that a community exists - select acs_privilege__create_privilege('dotlrn_view_community'); + perform acs_privilege__create_privilege(''dotlrn_view_community''); -- the ability to participate in a community - select acs_privilege__create_privilege('dotlrn_edit_community'); + perform acs_privilege__create_privilege(''dotlrn_edit_community''); -- the ability to admin a community - select acs_privilege__create_privilege('dotlrn_admin_community'); + perform acs_privilege__create_privilege(''dotlrn_admin_community''); -- the ability to create a community - select acs_privilege__create_privilege('dotlrn_create_community'); + perform acs_privilege__create_privilege(''dotlrn_create_community''); -- the ability to even view a community type - select acs_privilege__create_privilege('dotlrn_view_community_type'); + perform acs_privilege__create_privilege(''dotlrn_view_community_type''); -- the ability to admin a community type - select acs_privilege__create_privilege('dotlrn_admin_community_type'); + perform acs_privilege__create_privilege(''dotlrn_admin_community_type''); -- the ability to create a community type - select acs_privilege__create_privilege('dotlrn_create_community_type'); + perform acs_privilege__create_privilege(''dotlrn_create_community_type''); + -- the ability to spam a community + perform acs_privilege__create_privilege(''dotlrn_spam_community''); + -- temporarily drop this trigger to avoid a data-change violation -- on acs_privilege_hierarchy_index while updating the child privileges. drop trigger acs_priv_hier_ins_del_tr on acs_privilege_hierarchy; -- Consistent permissions - select acs_privilege__add_child('dotlrn_edit_community', 'dotlrn_view_community'); - select acs_privilege__add_child('dotlrn_admin_community', 'dotlrn_edit_community'); + perform acs_privilege__add_child(''dotlrn_edit_community'', ''dotlrn_view_community''); + perform acs_privilege__add_child(''dotlrn_admin_community'', ''dotlrn_edit_community''); + perform acs_privilege__add_child(''dotlrn_admin_community'', ''dotlrn_spam_community''); -- inheritance - select acs_privilege__add_child('create', 'dotlrn_create_community_type'); - select acs_privilege__add_child('create', 'dotlrn_create_community'); - select acs_privilege__add_child('write', 'dotlrn_edit_community'); - select acs_privilege__add_child('read', 'dotlrn_view_community'); - select acs_privilege__add_child('read', 'dotlrn_view_community_type'); - select acs_privilege__add_child('admin', 'dotlrn_admin_community'); - select acs_privilege__add_child('admin', 'dotlrn_admin_community_type'); + perform acs_privilege__add_child(''create'', ''dotlrn_create_community_type''); + perform acs_privilege__add_child(''create'', ''dotlrn_create_community''); + perform acs_privilege__add_child(''write'', ''dotlrn_edit_community''); + perform acs_privilege__add_child(''read'', ''dotlrn_view_community''); + perform acs_privilege__add_child(''read'', ''dotlrn_view_community_type''); + perform acs_privilege__add_child(''admin'', ''dotlrn_admin_community''); + perform acs_privilege__add_child(''admin'', ''dotlrn_admin_community_type''); + -- for now, we only want admins to be able to browse by default + perform acs_privilege__add_child(''admin'', ''dotlrn_browse''); -- re-enable the trigger before the last insert to force the -- acs_privilege_hierarchy_index table to be updated. - create trigger acs_priv_hier_ins_del_tr after insert or delete on acs_privilege_hierarchy for each row execute procedure acs_priv_hier_ins_del_tr (); - -- for now, we only want admins to be able to browse by default - select acs_privilege__add_child('admin', 'dotlrn_browse'); - -- no default permissions + return 0; +end;' language 'plpgsql'; -end; +select inline0(); +drop function inline0(); + + Index: openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql 9 Aug 2002 18:39:25 -0000 1.2 +++ openacs-4/packages/dotlrn/sql/postgresql/security-drop.sql 4 Dec 2002 09:51:03 -0000 1.3 @@ -39,7 +39,9 @@ perform acs_privilege__remove_child(''dotlrn_edit_community'', ''dotlrn_view_community''); perform acs_privilege__remove_child(''dotlrn_admin_community'', ''dotlrn_edit_community''); + perform acs_privilege__remove_child(''dotlrn_admin_community'', ''dotlrn_spam_community''); + delete from acs_permissions where privilege in (''dotlrn_admin_community'', @@ -59,7 +61,7 @@ perform acs_privilege__drop_privilege(''dotlrn_edit_community''); perform acs_privilege__drop_privilege(''dotlrn_view_community''); perform acs_privilege__drop_privilege(''dotlrn_view_community_type''); - + perform acs_privilege__drop_privilege(''dotlrn_spam_community''); return 0; end;' language 'plpgsql'; Index: openacs-4/packages/dotlrn/tcl/community-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.tcl,v diff -u -N -r1.171 -r1.172 --- openacs-4/packages/dotlrn/tcl/community-procs.tcl 12 Nov 2002 08:44:05 -0000 1.171 +++ openacs-4/packages/dotlrn/tcl/community-procs.tcl 4 Dec 2002 09:51:03 -0000 1.172 @@ -217,7 +217,7 @@ where object_id = :community_id } - set template_id [dotlrn::get_portal_id_from_type -type $community_type] + set template_id [dotlrn::get_portal_id_from_type -type $object_type] # Create comm's portal page set portal_id [portal::create \ @@ -311,8 +311,21 @@ # this community should be able to read this instance (and # it's children) permission::set_not_inherit -object_id $community_id - - return $community_id + + #this block sets permissions for subcommunities + while {1} { + if {![empty_string_p $parent_community_id]} { + #admin of the parent need admin on the subcommunity. + set parent_admin_party [db_string "parent_admin_party" "select segment_id from rel_segments where group_id = :parent_community_id and rel_type='dotlrn_admin_rel'"] + permission::grant -party_id $parent_admin_party -object_id $community_id -privilege "admin" + + #if this community has a parent we need to work up the chain. + set parent_community_id [get_parent_id -community_id $parent_community_id] + + } else { + return $community_id + } + } } ad_proc set_active_dates { @@ -376,12 +389,10 @@ ad_proc -private get_default_roles_not_cached { {-community_type:required} } { - set toplevel_community_type [get_toplevel_community_type -community_type $community_type] - - if {[string match $toplevel_community_type dotlrn_class_instance]} { - set community_type dotlrn_class_instance - } else { + if {[string match $community_type dotlrn_club]} { set community_type dotlrn_community + } elseif {![string match $community_type dotlrn_community]} { + set community_type dotlrn_class_instance } return [db_list_of_lists select_role_data {}] @@ -441,7 +452,6 @@ set pretty_name [lindex $roles [expr $i + 2]] } - ns_log Notice "PM: pretty_name $pretty_name [lang::util::localize $pretty_name]" return [lang::util::localize $pretty_name] } @@ -572,6 +582,9 @@ set member_segment_id [get_members_rel_id -community_id $community_id] set admin_segment_id [get_admin_rel_id -community_id $community_id] + set parent_id [dotlrn_community::get_parent_id -community_id $community_id] + set parent_admin_segment_id [get_admin_rel_id -community_id $parent_id] + permission::grant \ -party_id $member_segment_id \ -object_id $community_id \ @@ -745,6 +758,7 @@ } util_memoize_flush "dotlrn_community::list_users_not_cached -rel_type $rel_type -community_id $community_id" + util_memoize_flush_regexp $user_id } ad_proc -public add_user_to_community { @@ -772,6 +786,12 @@ ns_set put $extra_vars user_id $user_id ns_set put $extra_vars community_id $community_id + ns_log notice "rel_type is sending the following to relation_add -member_state needs approval \ + -extra_vars $extra_vars \ + $rel_type \ + $community_id \ + $user_id " + # Set up the relationship if {[catch {set rel_id [relation_add \ -member_state "needs approval" \ @@ -861,8 +881,10 @@ # flush the list_users cache util_memoize_flush "dotlrn_community::list_users_not_cached -rel_type $rel_type -community_id $community_id" } + util_memoize_flush_regexp $user_id } + ad_proc -public get_all_communities_by_user { user_id } { @@ -1120,6 +1142,7 @@ {-community_id:required} {-pretext "
  • "} {-join_target register} + {-drop_target deregister} {-only_member_p 0} } { Returns a html fragment of the subcommunity hierarchy of this @@ -1142,22 +1165,23 @@ if {[empty_string_p $user_id]} { set user_id [ad_get_user_id] } - foreach sc_id [get_subcomm_list -community_id $community_id] { - if {[has_subcommunity_p -community_id $sc_id] \ && [member_p $sc_id $user_id]} { # Shows the subcomms of this subcomm ONLY IF I'm a # member of the current comm set url [get_community_url $sc_id] append chunk "$pretext [get_community_name $sc_id]\n" - if {[dotlrn::user_can_admin_community_p -community_id $sc_id]} { - append chunk "\[ admin \]" - } + append chunk "[_ dotlrn.Drop]\n" + +# Removing admin to improve performance +# if {[dotlrn::user_can_admin_community_p -community_id $sc_id]} { +# append chunk " \"Administer\"\n" +# } append chunk "\n" - } elseif {[member_p $sc_id $user_id] || [dotlrn::user_can_admin_community_p -community_id $sc_id] || [not_closed_p -community_id $sc_id]} { + } elseif {[member_p $sc_id $user_id] || [not_closed_p -community_id $sc_id]} { # Shows the subcomm if: # 1. I'm a member of this subcomm OR @@ -1182,24 +1206,27 @@ append chunk "$pretext [get_community_name $sc_id]\n" if {![member_p $sc_id $user_id] && [not_closed_p -community_id $sc_id]} { + append chunk "" - append chunk "\[ " - if {[member_pending_p -community_id $sc_id -user_id $user_id]} { append chunk "[_ dotlrn.Pending_Approval]" } elseif {[needs_approval_p -community_id $sc_id]} { - append chunk ">Request Membership\n" - + append chunk "[_ dotlrn.Request_Membership]\n" } else { - append chunk "Join\n" + append chunk "[_ dotlrn.Join]\n" } - append chunk " \]\n" - } + append chunk "\n" + } elseif {[member_p $sc_id $user_id]} { - if {[dotlrn::user_can_admin_community_p -community_id $sc_id]} { - append chunk "\[ Administer \]\n" - } + # User is a member. + append chunk "[_ dotlrn.Drop]\n" + + } + #Removing admin to improve performance. +# if {[dotlrn::user_can_admin_community_p -community_id $sc_id]} { +# append chunk " \"Administer\"\n" +# } } } @@ -1296,7 +1323,8 @@ } { if {[subcommunity_p -community_id $community_id]} { set parent_name [get_parent_name -community_id $community_id] - return [concat "$parent_name : [get_community_name $community_id]"] + set parent_url [get_community_url [get_parent_id -community_id $community_id]] + return [concat "$parent_name : [get_community_name $community_id]"] } else { return [get_community_name $community_id] } Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -N -r1.78 -r1.79 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 31 Jul 2002 21:18:32 -0000 1.78 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 4 Dec 2002 09:51:03 -0000 1.79 @@ -26,12 +26,6 @@ - - - select package_id from dotlrn_community_types where community_type= :community_type - - - update dotlrn_communities_all set package_id= :package_id where community_id= :community_id @@ -166,7 +160,7 @@ and registered_users.user_id not in (select dm.user_id from dotlrn_member_rels_full dm where dm.community_id = :subcomm_id) - order by dotlrn_member_rels_approved.rel_type, registered_users.last_name + order by last_name @@ -372,15 +366,15 @@ select 1 - from dotlrn_active_comms_not_closed + from dotlrn_communities_not_closed where community_id = :community_id select 1 - from dotlrn_active_comms_not_closed + from dotlrn_communities_not_closed where community_id = :community_id and join_policy = 'open' @@ -389,7 +383,7 @@ select 1 - from dotlrn_active_comms_not_closed + from dotlrn_communities_not_closed where community_id = :community_id and join_policy = 'needs approval' @@ -468,6 +462,18 @@ + + + select impl_name + from acs_sc_impls, + acs_sc_bindings, + acs_sc_contracts + where acs_sc_impls.impl_id = acs_sc_bindings.impl_id + and acs_sc_contracts.contract_id = acs_sc_bindings.contract_id + and acs_sc_contracts.contract_name = 'dotlrn_applet' + + + select dotlrn_applets.applet_key @@ -478,6 +484,14 @@ + + + select applet_key + from dotlrn_applets + where active_p = 't' + + + select dotlrn_applets.applet_key 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 -N -r1.34 -r1.35 --- openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 23 Oct 2002 12:38:38 -0000 1.34 +++ openacs-4/packages/dotlrn/tcl/dotlrn-init.tcl 4 Dec 2002 09:51:03 -0000 1.35 @@ -76,14 +76,16 @@ # 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 [db_list select_not_installed_applets {}] { - dotlrn_applet::applet_call $applet AddApplet [list] + if {[catch {dotlrn_applet::applet_call $applet AddApplet [list]} errMsg]} { + ns_log warning "dotlrn-init: AddApplet $applet failed\n$errMsg" + } } 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" + ns_log notice "dotlrn-init: about to call dotlrn_class::init" if {![dotlrn_class::is_initialized]} { dotlrn_class::init } Index: openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl,v diff -u -N -r1.26 -r1.27 --- openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 23 Oct 2002 12:38:38 -0000 1.26 +++ openacs-4/packages/dotlrn/tcl/dotlrn-main-portlet-procs.tcl 4 Dec 2002 09:51:04 -0000 1.27 @@ -35,7 +35,7 @@ ad_proc -public get_pretty_name { } { - return [parameter::get -parameter dotlrn_main_portlet_pretty_name] + return [parameter::get -package_id [dotlrn::get_package_id] -parameter dotlrn_main_portlet_pretty_name] } ad_proc -public link { Index: openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl,v diff -u -N -r1.68 -r1.69 --- openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 23 Oct 2002 12:38:38 -0000 1.68 +++ openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 4 Dec 2002 09:51:04 -0000 1.69 @@ -412,7 +412,9 @@ foreach applet_key $default_applets_list { if {[dotlrn_applet::applet_exists_p -applet_key $applet_key]} { - dotlrn_community::applet_call $applet_key AddPortlet [list $portal_id] + if {[catch {dotlrn_community::applet_call $applet_key AddPortlet [list $portal_id]} errMsg]} { + ns_log warning "FAILED: dotlrn_community::applet_call $applet_key AddPortlet [list $portal_id]\n$errMsg" + } } } } Index: openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl,v diff -u -N -r1.51 -r1.52 --- openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 12 Nov 2002 08:44:05 -0000 1.51 +++ openacs-4/packages/dotlrn/tcl/dotlrn-security-procs.tcl 4 Dec 2002 09:51:04 -0000 1.52 @@ -51,7 +51,13 @@ set name "$name-1" } } - + + #bad things happen if the group name is the same as a dotlrn file name. + set conflicting_names [list members configure spam index not-allowed clone help] + if { [lsearch -exact $conflicting_names $name] != -1 } { + lappend name "-1" + } + return $name } @@ -126,7 +132,7 @@ set portal_id [portal::create \ -template_id $template_id \ -name "[_ dotlrn.lt_Your_dotLRN_Workspace]" \ - $user_id \ + $user_id ] ns_set put $extra_vars portal_id $portal_id @@ -150,12 +156,17 @@ # are selecting from changes inside the loop causing all kinds of # dead lock issues. set current_memberships [db_list_of_ns_sets select_current_memberships { - select community_id, + select dotlrn_member_rels_full.community_id, rel_type, member_state - from dotlrn_member_rels_full + from dotlrn_member_rels_full, dotlrn_communities where user_id = :user_id + and dotlrn_member_rels_full.community_id = dotlrn_communities.community_id + and dotlrn_communities.parent_community_id is null }] + + # Note that remove_user will remove users from the subgroups as well as the + # parent community. Therefore, current_memberships only contains parent communities. foreach row $current_memberships { dotlrn_community::remove_user [ns_set get $row community_id] $user_id @@ -264,10 +275,15 @@ } { Check if a user can read sensitive data in dotLRN } { - return [acs_privacy::user_can_read_private_data_p \ - -user_id $user_id \ - -object_id [dotlrn::get_package_id] \ - ] + if { [parameter::get -parameter protect_private_data_p -default 1] } { + return [ad_permission_p \ + -user_id $user_id \ + [dotlrn::get_package_id] \ + read_private_data + ] + } else { + return 1 + } } ad_proc -public require_user_read_private_data { @@ -370,6 +386,26 @@ } } + ad_proc -public user_can_spam_community_p { + {-user_id ""} + {-community_id:required} + } { + check if a user can admin a community + } { + return [permission::permission_p -party_id $user_id -object_id $community_id -privilege dotlrn_spam_community] + } + + ad_proc -public require_user_spam_community { + {-user_id ""} + {-community_id:required} + } { + require that user be able to spam a community + } { + if {![user_can_spam_community_p -user_id $user_id -community_id $community_id]} { + do_abort + } + } + ad_proc -public admin_p { {-user_id ""} } { Index: openacs-4/packages/dotlrn/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/navigation-procs.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/tcl/navigation-procs.tcl 23 Oct 2002 12:38:38 -0000 1.18 +++ openacs-4/packages/dotlrn/tcl/navigation-procs.tcl 4 Dec 2002 09:51:04 -0000 1.19 @@ -106,6 +106,9 @@ {-user_id:required} {-link_control_panel:required} {-control_panel_text:required} + {-link_all 0} + {-pre_html ""} + {-post_html ""} } { A helper procedure that generates the PORTAL navbar (the thing with the portal pages on it) for dotlrn. It is called from the @@ -115,8 +118,8 @@ set dotlrn_url [dotlrn::get_url] set community_id [dotlrn_community::get_community_id] set control_panel_name control-panel - set link_all 0 - + set control_panel_url "$dotlrn_url/$control_panel_name" + if {[empty_string_p $community_id]} { # We are not under a dotlrn community. However we could be # under /dotlrn (i.e. in the user's portal) or anywhere @@ -143,8 +146,9 @@ set text [dotlrn_community::get_community_header_name $community_id] set control_panel_name one-community-admin set link [dotlrn_community::get_community_url $community_id] - - # figure out what privs this user has on the community + set control_panel_url "$link/$control_panel_name" + + # figure out what this privs this user has on the community set admin_p [dotlrn::user_can_admin_community_p \ -user_id $user_id \ -community_id $community_id @@ -177,13 +181,15 @@ # # Common code for the the behavior of the control panel link # + set extra_td_selected_p 0 if {$show_control_panel} { if {$link_control_panel} { set extra_td_html \ - "   $control_panel_text" + "$control_panel_text" } else { - set extra_td_html "   $control_panel_text" + set extra_td_html "$control_panel_text" set link_all 1 + set extra_td_selected_p 1 } } else { set extra_td_html {} @@ -195,10 +201,11 @@ -portal_id $portal_id \ -link $link \ -link_all $link_all \ - -pre_html "" \ - -post_html "" \ + -pre_html $pre_html \ + -post_html $post_html \ -extra_td_html $extra_td_html \ - -table_html_args "class=\"navbar\""] + -extra_td_selected_p $extra_td_selected_p \ + -table_html_args "class=\"navbar\" border=0 cellspacing=0 cellpadding=3"] } } Index: openacs-4/packages/dotlrn/tcl/zz-dotlrn-postload-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/zz-dotlrn-postload-init.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/tcl/zz-dotlrn-postload-init.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,3 @@ +#if { [ad_ssl_available_p] } { +# ad_register_filter preauth GET "[dotlrn::get_url]/admin/*" ad_restrict_to_https +#} \ No newline at end of file Index: openacs-4/packages/dotlrn/www/approve-link.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/approve-link.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/approve-link.adp 23 Oct 2002 12:38:39 -0000 1.4 +++ openacs-4/packages/dotlrn/www/approve-link.adp 4 Dec 2002 09:51:04 -0000 1.5 @@ -22,3 +22,4 @@ + Index: openacs-4/packages/dotlrn/www/community-edit-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-edit-2.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/community-edit-2.adp 23 Oct 2002 12:38:39 -0000 1.4 +++ openacs-4/packages/dotlrn/www/community-edit-2.adp 4 Dec 2002 09:51:04 -0000 1.5 @@ -30,11 +30,19 @@ #dotlrn.lt_this_is_what_the_header#: -
    -
    -@header_alt_text@  @header_text@ -
    + + + + + +
    +
    + @header_text@ +
    +

    Index: openacs-4/packages/dotlrn/www/community-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-edit-2.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/community-edit-2.tcl 12 Nov 2002 08:44:05 -0000 1.9 +++ openacs-4/packages/dotlrn/www/community-edit-2.tcl 4 Dec 2002 09:51:04 -0000 1.10 @@ -38,28 +38,33 @@ set page_title [_ dotlrn.Preview] set header_text [dotlrn_community::get_community_header_name $community_id] -# # Image stuff -# + set tmp_filename [ns_queryget header_img.tmpfile] + +#TODO - better way to get typs. +# THIS DOESN'T WORK. set mime_type [ns_guesstype $header_img] + if {[empty_string_p $tmp_filename]} { - set tmp_size 0 - set revision_id 0 -} else { - set tmp_size [file size $tmp_filename] -} + set tmp_size 0 + set revision_id 0 + } else { + set tmp_size [file size $tmp_filename] + } + set title "$header_img-[db_nextval acs_object_id_seq]" -# strip off the C:\directories... crud and just get the file name +# # strip off the C:\directories... crud and just get the file name + if ![regexp {([^/\\]+)$} $header_img match client_filename] { - set client_filename $header_img + set client_filename $header_img } if { ![empty_string_p [ad_parameter MaximumFileSize]] - && $tmp_size > 0 - && $tmp_size > [ad_parameter MaximumFileSize] } { + && $tmp_size > 0 + && $tmp_size > [ad_parameter MaximumFileSize] } { set msg_subst_list [list system_name [ad_system_name] \ max_attachments_bytes [util_commify_number [ad_parameter MaximumFileSize]]] @@ -70,8 +75,11 @@ if { $tmp_size > 0 } { # import the content now, so that we can spit it out in the preview db_transaction { - set parent_id 0 - + + # We will store the image in the communities' shared folder. + set parent_id [dotlrn_fs::get_community_shared_folder -community_id $community_id] + + # the last param "object name" is unused set revision_id [cr_import_content \ -title $title \ @@ -86,7 +94,7 @@ ns_log notice "aks1: new revision_id $revision_id" - } on_error { + } on_error { # most likely a duplicate name, double click, etc. ad_return_complaint 1 " [_ dotlrn.lt_There_was_an_error_tr] @@ -101,7 +109,6 @@ $errmsg " - ad_script_abort } } else { @@ -143,6 +150,35 @@ append style_fragment " " "color: $header_font_color;" +#logo stuff +if {[empty_string_p $revision_id]} { + + set comm_type [dotlrn_community::get_community_type_from_community_id $community_id] + + set temp_community_id $community_id + while {[dotlrn_community::subcommunity_p -community_id $temp_community_id]} { + # For a subcommunity, we use the logo of the + # the first ancestor that is not a sub_community + + set temp_community_id [dotlrn_community::get_parent_id -community_id $temp_community_id] + set comm_type [dotlrn_community::get_community_type_from_community_id $temp_community_id] + + } + + if {$comm_type == "dotlrn_club"} { + #community colors + set scope_name "comm" + } else { + set scope_name "course" + } + + set header_url "[dotlrn::get_url]/graphics/logo-$scope_name.gif" + +} else { + set header_url "[dotlrn_community::get_community_url $community_id]/file-storage/download/?version_id=$revision_id" +} + + form create header_form set yes_label "[_ dotlrn.lt_Save_and_use_this_hea]" @@ -158,16 +194,16 @@ -widget submit element create header_form header_logo_item_id \ - -label header_logo_item_id \ - -datatype text \ - -widget hidden \ - -value $revision_id + -label header_logo_item_id \ + -datatype text \ + -widget hidden \ + -value $revision_id element create header_form header_logo_alt_text \ - -label header_logo_alt_text \ - -datatype text \ - -widget hidden \ - -value $header_alt_text + -label header_logo_alt_text \ + -datatype text \ + -widget hidden \ + -value $header_alt_text element create header_form header_font \ -label header_font \ @@ -204,8 +240,8 @@ [list header_font_size $header_font_size] \ [list header_font_color $header_font_color] \ [list header_logo_item_id $header_logo_item_id] \ - [list header_logo_alt_text $header_logo_alt_text] \ - ] + [list header_logo_alt_text $header_logo_alt_text]] + ad_returnredirect "one-community-admin" } else { Index: openacs-4/packages/dotlrn/www/community-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-edit.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/community-edit.adp 23 Oct 2002 12:38:39 -0000 1.9 +++ openacs-4/packages/dotlrn/www/community-edit.adp 4 Dec 2002 09:51:04 -0000 1.10 @@ -59,15 +59,20 @@ - - #dotlrn.Header_Icon#   - + + #dotlrn.header_logo#   + + +    + + + - #dotlrn.Header_Icon_Alt_text#   - - + #dotlrn.Header_Alternate_Text#   + + Index: openacs-4/packages/dotlrn/www/community-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-edit.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/community-edit.tcl 23 Oct 2002 12:38:39 -0000 1.6 +++ openacs-4/packages/dotlrn/www/community-edit.tcl 4 Dec 2002 09:51:04 -0000 1.7 @@ -23,7 +23,7 @@ @version $Id$ } -query { - {referer "community-edit"} + {referer "one-community-admin"} } set user_id [ad_conn user_id] @@ -128,9 +128,46 @@ -community_id $community_id \ -attribute_name header_logo_alt_text ] - + +set revision_id [dotlrn_community::get_attribute \ + -community_id $community_id \ + -attribute_name header_logo_item_id + ] + +# Default logos are served from know locations in the file system +# based on community type. + +# Customized logos are stored in the public file-storage folder +# for the community. + +if {[empty_string_p $revision_id]} { + + set comm_type [dotlrn_community::get_community_type_from_community_id $community_id] + + set temp_community_id $community_id + while {[dotlrn_community::subcommunity_p -community_id $temp_community_id]} { + # For a subcommunity, we use the logo of the + # the first ancestor that is not a sub_community + + set temp_community_id [dotlrn_community::get_parent_id -community_id $temp_community_id] + set comm_type [dotlrn_community::get_community_type_from_community_id $temp_community_id] + + } + + if {$comm_type == "dotlrn_club"} { + #community colors + set scope_name "comm" + } else { + set scope_name "course" + } + + set header_url "[dotlrn::get_url]/graphics/logo-$scope_name.gif" + +} else { + set header_url "[dotlrn_community::get_community_url $community_id]/file-storage/download/?version_id=$revision_id" +} + set title [_ dotlrn.Edit_Properties] set context_bar [list [list one-community-admin [_ dotlrn.Administer]] [_ dotlrn.Edit_Properties]] ad_return_template - Index: openacs-4/packages/dotlrn/www/community-member.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-member.adp,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/community-member.adp 23 Oct 2002 12:38:39 -0000 1.12 +++ openacs-4/packages/dotlrn/www/community-member.adp 4 Dec 2002 09:51:04 -0000 1.13 @@ -55,7 +55,11 @@

  • #dotlrn.Personal_home_page# @url@
  • - + + +
  • @weblogs.name@ - #dotlrn.Latest_post# @weblogs.lastest_post@ + +

    #dotlrn.Biography# @bio@ @@ -70,7 +74,7 @@

    #dotlrn.Shared_Files#

    - +
    Index: openacs-4/packages/dotlrn/www/community-member.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-member.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/community-member.tcl 18 Nov 2002 17:58:53 -0000 1.12 +++ openacs-4/packages/dotlrn/www/community-member.tcl 4 Dec 2002 09:51:04 -0000 1.13 @@ -59,6 +59,7 @@ where user_id = :user_id } + if {![db_0or1row user_information $user_info_sql]} { ad_return_error "[_ dotlrn.No_user_found]" [_ dotlrn.no_community_member_with_id [list user_id $user_id]] ad_script_abort @@ -74,6 +75,17 @@ and attribute_name = 'bio') } -default ""] +set weblog_p 0 +if {1} { + set weblog_package_id [site_node_apm_integration::get_child_package_id -package_key "forums"] + set weblog_url "[dotlrn_community::get_url -package_id $weblog_package_id]/forum-view" +#set to check if you are using webloggers + + db_multirow weblogs weblogs {select name, forum_id, to_char(o.last_modified, 'Mon DD, YYYY') as lastest_post from forums_forums_enabled f, acs_objects o where o.object_id = forum_id + and o.creation_user = :user_id and f.package_id = :weblog_package_id} + set weblog_p 1 +} + set portrait_p 0 if {[ad_parameter "show_portrait_p" dotlrn]} { set portrait_p 1 @@ -114,6 +126,9 @@ db_multirow user_contributions user_contributions {} set folder_id [dotlrn_fs::get_user_shared_folder -user_id $user_id] +set scope_fs_url "/packages/file-storage/www/folder-chunk" +set n_past_days "" +set url [site_node_object_map::get_url -object_id $folder_id] set context_bar [ad_context_bar_ws_or_index "[_ dotlrn.Community_member]"] set system_name [ad_system_name] Index: openacs-4/packages/dotlrn/www/community-type.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-type.adp,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/community-type.adp 23 Oct 2002 12:38:39 -0000 1.10 +++ openacs-4/packages/dotlrn/www/community-type.adp 4 Dec 2002 09:51:04 -0000 1.11 @@ -43,3 +43,4 @@

    + Index: openacs-4/packages/dotlrn/www/configure.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/configure.adp,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/dotlrn/www/configure.adp 23 Oct 2002 12:38:39 -0000 1.15 +++ openacs-4/packages/dotlrn/www/configure.adp 4 Dec 2002 09:51:04 -0000 1.16 @@ -18,13 +18,14 @@ %> - -#dotlrn.Customize_Layout# -0 + +#dotlrn.Configure_name# +@portal_id@ +1 +1 +1 +./

    @rendered_page@ - - - Index: openacs-4/packages/dotlrn/www/configure.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/configure.tcl,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/dotlrn/www/configure.tcl 23 Oct 2002 12:38:39 -0000 1.17 +++ openacs-4/packages/dotlrn/www/configure.tcl 4 Dec 2002 09:51:04 -0000 1.18 @@ -44,25 +44,14 @@ } else { set user_id [ad_conn user_id] - # am i not a limited access user with 0 or 1 communities? - # if so, i have a user portal that i can configure - if {![dotlrn::user_can_browse_p -user_id $user_id]} { - - set communities [dotlrn_community::get_all_communities_by_user $user_id] - - if {[llength $communities] == 0} { - ad_returnredirect "index-not-a-user" - ad_script_abort - } elseif {[llength $communities] == 1} { - ad_returnredirect [ns_set get [lindex $communities 0] url] - ad_script_abort - } - - } + # I don't see under what circumstance we wouldn't want users to + # customize thier own portal. -Caroline. + # dotlrn::require_user_browse -user_id $user_id + set portal_id [dotlrn::get_portal_id -user_id $user_id] set name [portal::get_name $portal_id] - set rendered_page [portal::configure $portal_id "index"] + set rendered_page [portal::configure -allow_theme_change_p 0 $portal_id "index"] } ad_return_template Index: openacs-4/packages/dotlrn/www/control-panel.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/control-panel.adp,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/control-panel.adp 21 Nov 2002 15:18:50 -0000 1.6 +++ openacs-4/packages/dotlrn/www/control-panel.adp 4 Dec 2002 09:51:04 -0000 1.7 @@ -24,25 +24,64 @@ <% set dotlrn_url [dotlrn::get_url] %> + + +
    + + + + + + + + + -
    - -
    + + +
    #dotlrn.lt_Help_and_Personal_Con#
    + +
    +

    #dotlrn.General_Site_Help#

    +

    #dotlrn.Personal_Options#

    + +
    +
    + +
    + + + + + + + + + + + + +
    #dotlrn.lt_JoinDrop_Classes_or_C#
    + +
    +
    Index: openacs-4/packages/dotlrn/www/control-panel.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/control-panel.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/control-panel.tcl 23 Oct 2002 12:38:39 -0000 1.4 +++ openacs-4/packages/dotlrn/www/control-panel.tcl 4 Dec 2002 09:51:04 -0000 1.5 @@ -36,11 +36,12 @@ # Make sure user is logged in set user_id [ad_maybe_redirect_for_registration] -set title "[_ dotlrn.Control_Panel]" +set title [parameter::get -localize -parameter admin_page_name] set admin_p [dotlrn::admin_p] set admin_url "[dotlrn::get_url]/admin" set referer [ns_conn url] set admin_pretty_name [parameter::get -localize -parameter dotlrn_admin_pretty_name] +set system_owner [ad_system_owner] ad_return_template Index: openacs-4/packages/dotlrn/www/deregister-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister-confirm.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/deregister-confirm.adp 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,69 @@ +<% + + # + # Copyright (C) 2001, 2002 MIT + # + # This file is part of dotLRN. + # + # dotLRN is free software; you can redistribute it and/or modify it under the + # terms of the GNU General Public License as published by the Free Software + # Foundation; either version 2 of the License, or (at your option) any later + # version. + # + # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + # details. + # + +%> + + +#dotlrn.Confirm_Drop# + +#dotlrn.lt_You_are_about_to_dele# + + + #dotlrn.lt_Note_This_process_is_# + + + #dotlrn.lt_Note_This_process_is__1# + + +

    + + #dotlrn.lt_Do_you_really_want_to# + + + #dotlrn.lt_Do_you_really_want_to_1# + + +

    + +@hidden_user_ids@ +
      + + +
    • @users_pending_drop.first_names@ @users_pending_drop.last_name@ + + +
    + + + + + + + +
    + + + +
    + +
    +
    + +

    +#dotlrn.lt_Note_The_script_will_# + Index: openacs-4/packages/dotlrn/www/deregister-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister-confirm.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/deregister-confirm.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,57 @@ +# +# Copyright (C) 2001, 2002 MIT +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + deregister-confirm + + @author Tracy Adams (teadams@alum.mit.edu) + @creation-date 2002-29-08 + @version $Id: deregister-confirm.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} -query { + {user_id:integer,multiple,notnull} + {community_id ""} + {referer ""} +} + +ad_maybe_redirect_for_registration + +set time_per_user 15 +set num_users_display_limit 99 + +set num_users [llength $user_id] +set num_seconds [expr $time_per_user*$num_users] +set num_minutes [expr $num_seconds/60] + +# Note: This query will not work (in Oracle) +# if num_users_display_limit is over 100. + +if {$num_users < $num_users_display_limit} { + db_multirow users_pending_drop select_users_pending_drop {} +} + +set hidden_user_ids "" + +foreach member_id $user_id { + append hidden_user_ids "" +} + +ad_return_template + + + + + + Index: openacs-4/packages/dotlrn/www/deregister-confirm.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister-confirm.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/deregister-confirm.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,16 @@ + + + + + + + select user_id, + first_names, + last_name + from dotlrn_users + where user_id in ([join $user_id ","]) + order by last_name asc + + + + Index: openacs-4/packages/dotlrn/www/deregister-link.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister-link.adp,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/deregister-link.adp 12 Nov 2002 08:44:05 -0000 1.8 +++ openacs-4/packages/dotlrn/www/deregister-link.adp 4 Dec 2002 09:51:04 -0000 1.9 @@ -18,4 +18,8 @@ %> -#dotlrn.Drop_Membership#@label@ +

    +#dotlrn.Drop_Membership#@label@ +
    + + Index: openacs-4/packages/dotlrn/www/deregister.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/deregister.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/deregister.tcl 23 Oct 2002 12:38:39 -0000 1.6 +++ openacs-4/packages/dotlrn/www/deregister.tcl 4 Dec 2002 09:51:04 -0000 1.7 @@ -22,11 +22,20 @@ @creation-date 2001-10-06 @version $Id$ } -query { - {user_id ""} + {user_id:multiple,integer ""} {community_id ""} {referer "./"} } + +# This page was modified to allow more that one user to be dropped at a time. +# This one done so there is one consistent way of dropping members. +# +# The parameter "user_id" was kept so that other entry points (both current +# and those that might occur in the future from OpenACS and other changes) +# wouldn't break. This does have the unfortunate consequence that the name +# user_id is not intuative when it is a list of many user_ids. (teadams@alum.mit.edu) + ad_maybe_redirect_for_registration if {[empty_string_p $community_id]} { @@ -39,7 +48,28 @@ dotlrn::require_user_admin_community -community_id $community_id } -dotlrn_community::remove_user $community_id $user_id +foreach member_id $user_id { + + # This is catch most double clicks. + # The catch will take care of cases where the double click is too fast. + if {[dotlrn_community::member_p $community_id $member_id]} { + if {[catch { + dotlrn_community::remove_user $community_id $member_id + } errmsg]} { + + if {![dotlrn_community::member_p $community_id $user_id]} { + # assume this was a double click + ad_returnredirect $referer + ad_script_abort + } else { + ns_log Error "deregister.tcl failed: $errmsg" + ReturnHeaders + ad_return_error "[_ dotlrn.lt_Error_removing_user_c]" "[_ dotlrn.lt_An_error_occured_whil_1]" + } + } + } +} + ad_returnredirect $referer Index: openacs-4/packages/dotlrn/www/dotlrn-default-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/dotlrn-default-master.adp,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/dotlrn-default-master.adp 23 Oct 2002 12:38:39 -0000 1.12 +++ openacs-4/packages/dotlrn/www/dotlrn-default-master.adp 4 Dec 2002 09:51:04 -0000 1.13 @@ -36,9 +36,8 @@ + - - Index: openacs-4/packages/dotlrn/www/dotlrn-default-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/dotlrn-default-master.tcl,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/dotlrn/www/dotlrn-default-master.tcl 23 Oct 2002 12:38:39 -0000 1.20 +++ openacs-4/packages/dotlrn/www/dotlrn-default-master.tcl 4 Dec 2002 09:51:04 -0000 1.21 @@ -210,7 +210,7 @@ set header_font_color "black" set header_logo_item_id "" set header_img_url "$dotlrn_graphics_url/logowhite.gif" -set header_img_alt_text "[_ dotlrn.Header_Logo]" +set header_img_alt_text "[_ dotlrn.header_logo]" if {[empty_string_p [dotlrn_community::get_parent_community_id -package_id $package_id]]} { set parent_comm_p 0 Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql 17 Jun 2002 21:57:20 -0000 1.6 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet-oracle.xql 4 Dec 2002 09:51:04 -0000 1.7 @@ -10,11 +10,11 @@ decode(dotlrn_communities.community_type, 'dotlrn_community', 'dotlrn_community', 'dotlrn_club', 'dotlrn_club', 'dotlrn_class_instance') as simple_community_type, + decode(dotlrn_community_admin_p(dotlrn_communities.community_id, dotlrn_member_rels_approved.user_id),'f',0,1) as admin_p, tree.tree_level(dotlrn_communities.tree_sortkey) as tree_level, nvl((select tree.tree_level(dotlrn_community_types.tree_sortkey) from dotlrn_community_types - where dotlrn_community_types.community_type = dotlrn_communities.community_type), 0) as community_type_level, - acs_permission.permission_p(dotlrn_communities.community_id, :user_id, 'admin') as admin_p + where dotlrn_community_types.community_type = dotlrn_communities.community_type), 0) as community_type_level from dotlrn_communities, dotlrn_member_rels_approved where dotlrn_communities.community_id = dotlrn_member_rels_approved.community_id Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp,v diff -u -N -r1.33 -r1.34 --- openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp 23 Oct 2002 12:38:39 -0000 1.33 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.adp 4 Dec 2002 09:51:04 -0000 1.34 @@ -18,8 +18,6 @@ %> -<% set dotlrn_url [dotlrn::get_url] %> - #dotlrn.lt_JoinDrop_a_Class_or_C# ]

    @@ -35,35 +33,51 @@ set depth 0 %> +

    -
  • <%= [parameter::get -localize -parameter class_instances_pretty_plural] %>: + <%= [parameter::get -localize -parameter class_instances_pretty_plural] %>: -
  • <%= [parameter::get -localize -parameter clubs_pretty_plural] %>: + <%= [parameter::get -localize -parameter clubs_pretty_plural] %>: +
  • <% set new_level $communities(tree_level) %> -<% incr depth -1 %> + <% incr depth -1 %> - + + <% while {$depth > 1} { + append close_tags "" + incr depth -1 + } + %> + @close_tags@ + +
    <% incr depth 1 %>
      +
    • @communities.pretty_name@ - - [ - #dotlrn.Administer# - ] - + +   [ + #dotlrn.Drop_Membership# + ] + +   [ + #dotlrn.Administer# + ] + +
    • @@ -81,5 +95,3 @@ - - Index: openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl 23 Oct 2002 12:38:39 -0000 1.10 +++ openacs-4/packages/dotlrn/www/dotlrn-main-portlet.tcl 4 Dec 2002 09:51:04 -0000 1.11 @@ -21,8 +21,13 @@ @author Arjun Sanyal (arjun@openforce.net) @version $Id$ +} { } +if {![exists_and_not_null show_buttons_p]} { + set show_buttons_p 0 +} + set user_id [ad_conn user_id] set user_can_browse_p [dotlrn::user_can_browse_p -user_id $user_id] @@ -36,5 +41,6 @@ } } -ad_return_template +set dotlrn_url [dotlrn::get_url] +ad_return_template Index: openacs-4/packages/dotlrn/www/dotlrn-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/dotlrn-master.adp,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/dotlrn/www/dotlrn-master.adp 18 Nov 2002 13:42:08 -0000 1.15 +++ openacs-4/packages/dotlrn/www/dotlrn-master.adp 4 Dec 2002 09:51:04 -0000 1.16 @@ -1,6 +1,5 @@ <% - # # Copyright (C) 2001, 2002 MIT # # This file is part of dotLRN. @@ -14,87 +13,82 @@ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more # details. + + + # /www/dotlrn-default-master.adp # + # This is the 'default-master' template for dotlrn sites. + # + # Author: Arjun Sanyal (arjun@openforce.net), yon@openforce.net + # + # $Id$ -%> - +%> + + + @title@ @header_stuff@ + + - @body_attributes.key@="@body_attributes.value@"> + - - - - - - -
      - - - - - -
      -
      @contents.name@ -( new ) +( #dotlrn.new# )   @@ -82,7 +82,7 @@
      -

      Folder @folder_name@ is empty

      +

      #dotlrn.lt_Folder_folder_name_is#

      Index: openacs-4/packages/dotlrn/www/help.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/help.adp,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/help.adp 23 Oct 2002 12:38:39 -0000 1.7 +++ openacs-4/packages/dotlrn/www/help.adp 4 Dec 2002 09:51:04 -0000 1.8 @@ -19,9 +19,114 @@ %> -#dotlrn.Help# +#dotlrn.help# -#dotlrn.lt_This_page_will_eventu# +

      Editing Personal Information | Joining/Dropping + Groups | Requesting a New Group | Sending Bulk Email + | Modifying Your Forum Email Alerts| Additional Help

      +

      Editing Personal Information
      + You can change your personal information at any time. This enables you to protect + your password, correct or change your full name, publish a URL for a your website, + and change your login name/email address. If you do not keep this login name + the same as your current email address or a forwarding address, you will not + receive group emails and forum alerts from SloanSpace.

      +

      To Change Password:
      + +

    • Login and go to your Control Panel page
      + +
    • If you do not have a personal portal, click on the Help icon in the group + banner to get to your Control Panel.
      +
    • Click on "Change My Password"
      +
    • Enter your new password twice and click "Update." +

      To change personal information:
      + +

    • Login and go to your Control Panel page
      +
    • If you do not have a personal portal, click on the Help icon in the group + banner to get to your Control Panel.
      +
    • Click on "Edit My Personal Information"
      +
    • Edit your full name, your email address (which also changes your login + name to the system) and/or your personal URL.
      + +
    • Click "Update." +

      Joining/Dropping Groups
      + There are three types of groups: classes, communities and subgroups (of classes + and communities). Limited Access users (non-affiliated) cannot join + or drop groups.

      +

      To join/drop classes and communities:
      +

    • Go to your personal Home page, MySpace.
      +
    • Click on "Join/Drop a Class or Community Group" in the Groups + portlet.
      +
    • On the top of the page, you will see the list of your current class + and community memberships.
      +
    • Beside each group name is a "Drop Membership" icon.
      +
    • Scroll down the page to view the list of open classes and communities.
      +
    • Join any one by clicking on the join icon to the right of the group + name.
      +
    • Some groups have an approval process. For those, the link is called + "Request Membership."
      + +
    • An email will be sent to the group administrator who will approve/disapprove + your request and reply to you. +

      To join/drop subgroups:
      +

    • Since subgroups are subsets of groups, their memberships are handled + within the groups.
      +
    • Go to your personal Home page, MySpace.
      +
    • Go to the class or community through the link in the Groups portlet.
      +
    • Locate the Subgroups portlet on the class or community portal pages.
      +
    • Click the "Join/Drop a Subgroup" link.
      +
    • Click the "join" or "drop" link next to the desired + subgroup.
      +
    • Your membership status will change when the page reloads.
      + +
    • Then, return to the Subgroup Home page or MySpace to continue. +

      Requesting a New Class or Community
      + The Site Wide Administrator handles class and community requests.

      +

      To request a new class or to copy and reuse a class from a previous semester:
      + Send email to sloanspace_help@sloan.mit.edu. For a new class, include the class + number, class title, professor(s), teaching assistants and course assistants. + You will be notified by email when the shell is created. To copy and reuse a + class, you need only email sloanspace_help@sloan.mit.edu with the number, name + and previous semester of the course. Include professor, teaching assistant and + course assistant information if any of that has changed. The "recycled" + class will contain all old content, but the student list will be cleared.

      +

      To request a new community:
      + Send email to sloanspace-help@sloan.mit.edu. Include the name of the community, + a brief description of its purpose, the faculty or staff sponsor, the name(s) + of any persons who will need to be administrators of this community. You will + be notified by email when the community shell has been created.

      +

      Bulk Mail
      + Class and community administrators can send group emails through the group Control + Panel page. If enabled, class and community members can send group emails through + the "Email Members" links on the user Control Panel page.

      +

      To send a group email:
      + +

    • For admins, go to group Control Panel and click "New Bulk Mail." +
      + +
    • For students in classes, go to the Staff List portlet and click on Member + List.
      +
    • Click "Email Members."
      +
    • Select roles to email: Members or Administrators.
      +
    • Fill out subject heading and enter message.
      +
    • Select Send date and time and click "Submit."
      +
    • Review the message and click "Confirm."
      + +
    • The email is sent to all members with the role chosen. Group admins can view + the bulk mail history from the group Control Panel page. + +

      Modifying Your Forum Email Alerts
      + You can subscribe and unsubscribe to email alerts for any forum open to you + through the "Edit My Forum Email Alerts" link on the user Control Panel page. + Limited Access users can access their Control Panel through the Help icon + in the group banner.

      + +

      Additional Help
      + If your specific question is not answered here, consult the User or Admin + Handbooks located in the file storage area of the STS-Sloanwide community. + If you still cannot find the answer to your question or problem, email the + Site Wide Administrator at sloanspace-help@sloan.mit.edu.

      +

      +


      +

      - - Index: openacs-4/packages/dotlrn/www/join-policy-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/join-policy-toggle.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/join-policy-toggle.tcl 23 Oct 2002 12:38:39 -0000 1.6 +++ openacs-4/packages/dotlrn/www/join-policy-toggle.tcl 4 Dec 2002 09:51:04 -0000 1.7 @@ -31,7 +31,7 @@ [string equal $policy "needs approval"] == 1 || [string equal $policy "closed"] == 1 )} { - ad_complain {policy must be one of: open, needs approval, or closed} + ad_complain [_ dotlrn.lt_policy_must_be_one_of] } } } Index: openacs-4/packages/dotlrn/www/manage-memberships.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/manage-memberships.adp,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/manage-memberships.adp 23 Oct 2002 12:38:39 -0000 1.18 +++ openacs-4/packages/dotlrn/www/manage-memberships.adp 4 Dec 2002 09:51:04 -0000 1.19 @@ -41,9 +41,9 @@ -

      <%= [parameter::get -localize -parameter class_instances_pretty_plural] %>

      + + -
      +
      <%= [parameter::get -localize -parameter departments_pretty_name] %>:  @@ -52,24 +52,25 @@ #dotlrn.Term# 
      - - +
      + - + - + - + @@ -78,7 +79,7 @@ - + @@ -90,31 +91,29 @@ -

      <%= [parameter::get -localize -parameter clubs_pretty_plural] %>

      - -
      <%= [parameter::get -localize -parameter class_instances_pretty_name] %> #dotlrn.Name# #dotlrn.Term# #dotlrn.Role##dotlrn.Actions##dotlrn.Actions#
      @member_classes.pretty_name@ @member_classes.term_name@ @member_classes.term_year@[ #dotlrn.Pending_Approval# ] []
      - +
      + - + - + - + - + @@ -127,15 +126,14 @@ -
      +
      -

      #dotlrn.Join_A_Group#

      +

      #dotlrn.Join_A_Group#

      -

      <%= [parameter::get -localize -parameter class_instances_pretty_plural] %>

      - -
      <%= [parameter::get -localize -parameter clubs_pretty_name] %> #dotlrn.Name# #dotlrn.Role##dotlrn.Actions##dotlrn.Actions#
      @member_clubs.pretty_name@ @member_clubs.role@ [ #dotlrn.Pending_Approval# ] []
      +
      + +
      <%= [parameter::get -localize -parameter departments_pretty_name] %>:  @@ -144,33 +142,34 @@ #dotlrn.Term# 
      - - +
      + - + - + - + - + - + @@ -182,33 +181,32 @@ -

      <%= [parameter::get -localize -parameter clubs_pretty_plural] %>

      - -
      <%= [parameter::get -localize -parameter class_instances_pretty_name] %> #dotlrn.Name# #dotlrn.Term#  #dotlrn.Actions##dotlrn.Actions#
      @non_member_classes.pretty_name@ @non_member_classes.term_name@ @non_member_classes.term_year@   [] []
      - +

      +

      + - + - + - + - + - + @@ -220,6 +218,3 @@ - - - Index: openacs-4/packages/dotlrn/www/member-add-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add-2.adp,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/dotlrn/www/member-add-2.adp 20 Nov 2002 15:17:54 -0000 1.14 +++ openacs-4/packages/dotlrn/www/member-add-2.adp 4 Dec 2002 09:51:04 -0000 1.15 @@ -21,8 +21,15 @@ #dotlrn.Add_A_Member# -#dotlrn.Youre_adding# @first_names@ @last_name@ (@email@):

      + +#dotlrn.lt_strongfirst_names_las# + + + +#dotlrn.lt_You_are_adding_strong#

      + +
      @@ -37,3 +44,4 @@ + Index: openacs-4/packages/dotlrn/www/member-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add-2.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/member-add-2.tcl 23 Oct 2002 12:38:39 -0000 1.10 +++ openacs-4/packages/dotlrn/www/member-add-2.tcl 4 Dec 2002 09:51:04 -0000 1.11 @@ -41,6 +41,18 @@ where user_id = :user_id } +set community_name [dotlrn_community::get_community_name $community_id] + +# See if the user is already in the group +set member_p [dotlrn_community::member_p $community_id $user_id] + +if {$member_p} { + set existing_role [dotlrn_community::get_role_pretty_name -community_id $community_id -rel_type [db_string select_role {}]] + if {[empty_string_p $existing_role]} { + set existing_role "member" + } +} + # Depending on the community_type, we have allowable rel_types set rel_types [dotlrn_community::get_roles -community_id $community_id] Index: openacs-4/packages/dotlrn/www/member-add-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add-2.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/member-add-2.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,18 @@ + + + + oracle8.1.6 + + + + select dotlrn_member_rels_approved.rel_type + from dotlrn_member_rels_approved + where dotlrn_member_rels_approved.community_id = :community_id + and dotlrn_member_rels_approved.user_id = :user_id + + + + + + + Index: openacs-4/packages/dotlrn/www/member-add-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add-3.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/member-add-3.tcl 23 Oct 2002 12:38:39 -0000 1.6 +++ openacs-4/packages/dotlrn/www/member-add-3.tcl 4 Dec 2002 09:51:04 -0000 1.7 @@ -28,7 +28,14 @@ } set community_id [dotlrn_community::get_community_id] +# See if the user is already in the group +set member_p [dotlrn_community::member_p $community_id $user_id] +if {$member_p} { + dotlrn_community::remove_user $community_id $user_id +} + + # Add the relation dotlrn_community::add_user -rel_type $rel_type $community_id $user_id Index: openacs-4/packages/dotlrn/www/member-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add.adp,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/member-add.adp 23 Oct 2002 12:38:39 -0000 1.12 +++ openacs-4/packages/dotlrn/www/member-add.adp 4 Dec 2002 09:51:04 -0000 1.13 @@ -22,12 +22,16 @@ #dotlrn.Add_A_Member# @context_bar@ + + #dotlrn.there_are_no_users_matching# + + + #dotlrn.lt_The_results_of_your_s# + +

      - - - Index: openacs-4/packages/dotlrn/www/member-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/member-add.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/member-add.tcl 23 Oct 2002 12:38:39 -0000 1.8 +++ openacs-4/packages/dotlrn/www/member-add.tcl 4 Dec 2002 09:51:04 -0000 1.9 @@ -26,6 +26,7 @@ {referer "one-community-admin"} } +set search_text [string trim $search_text] set community_id [dotlrn_community::get_community_id] # Just search Index: openacs-4/packages/dotlrn/www/members-chunk-table-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members-chunk-table-oracle.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn/www/members-chunk-table-oracle.xql 24 Jul 2002 14:00:39 -0000 1.3 +++ openacs-4/packages/dotlrn/www/members-chunk-table-oracle.xql 4 Dec 2002 09:51:04 -0000 1.4 @@ -15,20 +15,16 @@ from registered_users, dotlrn_member_rels_approved where dotlrn_member_rels_approved.community_id = :community_id - and dotlrn_member_rels_approved.user_id = registered_users.user_id - order by decode(role, + and dotlrn_member_rels_approved.user_id = + registered_users.user_id order by decode(role, 'instructor',1, 'admin',2, 'teaching_assistant',3, 'course_assistant',4, 'course_admin',5, 'student',6, - 'member',7), - last_name - -- note, last_name should be sorted by $ order, but b/c this - -- query gets called by ad_table, ad_table would have to know - -- to uplevel order.. not going to happen. So no reversals on - -- last name for now, sorry. + 'member',7), $order_by + Index: openacs-4/packages/dotlrn/www/members-chunk-table-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members-chunk-table-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/members-chunk-table-postgresql.xql 23 Jul 2002 13:40:45 -0000 1.2 +++ openacs-4/packages/dotlrn/www/members-chunk-table-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.3 @@ -31,12 +31,7 @@ WHEN role = 'member' THEN 7 END - ) asc, - last_name - -- note, last_name should be sorted by the variable order, but b/c this - -- query gets called by ad_table, ad_table would have to know to uplevel - -- order.. not going to happen. So no reversals on last name for now, - -- sorry. + ) asc, $order_by Index: openacs-4/packages/dotlrn/www/members-chunk-table.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members-chunk-table.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/members-chunk-table.adp 12 Nov 2002 08:44:05 -0000 1.9 +++ openacs-4/packages/dotlrn/www/members-chunk-table.adp 4 Dec 2002 09:51:04 -0000 1.10 @@ -20,24 +20,101 @@

      #dotlrn.Members_of# <%= [dotlrn_community::get_community_name $community_id] %>

      -@table@ + + + #dotlrn.Add_A_Member# + + + +
      +
      + + +
      <%= [parameter::get -localize -parameter clubs_pretty_name] %> #dotlrn.Name#    #dotlrn.Actions##dotlrn.Actions#
      @non_member_clubs.pretty_name@     [] []
      + + + + + + + + + + + + + + + + + + + + + + + +
        + #dotlrn.First_Name# @first_names_order_html@ + + #dotlrn.Last_Name# @last_name_order_html@ + + #dotlrn.Email_1# @email_order_html@ + #dotlrn.Role##dotlrn.Actions#
      + + + + <%=[acs_community_member_link -user_id @current_members.user_id@ -label @current_members.first_names@] %><%=[acs_community_member_link -user_id @current_members.user_id@ -label @current_members.last_name@]%> + + + @current_members.email@ + + + + + @current_members.email@ + + +   + + + + <%=[template::util::nvl [dotlrn_community::get_role_pretty_name -community_id @community_id@ -rel_type @current_members.rel_type@] "Student"]%> + + +   #dotlrn.Drop_Membership# | #dotlrn.User_Admin_Page# + + + + #dotlrn.Drop_Membership# + + +   + + +
      + +

      + + + + + + +


        -
      • -
        - #dotlrn.Add_A_Member# - -
        +
      • <% set dotlrn_admin_url [dotlrn::get_admin_url] %>
      • - + #dotlrn.lt_Add_members_to_anothe#
      • Index: openacs-4/packages/dotlrn/www/members-chunk-table.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members-chunk-table.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/members-chunk-table.tcl 12 Nov 2002 08:44:05 -0000 1.18 +++ openacs-4/packages/dotlrn/www/members-chunk-table.tcl 4 Dec 2002 09:51:04 -0000 1.19 @@ -23,7 +23,8 @@ @version $Id$ } -query { {parent_user_role:multiple,array,optional} - {orderby "role"} + {order "last_name"} + {order_direction "asc"} } -properties { users:multirow n_parent_users:onevalue @@ -58,92 +59,58 @@ } } -# Get all users for this community, including role -set community_members [dotlrn_community::list_users $community_id] -set table_def [list] +if {[string compare $order_direction "asc"]==0} { + set order_html "" + set opposite_order_direction "desc" +} else { + set order_html "" + set opposite_order_direction "asc" +} -lappend table_def [list \ - first_names \ - [_ dotlrn.First_Names] \ - {upper(first_names) $order} \ - {[acs_community_member_link -user_id $user_id -label $first_names]} \ -] +# Variables that will be used if the column +# is not selected. +set first_names_order_html "" +set last_name_order_html "" +set email_order_html "" -lappend table_def [list \ - last_name \ - [_ dotlrn.Last_Name] \ - {upper(last_name) $order} \ - {[acs_community_member_link -user_id $user_id -label $last_name]} \ -] +set first_names_order_direction $order_direction +set last_name_order_direction $order_direction +set email_order_direction $order_direction -if {$read_private_data_p || [string equal $my_user_id \$user_id]} { - lappend table_def [list \ - email \ - [_ dotlrn.Email_1] \ - {upper(email) $order, upper(role)} \ - {$email} \ - ] -} else { - lappend table_def [list \ - email \ - [_ dotlrn.Email_1] \ - {upper(email) $order, upper(role)} \ - { } \ - ] + +# Special case for the selected column. +switch $order { + "first_names" { + set first_names_order_html $order_html + set first_names_order_direction $opposite_order_direction + } + "last_name" { + set last_name_order_html $order_html + set last_name_order_direction $opposite_order_direction + } + "email" { + set email_order_html $order_html + set email_order_direction $opposite_order_direction + } } -lappend table_def [list \ - role \ - [_ dotlrn.Role] \ - {decode(role,'instructor',1,'admin',2,'teaching_assistant',3,'course_assistant',4,'course_admin',5,'student',6,'member',7) asc, last_name $order} \ - {[dotlrn_community::get_role_pretty_name -community_id $community_id -rel_type $rel_type]} \ -] +# vars to carry over (from previous script) +# Do a special clause for role! -if {$site_wide_admin_p} { - lappend table_def [list \ - manage \ - [_ dotlrn.Actions] \ - {} \ - {\[ [_ dotlrn.Drop_Membership] | [_ dotlrn.Manage] \]} \ - ] -} elseif {$admin_p} { - lappend table_def [list \ - manage \ - [_ dotlrn.Actions] \ - {} \ - {\[ Drop Membership \]} \ - ] -} else { - lappend table_def [list \ - manage \ - [_ dotlrn.Actions] \ - {} \ - { - [eval { - if {$my_user_id == $user_id} { - return "\[ [_ dotlrn.Drop_nbsp_Membership] \]" - } else { - return " " - } - }] - } \ - ] -} +# The note in the members-chunk-table.xql indicated that +# it would be very hard to make sorting work with ad_table +# and sorting by columns functionality was incomplete. After +# struggling with ad_table for a while, I went to the +# OpenACS IRC and asked some questions. The response +# basically was that ad_table needs a refactoring. +# Therefore, I (teadams@alum.mit.edu) decided to +# simplify and use db_multirow and code my own column +# sorting. -set table [ad_table \ - -Tmissing_text "
        [_ dotlrn.No_members]
        " \ - -Textra_vars {referer my_user_id community_id rel_type} \ - -Torderby $orderby \ - select_current_members \ - "" \ - $table_def -] +set order_by "$order $order_direction" -set user_list [list] -foreach user $community_members { - lappend user_list [ns_set get $user user_id] -} +db_multirow current_members select_current_members {} db_multirow pending_users select_pending_users { select dotlrn_users.*, Index: openacs-4/packages/dotlrn/www/members.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members.adp,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/dotlrn/www/members.adp 12 Nov 2002 08:44:05 -0000 1.17 +++ openacs-4/packages/dotlrn/www/members.adp 4 Dec 2002 09:51:04 -0000 1.18 @@ -20,5 +20,14 @@ #dotlrn.Manage_Membership# +1 + + + + + + Index: openacs-4/packages/dotlrn/www/members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/members.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/members.tcl 23 Oct 2002 12:38:39 -0000 1.18 +++ openacs-4/packages/dotlrn/www/members.tcl 4 Dec 2002 09:51:04 -0000 1.19 @@ -34,4 +34,5 @@ set community_id [dotlrn_community::get_community_id] set portal_id [dotlrn_community::get_portal_id -community_id $community_id] set admin_p [dotlrn::user_can_admin_community_p -user_id [ad_get_user_id] -community_id $community_id] - +set spam_p [dotlrn::user_can_spam_community_p -user_id [ad_get_user_id] -community_id $community_id] +set return_url "[ns_conn url]?[ns_conn query]" Index: openacs-4/packages/dotlrn/www/my-communities-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/my-communities-oracle.xql,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/my-communities-oracle.xql 31 May 2002 15:14:45 -0000 1.8 +++ openacs-4/packages/dotlrn/www/my-communities-oracle.xql 4 Dec 2002 09:51:04 -0000 1.9 @@ -14,7 +14,7 @@ dotlrn_member_rels_approved.rel_type, dotlrn_member_rels_approved.role, '' as role_pretty_name, - decode(dotlrn_community.admin_p(dotlrn_communities.community_id, dotlrn_member_rels_approved.user_id),'f',0,1) as admin_p + decode(dotlrn_community_admin_p(dotlrn_communities.community_id, dotlrn_member_rels_approved.user_id),'f',0,1) as admin_p from dotlrn_communities, dotlrn_member_rels_approved where dotlrn_member_rels_approved.user_id = :user_id Index: openacs-4/packages/dotlrn/www/my-communities-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/my-communities-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/my-communities-postgresql.xql 15 Jul 2002 20:12:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/my-communities-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -16,7 +16,7 @@ '' as role_pretty_name, CASE WHEN - dotlrn_community__admin_p(dotlrn_communities.community_id, + dotlrn_community_admin_p(dotlrn_communities.community_id, dotlrn_member_rels_approved.user_id) = 'f' THEN 0 ELSE 1 Index: openacs-4/packages/dotlrn/www/my-communities.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/my-communities.adp,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/my-communities.adp 23 Oct 2002 12:38:39 -0000 1.13 +++ openacs-4/packages/dotlrn/www/my-communities.adp 4 Dec 2002 09:51:04 -0000 1.14 @@ -26,15 +26,12 @@ @communities.pretty_name@ @communities.role_pretty_name@ - [ + - #dotlrn.Administer# - | - #dotlrn.Email_Members# - | + #dotlrn.Administer# - - ] + + Index: openacs-4/packages/dotlrn/www/one-community-portal-configure-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-portal-configure-2.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/one-community-portal-configure-2.tcl 23 Oct 2002 12:38:39 -0000 1.6 +++ openacs-4/packages/dotlrn/www/one-community-portal-configure-2.tcl 4 Dec 2002 09:51:04 -0000 1.7 @@ -21,12 +21,12 @@ @version $Id$ } -query { } - +ns_log warning "starting one-community-portal-configure" set form [ns_getform] set portal_id [ns_set get $form portal_id] set return_url [ns_set get $form return_url] set anchor [ns_set get $form anchor] - +ns_log warning "about to call dispatch" portal::configure_dispatch -portal_id $portal_id -form $form #ad_return_complaint 1 "one-community-portal-configure?portal_id=$portal_id&referer=$return_url#$anchor" Index: openacs-4/packages/dotlrn/www/one-community-portal-configure.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community-portal-configure.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/one-community-portal-configure.tcl 23 Oct 2002 12:38:39 -0000 1.4 +++ openacs-4/packages/dotlrn/www/one-community-portal-configure.tcl 4 Dec 2002 09:51:04 -0000 1.5 @@ -32,6 +32,7 @@ -community_id [dotlrn_community::get_community_id] set rendered_page [portal::configure \ + -allow_theme_change_p "0" \ [dotlrn_community::get_portal_id] \ $referer ] Index: openacs-4/packages/dotlrn/www/one-community.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/one-community.adp,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/dotlrn/www/one-community.adp 23 Oct 2002 12:38:39 -0000 1.23 +++ openacs-4/packages/dotlrn/www/one-community.adp 4 Dec 2002 09:51:04 -0000 1.24 @@ -20,6 +20,8 @@ +

        + @rendered_page@ Index: openacs-4/packages/dotlrn/www/register-link.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/register-link.adp,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/dotlrn/www/register-link.adp 21 Nov 2002 10:26:43 -0000 1.11 +++ openacs-4/packages/dotlrn/www/register-link.adp 4 Dec 2002 09:51:04 -0000 1.12 @@ -17,5 +17,8 @@ # %> +
        + #dotlrn.Join#@label@@label@ +
        -#dotlrn.Join#@label@ + Index: openacs-4/packages/dotlrn/www/register.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/register.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/register.tcl 23 Oct 2002 12:38:39 -0000 1.8 +++ openacs-4/packages/dotlrn/www/register.tcl 4 Dec 2002 09:51:04 -0000 1.9 @@ -45,14 +45,95 @@ where community_id = :community_id }] -switch -exact $join_policy { - "open" { - dotlrn_community::add_user -member_state approved $community_id $user_id + +# Check to see if the user is member already. +# This should prevent most double clicks, leaving +# the catch below to trap the rest. + +if {[dotlrn_community::member_p $community_id $user_id]} { + ad_returnredirect $referer + ad_script_abort +} + + +if {[catch { + switch -exact $join_policy { + "open" { + dotlrn_community::add_user -member_state approved $community_id $user_id + } + "needs approval" { + dotlrn_community::add_user -member_state "needs approval" $community_id $user_id + + # Following the same proccess as spam.tcl to email + # admins in bulk. + + set segment_id [db_string select_admin_rel_segment_id {}] + set community_name [dotlrn_community::get_community_name $community_id] + set community_url "[ad_parameter -package_id [ad_acs_kernel_id] SystemURL][dotlrn_community::get_community_url $community_id]" + + set query "select parties.email, + decode(acs_objects.object_type, + 'user', + (select first_names + from persons + where person_id = parties.party_id), + 'group', + (select group_name + from groups + where group_id = parties.party_id), + 'rel_segment', + (select segment_name + from rel_segments + where segment_id = parties.party_id), + '') as first_names, + decode(acs_objects.object_type, + 'user', + (select last_name + from persons + where person_id = parties.party_id), + '') as last_name + from party_approved_member_map, + parties, + acs_objects + where party_approved_member_map.party_id = $segment_id + and party_approved_member_map.member_id <> $segment_id + and party_approved_member_map.member_id = parties.party_id + and parties.party_id = acs_objects.object_id" + + + set full_name "[dotlrn::get_user_name $user_id]" + set email "[cc_email_from_party $user_id]" + set subject "$full_name ($email) has requested to join $community_name." + + set message "$full_name ($email) has requested to join $community_name. + +Visit this link to approve or reject this request: +$community_url/members + + " + + bulk_mail::new \ + -package_id [site_node_apm_integration::get_child_package_id -package_id [dotlrn_community::get_package_id $community_id] -package_key [bulk_mail::package_key]] \ + -from_addr [ad_system_owner] \ + -subject $subject \ + -message $message \ + -query $query + + } } - "needs approval" { - dotlrn_community::add_user -member_state "needs approval" $community_id $user_id +} errmsg]} { + + # Check to see if they are already a member + # (in which case this was likely a double click) + + if {[dotlrn_community::member_p $community_id $user_id]} { + ad_returnredirect $referer + ad_script_abort + } else { + ns_log Error "register.tcl failed: $errmsg" + + ad_return_error "Error adding user to community" "An error occured while trying to add a user to a community. This error has been logged." } } ad_returnredirect $referer - Index: openacs-4/packages/dotlrn/www/register.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/register.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/register.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,22 @@ + + + + + + + select join_policy + from dotlrn_communities_full + where community_id = :community_id + + + + + + select rel_segments.segment_id + from rel_segments + where rel_segments.group_id = :community_id + and rel_segments.rel_type = 'dotlrn_admin_rel' + + + + Index: openacs-4/packages/dotlrn/www/reject-link.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/reject-link.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/reject-link.adp 23 Oct 2002 12:38:39 -0000 1.4 +++ openacs-4/packages/dotlrn/www/reject-link.adp 4 Dec 2002 09:51:04 -0000 1.5 @@ -22,3 +22,4 @@ + Index: openacs-4/packages/dotlrn/www/spam-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam-2.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/spam-2.adp 23 Oct 2002 12:38:39 -0000 1.9 +++ openacs-4/packages/dotlrn/www/spam-2.adp 4 Dec 2002 09:51:04 -0000 1.10 @@ -27,16 +27,30 @@ #dotlrn.are_you_sure_you_want_to_send# @spam_name@ #dotlrn.Message#?

        - - - - - - - - - -
        #dotlrn.Subject#
        @subject@
        #dotlrn.Message#
        @message@
        + + + + + + + + + + +
        #dotlrn.Subject#
        @subject@
        #dotlrn.Message#@preview_message@
        +
        + + + + + + + + + + +
        #dotlrn.Subject#@subject@
        #dotlrn.Message# <%= [ad_text_to_html -- "$preview_message"] %>
        +
        @confirm_data@ @@ -45,3 +59,4 @@ + Index: openacs-4/packages/dotlrn/www/spam-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam-2.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/spam-2.tcl 23 Oct 2002 12:38:39 -0000 1.5 +++ openacs-4/packages/dotlrn/www/spam-2.tcl 4 Dec 2002 09:51:04 -0000 1.6 @@ -30,12 +30,21 @@ portal_id:onevalue } -form get_values spam_message subject message -set subject [ad_quotehtml $subject] -set message [ad_quotehtml $message] +form get_values spam_message subject message message_type -set spam_name [bulk_mail::parameter -parameter PrettyName -default Spam] -set context_bar [list [list $referer Admin] "$spam_name Community"] +# the following is just to make sure the previewing works ok. +# in case the user types a html message and chooses the messsage +# to be a plain text type or vice-versa. +if {$message_type == "html"} { + if [ad_looks_like_html_p $message] { + set preview_message "
        $message
        " + } else { + set preview_message "$message" + } +} else { + set preview_message [ad_quotehtml $message] +} + +set context_bar [list [list $referer Admin] "[_ dotlrn.Spam_Community]"] set community_id [dotlrn_community::get_community_id] set portal_id [dotlrn_community::get_portal_id -community_id $community_id] - Index: openacs-4/packages/dotlrn/www/spam-policy-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam-policy-toggle.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/spam-policy-toggle.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,53 @@ +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + Change the spam policy of a dotLRN community. + + @author Don Baccus (dhogaza@pacifier.com) + @creation-date 2002-01-18 + @version $Id: spam-policy-toggle.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} -query { + {community_id ""} + policy:notnull + {referer "one-community-admin"} +} -validate { + policy_ck -requires {policy:notnull} { + if {!( + [string equal $policy "all"] == 1 || + [string equal $policy "admins"] == 1 + )} { + ad_complain [_ dotlrn.lt_spam_policy_must_be_o] + } + } +} + +if {[empty_string_p $community_id]} { + set community_id [dotlrn_community::get_community_id] +} + +dotlrn::require_user_admin_community -community_id $community_id + +if { [string equal $policy all] } { + set action "grant" +} else { + set action "revoke" +} + +permission::$action -party_id [dotlrn_community::get_members_rel_id -community_id $community_id] \ + -object_id $community_id -privilege dotlrn_spam_community + +# Make sure we flush everything that references this community and the spam privilege +util_memoize_flush_regexp "${community_id}(.*)dotlrn_spam_community" + +ad_returnredirect $referer Index: openacs-4/packages/dotlrn/www/spam-variables.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam-variables.adp,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/spam-variables.adp 23 Oct 2002 12:38:39 -0000 1.6 +++ openacs-4/packages/dotlrn/www/spam-variables.adp 4 Dec 2002 09:51:04 -0000 1.7 @@ -68,3 +68,4 @@ + Index: openacs-4/packages/dotlrn/www/spam.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam.adp,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/dotlrn/www/spam.adp 23 Oct 2002 12:38:39 -0000 1.17 +++ openacs-4/packages/dotlrn/www/spam.adp 4 Dec 2002 09:51:04 -0000 1.18 @@ -23,8 +23,6 @@ @context_bar@ - - Index: openacs-4/packages/dotlrn/www/spam.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/spam.tcl 23 Oct 2002 12:38:39 -0000 1.18 +++ openacs-4/packages/dotlrn/www/spam.tcl 4 Dec 2002 09:51:04 -0000 1.19 @@ -34,7 +34,7 @@ set community_id [dotlrn_community::get_community_id] } -dotlrn::require_user_admin_community -community_id $community_id +dotlrn::require_user_spam_community -community_id $community_id set sender_id [ad_conn user_id] set portal_id [dotlrn_community::get_portal_id -community_id $community_id] @@ -75,6 +75,13 @@ -widget textarea \ -html {rows 10 cols 80 wrap soft} +element create spam_message message_type \ + -label "Message Type" \ + -datatype text \ + -widget select \ + -options {{"Plain text" "text"} {HTML "html"}} \ + -value "text" + element create spam_message send_date \ -label [_ dotlrn.Send_Date] \ -datatype date \ @@ -90,12 +97,14 @@ if {[ns_queryexists "form:confirm"]} { form get_values spam_message \ - community_id from rel_type subject message send_date referer + community_id from rel_type subject message message_type send_date referer set segment_id [db_string select_rel_segment_id {}] set community_name [dotlrn_community::get_community_name $community_id] set community_url "[ad_parameter -package_id [ad_acs_kernel_id] SystemURL][dotlrn_community::get_community_url $community_id]" + set safe_community_name [db_quote $community_name] + set query " select '$from' as from_addr, '$sender_first_names' as sender_first_names, @@ -121,7 +130,7 @@ from persons where person_id = parties.party_id), '') as last_name, - '$community_name' as community_name, + '$safe_community_name' as community_name, '$community_url' as community_url from party_approved_member_map, parties, @@ -130,15 +139,26 @@ and party_approved_member_map.member_id <> $segment_id and party_approved_member_map.member_id = parties.party_id and parties.party_id = acs_objects.object_id + and parties.party_id in (select acs_rels.object_id_two + from acs_rels, membership_rels + where acs_rels.object_id_one = + acs.magic_object_id('registered_users') + and acs_rels.rel_id = + membership_rels.rel_id + and membership_rels.member_state + = 'approved') " +ns_log notice "query: $query" + bulk_mail::new \ -package_id [site_node_apm_integration::get_child_package_id -package_key [bulk_mail::package_key]] \ -send_date [template::util::date::get_property linear_date $send_date] \ -date_format "YYYY MM DD HH24 MI SS" \ -from_addr $from \ -subject "\[$community_name\] $subject" \ -message $message \ + -message_type $message_type \ -query $query ad_returnredirect $referer Index: openacs-4/packages/dotlrn/www/subscribe-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/subscribe-members.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/subscribe-members.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,51 @@ +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + + Subscribe group members to a forum and set autosubscription mode + + @author Don Baccus (dhogaza@pacifier.com) + @cvs_id $Id: subscribe-members.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} { + forum_id:integer,notnull + community_id:integer,notnull + return_url:notnull +} + +set users [dotlrn_community::list_users $community_id] + +# Precompute these items rather than repeat them for each user + +set type_id [notification::type::get_type_id -short_name forums_forum_notif] +set interval_id [notification::get_interval_id -name instant] +set delivery_method_id [notification::get_delivery_method_id -name email] + +db_transaction { + + foreach user $users { + # Add notification for this user if they're not already subscribed for an instant alert + set user_id [ns_set get $user user_id] + if {[string equal [notification::request::get_request_id -user_id $user_id -type_id $type_id -object_id $forum_id] ""] } { + notification::request::new -type_id $type_id -user_id $user_id -object_id $forum_id -interval_id $interval_id \ + -delivery_method_id $delivery_method_id + } + } + + # Now flip the forum's autosubscription flag so new users will get autosubscribed. + db_dml update_autosubscribe_p {} + +} + +ad_returnredirect $return_url Index: openacs-4/packages/dotlrn/www/subscribe-members.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/subscribe-members.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/subscribe-members.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,13 @@ + + + + + + + update forums_forums + set autosubscribe_p = 't' + where forum_id = :forum_id + + + + Index: openacs-4/packages/dotlrn/www/unsubscribe-members.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/unsubscribe-members.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/unsubscribe-members.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,32 @@ +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + + Subscribe group members to a forum and set autosubscription mode + + @author Don Baccus (dhogaza@pacifier.com) + @cvs_id $Id: unsubscribe-members.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} { + forum_id:integer,notnull + community_id:integer,notnull + return_url:notnull +} + +db_transaction { + db_dml update_autosubscribe_p {} + notification::request::delete_all -object_id $forum_id +} + +ad_returnredirect $return_url Index: openacs-4/packages/dotlrn/www/unsubscribe-members.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/unsubscribe-members.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/unsubscribe-members.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,14 @@ + + + + oracle8.1.6 + + + + update forums_forums + set autosubscribe_p = 'f' + where forum_id = :forum_id + + + + Index: openacs-4/packages/dotlrn/www/user-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/user-add.adp,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/user-add.adp 23 Oct 2002 12:38:39 -0000 1.8 +++ openacs-4/packages/dotlrn/www/user-add.adp 4 Dec 2002 09:51:04 -0000 1.9 @@ -21,8 +21,30 @@ #dotlrn.Add_A_User# @context_bar@ +

        #dotlrn.lt_Add_a_new_user_to_Slo#

        + +
        + #dotlrn.lt_Note_use_this_feature# +
          +
        1. #dotlrn.lt_If_this_person_is_a_M# +
        2. #dotlrn.lt_Be_sure_that_the_pers# + +
        3. #dotlrn.lt_Use_this_only_for_an_# + + + +
        4. #dotlrn.lt_This_allows_you_to_gi# +
        5. +
            +
          • #dotlrn.lt_Information_about_oth# +
          • #dotlrn.lt_If_you_wish_to_give_g# + +
          +
        +
        +
        +
        +
        - - Index: openacs-4/packages/dotlrn/www/user-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/user-add.tcl,v diff -u -N -r1.26 -r1.27 --- openacs-4/packages/dotlrn/www/user-add.tcl 23 Oct 2002 12:38:39 -0000 1.26 +++ openacs-4/packages/dotlrn/www/user-add.tcl 4 Dec 2002 09:51:04 -0000 1.27 @@ -40,9 +40,11 @@ if {![empty_string_p $community_id]} { dotlrn::require_user_admin_community -community_id [dotlrn_community::get_community_id] set context_bar [list [list "one-community-admin" [_ dotlrn.Admin]] [_ dotlrn.Add_User]] + set community_p 1 } else { dotlrn::require_admin set context_bar [list [list users [_ dotlrn.Users]] [_ dotlrn.Add_User]] + set community_p 0 } set target_user_id [db_nextval acs_object_id_seq] @@ -55,13 +57,6 @@ -widget hidden \ -value $target_user_id -element create add_user id \ - -label [_ dotlrn.ID_1] \ - -datatype text \ - -widget text \ - -html {size 30} \ - -value $id - element create add_user email \ -label [_ dotlrn.Email_1] \ -datatype text \ @@ -120,10 +115,9 @@ if {[form is_valid add_user]} { form get_values add_user \ - target_user_id id email first_names last_name referer type can_browse_p read_private_data_p dotlrn_interactive_p + target_user_id email first_names last_name referer type can_browse_p read_private_data_p dotlrn_interactive_p db_transaction { - if {[empty_string_p [cc_email_from_party $target_user_id]]} { # create the ACS user set password [ad_generate_random_string] @@ -135,7 +129,7 @@ if {!${dotlrn_interactive_p}} { # make the user a dotLRN user - dotlrn::user_add -id $id -type $type -can_browse\=$can_browse_p -user_id $target_user_id + dotlrn::user_add -type $type -can_browse\=$can_browse_p -user_id $target_user_id } } @@ -155,4 +149,3 @@ } ad_return_template - Index: openacs-4/packages/dotlrn/www/weblog-control-panel.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/weblog-control-panel.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/weblog-control-panel.adp 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,29 @@ +<% + + # + # Copyright (C) 2001, 2002 MIT + # + # This file is part of dotLRN. + # + # dotLRN is free software; you can redistribute it and/or modify it under the + # terms of the GNU General Public License as published by the Free Software + # Foundation; either version 2 of the License, or (at your option) any later + # version. + # + # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + # details. + # + +%> + + +#dotlrn.Create_a_Web_Log# + + + + +
      • #dotlrn.Post_to# @weblogs.name@ + + Index: openacs-4/packages/dotlrn/www/weblog-control-panel.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/weblog-control-panel.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/weblog-control-panel.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,36 @@ +# +# Copyright (C) 2001, 2002 MIT +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + Web log controls for user control panel + + @author Caroline Meeks (cmeeks@mit.edu) + @creation-date 2002-09-13 + @version $Id: weblog-control-panel.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} + +set user_id [ad_maybe_redirect_for_registration] + + +set dotlrn_package_id [dotlrn::get_package_id] + +set weblog_package_id [site_node_apm_integration::get_child_package_id -package_key "forums"] + +set weblog_url "[dotlrn_community::get_url -package_id $weblog_package_id]/forum-view" +db_multirow weblogs weblogs {select name, forum_id, to_char(o.last_modified, 'Mon DD, YYYY') as lastest_post from forums_forums_enabled f, acs_objects o where o.object_id = forum_id and o.creation_user = :user_id and f.package_id = :weblog_package_id} + + +ad_return_template Index: openacs-4/packages/dotlrn/www/weblog-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/weblog-new.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/weblog-new.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,77 @@ +# +# Copyright (C) 2001, 2002 MIT +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_page_contract { + Create a user weblog + + @author Caroline Meeks (cmeeks@mit.edu) + @creation-date 2002-09-12 + @version $Id: weblog-new.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} -query { + {referer "control-panel"} +} -validate { + +} + +set user_id [ad_maybe_redirect_for_registration] + +set weblog_package_id [site_node_apm_integration::get_child_package_id -package_key "forums"] +set existing_forum_ids [db_list weblog_forum_id {select forum_id from forums_forums_enabled f, acs_objects o where o.object_id = forum_id and o.creation_user = :user_id and f.package_id = :weblog_package_id}] + +if {![llength $existing_forum_ids]} { + #No existing weblog lets make them one. + + set user_name [dotlrn::get_user_name $user_id] + set name "[_ dotlrn.lt_Web_Log_for_user_name]" + set charter "[_ dotlrn.Public_Web_Log]" + set presentation_type "weblog" + set posting_policy "open" + set new_threads_p 0 + + + db_transaction { + set forum_id [forum::new -name $name \ + -charter $charter \ + -presentation_type $presentation_type \ + -posting_policy $posting_policy \ + -package_id $weblog_package_id \ + ] + + + #Only this user can create new threads. + forum::new_questions_deny -forum_id $forum_id + forum::new_questions_allow -forum_id $forum_id -party_id $user_id + + #Everyone should be subscribed to thier weblog! + + notification::request::new -object_id $forum_id \ + -type_id [notification::type::get_type_id -short_name "forums_forum_notif"] \ + -user_id $user_id \ + -interval_id [notification::get_interval_id -name "instant"] \ + -delivery_method_id [notification::get_delivery_method_id -name "email"] + } +} else { + set forum_id [lindex $existing_forum_ids 0] + #Probably a double click, send them to thier first existing enabled weblog. +} + +ad_returnredirect "[dotlrn_community::get_url -package_id $weblog_package_id]/forum-view?forum_id=$forum_id" + + + + + + Index: openacs-4/packages/dotlrn/www/admin/add-instructor-2.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/add-instructor-2.adp,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/admin/add-instructor-2.adp 23 Oct 2002 12:38:40 -0000 1.7 +++ openacs-4/packages/dotlrn/www/admin/add-instructor-2.adp 4 Dec 2002 09:51:04 -0000 1.8 @@ -33,3 +33,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/class.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class.adp,v diff -u -N -r1.27 -r1.28 --- openacs-4/packages/dotlrn/www/admin/class.adp 23 Oct 2002 12:38:40 -0000 1.27 +++ openacs-4/packages/dotlrn/www/admin/class.adp 4 Dec 2002 09:51:04 -0000 1.28 @@ -103,7 +103,7 @@ - [ #dotlrn.Administer# ] + #dotlrn.Administer# @@ -127,3 +127,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/classes-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes-chunk.adp,v diff -u -N -r1.16 -r1.17 --- openacs-4/packages/dotlrn/www/admin/classes-chunk.adp 23 Oct 2002 12:38:40 -0000 1.16 +++ openacs-4/packages/dotlrn/www/admin/classes-chunk.adp 4 Dec 2002 09:51:04 -0000 1.17 @@ -112,3 +112,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/club.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/club.adp,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/admin/club.adp 23 Oct 2002 12:38:40 -0000 1.12 +++ openacs-4/packages/dotlrn/www/admin/club.adp 4 Dec 2002 09:51:04 -0000 1.13 @@ -26,3 +26,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.adp 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,31 @@ +<% + + # + # Copyright (C) 2001, 2002 MIT + # + # This file is part of dotLRN. + # + # dotLRN is free software; you can redistribute it and/or modify it under the + # terms of the GNU General Public License as published by the Free Software + # Foundation; either version 2 of the License, or (at your option) any later + # version. + # + # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + # details. + # + +%> + + +#dotlrn.lt_Add_community_name_Me# +@context_bar@ + +#dotlrn.Note# + +#dotlrn.lt_This_action_will_take_1# + +

        + + Index: openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,109 @@ +# +# Copyright (C) 2001, 2002 MIT +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +ad_page_contract { + Add a members of one community to another + + @author yon (yon@openforce.net) + @creation-date 2002-02-10 + @param source_community_id The community_id for the source community. The members of the source community will be added to the target community the user selects. + @param referer The url for the administration page of the source community. + @version $Id: community-members-add-to-community.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} -query { + source_community_id:integer + referer +} -properties { + context_bar:onevalue +} + + +set community_name [db_string select_community_info {}] +set users [dotlrn_community::list_users $source_community_id] + +set context_bar [list [list $referer $community_name] "[_ dotlrn.lt_Add_Members_to_Anothe]"] + +form create select_community + +element create select_community source_community_id \ + -label " " \ + -datatype text \ + -widget hidden \ + -value $source_community_id + +element create select_community referer \ + -label "[_ dotlrn.Referer]" \ + -datatype text \ + -widget hidden \ + -value $referer + +set communities [db_list_of_lists select_all_communities { + select dotlrn_communities.pretty_name, + dotlrn_communities.community_id + from dotlrn_communities + where dotlrn_communities.portal_id is not NULL + order by dotlrn_communities.pretty_name, + dotlrn_communities.community_id +}] + +if {[llength $communities]} { + element create select_community community_id \ + -label "[_ dotlrn.Add_users_to]" \ + -datatype text \ + -widget select \ + -options "{{} {}} $communities" +} else { + element create select_community community_id \ + -label "[_ dotlrn.No_groups_to_add_to]" \ + -datatype text \ + -widget hidden \ + -value "" +} + +if {[form is_valid select_community]} { + form get_values select_community \ + source_community_id community_id + + if {![empty_string_p $community_id]} { + db_transaction { + foreach user $users { + set user_id [ns_set get $user user_id] + if {![dotlrn_community::member_p $community_id $user_id]} { + if {[catch { + # There is still a danger that a double + # click will cause a failure. + dotlrn_community::add_user $community_id $user_id + } errmsg]} { + if {[dotlrn_community::member_p $community_id $user_id]} { + # assume this was a double click + ad_returnredirect $referer + ad_script_abort + } else { + ns_log Error "community-members-add-to_community.tcl failed: $errmsg" + ReturnHeaders + ad_return_error "[_ dotlrn.lt_Error_adding_user_to_]" "[_ dotlrn.lt_An_error_occured_whil]" + } + } + } + } + } + } + + ad_returnredirect $referer + ad_script_abort +} + +set estimated_number_of_seconds [expr [llength $users] * 3] + +ad_return_template Index: openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/community-members-add-to-community.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,13 @@ + + + + + + + select pretty_name + from dotlrn_communities + where community_id = :source_community_id + + + + Index: openacs-4/packages/dotlrn/www/admin/department-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/department-delete.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/admin/department-delete.adp 23 Oct 2002 12:38:40 -0000 1.2 +++ openacs-4/packages/dotlrn/www/admin/department-delete.adp 4 Dec 2002 09:51:04 -0000 1.3 @@ -1,7 +1,7 @@ <% # - # Copyright (C) 2001, 2002 OpenForce, Inc. + # Copyright (C) 2001, 2002 MIT # # This file is part of dotLRN. # Index: openacs-4/packages/dotlrn/www/admin/department-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/department-delete.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/admin/department-delete.tcl 23 Oct 2002 12:38:40 -0000 1.2 +++ openacs-4/packages/dotlrn/www/admin/department-delete.tcl 4 Dec 2002 09:51:04 -0000 1.3 @@ -1,5 +1,5 @@ # -# Copyright (C) 2001, 2002 OpenForce, Inc. +# Copyright (C) 2001, 2002 MIT # # This file is part of dotLRN. # Index: openacs-4/packages/dotlrn/www/admin/department.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/department.adp,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/dotlrn/www/admin/department.adp 23 Oct 2002 12:38:40 -0000 1.11 +++ openacs-4/packages/dotlrn/www/admin/department.adp 4 Dec 2002 09:51:04 -0000 1.12 @@ -25,31 +25,30 @@
        • - External URL: + #dotlrn.External_URL_1# @external_url@ - <none set up> + <#dotlrn.none_set_up#>
        • - Description: + #dotlrn.Description_1# @description@ - <none set up> + <#dotlrn.none_set_up#>

        • Edit - department properties. + href="department-edit?department_key=@department_key@&referer=@referer@">#dotlrn.lt_Edit_department_prope#
        @@ -58,3 +57,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/dotlrn-admin-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/dotlrn-admin-master.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn/www/admin/dotlrn-admin-master.adp 23 Oct 2002 12:38:40 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/dotlrn-admin-master.adp 4 Dec 2002 09:51:04 -0000 1.5 @@ -20,13 +20,13 @@ @title@ +1 +

        @title@

        <%= [eval dotlrn::admin_navbar $context_bar] %>
        - - Index: openacs-4/packages/dotlrn/www/admin/edit-preapproved-emails.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/edit-preapproved-emails.adp,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/dotlrn/www/admin/edit-preapproved-emails.adp 23 Oct 2002 12:38:40 -0000 1.7 +++ openacs-4/packages/dotlrn/www/admin/edit-preapproved-emails.adp 4 Dec 2002 09:51:04 -0000 1.8 @@ -53,3 +53,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/password-update-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/password-update-2.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/password-update-2.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,63 @@ +ad_page_contract { + Updates the users password if password_1 matches password_2 + + @cvs-id $Id: password-update-2.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} { + user_id:integer,notnull + password_1:notnull + password_2:notnull + {return_url ""} + +} -validate { + confirm_password -requires {password_2:notnull} { + if {[empty_string_p $password_2]} { + ad_complain "[_ dotlrn.lt_You_need_to_confirm_t]" + } + } + new_password_match -requires {password_1:notnull password_2:notnull confirm_password} { + if {![string equal $password_1 $password_2]} { + ad_complain "[_ dotlrn.lt_Your_passwords_dont_m]" + } + } +} + +ad_change_password $user_id $password_1 + + +set system_owner [ad_system_owner] +set system_name [ad_system_name] + +set subject "[_ dotlrn.lt_Your_password_on_syst]" +set change_password_url "[ad_url]/user/password-update?[export_vars {user_id {password_old $password_1}}]" +set body "[_ dotlrn.lt_Please_follow_the_fol]" + +set email [db_string select_user_email {}] + +# Send email +if [catch {ns_sendmail $email $system_owner $subject $body} errmsg] { + ns_log Error "[_ dotlrn.lt_Error_sending_email_t]" $errmsg + ad_return_error \ + "[_ dotlrn.Error_sending_mail]" \ + "[_ dotlrn.lt_There_was_an_error_se]" +} else { + + set system_name [ad_system_name] + set admin_subject "[_ dotlrn.lt_The_following_email_w]" + set admin_message "[_ dotlrn.lt_The_following_email_w_1]" + + + if [catch {ns_sendmail $system_owner $system_owner $admin_subject $admin_message} errmsg] { + + ns_log Error "Error sending email from password-update-2.tcl" $errmsg + ad_return_error \ + "[_ dotlrn.Error_sending_mail]" \ + "[_ dotlrn.lt_There_was_an_error_se_1]" + } +} + + +if {[empty_string_p $return_url]} { + set return_url "user?user_id=$user_id" +} + +ad_returnredirect $return_url Index: openacs-4/packages/dotlrn/www/admin/password-update-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/password-update-2.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/password-update-2.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,13 @@ + + + + + + + select email + from registered_users + where user_id = :user_id + + + + Index: openacs-4/packages/dotlrn/www/admin/password-update.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/password-update.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/password-update.adp 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,29 @@ + +#dotlrn.Update_Password# +@context_bar@ + + + + + + + + + + + + + + + + +
        #dotlrn.New_Password#
        #dotlrn.Confirm_1#
        + +
        +
        + +
        + +
        + + Index: openacs-4/packages/dotlrn/www/admin/password-update.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/password-update.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/password-update.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,18 @@ +ad_page_contract { + Let's the admin change a user's password. + + + @version $Id: password-update.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} { + {user_id:integer} + {return_url ""} + {password_old ""} +} + +db_1row user_information {} + +set context_bar [list [list users Users] [list "user.tcl?user_id=$user_id" "$first_names $last_name"] "[_ dotlrn.Update_Password]"] + +set site_link [ad_site_home_link] + +ad_return_template Index: openacs-4/packages/dotlrn/www/admin/password-update.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/password-update.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/password-update.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,15 @@ + + + + + + select first_names, + last_name, + email, + url + from cc_users + where user_id = :user_id + + + + Index: openacs-4/packages/dotlrn/www/admin/site-wide-admin-toggle.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/site-wide-admin-toggle.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/admin/site-wide-admin-toggle.tcl 23 Oct 2002 12:38:40 -0000 1.6 +++ openacs-4/packages/dotlrn/www/admin/site-wide-admin-toggle.tcl 4 Dec 2002 09:51:04 -0000 1.7 @@ -32,5 +32,5 @@ ad_permission_revoke $user_id [acs_magic_object "security_context_root"] "admin" } +util_memoize_flush_regexp $user_id ad_returnredirect $referer - Index: openacs-4/packages/dotlrn/www/admin/term.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/term.adp,v diff -u -N -r1.19 -r1.20 --- openacs-4/packages/dotlrn/www/admin/term.adp 23 Oct 2002 12:38:40 -0000 1.19 +++ openacs-4/packages/dotlrn/www/admin/term.adp 4 Dec 2002 09:51:04 -0000 1.20 @@ -135,3 +135,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/user-new-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-new-2.tcl,v diff -u -N -r1.27 -r1.28 --- openacs-4/packages/dotlrn/www/admin/user-new-2.tcl 23 Oct 2002 12:38:40 -0000 1.27 +++ openacs-4/packages/dotlrn/www/admin/user-new-2.tcl 4 Dec 2002 09:51:04 -0000 1.28 @@ -25,7 +25,6 @@ {referer "[dotlrn::get_admin_url]/users"} } - set context_bar [list [list users [_ dotlrn.Users]] [_ dotlrn.New]] db_1row select_user_info { @@ -76,20 +75,55 @@ -widget hidden \ -value $referer + if {[form is_valid add_user]} { + form get_values add_user \ user_id id type can_browse_p read_private_data_p referer + set subject "Your [ad_system_name] membership has been approved" + set message "Your [ad_system_name] membership has been approved. Please return to [ad_url] to log into [ad_system_name]." + + set email_from [ad_parameter -package_id [ad_acs_kernel_id] SystemOwner] + db_transaction { dotlrn::user_add -id $id -type $type -can_browse\=$can_browse_p -user_id $user_id acs_privacy::set_user_read_private_data -user_id $user_id -object_id [dotlrn::get_package_id] -value $read_private_data_p } + + + if [catch {ns_sendmail $email $email_from $subject $message} errmsg] { + + ns_log Error "Error sending email from user-new-2.tcl" $errmsg + ad_return_error \ + "Error sending mail" \ + "There was an error sending email to $email." + } else { + set admin_subject "The following email was just sent from [ad_system_name]" + + set admin_message "The following email was just sent from [ad_system_name] + +Sent by: $email_from +Sent to: $email +Subject: $subject +Message: $message" + + + if [catch {ns_sendmail $email_from $email_from $admin_subject $admin_message} errmsg] { + + ns_log Error "Error sending email from user-new-2.tcl" $errmsg + ad_return_error \ + "Error sending mail" \ + "There was an error sending email to $email." + } + + } + ad_returnredirect $referer ad_script_abort } set context_bar [list [list users [_ dotlrn.Users]] [_ dotlrn.New]] ad_return_template - Index: openacs-4/packages/dotlrn/www/admin/user-new.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-new.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/admin/user-new.adp 23 Oct 2002 12:38:40 -0000 1.9 +++ openacs-4/packages/dotlrn/www/admin/user-new.adp 4 Dec 2002 09:51:04 -0000 1.10 @@ -31,3 +31,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/user-nuke-error.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-nuke-error.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/user-nuke-error.adp 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,13 @@ + +#dotlrn.lt_Error_Nuking_first_na# +@context_bar@ + +

        #dotlrn.Sorry#

        + +

        + +#dotlrn.lt_Well_we_tried_to_nuke# + +

        + +#dotlrn.lt_Return_to_where_you_w# Index: openacs-4/packages/dotlrn/www/admin/user-nuke.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-nuke.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/user-nuke.adp 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,11 @@ + +#dotlrn.lt_Nuke_first_names_last# +@context_bar@ + +

        #dotlrn.Confirmation#

        + +

        + +#dotlrn.lt_Please_confirm_that_y# + + \ No newline at end of file Index: openacs-4/packages/dotlrn/www/admin/user-nuke.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-nuke.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/user-nuke.tcl 4 Dec 2002 09:51:04 -0000 1.2 @@ -0,0 +1,53 @@ +ad_page_contract { + + Try to delete a pending user from the database. + + @author Andrew Grumet (aegrumet@alum.mit.edu) + @creation-date 2002-08-08 + @version $Id: user-nuke.tcl,v 1.2 2002/12/04 09:51:04 peterm Exp $ +} { + user_id:integer,notnull + {referer "[dotlrn::get_admin_url]/users"} +} + +db_1row select_user_info { + select email, + first_names, + last_name + from cc_users + where user_id = :user_id +} + +form create confirm_delete + +element create confirm_delete user_id \ + -label "[_ dotlrn.User_ID_1]" \ + -datatype integer \ + -widget hidden \ + -value $user_id + +element create confirm_delete confirmed_p \ + -label "[_ dotlrn.Are_you_sure]" \ + -datatype text \ + -widget radio \ + -options [list [list [_ dotlrn.No] f] [list [_ dotlrn.Yes] t]] \ + -value f + +set context_bar [list [list users [_ dotlrn.Users]] [_ dotlrn.Nuke]] + +if [form is_valid confirm_delete] { + form get_values confirm_delete user_id confirmed_p + if [string equal $confirmed_p t] { + if [catch { db_exec_plsql nuke_user { begin acs.remove_user(:user_id); end; } } errMsg ] { + ad_return_template user-nuke-error + } else { + # Nuke was successful. + ad_returnredirect $referer + ad_script_abort + } + } else { + # Nuke cancelled + ad_returnredirect $referer + ad_script_abort + } +} Index: openacs-4/packages/dotlrn/www/admin/user-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-oracle.xql,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/admin/user-oracle.xql 21 May 2002 07:46:03 -0000 1.8 +++ openacs-4/packages/dotlrn/www/admin/user-oracle.xql 4 Dec 2002 09:51:04 -0000 1.9 @@ -6,6 +6,7 @@ select dotlrn_users.*, + acs_permission.permission_p(:root_object_id, dotlrn_users.user_id, 'admin') as site_wide_admin_p, acs_permission.permission_p(:dotlrn_package_id, :user_id, 'read_private_data') as read_private_data_p from dotlrn_users where dotlrn_users.user_id = :user_id @@ -31,8 +32,7 @@ select dotlrn_class_instances_full.*, dotlrn_member_rels_approved.rel_type, dotlrn_member_rels_approved.role, - '' as role_pretty_name, - acs_permission.permission_p(dotlrn_class_instances_full.class_instance_id, :user_id, 'admin') as admin_p + '' as role_pretty_name from dotlrn_class_instances_full, dotlrn_member_rels_approved where dotlrn_member_rels_approved.user_id = :user_id @@ -49,8 +49,7 @@ select dotlrn_clubs_full.*, dotlrn_member_rels_approved.rel_type, dotlrn_member_rels_approved.role, - '' as role_pretty_name, - acs_permission.permission_p(dotlrn_clubs_full.club_id, :user_id, 'admin') as admin_p + '' as role_pretty_name from dotlrn_clubs_full, dotlrn_member_rels_approved where dotlrn_member_rels_approved.user_id = :user_id @@ -66,8 +65,7 @@ dotlrn_community.url(dotlrn_communities.community_id) as url, dotlrn_member_rels_approved.rel_type, dotlrn_member_rels_approved.role, - '' as role_pretty_name, - acs_permission.permission_p(dotlrn_communities.community_id, :user_id, 'admin') as admin_p + '' as role_pretty_name from dotlrn_communities, dotlrn_member_rels_approved where dotlrn_member_rels_approved.user_id = :user_id Index: openacs-4/packages/dotlrn/www/admin/user-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/user-postgresql.xql 15 Jul 2002 20:12:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/user-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -6,6 +6,7 @@ select dotlrn_users.*, + acs_permission__permission_p(:root_object_id, dotlrn_users.user_id, 'admin') as site_wide_admin_p, acs_permission__permission_p(:dotlrn_package_id, :user_id, 'read_private_data') as read_private_data_p from dotlrn_users where dotlrn_users.user_id = :user_id @@ -31,8 +32,7 @@ select dotlrn_class_instances_full.*, dotlrn_member_rels_approved.rel_type, dotlrn_member_rels_approved.role, - '' as role_pretty_name, - acs_permission__permission_p(dotlrn_class_instances_full.class_instance_id, :user_id, 'admin') as admin_p + '' as role_pretty_name from dotlrn_class_instances_full, dotlrn_member_rels_approved where dotlrn_member_rels_approved.user_id = :user_id @@ -49,8 +49,7 @@ select dotlrn_clubs_full.*, dotlrn_member_rels_approved.rel_type, dotlrn_member_rels_approved.role, - '' as role_pretty_name, - acs_permission__permission_p(dotlrn_clubs_full.club_id, :user_id, 'admin') as admin_p + '' as role_pretty_name from dotlrn_clubs_full, dotlrn_member_rels_approved where dotlrn_member_rels_approved.user_id = :user_id @@ -66,8 +65,7 @@ dotlrn_community__url(dotlrn_communities.community_id) as url, dotlrn_member_rels_approved.rel_type, dotlrn_member_rels_approved.role, - '' as role_pretty_name, - acs_permission__permission_p(dotlrn_communities.community_id, :user_id, 'admin') as admin_p + '' as role_pretty_name from dotlrn_communities, dotlrn_member_rels_approved where dotlrn_member_rels_approved.user_id = :user_id Index: openacs-4/packages/dotlrn/www/admin/user.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user.adp,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/admin/user.adp 12 Nov 2002 08:44:06 -0000 1.18 +++ openacs-4/packages/dotlrn/www/admin/user.adp 4 Dec 2002 09:51:04 -0000 1.19 @@ -165,19 +165,35 @@

        + #dotlrn.Add# #dotlrn.this_user_to_dotLRN# + + +#dotlrn.lt_This_user_is_currentl#. +

        #dotlrn.lt_Administrative_Action#

        + Index: openacs-4/packages/dotlrn/www/admin/user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/user.tcl,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/admin/user.tcl 18 Nov 2002 17:58:53 -0000 1.13 +++ openacs-4/packages/dotlrn/www/admin/user.tcl 4 Dec 2002 09:51:04 -0000 1.14 @@ -44,6 +44,8 @@ set return_url "[ad_parameter -package_id [ad_acs_kernel_id] CommunityMemberAdminURL]?user_id=$user_id" set export_edit_vars "user_id=$user_id&return_url=$return_url" +set dotlrn_url [dotlrn::get_url] +set root_object_id [acs_magic_object security_context_root] if {![db_0or1row select_user_info {}]} { ad_return_complaint 1 "
      • [_ dotlrn.couldnt_find_user_id [list user_id $user_id]]
      • " ad_script_abort @@ -82,5 +84,8 @@ set context_bar [list [list users [_ dotlrn.Users]] "$first_names $last_name"] -ad_return_template +set dual_approve_return_url [ns_urlencode [dotlrn::get_admin_url]/user-new-2?user_id=$user_id&referer=$return_url] +set approve_user_url "/acs-admin/users/member-state-change?user_id=$user_id&member_state=approved&return_url=$dual_approve_return_url" + +ad_return_template Index: openacs-4/packages/dotlrn/www/admin/users-bulk-upload.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-bulk-upload.adp,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/admin/users-bulk-upload.adp 23 Oct 2002 12:38:40 -0000 1.8 +++ openacs-4/packages/dotlrn/www/admin/users-bulk-upload.adp 4 Dec 2002 09:51:04 -0000 1.9 @@ -105,3 +105,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql 2 Jun 2002 00:05:56 -0000 1.12 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-large-oracle.xql 4 Dec 2002 09:51:04 -0000 1.13 @@ -36,11 +36,11 @@ acs_rels, membership_rels where parties.party_id = users.user_id + and member_state not in ('banned','deleted','rejected') and users.user_id = persons.person_id and persons.person_id = acs_rels.object_id_two and acs_rels.object_id_one = acs.magic_object_id('registered_users') and acs_rels.rel_id = membership_rels.rel_id - and membership_rels.member_state = 'approved' and not exists (select 1 from acs_rels a, dotlrn_user_types Index: openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql 15 Jul 2002 20:12:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-large-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -36,11 +36,11 @@ acs_rels, membership_rels where parties.party_id = users.user_id + and member_state not in ('banned','deleted','rejected') and users.user_id = persons.person_id and persons.person_id = acs_rels.object_id_two and acs_rels.object_id_one = acs__magic_object_id('registered_users') and acs_rels.rel_id = membership_rels.rel_id - and membership_rels.member_state = 'approved' and not exists (select 1 from acs_rels a, dotlrn_user_types Index: openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl 23 Oct 2002 12:38:40 -0000 1.11 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-large.tcl 4 Dec 2002 09:51:04 -0000 1.12 @@ -70,7 +70,7 @@ } } elseif {[string equal $type pending] == 1} { db_multirow users select_non_dotlrn_users {} { - set users:${i}(access_level) Limited + set users:${i}(access_level) N/A incr i } } else { Index: openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 5 Jun 2002 05:09:01 -0000 1.13 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium-oracle.xql 4 Dec 2002 09:51:04 -0000 1.14 @@ -47,10 +47,11 @@ acs_rels, membership_rels where parties.party_id = users.user_id + and member_state not in ('banned','deleted','rejected') and users.user_id = persons.person_id and persons.person_id = acs_rels.object_id_two + and acs_rels.object_id_one = acs.magic_object_id('registered_users') and acs_rels.rel_id = membership_rels.rel_id - and membership_rels.member_state = 'approved' and not exists (select 1 from acs_rels a, dotlrn_user_types Index: openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql 15 Jul 2002 20:12:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -47,10 +47,11 @@ acs_rels, membership_rels where parties.party_id = users.user_id + and member_state not in ('banned','deleted','rejected') and users.user_id = persons.person_id and persons.person_id = acs_rels.object_id_two + and acs_rels.object_id_one = acs__magic_object_id('registered_users') and acs_rels.rel_id = membership_rels.rel_id - and membership_rels.member_state = 'approved' and not exists (select 1 from acs_rels a, dotlrn_user_types Index: openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl 23 Oct 2002 12:38:40 -0000 1.12 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-medium.tcl 4 Dec 2002 09:51:04 -0000 1.13 @@ -62,7 +62,7 @@ append query "_other" } db_multirow users $query {} { - set users:${i}(access_level) Limited + set users:${i}(access_level) N/A incr i } } else { Index: openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql 2 Jun 2002 00:05:56 -0000 1.13 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-small-oracle.xql 4 Dec 2002 09:51:04 -0000 1.14 @@ -24,18 +24,18 @@ persons.last_name, parties.email, 'f' as read_private_data_p, - acs_permission.permission_p(:root_object_id, users.user_id, 'admin') as site_wide_admin_p + acs_permission.permission_p(:root_object_id, users.user_id, 'admin') as site_wide_admin_p, member_state from parties, users, persons, acs_rels, membership_rels where parties.party_id = users.user_id + and member_state not in ('banned','deleted','rejected') and users.user_id = persons.person_id and persons.person_id = acs_rels.object_id_two and acs_rels.object_id_one = acs.magic_object_id('registered_users') and acs_rels.rel_id = membership_rels.rel_id - and membership_rels.member_state = 'approved' and not exists (select 1 from acs_rels a, dotlrn_user_types Index: openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql 15 Jul 2002 20:12:46 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-small-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.2 @@ -10,7 +10,7 @@ dotlrn_users.last_name, dotlrn_users.email, acs_permission__permission_p(:dotlrn_package_id, dotlrn_users.user_id, 'read_private_data') as read_private_data_p, - acs_permission__permission_p(:root_object_id, dotlrn_users.user_id, 'admin') as site_wide_admin_p + acs_permission__permission_p(:root_object_id,dotlrn_users.user_id, 'admin') as site_wide_admin_p from dotlrn_users where dotlrn_users.type = :type order by dotlrn_users.last_name @@ -24,18 +24,19 @@ persons.last_name, parties.email, 'f' as read_private_data_p, - acs_permission__permission_p(:root_object_id, users.user_id, 'admin') as site_wide_admin_p + acs_permission__permission_p(:root_object_id, users.user_id, 'admin') as site_wide_admin_p, + member_state from parties, users, persons, acs_rels, membership_rels where parties.party_id = users.user_id + and member_state not in ('banned','deleted','rejected') and users.user_id = persons.person_id and persons.person_id = acs_rels.object_id_two and acs_rels.object_id_one = acs__magic_object_id('registered_users') and acs_rels.rel_id = membership_rels.rel_id - and membership_rels.member_state = 'approved' and not exists (select 1 from acs_rels a, dotlrn_user_types Index: openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl 23 Oct 2002 12:38:40 -0000 1.10 +++ openacs-4/packages/dotlrn/www/admin/users-chunk-small.tcl 4 Dec 2002 09:51:04 -0000 1.11 @@ -45,7 +45,7 @@ } } elseif {[string equal $type pending] == 1} { db_multirow users select_non_dotlrn_users {} { - set users:${i}(access_level) Limited + set users:${i}(access_level) N/A incr i } } else { Index: openacs-4/packages/dotlrn/www/admin/users-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-chunk.adp,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/admin/users-chunk.adp 23 Oct 2002 12:38:40 -0000 1.18 +++ openacs-4/packages/dotlrn/www/admin/users-chunk.adp 4 Dec 2002 09:51:04 -0000 1.19 @@ -18,13 +18,34 @@ %> +<% + # The structure of this table is determined by the type of user we + # are displaying. It doesn't make much sense to display access + # level, guest status, and admin status for pending users. Instead we + # will offer links to common actions. + + # Note: There is some redundant logic inside the table and in + # other files that display access and guest status fields as N/A + # for pending users. Previous to the change, this page was + # displaying "Limited" and "Yes", respectively, which are wrong + # and confused our site administrator. + # The N/A logic is a failsafe in case these columns come back for + # some reason. aegrumet@mit.edu 2002-08-08. + +%> +
        + + + + + @@ -49,9 +70,23 @@ + + + + - + + @@ -77,3 +113,4 @@ + Index: openacs-4/packages/dotlrn/www/admin/users-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-delete.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/dotlrn/www/admin/users-delete.tcl 23 Oct 2002 12:38:40 -0000 1.5 +++ openacs-4/packages/dotlrn/www/admin/users-delete.tcl 4 Dec 2002 09:51:04 -0000 1.6 @@ -39,6 +39,12 @@ -widget hidden \ -value $users +element create confirm_delete referer \ + -label " " \ + -datatype text \ + -widget hidden \ + -value $referer + if {[form is_valid confirm_delete]} { form get_values confirm_delete \ users Index: openacs-4/packages/dotlrn/www/admin/users-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/users-oracle.xql,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn/www/admin/users-oracle.xql 9 Jul 2002 12:39:33 -0000 1.13 +++ openacs-4/packages/dotlrn/www/admin/users-oracle.xql 4 Dec 2002 09:51:04 -0000 1.14 @@ -7,8 +7,11 @@ select count(*) from (select acs_rels.object_id_two - from acs_rels + from acs_rels, membership_rels where acs_rels.object_id_one = (select acs.magic_object_id('registered_users') from dual) + and acs_rels.rel_id = membership_rels.rel_id + and membership_rels.member_state + not in ('banned','deleted','rejected') minus select acs_rels.object_id_two from acs_rels, dotlrn_user_types Index: openacs-4/packages/dotlrn/www/admin/users-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/users-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn/www/admin/users-postgresql.xql 11 Jul 2002 15:54:13 -0000 1.2 +++ openacs-4/packages/dotlrn/www/admin/users-postgresql.xql 4 Dec 2002 09:51:04 -0000 1.3 @@ -7,8 +7,11 @@ select count(*) from (select acs_rels.object_id_two - from acs_rels + from acs_rels, membership_rels where acs_rels.object_id_one = (select acs__magic_object_id('registered_users') from dual) + and acs_rels.rel_id = membership_rels.rel_id + and membership_rels.member_state + not in ('banned','deleted','rejected') and acs_rels.object_id_two not in ( select acs_rels.object_id_two from acs_rels, Index: openacs-4/packages/dotlrn/www/admin/users-search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-search.tcl,v diff -u -N -r1.22 -r1.23 --- openacs-4/packages/dotlrn/www/admin/users-search.tcl 23 Oct 2002 12:38:40 -0000 1.22 +++ openacs-4/packages/dotlrn/www/admin/users-search.tcl 4 Dec 2002 09:51:04 -0000 1.23 @@ -248,6 +248,7 @@ if {[llength $wheres]} { append sql " where " append sql [join $wheres " $join_criteria "] + append sql "order by last_name, first_names" } set referer [ns_conn url] Index: openacs-4/packages/dotlrn/www/admin/users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users.adp,v diff -u -N -r1.27 -r1.28 --- openacs-4/packages/dotlrn/www/admin/users.adp 23 Oct 2002 12:38:40 -0000 1.27 +++ openacs-4/packages/dotlrn/www/admin/users.adp 4 Dec 2002 09:51:04 -0000 1.28 @@ -34,6 +34,13 @@

        +
        + #dotlrn.lt_Search_dotLRN_users_f# + + + + +
        #dotlrn.lt_Add_a_new_dotLRN_user# @@ -53,8 +60,3 @@ - - - - - Index: openacs-4/packages/dotlrn/www/admin/users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/dotlrn/www/admin/users.tcl 12 Nov 2002 10:03:56 -0000 1.18 +++ openacs-4/packages/dotlrn/www/admin/users.tcl 4 Dec 2002 09:51:04 -0000 1.19 @@ -21,7 +21,7 @@ @creation-date 2002-01-30 @version $Id$ } -query { - {type "admin"} + {type "pending"} } -properties { context_bar:onevalue control_bar:onevalue @@ -53,7 +53,7 @@ set n_deactivated_users [db_string select_deactivated_users_count {}] lappend dotlrn_roles_localized [list deactivated "[_ dotlrn.Deactivated] ($n_deactivated_users)" {}] -set control_bar [ad_dimensional [list [list type "[_ dotlrn.User_Type]:" admin $dotlrn_roles_localized]]] +set control_bar [ad_dimensional [list [list type "[_ dotlrn.User_Type]:" $type $dotlrn_roles_localized]]] if {[string equal $type "deactivated"] == 1} { set n_users $n_deactivated_users Index: openacs-4/packages/dotlrn/www/graphics/admin.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/admin.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/admin.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1 @@ +GIF89a ��3����\3�kG�t묗�D���߁a�������7�Q%�M !�, Q�!��8�Q�Z@(�di1%{.� k��t��A��>,� ]H��(lr�h39e:��ݒ���i�ku���h0�p��; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/dash.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/dash.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/dash.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1 @@ +GIF89a����!�,����X; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/drop.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/drop.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/drop.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,4 @@ +GIF89a ��3����\3�kG�t묗�D���߁a�������7�Q%�M �����&���A�wh��wa��wS��w@n�@j�@�����v��w����w$H +�����$�w U�w������w��w �w@8�H@j�0j@� `�  X�(�w'(�w�,�0���w �q�w���w<�(���w(\������$�w�T�w������w93�wT3�w�P�wG3�wh�H�<�����(�$�wHb�w����G3�w�2�w8(��zQt�t�$�w�T�w������w.��w:��w'}�w@���BT(�D������w��w����:��w\WC(�'}�w@ �����HX}��墭���$ btn_drop2.gi����4�$�wU�w���� �wӘ�w��w'}�wD�D +��a�H�������D +s�D�!�, @l ����P��1@D�%f�h`�E�%j�r"Ȉ>n�Ȳ%D+�<)Rdɋ0pɓ�,�I�e��!ku�T�ō7oFl*�fԤ,�I"��; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/help-comm.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/help-comm.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/help-comm.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,2 @@ +GIF89a �����3Ϡ��ɻ�����ݠA�wU�\3�iDݻ�֭�ɒw…f�N"!�, n�I��� I��P��HC�a�@&�N�0Jm9Je +�� p@0 � `@zS`:+��Z2�m����w�HPb�A@Ht�W��;��SKwN7/,6��/ j; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/help-course.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/help-course.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/help-course.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,2 @@ +GIF89a ����#tL������������O�p2}Xl��^�|��Ê���Ƿ{��@�d!�, q�2$D�=���HCP�R ��H��"x� +��|� 40°8�T��!�ӈPX!���`�:G�R���1�d"��%!aC����:1�iuK4,,*��� g���; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/help-user.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/help-user.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/help-user.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1 @@ +GIF89a �5hDi����p��������������!�, bHt�|*J�%(�U@�I��EBQ�R�`eE1�D�^��,�O`&�9&QC�48����ґ���!���Щ�#0��� `5�0F���W�}�u ; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/join.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/join.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/join.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,6 @@ +GIF89a ��3����\3�kG�t묗�D����Q%߁a�7�������M X���w$H +�0�H�$�w U�w������w��w �wx�gifiA�w��,y�r�w�mH���&v�<����r�w&v�< �� �H +nH�E8E˳B�<&v�<�mH��B,y�mH��Em��A,y$ &�!��wn�d�bmp;��$�wU�w���� �wӘ�w��w8ED�D +�����������D +s�D�!�, @b, ����(� ���(��ĉ!00@�E�/V�H�cF�Mp��ɋ/=>`�@�M��J +�#W�QA�:�k���&a�v���Ն"�UqRBpXL�x��> )JQ�Ȕ4�����C\O $�I���Y��EEA��b'X0H�_ RCm88��s�$`!@�@��@m3,@j�� <�! ��T9����i�0Y6�ApQ��H��,��b�=��)@Ӝf����8 �OR0H�U��5���ґF"�~�I1�il� �h@�@�&H����yO�`�%���� HBm`�� +Ԇ�Px��̠Y�ȥT�K��fޥ \&�������I�bH�i�M�ٓ����j(E\> H� ŔZ �R�x⊔U5 ?I�#����jn��",���x��&����ܓO�R���jFxX��bJA (��� �l����/�g�i����|w.�"�Z��i�[+"7���m:�+� �&%�flm��#��$b&B� v Shk] �9.wCG����%�B�祧��PR�� ���%�|�˵Y�u 7a�T�M ��*ȹQ�-����m��NA�wO��ǝ!�AmP[���6`%�P�� +$��P�����Z#/�rm1� ����ڵ�Ja��;O���'��p�ӹP��hր� ����"[e՚1[� +��v�S�V<����b +��]�A�&�vs׃�G����0k֙�P����FA��K�m���%&�]�(�R������&k�gS�j2$��K|���r��.�(́Tːe��K�cta�� +�MQ@8�Hf1XP���(05K�@�&��V���0�.(p���Bx� `�J��W�Lh�fB$x��V".F/r��`�C��E5���f�j�:������>Fp~ � IH>���L�"9�F.�"�; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/logo-course.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/logo-course.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/logo-course.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,18 @@ +GIF89a�$�U���164���|���ƻ���i�~��������ˀ����� + +o��@@@%('�����������悥����W^[������m�����������000�����ߎ��������������u�����JQN������clh�����롼������ޡ�����>CA�����ͨ��������w�� ����Ǽ<==������PPPppp���ozu|��```���^ca���lml���,-,������������c�y������!�U,�$��T����'U������Q�UQ������������������U'���������������$�����������Ŏ��,�$����Ƅ����Tș�#͋��������ؙ)����������-�)�������̽��>g�]��a�J6�p�\@z��8���)~�T�x1X�J�ֱ{�h�EC"]v,�ёJC#]� a%� �Ĕɒ��G�!����F�>[� :�hP���1{d +�! ����95SU�W�����*%�p��]E�D��=ֲ y$�:��޼/��'�P��T"@�V�P��+.T���Gq !�[����4�(������e+��bC���5&��YjhP9�9M���DN�}���Kɠ;���U��������9���|�r��e/� ]�ͼ�Im� +��R�����'Uz�T��m:lPE�m`�Z��c�}+��!E,�r�� +ġ0�"8x@\�Q!CX`�i;��H��H9( 0�� +�!,`�m +PH� DG������`W�M�U�H��i��8�w�y0����_�'^4�vC �pۑ� +0xJ� �ОCRA{R�)�]O���}i>��"bR���E�6��pp� +x:�klqTq`{5�9��ART4)� *���*�x.0H�Q��,jY"[UR�"a����7q��7�Ut��$�@��N����m��R���C+��!I+� +���6`(���p۟V�U A���)x��Y� <�a" ����֖ +� ��i������Y�m�B� � ��Rѣ�-K����i%*�ܓ� � ��K!�V���-W�yo�� 6� �m9DQ� 5�|@�.GWh!5#���I=B��2��i���מ���Spp�NwHE���� +���u�\#^�eS�2���l@���< |�B��wm��q;Lwħu��i�PŸs[����0� ��i��''J�3P�@ط�<��]�L�;Wq�"������7�����pۮ~Z�U�͟߀����/0x� +���m�G������$3���#��v��-\J�6T�KM�+���@$��uP���5��� +H�������ܵ�J�j@�n�e�c�1D:�����8�� �E1Qm�h�\6`��d�N���;u0`�U� �Ĕ%�3�������f5�y͘ � �� +8��i��*b�����7�a���w]e�J��~ +�rE���f�=&���"9 F*rm�H�#i�ED`��t�%1��%4P��8I�R�r�I�*W��ܦ���,gI�Z�R +���.w��]N��A/e; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/logo-user.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/logo-user.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/logo-user.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,17 @@ +GIF89a�$�W������Z��Rgl@@@)36s�����Gx�M~� + +���S��{����� l��g�����f���������ȫ��q��������=MQ����������à�������������y��e��&(������`��000��������������������HZ^3@C������q��M|����PPP\syY�����}��pppISU������/68���������```���j��:<=w��9CEDPS��ڈ����ڼ��As�������!�W,�$��V����W�����VS��S���������������/�W ������������������$����������Ņ�� ���ȕ�δ�W���х$���С�ւ����ؿ��˔����״"���ߗ�����3�`�S��ʊ)2�#aBx���Z�H�n�XM� +��H�"ڢU"ь��4N����ȋ�(e@���g9,Ų���0�t�J�B4p�l�� %�>���( +G4�dhDB�v{�:�i�]�ruh���S���Ķ$[�W�S����.8�K A[��F�%D��_�a1 +�[8��+{�6:�j��*UQ�(�"���IT����n��kA�U��*-H_!z�긬I8�9 ?+���TI�~�N��x〿�U�ùs$R���H�'R:{W������?�39"�T���Ag[a��IQ��Z�8�pށgE(��B��P��=�� 5P@� \s# �R��X�P@� 4'�;�HEb��T�X �uW�� =:eZ +C<�H��d�]���])"�g�qwEs>� HĆ�sb�y�i tB0��!`�#L^� �ؠ�h1$�%dn0�o���_<�V�|U�@���7���H2`�oR1������Ra�nR0g�����#]���U|��~�Y�e�V�g�!��� V�@��p�o��@''���z:М�i��V� ���'E���BZ��hQP>�����w_5�h(�C�6�|�a��A���@Z�\�Vh����۹0�H� +rl܋%P�e=` +� ���%|�����~VH�"�9'���e����Y��8����^�P#���� +����X�l�� �� +KKm�E��� �^��LS�t� ����ZA��#�hxˁ^qU�S�X����B�� +l�_Qi< ��fc�sD$2Bs2佷�x�����Ȃ���:����Aֹ52�ZV�� +7 \ŰXj�� V��w\����pc[^l?H �T�p���V��U-x���f�B�`�� +B?�"��0�0 +l攛�l0�$�;-��@G4l��j_l&�*�/6&��:�*���G�B����c�c�����I������� +H�V�$h i� �����3Ϡ��ɻ�A�iD���\3ݻ����֭�…fɒw��̧N"�wU!�,> ��I��8km�HR34ۤX���D�+CA�<�:"�� +@B`!0��D0 &�Ӏ��Nԋ�P,�"�XX��V ��49����L.C �i. +x +p/xO�'LCI �./ ��� +Y4��vCLs0(�>� +�FGn��U�tO� ����� ����Jd/tp ��kD; +3:= +6T�I�NB ~M��;X���B; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/myspace-course.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/myspace-course.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/myspace-course.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,8 @@ +GIF89a> ����#tL������2}X^�|���O�p��çǷ���{��������@�dl��!�,> �H3��m4ɻO�pydi�C��C��x�:��@�($`I�c +:'�-����P.z��\\%{ + ��uy�. ��)? ~e) t +l*tK� H?E �$)* +���$ +U/��r?Ho+!�� �BCj��Q�pK� +����� �����F{%`*pl�~g@7 +.692'#p"�vqP �@|<����#J�X"; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/myspace-user.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/myspace-user.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/myspace-user.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1,4 @@ +GIF89a> ����9kAg����n�����������!�,> � +f�ͬI�(����4A (��)�Jg�!0�J1GQD���²d>� +(5 ���УB�b)p<���[�u�,U�2�܊���&��,��"mRis!n*J"$:n"3:eE$h�3#�eU�Y���=j|��a#Tr���&8q)4��$*h��o+.C)/�����N�']����� + ; \ No newline at end of file Index: openacs-4/packages/dotlrn/www/graphics/request.gif =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/graphics/Attic/request.gif,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/graphics/request.gif 4 Dec 2002 09:51:05 -0000 1.2 @@ -0,0 +1 @@ +GIF89a( ��3����\3�kF�y챞����k�7�rO���߁a���!�,( \�%��8k]\C@(�di�@q�A�0����q�v8�K��\@!o�,:}@��E���3�5��+U+5C�]��^k�P�B7��CGBp�y; \ No newline at end of file Index: openacs-4/packages/dotlrn-forums/dotlrn-forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/dotlrn-forums.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/dotlrn-forums/dotlrn-forums.info 21 Jul 2002 21:26:28 -0000 1.6 +++ openacs-4/packages/dotlrn-forums/dotlrn-forums.info 4 Dec 2002 09:51:50 -0000 1.7 @@ -20,9 +20,15 @@ + + + + + + Index: openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-admin-portlet-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-admin-portlet-create.sql 4 Dec 2002 09:51:50 -0000 1.2 @@ -0,0 +1,199 @@ +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- packages/dotlrn-forums/sql/dotlrn-forums-portlets-create.sql +-- + +-- Creates the dotlrn forums admin datasources for portal portlets + +-- This is a modified version of the standard forums admin portlet which includes +-- some admin UI options tied to dotlrn specific features. The particular feature +-- that triggered the creation of this custom portlet is the optional autosubscribing +-- of dotlrn community members to a forum. + +-- @author Don Baccus (arjun@openforce.net) +-- @creation-date 2002-29-08 + +-- $Id: dotlrn-forums-admin-portlet-create.sql,v 1.2 2002/12/04 09:51:50 peterm Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource.new( + name => 'dotlrn_forums_admin_portlet', + description => 'Displays the dotlrn_forums_admin' + ); + + -- 4 defaults procs + + -- shadeable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shadeable_p', + value => 'f' +); + + -- shaded_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'shaded_p', + value => 'f' +); + + -- hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'hideable_p', + value => 't' +); + + -- user_editable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'user_editable_p', + value => 'f' +); + + -- link_hideable_p + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 't', + key => 'link_hideable_p', + value => 't' +); + + + -- forums_admin-specific procs + + -- package_id must be configured + portal_datasource.set_def_param ( + datasource_id => ds_id, + config_required_p => 't', + configured_p => 'f', + key => 'package_id', + value => '' +); + + +end; +/ +show errors + + +declare + foo integer; +begin + -- create the implementation + foo := acs_sc_impl.new ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'dotlrn_forums_admin_portlet' + ); + +end; +/ +show errors + +declare + foo integer; +begin + + -- add all the hooks + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'GetMyName', + 'dotlrn_forums_admin_portlet::get_my_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'GetPrettyName', + 'dotlrn_forums_admin_portlet::get_pretty_name', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'Link', + 'dotlrn_forums_admin_portlet::link', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'AddSelfToPage', + 'dotlrn_forums_admin_portlet::add_self_to_page', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'Show', + 'dotlrn_forums_admin_portlet::show', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'Edit', + 'dotlrn_forums_admin_portlet::edit', + 'TCL' + ); + + foo := acs_sc_impl.new_alias ( + 'portal_datasource', + 'dotlrn_forums_admin_portlet', + 'RemoveSelfFromPage', + 'dotlrn_forums_admin_portlet::remove_self_from_page', + 'TCL' + ); + +end; +/ +show errors + +declare + foo integer; +begin + + -- Add the binding + acs_sc_binding.new ( + contract_name => 'portal_datasource', + impl_name => 'dotlrn_forums_admin_portlet' + ); +end; +/ +show errors + Index: openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql 9 Aug 2002 18:39:28 -0000 1.3 +++ openacs-4/packages/dotlrn-forums/sql/oracle/dotlrn-forums-create.sql 4 Dec 2002 09:51:50 -0000 1.4 @@ -14,120 +14,138 @@ -- details. -- + -- --- The forums applet for dotLRN --- -- @author Ben Adida (ben@openforce.net) -- @creation-date 2002-05-29 -- @version $Id$ -- +-- 10/05/2001 +-- redone for Forums by Ben 05/29/2002 +-- + declare - foo integer; + foo integer; begin + -- create the implementation + foo := acs_sc_impl.new ( + 'dotlrn_applet', + 'dotlrn_forums', + 'dotlrn_forums' + ); - foo := acs_sc_impl.new( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_owner_name => 'dotlrn_forums' - ); + -- add all the hooks - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'GetPrettyName', - impl_alias => 'dotlrn_forums::get_pretty_name', - impl_pl => 'TCL' - ); + -- GetPrettyName + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'GetPrettyName', + 'dotlrn_forums::get_pretty_name', + 'TCL' + ); - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'AddApplet', - impl_alias => 'dotlrn_forums::add_applet', - impl_pl => 'TCL' - ); + -- AddApplet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'AddApplet', + 'dotlrn_forums::add_applet', + 'TCL' + ); - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'RemoveApplet', - impl_alias => 'dotlrn_forums::remove_applet', - impl_pl => 'TCL' - ); + -- RemoveApplet + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'RemoveApplet', + 'dotlrn_forums::remove_applet', + 'TCL' + ); - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'AddAppletToCommunity', - impl_alias => 'dotlrn_forums::add_applet_to_community', - impl_pl => 'TCL' - ); + -- AddAppletToCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'AddAppletToCommunity', + 'dotlrn_forums::add_applet_to_community', + 'TCL' + ); - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'RemoveAppletFromCommunity', - impl_alias => 'dotlrn_forums::remove_applet_from_community', - impl_pl => 'TCL' - ); + -- RemoveAppletFromCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'RemoveAppletFromCommunity', + 'dotlrn_forums::remove_applet_from_community', + 'TCL' + ); + -- AddUser + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'AddUser', + 'dotlrn_forums::add_user', + 'TCL' + ); - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'AddUser', - impl_alias => 'dotlrn_forums::add_user', - impl_pl => 'TCL' - ); + -- RemoveUser + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'RemoveUser', + 'dotlrn_forums::remove_user', + 'TCL' + ); - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'RemoveUser', - impl_alias => 'dotlrn_forums::remove_user', - impl_pl => 'TCL' - ); + -- AddUserToCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'AddUserToCommunity', + 'dotlrn_forums::add_user_to_community', + 'TCL' + ); - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', - impl_operation_name => 'AddUserToCommunity', - impl_alias => 'dotlrn_forums::add_user_to_community', - impl_pl => 'TCL' - ); + -- RemoveUserFromCommunity + foo := acs_sc_impl.new_alias ( + 'dotlrn_applet', + 'dotlrn_forums', + 'RemoveUserFromCommunity', + 'dotlrn_forums::remove_user_from_community', + 'TCL' + ); - foo := acs_sc_impl.new_alias( + -- AddPortlet + foo := acs_sc_impl.new_alias ( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_forums', - impl_operation_name => 'RemoveUserFromCommunity', - impl_alias => 'dotlrn_forums::remove_user_from_community', - impl_pl => 'TCL' - ); - - foo := acs_sc_impl.new_alias( - impl_contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums', impl_operation_name => 'AddPortlet', impl_alias => 'dotlrn_forums::add_portlet', impl_pl => 'TCL' ); - foo := acs_sc_impl.new_alias( + -- RemovePortlet + foo := acs_sc_impl.new_alias ( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_forums', impl_operation_name => 'RemovePortlet', impl_alias => 'dotlrn_forums::remove_portlet', impl_pl => 'TCL' ); - foo := acs_sc_impl.new_alias( + -- Clone + foo := acs_sc_impl.new_alias ( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_forums', impl_operation_name => 'Clone', impl_alias => 'dotlrn_forums::clone', impl_pl => 'TCL' ); + -- Change Event Handler + foo := acs_sc_impl.new_alias( impl_contract_name => 'dotlrn_applet', impl_name => 'dotlrn_forums', @@ -136,11 +154,32 @@ impl_pl => 'TCL' ); - acs_sc_binding.new( - contract_name => 'dotlrn_applet', - impl_name => 'dotlrn_forums' - ); + -- Add the binding + acs_sc_binding.new ( + contract_name => 'dotlrn_applet', + impl_name => 'dotlrn_forums' + ); end; / -show errors +show errors; + +-- DRB: This is a bit of a hack but I can't really think of any reason why the dotlrn forums +-- applet should be forbidden from altering the forums table to track whether or not the +-- forum is an autosubscribe forum. We don't want to modify the forums package itself +-- because autosubscription is very much a dotLRN feature inherited from SSV1. + +-- An alternative would be to create an acs relationship to track which forums users should +-- be autosubscribed to, but each relationship is an object. This is a heavyweight way to +-- accomplish something simple. + +alter table forums_forums add ( + autosubscribe_p char(1) + default 'f' + constraint forums_autosubscribe_p_nn + not null + constraint forums_autosubscribe_p_ck + check (autosubscribe_p in ('t','f')) +); + +@dotlrn-forums-admin-portlet-create Index: openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-admin-portlet-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-admin-portlet-create.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-admin-portlet-create.sql 4 Dec 2002 09:51:50 -0000 1.2 @@ -0,0 +1,215 @@ +-- +-- This file is part of dotLRN. +-- +-- dotLRN is free software; you can redistribute it and/or modify it under the +-- terms of the GNU General Public License as published by the Free Software +-- Foundation; either version 2 of the License, or (at your option) any later +-- version. +-- +-- dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +-- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +-- details. +-- + +-- +-- packages/dotlrn-forums/sql/dotlrn-forums-portlets-create.sql +-- + +-- Creates the dotlrn forums admin datasources for portal portlets + +-- This is a modified version of the standard forums admin portlet which includes +-- some admin UI options tied to dotlrn specific features. The particular feature +-- that triggered the creation of this custom portlet is the optional autosubscribing +-- of dotlrn community members to a forum. + +-- @author Don Baccus (arjun@openforce.net) +-- @creation-date 2002-08-29 + +-- $Id: dotlrn-forums-admin-portlet-create.sql,v 1.2 2002/12/04 09:51:50 peterm Exp $ + +-- This is free software distributed under the terms of the GNU Public +-- License version 2 or higher. Full text of the license is available +-- from the GNU Project: http://www.fsf.org/copyleft/gpl.html + +create function inline_0() +returns integer as ' +declare + ds_id portal_datasources.datasource_id%TYPE; +begin + ds_id := portal_datasource__new( + ''dotlrn_forums_admin_portlet'', -- name + ''Displays the dotlrn_forums_admin'' -- description + ); + + -- 4 defaults procs + + -- shadeable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''shadeable_p'', -- key + ''f'' -- value + ); + + -- shaded_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''shaded_p'', -- key + ''f'' -- value + ); + + -- hideable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''hideable_p'', -- key + ''t'' -- value + ); + + -- user_editable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''user_editable_p'', -- key + ''f'' -- value + ); + + -- link_hideable_p + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''t'', -- configured_p + ''link_hideable_p'', -- key + ''t'' -- value + ); + + + -- forums_admin-specific procs + + -- package_id must be configured + perform portal_datasource__set_def_param ( + ds_id, -- datasource_id + ''t'', -- config_required_p + ''f'', -- configured_p + ''package_id'', -- key + '''' -- value + ); + + return 0; + +end;' language 'plpgsql'; +select inline_0(); +drop function inline_0(); + + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + -- create the implementation + perform acs_sc_impl__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''dotlrn_forums_admin_portlet'' + ); + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- add all the hooks + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''GetMyName'', + ''dotlrn_forums_admin_portlet::get_my_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''GetPrettyName'', + ''dotlrn_forums_admin_portlet::get_pretty_name'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''Link'', + ''dotlrn_forums_admin_portlet::link'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''AddSelfToPage'', + ''dotlrn_forums_admin_portlet::add_self_to_page'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''Show'', + ''dotlrn_forums_admin_portlet::show'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''Edit'', + ''dotlrn_forums_admin_portlet::edit'', + ''TCL'' + ); + + perform acs_sc_impl_alias__new ( + ''portal_datasource'', + ''dotlrn_forums_admin_portlet'', + ''RemoveSelfFromPage'', + ''dotlrn_forums_admin_portlet::remove_self_from_page'', + ''TCL'' + ); + + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +create function inline_0() +returns integer as ' +declare + foo integer; +begin + + -- Add the binding + perform acs_sc_binding__new ( + ''portal_datasource'', -- contract_name + ''dotlrn_forums_admin_portlet'' -- impl_name + ); + return 0; + +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); Index: openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql 9 Aug 2002 18:39:28 -0000 1.3 +++ openacs-4/packages/dotlrn-forums/sql/postgresql/dotlrn-forums-create.sql 4 Dec 2002 09:51:50 -0000 1.4 @@ -27,113 +27,111 @@ create function inline_0() returns integer as ' -declare - foo integer; begin - foo := acs_sc_impl__new ( + perform acs_sc_impl__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''dotlrn_forums'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''GetPrettyName'', ''dotlrn_forums::get_pretty_name'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''AddApplet'', ''dotlrn_forums::add_applet'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''RemoveApplet'', ''dotlrn_forums::remove_applet'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''AddAppletToCommunity'', ''dotlrn_forums::add_applet_to_community'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''RemoveAppletFromCommunity'', ''dotlrn_forums::remove_applet_from_community'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''AddUser'', ''dotlrn_forums::add_user'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''RemoveUser'', ''dotlrn_forums::remove_user'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''AddUserToCommunity'', ''dotlrn_forums::add_user_to_community'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''RemoveUserFromCommunity'', ''dotlrn_forums::remove_user_from_community'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''AddPortlet'', ''dotlrn_forums::add_portlet'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''RemovePortlet'', ''dotlrn_forums::remove_portlet'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''Clone'', ''dotlrn_forums::clone'', ''TCL'' ); - foo := acs_sc_impl_alias__new ( + perform acs_sc_impl_alias__new ( ''dotlrn_applet'', ''dotlrn_forums'', ''ChangeEventHandler'', @@ -152,3 +150,22 @@ select inline_0(); drop function inline_0(); + +-- DRB: This is a bit of a hack but I can't really think of any reason why the dotlrn forums +-- applet should be forbidden from altering the forums table to track whether or not the +-- forum is an autosubscribe forum. We don't want to modify the forums package itself +-- because autosubscription is very much a dotLRN feature inherited from SSV1. + +-- An alternative would be to create an acs relationship to track which forums users should +-- be autosubscribed to, but each relationship is an object. This is a heavyweight way to +-- accomplish something simple. + +-- JCD: postgres won't let us do this all as one step like oracle will... +alter table forums_forums add autosubscribe_p char(1) + constraint forums_autosubscribe_p_ck + check (autosubscribe_p in ('t','f')); +update forums_forums set autosubscribe_p = 'f' + where autosubscribe_p is null; +alter table forums_forums alter column autosubscribe_p SET DEFAULT 'f'; + +\i dotlrn-forums-admin-portlet-create.sql Index: openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-admin-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-admin-portlet-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-admin-portlet-procs.tcl 4 Dec 2002 09:51:50 -0000 1.2 @@ -0,0 +1,89 @@ +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +ad_library { + + Procedures to supports forums admin portlets + + @creation-date September 30 2001 + @author arjun@openforce.net + @version $Id: dotlrn-forums-admin-portlet-procs.tcl,v 1.2 2002/12/04 09:51:50 peterm Exp $ +} + +namespace eval dotlrn_forums_admin_portlet { + + ad_proc -private get_my_name { + } { + return "dotlrn_forums_admin_portlet" + } + + ad_proc -public get_pretty_name { + } { + return "Forums Administration" + } + + ad_proc -private my_package_key { + } { + return "dotlrn-forums" + } + + ad_proc -public link { + } { + return "" + } + + ad_proc -public add_self_to_page { + {-portal_id:required} + {-package_id:required} + } { + Adds a forums admin PE to the admin portal + + @return new element_id + } { + return [portal::add_element_parameters \ + -portal_id $portal_id \ + -portlet_name [get_my_name] \ + -pretty_name [get_pretty_name] \ + -key package_id \ + -value $package_id + ] + } + + ad_proc -public remove_self_from_page { + {-portal_id:required} + } { + Removes the forums admin PE from the portal + } { + portal::remove_element \ + -portal_id $portal_id \ + -portlet_name [get_my_name] + } + + ad_proc -public show { + cf + } { + } { + portal::show_proc_helper \ + -package_key [my_package_key] \ + -config_list $cf \ + -template_src "dotlrn-forums-admin-portlet" + } + + ad_proc -public edit { + cf + } { + } { + return "" + } + +} Index: openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl 11 Nov 2002 10:39:48 -0000 1.10 +++ openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.tcl 4 Dec 2002 09:51:50 -0000 1.11 @@ -97,12 +97,17 @@ ] # mount attachments under forums, if available - # attachments requires that dotlrn-fs is already mounted - if {[apm_package_registered_p attachments] && [dotlrn_community::applet_active_p -community_id $community_id -applet_key [dotlrn_fs::applet_key]]} { + # attachments requires that dotlrn-fs is already mounted + if {[apm_package_registered_p attachments] + && [dotlrn_community::applet_active_p \ + -community_id $community_id \ + -applet_key [dotlrn_fs::applet_key]]} { set attachments_node_id [site_node::new \ -name [attachments::get_url] \ - -parent_id [site_node::get_node_id_from_object_id -object_id $package_id] + -parent_id [site_node::get_node_id_from_object_id \ + -object_id $package_id + ] ] site_node::mount \ @@ -111,16 +116,18 @@ set fs_package_id [dotlrn_community::get_applet_package_id \ -community_id $community_id \ - -applet_key [dotlrn_fs::applet_key] \ + -applet_key [dotlrn_fs::applet_key] ] - + # map the fs root folder to the package_id of the new forums pkg attachments::map_root_folder \ -package_id $package_id \ - -folder_id [fs::get_root_folder -package_id $fs_package_id] - + -folder_id [fs::get_root_folder -package_id $fs_package_id] + + } else { + ns_log Warning "DOTLRN-FORUMS: Warning attachments or dotlrn-fs not found!" } - + set auto_create_forum_p [parameter::get_from_package_key \ -package_key [my_package_key] \ -parameter auto_create_forum_p \ @@ -151,7 +158,7 @@ -community_id $community_id \ ] - forums_admin_portlet::add_self_to_page \ + dotlrn_forums_admin_portlet::add_self_to_page \ -portal_id $admin_portal_id \ -package_id $package_id @@ -216,17 +223,17 @@ dotlrn_forums::add_portlet_helper $portal_id $args - # Set up notifications for all the forums - foreach forum [forum::list_forums -package_id $package_id] { - set forum_id [ns_set get $forum forum_id] + # Set up notifications for all the forums that have set for autosubscription + db_foreach select_forums {} { notification::request::new \ -type_id [notification::type::get_type_id -short_name forums_forum_notif] \ -user_id $user_id \ -object_id $forum_id \ -interval_id [notification::get_interval_id -name instant] \ -delivery_method_id [notification::get_delivery_method_id -name email] } + } ad_proc -public remove_user_from_community { Index: openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-forums/tcl/dotlrn-forums-procs.xql 4 Dec 2002 09:51:50 -0000 1.2 @@ -0,0 +1,11 @@ + + + + + select forum_id + from forums_forums + where package_id = :package_id + and autosubscribe_p = 't' + + + Index: openacs-4/packages/dotlrn-forums/www/dotlrn-forums-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/dotlrn-forums-admin-portlet.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-forums/www/dotlrn-forums-admin-portlet.adp 4 Dec 2002 09:51:51 -0000 1.2 @@ -0,0 +1,34 @@ +<% + + # + # Copyright (C) 2001, 2002 MIT + # + # This file is part of dotLRN. + # + # dotLRN is free software; you can redistribute it and/or modify it under the + # terms of the GNU General Public License as published by the Free Software + # Foundation; either version 2 of the License, or (at your option) any later + # version. + # + # dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY + # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + # details. + # + +%> + + Index: openacs-4/packages/dotlrn-forums/www/dotlrn-forums-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-forums/www/dotlrn-forums-admin-portlet.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-forums/www/dotlrn-forums-admin-portlet.tcl 4 Dec 2002 09:51:51 -0000 1.2 @@ -0,0 +1,59 @@ +# +# This file is part of dotLRN. +# +# dotLRN is free software; you can redistribute it and/or modify it under the +# terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# dotLRN is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# + +# This version of the forums-admin-portlet has been customized for dotLRN + +ad_page_contract { + The display logic for the forums admin portlet + + @author Ben Adida (ben@openforce) + @cvs_id $Id: dotlrn-forums-admin-portlet.tcl,v 1.2 2002/12/04 09:51:51 peterm Exp $ +} -properties { + +} + +array set config $cf + +set list_of_package_ids $config(package_id) + +if {[llength $list_of_package_ids] > 1} { + # We have a problem! + return -code error "There should be only one instance of forums for admin purposes" +} + +set package_id [lindex $list_of_package_ids 0] +set return_url "[ad_conn url]?[ad_conn query]" +set community_id [dotlrn_community::get_community_id] + +db_multirow -extend {query_vars} forums select_forums { + select forum_id, name, enabled_p, autosubscribe_p + from forums_forums + where package_id = :package_id +} { + set query_vars [export_vars {return_url community_id forum_id}] +} + +set url [lindex [site_node::get_url_from_object_id -object_id $package_id] 0] +set dotlrn_url [dotlrn::get_url] + +set package_id [ad_conn package_id] +set default_name [db_string select_package_name { + select instance_name from apm_packages where package_id= :package_id +}] + +append default_name " Forum" + +set encoded_default_name [ns_urlencode $default_name] + +ad_return_template Index: openacs-4/packages/dotlrn-fs/www/all-objects.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/all-objects.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn-fs/www/all-objects.tcl 18 Nov 2002 18:01:20 -0000 1.12 +++ openacs-4/packages/dotlrn-fs/www/all-objects.tcl 4 Dec 2002 09:52:16 -0000 1.13 @@ -63,7 +63,7 @@ set table_def [list] -lappend table_def [list name [_ dotlrn-fs.Name] {fs_objects.name $order} "
        "] +lappend table_def [list name [_ dotlrn-fs.Name] {fs_objects.name $order} ""] lappend table_def [list folder_name [_ dotlrn-fs.Folder] {} ""] lappend table_def [list type [_ dotlrn-fs.Type] {fs_objects.type $order} {c}] lappend table_def [list content_size [_ dotlrn-fs.Size] {fs_objects.content_size $order} {}] Index: openacs-4/packages/dotlrn-fs/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/index-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/dotlrn-fs/www/index-postgresql.xql 30 Jul 2002 12:27:47 -0000 1.1 +++ openacs-4/packages/dotlrn-fs/www/index-postgresql.xql 4 Dec 2002 09:52:16 -0000 1.2 @@ -9,7 +9,7 @@ from (select fs_folders.folder_id, fs_folders.parent_id, fs_folders.name, - nvl ((select sum(fs_files.content_size) as content_size + coalesce ((select sum(fs_files.content_size) as content_size from fs_files where fs_files.parent_id in (select cr_items.item_id from cr_items Index: openacs-4/packages/dotlrn-portlet/catalog/dotlrn-portlet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/catalog/dotlrn-portlet.en_US.ISO-8859-1.xml,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn-portlet/catalog/dotlrn-portlet.en_US.ISO-8859-1.xml 12 Nov 2002 08:46:39 -0000 1.2 +++ openacs-4/packages/dotlrn-portlet/catalog/dotlrn-portlet.en_US.ISO-8859-1.xml 4 Dec 2002 09:50:07 -0000 1.3 @@ -1,34 +1,38 @@ - + - Add A Member: Administer + All members Archive Archive this group Closed Copy this group - Customize layout - Edit properties - List + Email Members Manage Applets Manage Membership - Membership + Member List Needs Approval New %sub_pretty_name% No + Only admins Open + Sort + Sort/manage Group Administration - deregister - Add/Remove %pretty_name% members - This allows you to register new users and give them access to just this community. - This allows you to register new non-MIT users and give them access to just this community. - Information about students who are part of this community will not be available to this user. - Add a Limited Access user to this community - Add a Limited Access Guest user to this community + Add/Remove %pretty_name% members + Change Bulk Mail Policy Change Enrollment Policy + Create a new Limited Access user + Create a new Limited Access Guest user + Customize Portal Layout No %subcomm_pretty_plural% + Only use this to create an account for cross-registered students who do not have accounts from a previous class. + Only use this to create accounts for non-affiliated users who do not already have an account. + Information about other members of this community will not be available to this user. + Sorry, this functionality is not available to guests This group is archived + can send bulk mail to this community. Members Staff List Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp,v diff -u -N -r1.26 -r1.27 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp 12 Nov 2002 08:46:39 -0000 1.26 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.adp 4 Dec 2002 09:50:08 -0000 1.27 @@ -31,31 +31,35 @@
        +
      • #dotlrn-portlet.Manage_Membership# - #dotlrn-portlet.lt_AddRemove_pretty_name#
      • -
      • #dotlrn-portlet.Edit_properties#
      • -
        - -
      • #dotlrn-portlet.Customize_layout#
      • -
        - -
      • - #dotlrn-portlet.Membership# - +

      • Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl 10 Nov 2002 16:25:59 -0000 1.13 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-admin-portlet.tcl 4 Dec 2002 09:50:08 -0000 1.14 @@ -36,6 +36,18 @@ set admin_pretty_name [ad_parameter -localize dotlrn_admin_pretty_name dotlrn] set subcommunity_p [dotlrn_community::subcommunity_p -community_id $community_id] +#The community_type is dotlrn_club for "communties" and the subject name for classes. +set comm_type [dotlrn_community::get_community_type_from_community_id $community_id] + +if {$comm_type == "dotlrn_club"} { + set club_p 1 +} else { + set club_p 0 +} + +set members_rel_id [dotlrn_community::get_members_rel_id -community_id $community_id] +set members_can_spam_p [permission::permission_p -party_id $members_rel_id -object_id $community_id -privilege dotlrn_spam_community] + # get the community info db_1row select_community_info {} Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp 10 Nov 2002 16:25:59 -0000 1.11 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.adp 4 Dec 2002 09:50:08 -0000 1.12 @@ -18,44 +18,47 @@ %> - -
          - + + +
        #dotlrn.User##dotlrn.Actions##dotlrn.Access# #dotlrn.Guest# #dotlrn.Site-wide_Admin#
        + <% # We had to escape to Tcl to get the desired behavior. AG %> + #dotlrn.lt_approve_and_add_to_do# | #dotlrn.nuke# + @users.access_level@#dotlrn.no##dotlrn.yes# + + #dotlrn.NA# + + + #dotlrn.no##dotlrn.yes# + + #dotlrn.yes# @@ -62,6 +97,7 @@ #dotlrn.yes#
        \$name\$name\$folder_name[ad_decode $type folder "$content_size item[ad_decode $content_size 1 {} s]" url {} "$content_size byte[ad_decode $content_size 1 {} s]"]
        + -
      • - <%= [acs_community_member_link -user_id $users(user_id) -label "$users(first_names) $users(last_name)"] %> - - - (@users.email@) - - @users.role@ + +
      • + + + + - - [ #dotlrn-portlet.deregister# ] - - - - [ #dotlrn-portlet.deregister# ] - - - - -
        - + + - - -
        - #dotlrn-portlet.Add_A_Member# - - + +
        +#dotlrn-portlet.Sort##dotlrn-portlet.Sortmanage# + + +
        + <%= [acs_community_member_link -user_id $users(user_id) -label "$users(first_names) $users(last_name)"] %> + + @users.email@ + + @users.role@ +
        + + -
        + #dotlrn-portlet.lt_Sorry_this_functional#
        - + + +
        +
        Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl 9 Aug 2002 18:39:29 -0000 1.9 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-portlet.tcl 4 Dec 2002 09:50:08 -0000 1.10 @@ -32,6 +32,7 @@ set admin_p [dotlrn::user_can_admin_community_p -user_id $user_id -community_id $community_id] set read_private_data_p [dotlrn::user_can_read_private_data_p -user_id $user_id] +set spam_p [dotlrn::user_can_spam_community_p -user_id [ad_get_user_id] -community_id $community_id] # Get all users for this community, including role template::util::list_of_ns_sets_to_multirow \ Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 10 Nov 2002 16:25:59 -0000 1.12 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-members-staff-portlet.adp 4 Dec 2002 09:50:08 -0000 1.13 @@ -80,6 +80,6 @@
        -<%= [dotlrn_community::get_role_pretty_plural -community_id $community_id -rel_type dotlrn_student_rel] %> #dotlrn-portlet.List# +#dotlrn-portlet.Member_List#
        Index: openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp 10 Nov 2002 16:25:59 -0000 1.10 +++ openacs-4/packages/dotlrn-portlet/www/dotlrn-portlet.adp 4 Dec 2002 09:50:08 -0000 1.11 @@ -43,4 +43,3 @@
        - Index: openacs-4/packages/dotlrn-syllabus/tcl/syllabus-portlet-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/tcl/syllabus-portlet-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/dotlrn-syllabus/tcl/syllabus-portlet-procs.tcl 10 Nov 2002 18:16:48 -0000 1.7 +++ openacs-4/packages/dotlrn-syllabus/tcl/syllabus-portlet-procs.tcl 4 Dec 2002 09:53:05 -0000 1.8 @@ -129,6 +129,7 @@ lappend out_list [ns_set get $row object_id] lappend out_list [ns_set get $row type] lappend out_list [ns_set get $row live_revision] + lappend out_list [ns_set get $row file_upload_name] } } Index: openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.adp 10 Nov 2002 18:16:48 -0000 1.4 +++ openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.adp 4 Dec 2002 09:53:05 -0000 1.5 @@ -17,14 +17,13 @@ # %> - #dotlrn-syllabus.Go_to# - #dotlrn-syllabus.Download# + #dotlrn-syllabus.Download# #dotlrn-syllabus.pretty_name# Index: openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.tcl 9 Aug 2002 18:39:30 -0000 1.2 +++ openacs-4/packages/dotlrn-syllabus/www/syllabus-portlet.tcl 4 Dec 2002 09:53:05 -0000 1.3 @@ -36,4 +36,4 @@ set syllabus_id [lindex $syllabus_info_list 1] set type [lindex $syllabus_info_list 2] set live_revision [lindex $syllabus_info_list 3] - +set file_upload_name [lindex $syllabus_info_list 4] Index: openacs-4/packages/faq-portlet/catalog/faq-portlet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/catalog/faq-portlet.en_US.ISO-8859-1.xml,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/faq-portlet/catalog/faq-portlet.en_US.ISO-8859-1.xml 7 Nov 2002 08:16:51 -0000 1.2 +++ openacs-4/packages/faq-portlet/catalog/faq-portlet.en_US.ISO-8859-1.xml 4 Dec 2002 09:53:40 -0000 1.3 @@ -1,12 +1,15 @@ - + - Frequently Asked Questions (FAQs) + Disable + Disabled + Enable FAQ Administration - There should be only one instance of FAQ for admin purposes - New FAQ Group Name + New FAQ No FAQs + There should be only one instance of FAQ for admin purposes + Frequently Asked Questions (FAQs) Index: openacs-4/packages/faq-portlet/www/faq-admin-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/faq-admin-portlet.adp,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/faq-portlet/www/faq-admin-portlet.adp 23 Oct 2002 12:30:49 -0000 1.6 +++ openacs-4/packages/faq-portlet/www/faq-admin-portlet.adp 4 Dec 2002 09:53:40 -0000 1.7 @@ -23,6 +23,12 @@
      • @faqs.faq_name@ + + (#faq-portlet.Disabled# | #faq-portlet.Enable#) + + + (#faq-portlet.Disable#) +

      • Index: openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl 23 Oct 2002 12:30:49 -0000 1.6 +++ openacs-4/packages/faq-portlet/www/faq-admin-portlet.tcl 4 Dec 2002 09:53:40 -0000 1.7 @@ -26,6 +26,8 @@ # Configuration array set config $cf +set referer [ns_conn url] + # Should be a list already! set list_of_package_ids $config(package_id) @@ -38,7 +40,8 @@ db_multirow faqs select_faqs { select f.faq_id, - f.faq_name + f.faq_name, + f.disabled_p from faqs f, acs_objects o where f.faq_id = o.object_id Index: openacs-4/packages/faq-portlet/www/faq-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/Attic/faq-portlet-oracle.xql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/faq-portlet/www/faq-portlet-oracle.xql 4 Jun 2002 00:03:44 -0000 1.9 +++ openacs-4/packages/faq-portlet/www/faq-portlet-oracle.xql 4 Dec 2002 09:53:40 -0000 1.10 @@ -6,7 +6,7 @@ select acs_objects.context_id as package_id, - acs_object.name(acs_objects.context_id) as parent_name, + acs_object.name(apm_package.parent_id(acs_objects.context_id)) as parent_name, (select site_node.url(site_nodes.node_id) from site_nodes where site_nodes.object_id = acs_objects.context_id) as url, @@ -15,8 +15,9 @@ from faqs, acs_objects where faqs.faq_id = acs_objects.object_id + and faqs.disabled_p <> 't' and acs_objects.context_id in ([join $list_of_package_ids ", "]) - order by parent_name + order by lower(faq_name) Index: openacs-4/packages/faq-portlet/www/faq-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/Attic/faq-portlet-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/faq-portlet/www/faq-portlet-postgresql.xql 17 Jul 2002 20:20:31 -0000 1.1 +++ openacs-4/packages/faq-portlet/www/faq-portlet-postgresql.xql 4 Dec 2002 09:53:40 -0000 1.2 @@ -6,7 +6,7 @@ select acs_objects.context_id as package_id, - acs_object__name(acs_objects.context_id) as parent_name, + acs_object__name(apm_package__parent_id(acs_objects.context_id)) as parent_name, (select site_node__url(site_nodes.node_id) from site_nodes where site_nodes.object_id = acs_objects.context_id) as url, @@ -15,9 +15,10 @@ from faqs, acs_objects where faqs.faq_id = acs_objects.object_id + and faqs.disabled_p <> 't' and acs_objects.context_id in ([join $list_of_package_ids ", "]) - order by parent_name + order by lower(faq_name) - \ No newline at end of file + Index: openacs-4/packages/faq-portlet/www/faq-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq-portlet/www/faq-portlet.adp,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/faq-portlet/www/faq-portlet.adp 23 Oct 2002 12:30:49 -0000 1.14 +++ openacs-4/packages/faq-portlet/www/faq-portlet.adp 4 Dec 2002 09:53:40 -0000 1.15 @@ -28,10 +28,10 @@ %> - - - - +
        #faq-portlet.name##faq-portlet.group#
        + + + @@ -50,10 +50,10 @@ - + - + Index: openacs-4/packages/forums-portlet/catalog/forums-portlet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/catalog/forums-portlet.en_US.ISO-8859-1.xml,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/forums-portlet/catalog/forums-portlet.en_US.ISO-8859-1.xml 10 Nov 2002 17:33:35 -0000 1.2 +++ openacs-4/packages/forums-portlet/catalog/forums-portlet.en_US.ISO-8859-1.xml 4 Dec 2002 09:53:56 -0000 1.3 @@ -1,12 +1,13 @@ - + Forum + New! New Forum No Forums Forums Administration disabled There should be only one instance of forums for admin purposes - Bulletin Boards + Forums Index: openacs-4/packages/forums-portlet/www/forums-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums-portlet/www/forums-portlet.adp,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/forums-portlet/www/forums-portlet.adp 2 Dec 2002 12:39:45 -0000 1.11 +++ openacs-4/packages/forums-portlet/www/forums-portlet.adp 4 Dec 2002 09:53:56 -0000 1.12 @@ -33,19 +33,17 @@ <% set new_package_id $forums(package_id) %> -
        -
        @forums.parent_name@
        + @forums.parent_name@
        • - @forums.name@ - +#forums-portlet.New#
        • <% Index: openacs-4/packages/fs-portlet/catalog/fs-portlet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/catalog/fs-portlet.en_US.ISO-8859-1.xml,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/fs-portlet/catalog/fs-portlet.en_US.ISO-8859-1.xml 23 Oct 2002 12:32:12 -0000 1.1 +++ openacs-4/packages/fs-portlet/catalog/fs-portlet.en_US.ISO-8859-1.xml 4 Dec 2002 09:54:15 -0000 1.2 @@ -3,13 +3,10 @@ view details - View files modified in the last byte bytes Documents Create a new folder - All - days items Upload a file Create a URL Index: openacs-4/packages/fs-portlet/sql/oracle/fs-contents-portlet-mods.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/oracle/fs-contents-portlet-mods.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/sql/oracle/fs-contents-portlet-mods.sql 4 Dec 2002 09:54:15 -0000 1.2 @@ -0,0 +1,30 @@ +-- +-- Created by aegrumet@alum.mit.edu on 2002-06-24. +-- +-- This is a temporary workaround to ensure that +-- fs_contents_portlets get renamed properly. +-- + +create or replace trigger fs_cont_port_fldr_rnme_tr +after update on cr_folders +for each row +begin + + for row in (select m.element_id + from portal_element_map m, + portal_element_parameters p + where p.key = 'folder_id' + and p.value = :new.folder_id + and m.element_id = p.element_id + and m.name = 'fs_contents_portlet') loop + + update portal_element_map + set pretty_name = :new.label + where element_id = row.element_id; + + end loop; + + +end fs_cont_port_fldr_rnme_tr; +/ +show errors Index: openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-mods.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-mods.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/fs-portlet/sql/postgresql/fs-contents-portlet-mods.sql 4 Dec 2002 09:54:15 -0000 1.2 @@ -0,0 +1,30 @@ +-- +-- Created by aegrumet@alum.mit.edu on 2002-06-24. +-- +-- This is a temporary workaround to ensure that +-- fs_contents_portlets get renamed properly. +-- + +create or replace trigger fs_cont_port_fldr_rnme_tr +after update on cr_folders +for each row +begin + + for row in (select m.element_id + from portal_element_map m, + portal_element_parameters p + where p.key = 'folder_id' + and p.value = :new.folder_id + and m.element_id = p.element_id + and m.name = 'fs_contents_portlet') loop + + update portal_element_map + set pretty_name = :new.label + where element_id = row.element_id; + + end loop; + + +end fs_cont_port_fldr_rnme_tr; +/ +show errors Index: openacs-4/packages/fs-portlet/www/fs-contents-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/Attic/fs-contents-portlet-oracle.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/fs-portlet/www/fs-contents-portlet-oracle.xql 31 May 2002 06:34:27 -0000 1.1 +++ openacs-4/packages/fs-portlet/www/fs-contents-portlet-oracle.xql 4 Dec 2002 09:54:15 -0000 1.2 @@ -13,6 +13,7 @@ from site_nodes where site_nodes.object_id = file_storage.get_package_id(fs_objects.object_id))) as url, fs_objects.object_id, + fs_objects.file_upload_name, fs_objects.name, fs_objects.live_revision, fs_objects.type, Index: openacs-4/packages/fs-portlet/www/fs-contents-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/Attic/fs-contents-portlet-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/fs-portlet/www/fs-contents-portlet-postgresql.xql 12 Aug 2002 13:40:08 -0000 1.2 +++ openacs-4/packages/fs-portlet/www/fs-contents-portlet-postgresql.xql 4 Dec 2002 09:54:15 -0000 1.3 @@ -16,6 +16,7 @@ where site_nodes.object_id = file_storage__get_package_id(fs_objects.object_id)) END) as url, fs_objects.object_id, + fs_objects.file_upload_name, fs_objects.name, fs_objects.live_revision, fs_objects.type, Index: openacs-4/packages/fs-portlet/www/fs-contents-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-contents-portlet.adp,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/fs-portlet/www/fs-contents-portlet.adp 23 Oct 2002 12:32:12 -0000 1.8 +++ openacs-4/packages/fs-portlet/www/fs-contents-portlet.adp 4 Dec 2002 09:54:15 -0000 1.9 @@ -34,45 +34,6 @@
        +
        #faq-portlet.name##faq-portlet.group#
        @faqs.faq_name@ @faqs.parent_name@
        - - - - - - - @folders.name@ - @folders.type@ - - 0 #fs-portlet.items# - - - - @folders.content_size@ #fs-portlet.items# - - - @folders.content_size@ #fs-portlet.item# - - - - - - - @folders.name@ - @folders.type@ -   - - - - @folders.name@ - @folders.type@ - @folders.content_size@ #fs-portlet.byte##fs-portlet.bytes# - - - - - - - - - + Index: openacs-4/packages/fs-portlet/www/fs-contents-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-contents-portlet.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/fs-portlet/www/fs-contents-portlet.tcl 9 Aug 2002 18:39:32 -0000 1.4 +++ openacs-4/packages/fs-portlet/www/fs-contents-portlet.tcl 4 Dec 2002 09:54:15 -0000 1.5 @@ -48,6 +48,8 @@ } set folder_id [lindex $list_of_folder_ids 0] +set scope_fs_url "/packages/file-storage/www/folder-chunk" +set n_past_days "" set url [site_node_object_map::get_url -object_id $folder_id] set recurse_p 1 set contents_url "${url}folder-contents?[export_vars {folder_id recurse_p}]&" Index: openacs-4/packages/fs-portlet/www/fs-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet-oracle.xql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/fs-portlet/www/fs-portlet-oracle.xql 22 May 2002 08:50:54 -0000 1.9 +++ openacs-4/packages/fs-portlet/www/fs-portlet-oracle.xql 4 Dec 2002 09:54:15 -0000 1.10 @@ -14,6 +14,7 @@ where site_nodes.object_id = file_storage.get_package_id(fs_objects.object_id))) as url, fs_objects.object_id, fs_objects.name, + fs_objects.file_upload_name, fs_objects.live_revision, fs_objects.type, fs_objects.content_size @@ -36,6 +37,7 @@ where site_nodes.object_id = file_storage.get_package_id(fs_objects.object_id))) as url, fs_objects.object_id, fs_objects.name, + fs_objects.file_upload_name, fs_objects.live_revision, fs_objects.type, fs_objects.content_size @@ -49,3 +51,10 @@ + + + + + + + Index: openacs-4/packages/fs-portlet/www/fs-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/fs-portlet/www/fs-portlet-postgresql.xql 24 Jul 2002 15:34:40 -0000 1.1 +++ openacs-4/packages/fs-portlet/www/fs-portlet-postgresql.xql 4 Dec 2002 09:54:15 -0000 1.2 @@ -17,6 +17,7 @@ END) as url, fs_objects.object_id, fs_objects.name, + fs_objects.file_upload_name, fs_objects.live_revision, fs_objects.type, fs_objects.content_size @@ -42,6 +43,7 @@ END) as url, fs_objects.object_id, fs_objects.name, + fs_objects.file_upload_name, fs_objects.live_revision, fs_objects.type, fs_objects.content_size Index: openacs-4/packages/fs-portlet/www/fs-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet.adp,v diff -u -N -r1.22 -r1.23 --- openacs-4/packages/fs-portlet/www/fs-portlet.adp 23 Oct 2002 12:32:12 -0000 1.22 +++ openacs-4/packages/fs-portlet/www/fs-portlet.adp 4 Dec 2002 09:54:15 -0000 1.23 @@ -20,9 +20,8 @@ - - +
        - - -
        @@ -36,98 +35,82 @@
        -
        - - - #fs-portlet.view_past_mod_files# - #fs-portlet.all# - | - 1 - | - 2 - | - 3 - | - 7 - | - 14 - | - 30 - #fs-portlet.days#. - - -
        -
        -
        - - - - - - - - - - + + + + - - - - - - +
        - - - - @folders.name@ - - @folders.type@0 #fs-portlet.items# @folders.content_size@ #fs-portlet.items#@folders.content_size@ #fs-portlet.item#
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + @folders.name@ + @folders.type@0 #fs-portlet.items#@folders.content_size@ #fs-portlet.items#@folders.content_size@ #fs-portlet.item#  + + + @folders.name@ + @folders.type@   + + + @folders.name@ + @folders.type@@folders.content_size@ #fs-portlet.byte##fs-portlet.bytes# + [#fs-portlet.view_details#] + +
        + -
        - - - - - - - @folders.name@ - - @folders.type@ -   -   - - - - - - - @folders.name@ - - @folders.type@ - @folders.content_size@ #fs-portlet.byte##fs-portlet.bytes# - - - [ - #fs-portlet.view_details# - ] - - - - - - -
          - Index: openacs-4/packages/fs-portlet/www/fs-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/fs-portlet/www/fs-portlet.tcl,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/fs-portlet/www/fs-portlet.tcl 9 Aug 2002 18:39:32 -0000 1.15 +++ openacs-4/packages/fs-portlet/www/fs-portlet.tcl 4 Dec 2002 09:54:15 -0000 1.16 @@ -72,11 +72,11 @@ set delete_p [permission::permission_p -object_id $folder_id -privilege "delete"] } -set query "select_folder_contents" -if {!$scoped_p} { - set query "select_folders" +set query "select_folders" +if {$scoped_p} { + set scope_fs_url "/packages/file-storage/www/folder-chunk" +} else { + db_multirow folders $query {} } -db_multirow folders $query {} - ad_return_template Index: openacs-4/packages/new-portal/sql/oracle/add-sloan-theme.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/oracle/Attic/add-sloan-theme.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/new-portal/sql/oracle/add-sloan-theme.sql 16 Oct 2002 15:39:16 -0000 1.1 +++ openacs-4/packages/new-portal/sql/oracle/add-sloan-theme.sql 4 Dec 2002 09:54:47 -0000 1.2 @@ -1,5 +1,5 @@ -- --- Copyright (C) 2001, 2002 OpenForce, Inc. +-- Copyright (C) 2001, 2002 MIT -- -- This file is part of dotLRN. -- @@ -15,10 +15,6 @@ -- -- --- The New Portal Package --- copyright 2001, OpenForce, Inc. --- distributed under the GNU GPL v2 --- -- Arjun Sanyal (arjun@openforce.net) -- $Id$ -- Index: openacs-4/packages/new-portal/sql/postgresql/add-sloan-theme.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/sql/postgresql/Attic/add-sloan-theme.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/new-portal/sql/postgresql/add-sloan-theme.sql 16 Oct 2002 15:39:16 -0000 1.1 +++ openacs-4/packages/new-portal/sql/postgresql/add-sloan-theme.sql 4 Dec 2002 09:54:47 -0000 1.2 @@ -1,5 +1,5 @@ -- --- Copyright (C) 2001, 2002 OpenForce, Inc. +-- Copyright (C) 2001, 2002 MIT -- -- This file is part of dotLRN. -- @@ -15,11 +15,6 @@ -- -- --- The New Portal Package --- copyright 2001, OpenForce, Inc. --- distributed under the GNU GPL v2 --- --- Arjun Sanyal (arjun@openforce.net) -- $Id$ -- Index: openacs-4/packages/new-portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/tcl/portal-procs.tcl,v diff -u -N -r1.161 -r1.162 --- openacs-4/packages/new-portal/tcl/portal-procs.tcl 17 Nov 2002 13:12:58 -0000 1.161 +++ openacs-4/packages/new-portal/tcl/portal-procs.tcl 4 Dec 2002 09:54:47 -0000 1.162 @@ -431,7 +431,7 @@ append theme_chunk "" if {$allow_theme_change_p} { - append template "$theme_chunk" + append template "$theme_chunk" } # @@ -2316,4 +2316,3 @@ } } - Index: openacs-4/packages/new-portal/www/show-here.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/show-here.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/new-portal/www/show-here.tcl 16 Oct 2002 15:39:17 -0000 1.1 +++ openacs-4/packages/new-portal/www/show-here.tcl 4 Dec 2002 09:54:47 -0000 1.2 @@ -1,5 +1,5 @@ # -# Copyright (C) 2001, 2002 OpenForce, Inc. +# Copyright (C) 2001, 2002 MIT # # This file is part of dotLRN. # Index: openacs-4/packages/new-portal/www/themes/sloan-theme.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/new-portal/www/themes/sloan-theme.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/new-portal/www/themes/sloan-theme.adp 16 Oct 2002 15:39:17 -0000 1.1 +++ openacs-4/packages/new-portal/www/themes/sloan-theme.adp 4 Dec 2002 09:54:47 -0000 1.2 @@ -1,8 +1,8 @@ <% # - # Copyright (C) 2001, 2002 OpenForce, Inc. - # + # Copyright (C) 2001, 2002 MIT + # # This file is part of dotLRN. # # dotLRN is free software; you can redistribute it and/or modify it under the Index: openacs-4/packages/news-portlet/www/news-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet-oracle.xql,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/news-portlet/www/news-portlet-oracle.xql 18 Nov 2002 17:59:27 -0000 1.6 +++ openacs-4/packages/news-portlet/www/news-portlet-oracle.xql 4 Dec 2002 09:55:27 -0000 1.7 @@ -18,7 +18,9 @@ and (news_items_approved.archive_date >= sysdate or news_items_approved.archive_date is null) and news_items_approved.package_id in ([join $list_of_package_ids ", "]) order by parent_name, - news_items_approved.publish_title + news_items_approved.publish_date desc, + news_items_approved.publish_title + Index: openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql 18 Nov 2002 17:59:27 -0000 1.2 +++ openacs-4/packages/news-portlet/www/news-portlet-postgresql.xql 4 Dec 2002 09:55:27 -0000 1.3 @@ -18,7 +18,9 @@ and (news_items_approved.archive_date >= current_timestamp or news_items_approved.archive_date is null) and news_items_approved.package_id in ([join $list_of_package_ids ", "]) order by parent_name, - news_items_approved.publish_title + news_items_approved.publish_date desc, + news_items_approved.publish_title + Index: openacs-4/packages/news-portlet/www/news-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/news-portlet.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/news-portlet/www/news-portlet.adp 10 Nov 2002 16:24:42 -0000 1.9 +++ openacs-4/packages/news-portlet/www/news-portlet.adp 4 Dec 2002 09:55:27 -0000 1.10 @@ -32,15 +32,20 @@ <% set new_package_id $news_items(package_id) %> -
      -
    • @news_items.parent_name@ + @news_items.parent_name@
        + + + +
      • @news_items.publish_title@ (@news_items.publish_date@) @@ -49,7 +54,7 @@ <% set old_package_id $new_package_id %> - + Index: openacs-4/packages/news-portlet/www/summary.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/summary.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news-portlet/www/summary.adp 4 Dec 2002 09:55:27 -0000 1.2 @@ -0,0 +1,11 @@ +<% # This is the default template to render news items in admin/. Comments are not shown here %> +

        @publish_title@

        +
        +@publish_body@ +@more_link@ +

        Contributed by @creator_link@ +

        + + + + Index: openacs-4/packages/news-portlet/www/summary.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-portlet/www/summary.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/news-portlet/www/summary.tcl 4 Dec 2002 09:55:27 -0000 1.2 @@ -0,0 +1,99 @@ +# /packages/news/www/item.tcl + +ad_page_contract { + + Page to view one item (live or archived) in its active revision + @author stefan@arsdigita.com + @creation-date 2000-12-20 + @cvs-id $Id: summary.tcl,v 1.2 2002/12/04 09:55:27 peterm Exp $ + +} { + +} -properties { + title:onevalue + item_exist_p:onevalue + publish_title:onevalue + publish_date:onevalue + publish_body:onevalue + html_p:onevalue + creator_link:onevalue + comments:onevalue + comment_link:onevalue +} + +ad_require_permission [ad_conn package_id] news_read + + +# live view of a news item in its active revision +set item_exist_p [db_0or1row one_item " +select item_id, + live_revision, + publish_title, + html_p, + publish_date, + '' || item_creator || '' as creator_link +from news_items_live_or_submitted +where item_id = :item_id"] + + +if { $item_exist_p } { + + # workaround to get blobs with >4000 chars into a var, content.blob_to_string fails! + # when this'll work, you get publish_body by selecting 'publish_body' directly from above view + # + # RAL: publish_body is already snagged in the 1st query above for postgres. + # CERM: This work around is not used here, so this may not work for postgres. + # + + set publish_body [db_string get_content "select content + from cr_revisions + where revision_id = :live_revision"] + + +#currently not using comments in the summary but someone might want to change the template so they are available. + if { [ad_parameter SolicitCommentsP "news" 0] && + [ad_permission_p $item_id general_comments_create] } { + set comment_link [general_comments_create_link $item_id "[ad_conn package_url]item?item_id=$item_id"] + set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 \ + $item_id "[ad_conn package_url]item?item_id=$item_id"] + } else { + set comment_link "" + set comments "" + } + + +} else { + set context_bar {} + set title "Error" +} + +#This is a summary in the portlet we don't want it to be too long. + +set more_link "" +if { [string length $publish_body] > 1000 } { + set publish_body "[string range $publish_body 0 1000]" + set more_link "......read more" +} + +set publish_body [ad_convert_to_html -html_p $html_p $publish_body] + + + + +ad_return_template + + + + + + + + + + + + + + + + Index: openacs-4/packages/static-portlet/catalog/static-portlet.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/catalog/static-portlet.en_US.ISO-8859-1.xml,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/static-portlet/catalog/static-portlet.en_US.ISO-8859-1.xml 10 Nov 2002 17:44:39 -0000 1.2 +++ openacs-4/packages/static-portlet/catalog/static-portlet.en_US.ISO-8859-1.xml 4 Dec 2002 09:56:14 -0000 1.3 @@ -10,6 +10,6 @@ Custom Portlet Administration Delete %element_pretty_name% %pretty_name% Editing %element_pretty_name% %pretty_name% - Use this form to create a new %element_pretty_name%. The %element_pretty_name% will be created and automatically placed on the first page of %portal_name% portal. Goto the %control_panel_text% and select Customize Layout to move the this %element_pretty_name%. + Use this form to create a new %element_pretty_name%. The %element_pretty_name% will be created and automatically placed on the first page of %portal_name% portal. Goto the %control_panel_text% and select Customize Layout to move this %element_pretty_name%. <strong>Note</strong>: You can use plain text or HTML in the Content area. Index: openacs-4/packages/static-portlet/www/element-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-portlet/www/Attic/element-new.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/static-portlet/www/element-new.tcl 10 Nov 2002 17:44:39 -0000 1.11 +++ openacs-4/packages/static-portlet/www/element-new.tcl 4 Dec 2002 09:56:14 -0000 1.12 @@ -41,6 +41,15 @@ set control_panel_text "[_ static-portlet.Control_Panel]" } +#these are set for display and instructions. +set community_id $package_id + +set portal_name [portal::get_name $portal_id] + +if {![info exists control_panel_text]} { + set control_panel_text "[_ static-portlet.Control_Panel]" +} + form create new_static_element element create new_static_element pretty_name \