Index: lams_common/src/java/org/lamsfoundation/lams/integration/util/LoginRequestDispatcher.java =================================================================== RCS file: /usr/local/cvsroot/lams_common/src/java/org/lamsfoundation/lams/integration/util/LoginRequestDispatcher.java,v diff -u -r1.9 -r1.10 --- lams_common/src/java/org/lamsfoundation/lams/integration/util/LoginRequestDispatcher.java 24 Oct 2008 05:18:55 -0000 1.9 +++ lams_common/src/java/org/lamsfoundation/lams/integration/util/LoginRequestDispatcher.java 24 Oct 2008 05:24:12 -0000 1.10 @@ -124,24 +124,18 @@ String parameters = ""; - if (customCSV != null && extLmsId != null) { - parameters += "&" + PARAM_CUSTOM_CSV + "=" + customCSV; - parameters += "&" + PARAM_EXT_LMS_ID + "=" + extLmsId; - } else { - log.error("Parameter customCSV not present"); + // append the extra parameters if they are present in the request + try { + parameters = customCSV != null ? parameters + "&" + PARAM_CUSTOM_CSV + "=" + customCSV : parameters; + parameters = extLmsId != null ? parameters + "&" + PARAM_EXT_LMS_ID + "=" + extLmsId : parameters; + parameters = requestSrc != null ? parameters + "&" + PARAM_REQUEST_SRC + "=" + + URLEncoder.encode(requestSrc, "UTF8") : parameters; + parameters = notifyCloseURL != null ? parameters + "&" + PARAM_NOTIFY_CLOSE_URL + "=" + + URLEncoder.encode(notifyCloseURL, "UTF8") : parameters; + } catch (UnsupportedEncodingException e) { + log.error(e); } - if (requestSrc != null && notifyCloseURL != null) { - try { - parameters = "&" + PARAM_REQUEST_SRC + "=" + URLEncoder.encode(requestSrc, "UTF8"); - parameters += "&" + PARAM_NOTIFY_CLOSE_URL + "=" + URLEncoder.encode(notifyCloseURL, "UTF8"); - } catch (UnsupportedEncodingException e) { - log.error(e); - } - } else { - log.error("Parameters 'requestSrc' and 'notifyCloseURL' are not present"); - } - return request.getContextPath() + URL_AUTHOR + parameters; } /** MONITOR * */