Index: lams_central/build.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_central/build.xml,v
diff -u -r1.36.2.1 -r1.36.2.2
--- lams_central/build.xml 12 Mar 2007 01:30:05 -0000 1.36.2.1
+++ lams_central/build.xml 7 Jun 2007 05:02:07 -0000 1.36.2.2
@@ -113,9 +113,39 @@
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+ isLAMS ${isLAMS}
+ isRAMS ${isRAMS}
+
+
+
+ Setting login logo to RAMS
+
+
+
+
+
+
+
+
+
+
@@ -145,8 +175,12 @@
+
+
+
+
@@ -302,7 +336,7 @@
-
+
Index: lams_central/src/flash/lam_addseq_wiz.fla
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/flash/Attic/lam_addseq_wiz.fla,v
diff -u -r1.21.2.1 -r1.21.2.2
Binary files differ
Index: lams_central/src/flash/main_monitoring.as
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/flash/Attic/main_monitoring.as,v
diff -u -r1.6 -r1.6.2.1
Binary files differ
Index: lams_central/src/flash/org/lamsfoundation/lams/monitoring/Application.as
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/flash/org/lamsfoundation/lams/monitoring/Attic/Application.as,v
diff -u -r1.24 -r1.24.2.1
Binary files differ
Index: lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java,v
diff -u -r1.4 -r1.4.2.1
--- lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java 17 Sep 2006 06:12:05 -0000 1.4
+++ lams_central/src/java/org/lamsfoundation/lams/security/LDAPAuthenticator.java 7 Jun 2007 05:02:07 -0000 1.4.2.1
@@ -70,7 +70,6 @@
// Load all authentication method parameters into env
env.setProperty(Context.INITIAL_CONTEXT_FACTORY, method.getParameterByName(Context.INITIAL_CONTEXT_FACTORY).getValue());
env.setProperty(Context.SECURITY_AUTHENTICATION, method.getParameterByName(Context.SECURITY_AUTHENTICATION).getValue());
- env.setProperty(Context.SECURITY_PROTOCOL, method.getParameterByName(Context.SECURITY_PROTOCOL).getValue());
String principalDNPrefix = method.getParameterByName(PRINCIPAL_DN_PREFIX_OPT).getValue();
String principalDNSuffix = method.getParameterByName(PRINCIPAL_DN_SUFFIX_OPT).getValue();
@@ -79,19 +78,25 @@
env.setProperty(Context.PROVIDER_URL, method.getParameterByName(Context.PROVIDER_URL).getValue());
env.put(Context.SECURITY_CREDENTIALS, credential);
-
+
Object originalTrustStore = System.getProperty("javax.net.ssl.trustStore");
Object originalTrustPass = System.getProperty("javax.net.ssl.trustStorePassword");
- //FIXME: synchronization issue: dynamically load certificate into
- // system instead of overwritting it.
- System.setProperty("javax.net.ssl.trustStore", method.getParameterByName("truststore.path").getValue());
- System.setProperty("javax.net.ssl.trustStorePassword", method.getParameterByName("truststore.password").getValue());
+
+ // optional parameters
+ try {
+ env.setProperty(Context.SECURITY_PROTOCOL, method.getParameterByName(Context.SECURITY_PROTOCOL).getValue());
+ // FIXME: synchronization issue: dynamically load certificate into
+ // system instead of overwritting it.
+ System.setProperty("javax.net.ssl.trustStore", method.getParameterByName("truststore.path").getValue());
+ System.setProperty("javax.net.ssl.trustStorePassword", method.getParameterByName("truststore.password").getValue());
+ } catch(NullPointerException e) {
+ }
log.debug("===> LDAP authenticator: " + env);
InitialLdapContext ctx = null;
try {
- ctx = new InitialLdapContext(env, null);
+ ctx = new InitialLdapContext(env, null);System.out.println(ctx);
log.debug("===> ldap context created: "+ctx);
return true;
} catch (Exception e) {
Index: lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java,v
diff -u -r1.13.2.1 -r1.13.2.2
--- lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java 30 Mar 2007 00:13:33 -0000 1.13.2.1
+++ lams_central/src/java/org/lamsfoundation/lams/security/UniversalLoginModule.java 7 Jun 2007 05:02:07 -0000 1.13.2.2
@@ -235,6 +235,7 @@
return roleSets;
}
+ ArrayList groupMembers = new ArrayList();
do {
String name = rs.getString(1);
String groupName = rs.getString(2);
@@ -248,23 +249,24 @@
try {
Principal p;
+ // Assign minimal role if user has none
if (name==null) {
- log.info("Found no roles");
- // give user account minimal role set so they can at
- // least access the index page.
name = Role.LEARNER;
+ log.info("Found no roles");
}
p = super.createIdentity(name);
- if (!group.isMember(p)) {
+ if (!groupMembers.contains(name)) {
log.info("Assign user to role " + p.getName());
group.addMember(p);
+ groupMembers.add(name);
}
if (name.equals(Role.SYSADMIN) || name.equals(Role.AUTHOR_ADMIN)) {
p = super.createIdentity(Role.AUTHOR);
log.info("Found "+name);
- if (!group.isMember(p)) {
+ if (!groupMembers.contains(Role.AUTHOR)) {
log.info("Assign user to role "+Role.AUTHOR);
group.addMember(p);
+ groupMembers.add(Role.AUTHOR);
}
}
} catch (Exception e) {
Index: lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java,v
diff -u -r1.2 -r1.2.2.1
--- lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java 17 Sep 2006 06:12:06 -0000 1.2
+++ lams_central/src/java/org/lamsfoundation/lams/util/CentralConstants.java 7 Jun 2007 05:02:07 -0000 1.2.2.1
@@ -28,4 +28,54 @@
public static final String MODULE_NAME = "central";
+ // Constants used by web services.
+ public static final String PARAM_SERVER_ID = "serverId";
+
+ public static final String PARAM_DATE_TIME = "datetime";
+
+ public static final String PARAM_HASH_VALUE = "hashValue";
+
+ public static final String PARAM_USERNAME = "username";
+
+ public static final String PARAM_COURSE_ID = "courseId";
+
+ public static final String PARAM_LEARNING_DESIGN_ID = "ldId";
+
+ public static final String PARAM_LESSON_ID = "lsId";
+
+ public static final String PARAM_TITLE = "title";
+
+ public static final String PARAM_DESC = "desc";
+
+ public static final String PARAM_STARTDATE = "startdate";
+
+ public static final String PARAM_COUNTRY = "country";
+
+ public static final String PARAM_LANG = "lang";
+
+ public static final String PARAM_METHOD = "method";
+
+ public static final String METHOD_START = "start";
+
+ public static final String METHOD_SCHEDULE = "schedule";
+
+ public static final String METHOD_DELETE = "delete";
+
+ public static final String PARAM_MODE = "mode";
+
+
+ public static final String ELEM_LESSON = "Lesson";
+
+ public static final String ATTR_LESSON_ID = "lessonId";
+
+ public static final String ATTR_DELETED = "deleted";
+
+
+ public static final String ELEM_FOLDER = "Folder";
+
+ public static final String ELEM_LEARNING_DESIGN = "LearningDesign";
+
+ public static final String ATTR_NAME = "name";
+
+ public static final String ATTR_RESOURCE_ID = "resourceId";
}
Index: lams_central/src/java/org/lamsfoundation/lams/webservice/LearningDesignRepositorySoapBindingImpl.java
===================================================================
RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/webservice/LearningDesignRepositorySoapBindingImpl.java,v
diff -u -r1.6 -r1.6.2.1
--- lams_central/src/java/org/lamsfoundation/lams/webservice/LearningDesignRepositorySoapBindingImpl.java 25 Sep 2006 05:41:54 -0000 1.6
+++ lams_central/src/java/org/lamsfoundation/lams/webservice/LearningDesignRepositorySoapBindingImpl.java 7 Jun 2007 05:02:07 -0000 1.6.2.1
@@ -160,15 +160,15 @@
Authenticator.authenticate(serverMap, datetime, username, hashValue);
ExtUserUseridMap userMap = integrationService.getExtUserUseridMap(serverMap, username);
integrationService.getExtCourseClassMap(serverMap, userMap, courseId, country, lang);
- return buildContentTree(userMap.getUser().getUserId()).toString();
+ return buildContentTree(userMap.getUser().getUserId(), mode).toString();
} catch (Exception e) {
log.debug(e.getMessage(),e);
throw new RemoteException(e.getMessage(), e);
}
}
- private ContentTreeNode buildContentTree(Integer userId) throws IOException,
+ private ContentTreeNode buildContentTree(Integer userId, Integer mode) throws IOException,
UserAccessDeniedException, RepositoryCheckedException {
log.debug("User Id - "+userId);
FolderContentDTO rootFolder = new FolderContentDTO(msgService
@@ -177,7 +177,7 @@
WorkspaceFolder.READ_ACCESS, null);
ContentTreeNode root = new ContentTreeNode(rootFolder);
FolderContentDTO userFolder = service.getUserWorkspaceFolder(userId);
- root.addChild(buildContentTreeNode(userFolder, userId));
+ root.addChild(buildContentTreeNode(userFolder, userId, mode));
FolderContentDTO dummyOrgFolder = new FolderContentDTO(msgService
.getMessage("organisations"), msgService.getMessage("folder"), null, null,
FolderContentDTO.FOLDER, new Long(WorkspaceAction.ORG_FOLDER_ID.longValue()),
@@ -189,25 +189,24 @@
Vector orgFolders = service.getAccessibleOrganisationWorkspaceFolders(userId);
for (int i = 0; i < orgFolders.size(); i++) {
FolderContentDTO orgFolder = (FolderContentDTO) orgFolders.get(i);
- dummyOrgNode.addChild(buildContentTreeNode(orgFolder, userId));
+ dummyOrgNode.addChild(buildContentTreeNode(orgFolder, userId, mode));
}
root.addChild(dummyOrgNode);
return root;
}
- private ContentTreeNode buildContentTreeNode(FolderContentDTO folder, Integer userId)
+ private ContentTreeNode buildContentTreeNode(FolderContentDTO folder, Integer userId, Integer mode)
throws UserAccessDeniedException, RepositoryCheckedException {
log.debug("build content tree node for folder - "+folder.getName());
ContentTreeNode node = new ContentTreeNode(folder);
if (folder.getResourceType().equals(FolderContentDTO.FOLDER)) {
log.debug(folder.getName()+" is a folder");
WorkspaceFolder wsfolder = service
.getWorkspaceFolder(folder.getResourceID().intValue());
- Vector items = service.getFolderContentsExcludeHome(userId, wsfolder,
- WorkspaceManagementService.MONITORING);
+ Vector items = service.getFolderContentsExcludeHome(userId, wsfolder, mode);
for (int i = 0; i < items.size(); i++) {
FolderContentDTO content = (FolderContentDTO) items.get(i);
- node.addChild(buildContentTreeNode(content, userId));
+ node.addChild(buildContentTreeNode(content, userId, mode));
}
}
return node;
Index: lams_central/web/images/css/btn_off.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/images/css/btn_off.gif,v
diff -u -r1.1 -r1.1.2.1
Binary files differ
Index: lams_central/web/images/css/button_bg.gif
===================================================================
RCS file: /usr/local/cvsroot/lams_central/web/images/css/button_bg.gif,v
diff -u -r1.1 -r1.1.2.1
Binary files differ