Index: lams_admin/conf/language/lams/ApplicationResources.properties =================================================================== diff -u -r0c436f5f696e462cb9882e9e0fb1e1e76224044e -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_admin/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 0c436f5f696e462cb9882e9e0fb1e1e76224044e) +++ lams_admin/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -2,7 +2,7 @@ #language code: en #locale code: AU - # Exported from the LAMS Community by Ernie Ghiglione on Wed Jan 16 14:38:11 CST 2019 + # Exported from the LAMS Community by Ernie Ghiglione on Fri Oct 25 18:22:26 CST 2019 #=================== labels for LAMS Administration =================# @@ -500,6 +500,7 @@ label.upload.info =Uploaded file must be an Excel file and not exceed size of {0} errors.maxfilesize =Uploaded file exceeded maximum size: {0} error.attachment.not.xls =File is not an Excel .xls file. +sysadmin.maintain.session.count =logged in users sysadmin.maintain.session =Logged in users sysadmin.maintain.session.login =Login sysadmin.maintain.session.id =Session ID @@ -634,6 +635,17 @@ outcome.authoring.existing =Added outcomes outcome.authoring.existing.none =none sysadmin.maintain.session.name =Name +congfig.header.antivirus =Antivirus +config.av.enable =Enable antivirus scanning on files upload +config.av.host =ClamAV server host +config.av.port =ClamAV server port +label.type.login =User login +label.type.logout =User logout +label.type.config.change =Configuration change +outcome.authoring.remove.confirm =Are you sure you want to remove this learning outcome? +sysadmin.alternative.user.id.name =Use alternative parameter name "lis_person_sourcedid" to get user id +config.header.privacy.settings =Privacy settings +config.restricted.displaying.user.names.in.groupings =Groupings: only display names for learners within own group -#======= End labels: Exported 627 labels for en AU ===== +#======= End labels: Exported 638 labels for en AU ===== Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/form/ExtServerCommonForm.java =================================================================== diff -u -rb77e07f34f5d86b1f69b0d10c08ed78b6acdb955 -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/form/ExtServerCommonForm.java (.../ExtServerCommonForm.java) (revision b77e07f34f5d86b1f69b0d10c08ed78b6acdb955) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/form/ExtServerCommonForm.java (.../ExtServerCommonForm.java) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -2,7 +2,7 @@ /** * Superclass for ExtServerForm and LtiConsumerForm, holding LTI consumers' and ExtServers' shared properties. - * + * * @author Andrey Balan */ public abstract class ExtServerCommonForm { @@ -20,7 +20,7 @@ private String prefix; private String lessonFinishUrl; - + private boolean disabled = false; private Boolean learnerPresenceAvailable; @@ -168,4 +168,3 @@ this.gradebookOnComplete = gradebookOnComplete; } } - Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/form/ExtServerForm.java =================================================================== diff -u -r0c436f5f696e462cb9882e9e0fb1e1e76224044e -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/form/ExtServerForm.java (.../ExtServerForm.java) (revision 0c436f5f696e462cb9882e9e0fb1e1e76224044e) +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/form/ExtServerForm.java (.../ExtServerForm.java) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -22,107 +22,21 @@ package org.lamsfoundation.lams.admin.web.form; -public class ExtServerForm { +/** + * Form for managing ExtServers. + */ +public class ExtServerForm extends ExtServerCommonForm { - private Integer sid = -1; - - private String serverid; - - private String serverkey; - - private String servername; - - private String serverdesc; - - private String prefix; - private String userinfoUrl; - private String lessonFinishUrl; - - private String logoutUrl; - private String extGroupsUrl; - - private boolean disabled = false; - + + private String logoutUrl; + private boolean timeToLiveLoginRequestEnabled = true; private Integer timeToLiveLoginRequest = 80; - private Boolean learnerPresenceAvailable; - - private Boolean learnerImAvailable; - - private Boolean liveEditEnabled; - - private Boolean enableLessonNotifications; - - /** - * Should Learner start the lesson from the beginning each time he enters it. - * Content is not removed, LessonProgress is deleted, not archived. - */ - private Boolean forceLearnerRestart; - - /** - * Should Learners be allowed to restart the lesson after finishing it. - * Content is not removed, LessonProgress is archived and then deleted. - */ - private Boolean allowLearnerRestart; - - /** - * Should learners be displayed activity gradebook on lesson complete. - */ - private Boolean gradebookOnComplete; - - public Integer getSid() { - return sid; - } - - public void setSid(Integer sid) { - this.sid = sid; - } - - public String getServerid() { - return serverid; - } - - public void setServerid(String serverid) { - this.serverid = serverid; - } - - public String getServerkey() { - return serverkey; - } - - public void setServerkey(String serverkey) { - this.serverkey = serverkey; - } - - public String getServername() { - return servername; - } - - public void setServername(String servername) { - this.servername = servername; - } - - public String getServerdesc() { - return serverdesc; - } - - public void setServerdesc(String serverdesc) { - this.serverdesc = serverdesc; - } - - public String getPrefix() { - return prefix; - } - - public void setPrefix(String prefix) { - this.prefix = prefix; - } - public String getUserinfoUrl() { return userinfoUrl; } @@ -131,36 +45,20 @@ this.userinfoUrl = userinfoUrl; } - public String getLessonFinishUrl() { - return lessonFinishUrl; - } - - public void setLessonFinishUrl(String lessonFinishUrl) { - this.lessonFinishUrl = lessonFinishUrl; - } - - public String getLogoutUrl() { - return logoutUrl; - } - - public void setLogoutUrl(String logoutUrl) { - this.logoutUrl = logoutUrl; - } - public String getExtGroupsUrl() { return extGroupsUrl; } public void setExtGroupsUrl(String extGroupsUrl) { this.extGroupsUrl = extGroupsUrl; } - - public boolean isDisabled() { - return disabled; + + public String getLogoutUrl() { + return logoutUrl; } - public void setDisabled(boolean disabled) { - this.disabled = disabled; + public void setLogoutUrl(String logoutUrl) { + this.logoutUrl = logoutUrl; } public boolean isTimeToLiveLoginRequestEnabled() { @@ -179,59 +77,4 @@ this.timeToLiveLoginRequest = timeToLiveLoginRequest; } - public Boolean getLearnerPresenceAvailable() { - return learnerPresenceAvailable; - } - - public void setLearnerPresenceAvailable(Boolean learnerPresenceAvailable) { - this.learnerPresenceAvailable = learnerPresenceAvailable; - } - - public Boolean getLearnerImAvailable() { - return learnerImAvailable; - } - - public void setLearnerImAvailable(Boolean learnerImAvailable) { - this.learnerImAvailable = learnerImAvailable; - } - - public Boolean getLiveEditEnabled() { - return liveEditEnabled; - } - - public void setLiveEditEnabled(Boolean liveEditEnabled) { - this.liveEditEnabled = liveEditEnabled; - } - - public Boolean getEnableLessonNotifications() { - return enableLessonNotifications; - } - - public void setEnableLessonNotifications(Boolean enableLessonNotifications) { - this.enableLessonNotifications = enableLessonNotifications; - } - - public Boolean getForceLearnerRestart() { - return forceLearnerRestart; - } - - public void setForceLearnerRestart(Boolean forceLearnerRestart) { - this.forceLearnerRestart = forceLearnerRestart; - } - - public Boolean getAllowLearnerRestart() { - return allowLearnerRestart; - } - - public void setAllowLearnerRestart(Boolean allowLearnerRestart) { - this.allowLearnerRestart = allowLearnerRestart; - } - - public Boolean getGradebookOnComplete() { - return gradebookOnComplete; - } - - public void setGradebookOnComplete(Boolean gradebookOnComplete) { - this.gradebookOnComplete = gradebookOnComplete; - } } Index: lams_admin/web/integration/servermaintain.jsp =================================================================== diff -u -rccc788f07597ad3fde52adb6ff13e964b552c35d -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_admin/web/integration/servermaintain.jsp (.../servermaintain.jsp) (revision ccc788f07597ad3fde52adb6ff13e964b552c35d) +++ lams_admin/web/integration/servermaintain.jsp (.../servermaintain.jsp) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -120,7 +120,11 @@
-
+ +
+ + +
<%@ include file="extLessonForm.jsp"%> Index: lams_central/src/java/org/lamsfoundation/lams/web/HomeController.java =================================================================== diff -u -r0c436f5f696e462cb9882e9e0fb1e1e76224044e -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_central/src/java/org/lamsfoundation/lams/web/HomeController.java (.../HomeController.java) (revision 0c436f5f696e462cb9882e9e0fb1e1e76224044e) +++ lams_central/src/java/org/lamsfoundation/lams/web/HomeController.java (.../HomeController.java) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -67,6 +67,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.context.WebApplicationContext; @@ -246,9 +247,8 @@ @RequestMapping("/addLesson") @SuppressWarnings("unchecked") - public String addLesson(HttpServletRequest req, HttpServletResponse res) + public String addLesson(HttpServletRequest req, HttpServletResponse res, @RequestParam Integer organisationID) throws IOException, UserAccessDeniedException, RepositoryCheckedException { - Integer organisationID = new Integer(WebUtil.readIntParam(req, "organisationID")); UserDTO userDTO = getUser(); if (!securityService.isGroupMonitor(organisationID, userDTO.getUserID(), "add lesson", false)) { res.sendError(HttpServletResponse.SC_FORBIDDEN, "User is not a monitor in the organisation"); @@ -287,7 +287,6 @@ users.withArray("unselectedMonitors").add(userJSON); } } - req.setAttribute("users", users.toString()); // find lessons which can be set as preceding ones for newly created lesson @@ -301,6 +300,9 @@ } } req.setAttribute("availablePrecedingLessons", availableLessons); + + // find subgroups which can be set as multiple lessons start + req.setAttribute("subgroups", organisation.getChildOrganisations()); return "addLesson"; } Index: lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java =================================================================== diff -u -r0c436f5f696e462cb9882e9e0fb1e1e76224044e -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java (.../LoginRequestServlet.java) (revision 0c436f5f696e462cb9882e9e0fb1e1e76224044e) +++ lams_central/src/java/org/lamsfoundation/lams/web/LoginRequestServlet.java (.../LoginRequestServlet.java) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.lamsfoundation.lams.integration.ExtCourseClassMap; import org.lamsfoundation.lams.integration.ExtServer; @@ -40,16 +41,17 @@ import org.lamsfoundation.lams.integration.security.Authenticator; import org.lamsfoundation.lams.integration.security.RandomPasswordGenerator; import org.lamsfoundation.lams.integration.service.IntegrationService; -import org.lamsfoundation.lams.integration.util.LoginRequestDispatcher; +import org.lamsfoundation.lams.integration.util.IntegrationConstants; +import org.lamsfoundation.lams.lesson.service.ILessonService; import org.lamsfoundation.lams.security.UniversalLoginModule; import org.lamsfoundation.lams.usermanagement.User; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.util.CentralConstants; +import org.lamsfoundation.lams.util.MessageService; import org.lamsfoundation.lams.util.WebUtil; import org.lamsfoundation.lams.web.util.AttributeNames; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.context.support.SpringBeanAutowiringSupport; -import org.springframework.web.context.support.WebApplicationContextUtils; /** * The LoginRequestServlet handles login request by an integrated external system. This servlet checks for the UserId, @@ -60,9 +62,23 @@ @SuppressWarnings("serial") public class LoginRequestServlet extends HttpServlet { private static Logger log = Logger.getLogger(LoginRequestServlet.class); + + private static final String URL_DEFAULT = "/index.jsp"; + private static final String URL_AUTHOR = "/home/author.do"; + + private static final String URL_LEARNER = "/home/learner.do?lessonID="; + + private static final String URL_MONITOR = "/home/monitorLesson.do?lessonID="; + + private static final String URL_GRADEBOOK = "/services/Gradebook?"; + @Autowired private IntegrationService integrationService; + @Autowired + private ILessonService lessonService; + @Autowired + private MessageService centralMessageService; /* * Request Spring to lookup the applicationContext tied to the current ServletContext and inject service beans @@ -89,26 +105,27 @@ * if an error occurred */ @Override - public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { HttpSession hses = request.getSession(true); - String extUsername = request.getParameter(LoginRequestDispatcher.PARAM_USER_ID); - String serverId = request.getParameter(LoginRequestDispatcher.PARAM_SERVER_ID); - String extCourseId = request.getParameter(LoginRequestDispatcher.PARAM_COURSE_ID); - String timestamp = request.getParameter(LoginRequestDispatcher.PARAM_TIMESTAMP); - String hash = request.getParameter(LoginRequestDispatcher.PARAM_HASH); - String method = request.getParameter(LoginRequestDispatcher.PARAM_METHOD); - String country = request.getParameter(LoginRequestDispatcher.PARAM_COUNTRY); - String locale = request.getParameter(LoginRequestDispatcher.PARAM_LANGUAGE); + String extUsername = request.getParameter(IntegrationConstants.PARAM_USER_ID); + String serverId = request.getParameter(IntegrationConstants.PARAM_SERVER_ID); + String extCourseId = request.getParameter(IntegrationConstants.PARAM_COURSE_ID); + String timestamp = request.getParameter(IntegrationConstants.PARAM_TIMESTAMP); + String hash = request.getParameter(IntegrationConstants.PARAM_HASH); + String method = request.getParameter(IntegrationConstants.PARAM_METHOD); + String country = request.getParameter(IntegrationConstants.PARAM_COUNTRY); + String locale = request.getParameter(IntegrationConstants.PARAM_LANGUAGE); String courseName = request.getParameter(CentralConstants.PARAM_COURSE_NAME); String usePrefix = request.getParameter(CentralConstants.PARAM_USE_PREFIX); boolean isUpdateUserDetails = WebUtil.readBooleanParam(request, - LoginRequestDispatcher.PARAM_IS_UPDATE_USER_DETAILS, false); + IntegrationConstants.PARAM_IS_UPDATE_USER_DETAILS, false); + String lessonId = request.getParameter(IntegrationConstants.PARAM_LESSON_ID); // implicit login params - String firstName = request.getParameter(LoginRequestDispatcher.PARAM_FIRST_NAME); - String lastName = request.getParameter(LoginRequestDispatcher.PARAM_LAST_NAME); - String email = request.getParameter(LoginRequestDispatcher.PARAM_EMAIL); + String firstName = request.getParameter(IntegrationConstants.PARAM_FIRST_NAME); + String lastName = request.getParameter(IntegrationConstants.PARAM_LAST_NAME); + String email = request.getParameter(IntegrationConstants.PARAM_EMAIL); if ((extUsername == null) || (method == null) || (serverId == null) || (timestamp == null) || (hash == null)) { response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Login Failed - login parameters missing"); @@ -135,21 +152,26 @@ lastName, locale, country, email, prefix, isUpdateUserDetails); } - // in case of request for learner with strict authentication check cache should also contain lsid - String lsId = request.getParameter(LoginRequestDispatcher.PARAM_LESSON_ID); - if ((LoginRequestDispatcher.METHOD_LEARNER_STRICT_AUTHENTICATION.equals(method) - || LoginRequestDispatcher.METHOD_MONITOR.equals(method)) && lsId == null) { - response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Login Failed - lsId parameter missing"); + // in case of request for learner with strict authentication check cache should also contain lessonId + if ((IntegrationConstants.METHOD_LEARNER_STRICT_AUTHENTICATION.equals(method) + || IntegrationConstants.METHOD_MONITOR.equals(method)) && StringUtils.isBlank(lessonId)) { + //show different messages for LTI learners (as this is a typical expected scenario) and all others + String errorMessage = IntegrationConstants.METHOD_LEARNER_STRICT_AUTHENTICATION.equals(method) + && extServer.isLtiConsumer() + ? centralMessageService.getMessage("message.lesson.not.started.cannot.participate") + : "Login Failed - lsId parameter missing"; + response.sendError(HttpServletResponse.SC_BAD_REQUEST, errorMessage); return; } - Authenticator.authenticateLoginRequest(extServer, timestamp, extUsername, method, lsId, hash); + + Authenticator.authenticateLoginRequest(extServer, timestamp, extUsername, method, lessonId, hash); - if (extCourseId == null && lsId != null) { + if (extCourseId == null && StringUtils.isNotBlank(lessonId)) { // derive course ID from lesson ID ExtCourseClassMap classMap = integrationService.getExtCourseClassMap(extServer.getSid(), - Long.parseLong(lsId)); + Long.parseLong(lessonId)); if (classMap == null) { - log.warn("Lesson " + lsId + " is not mapped to any course for server " + extServer.getServername()); + log.warn("Lesson " + lessonId + " is not mapped to any course for server " + extServer.getServername()); } else { extCourseId = classMap.getCourseid(); } @@ -160,26 +182,40 @@ integrationService.getExtCourseClassMap(extServer, userMap, extCourseId, courseName, method, prefix); } - + User user = userMap.getUser(); + if (user == null) { + String error = "Unable to add user to lesson class as user is missing from the user map"; + log.error(error); + throw new UserInfoFetchException(error); + } + + //adds users to the lesson with respective roles + if (StringUtils.isNotBlank(lessonId)) { + if (IntegrationConstants.METHOD_LEARNER.equals(method) + || IntegrationConstants.METHOD_LEARNER_STRICT_AUTHENTICATION.equals(method)) { + lessonService.addLearner(Long.parseLong(lessonId), user.getUserId()); + + } else if (IntegrationConstants.METHOD_MONITOR.equals(method) + || IntegrationConstants.METHOD_AUTHOR.equals(method)) { + lessonService.addStaffMember(Long.parseLong(lessonId), user.getUserId()); + } + } + String login = user.getLogin(); UserDTO loggedInUserDTO = (UserDTO) hses.getAttribute(AttributeNames.USER); String loggedInLogin = loggedInUserDTO == null ? null : loggedInUserDTO.getLogin(); // for checking if requested role is the same as already assigned - String role = method.equals(LoginRequestDispatcher.METHOD_LEARNER_STRICT_AUTHENTICATION) - ? LoginRequestDispatcher.METHOD_LEARNER + String role = method.equals(IntegrationConstants.METHOD_LEARNER_STRICT_AUTHENTICATION) + ? IntegrationConstants.METHOD_LEARNER : method; + // check if there is a redirect URL parameter already + String requestUrl = LoginRequestServlet.getRequestURL(request); if ((loggedInLogin != null) && loggedInLogin.equals(login) && request.isUserInRole(role)) { - String url = LoginRequestDispatcher.getRequestURL(request); - response.sendRedirect(response.encodeRedirectURL(url)); + response.sendRedirect(response.encodeRedirectURL(requestUrl)); return; } - // check if there is a redirect URL parameter already; besides, LoginRequestDispatcher.getRequestURL() method also adds - // users to the lesson with respective roles - String redirectURL = WebUtil.getBaseServerURL() + LoginRequestDispatcher.getRequestURL(request); - redirectURL = URLEncoder.encode(redirectURL, "UTF-8"); - // login.jsp knows what to do with these hses.setAttribute("login", login); String token = "#LAMS" + RandomPasswordGenerator.nextPassword(10); @@ -190,6 +226,8 @@ // notify the login module that the user has been authenticated correctly UniversalLoginModule.setAuthenticationToken(token); + String redirectURL = WebUtil.getBaseServerURL() + requestUrl; + redirectURL = URLEncoder.encode(redirectURL, "UTF-8"); response.sendRedirect("login.jsp?redirectURL=" + redirectURL); } catch (AuthenticationException e) { log.error("Authentication error: ", e); @@ -223,4 +261,62 @@ public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } + + /** + * If there is a redirectURL parameter then this becomes the redirect, otherwise it + * fetches the method parameter from HttpServletRequest and builds the redirect url. + */ + private static String getRequestURL(HttpServletRequest request) { + String method = request.getParameter(IntegrationConstants.PARAM_METHOD); + String lessonId = request.getParameter(IntegrationConstants.PARAM_LESSON_ID); + String mode = request.getParameter(IntegrationConstants.PARAM_MODE); + + // get the location from an explicit parameter if it exists + String redirect = request.getParameter("redirectURL"); + if (redirect != null) { + return request.getContextPath() + "/" + redirect; + } + + if (IntegrationConstants.MODE_GRADEBOOK.equals(mode)) { + return request.getContextPath() + URL_GRADEBOOK + request.getQueryString(); + } + /** AUTHOR * */ + else if (IntegrationConstants.METHOD_AUTHOR.equals(method)) { + String authorUrl = request.getContextPath() + URL_AUTHOR; + + // append the extra parameters if they are present in the request + String ldID = request.getParameter(IntegrationConstants.PARAM_LEARNING_DESIGN_ID); + if (ldID != null) { + authorUrl = WebUtil.appendParameterToURL(authorUrl, "learningDesignID", ldID); + } + + // Custom CSV string to be used for tool adapters + String customCSV = request.getParameter(IntegrationConstants.PARAM_CUSTOM_CSV); + if (customCSV != null) { + authorUrl = WebUtil.appendParameterToURL(authorUrl, IntegrationConstants.PARAM_CUSTOM_CSV, customCSV); + } + + String extLmsId = request.getParameter(IntegrationConstants.PARAM_SERVER_ID); + if (extLmsId != null) { + authorUrl = WebUtil.appendParameterToURL(authorUrl, IntegrationConstants.PARAM_EXT_LMS_ID, extLmsId); + } + + return authorUrl; + } + /** MONITOR * */ + else if (IntegrationConstants.METHOD_MONITOR.equals(method) && lessonId != null) { + return request.getContextPath() + URL_MONITOR + lessonId; + } + /** LEARNER * */ + else if ((IntegrationConstants.METHOD_LEARNER.equals(method) + || IntegrationConstants.METHOD_LEARNER_STRICT_AUTHENTICATION.equals(method)) && lessonId != null) { + String url = request.getContextPath() + URL_LEARNER + lessonId; + if (mode != null) { + url += "&" + IntegrationConstants.PARAM_MODE + "=" + mode; + } + return url; + } else { + return request.getContextPath() + URL_DEFAULT; + } + } } Index: lams_common/src/java/org/lamsfoundation/lams/integration/ExtServer.java =================================================================== diff -u -r0c436f5f696e462cb9882e9e0fb1e1e76224044e -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_common/src/java/org/lamsfoundation/lams/integration/ExtServer.java (.../ExtServer.java) (revision 0c436f5f696e462cb9882e9e0fb1e1e76224044e) +++ lams_common/src/java/org/lamsfoundation/lams/integration/ExtServer.java (.../ExtServer.java) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -62,6 +62,9 @@ @Column(name = "ext_groups_url") private String extGroupsUrl; + + @Column(name = "membership_url") + private String membershipUrl; @Column private Boolean disabled; @@ -115,6 +118,9 @@ */ @Column(name = "lti_consumer_monitor_roles") private String ltiToolConsumerMonitorRoles; + + @Column(name = "use_alternative_user_id_parameter_name") + private Boolean useAlternativeUseridParameterName; public ExtServer() { timeToLiveLoginRequest = 80; @@ -207,7 +213,15 @@ public void setExtGroupsUrl(String extGroupsUrl) { this.extGroupsUrl = extGroupsUrl; } + + public String getMembershipUrl() { + return this.membershipUrl; + } + public void setMembershipUrl(String membershipUrl) { + this.membershipUrl = membershipUrl; + } + public Boolean getDisabled() { return this.disabled; } @@ -333,4 +347,12 @@ public void setGradebookOnComplete(Boolean gradebookOnComplete) { this.gradebookOnComplete = gradebookOnComplete; } + + public Boolean getUseAlternativeUseridParameterName() { + return useAlternativeUseridParameterName; + } + + public void setUseAlternativeUseridParameterName(Boolean useAlternativeUseridParameterName) { + this.useAlternativeUseridParameterName = useAlternativeUseridParameterName; + } } \ No newline at end of file Index: lams_common/src/java/org/lamsfoundation/lams/integration/security/SsoHandler.java =================================================================== diff -u -r0c436f5f696e462cb9882e9e0fb1e1e76224044e -rf0924238dddb80210e0e088cda5fe967f66ef979 --- lams_common/src/java/org/lamsfoundation/lams/integration/security/SsoHandler.java (.../SsoHandler.java) (revision 0c436f5f696e462cb9882e9e0fb1e1e76224044e) +++ lams_common/src/java/org/lamsfoundation/lams/integration/security/SsoHandler.java (.../SsoHandler.java) (revision f0924238dddb80210e0e088cda5fe967f66ef979) @@ -99,7 +99,6 @@ // recreate session here in case it was invalidated in login.jsp by sysadmin's LoginAs HttpSession session = request.getSession(); - /* * Fetch UserDTO before completing request so putting it later in session is done ASAP * Response is sent in another thread and if UserDTO is not present in session when browser completes @@ -161,26 +160,21 @@ // check if user is already logged in HttpSession existingSession = SessionManager.getSessionForLogin(login); - + // store session so UniversalLoginModule can access it SessionManager.startSession(request); String oldSessionID = session.getId(); - + // do the logging in UniversalLoginModule or cache handler.handleRequest(exchange); - + // session ID was changed after log in SessionManager.updateSessionID(oldSessionID); if (login.equals(request.getRemoteUser())) { session.setAttribute(AttributeNames.USER, userDTO); - // if user is already logged in on another browser, log him out - if (existingSession != null) { - SessionManager.removeSessionByID(existingSession.getId(), true, false); - } - Integer failedAttempts = user.getFailedAttempts(); if (failedAttempts != null && failedAttempts > 0 && password != null && !password.startsWith("#LAMS")) {