Index: lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java =================================================================== diff -u -r131170beaa7c079b8c50b13dfdd283a9abcbd13d -r4c7972524def37c1472ee59358f25f9e564a8fd3 --- lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java (.../DisplayGroupAction.java) (revision 131170beaa7c079b8c50b13dfdd283a9abcbd13d) +++ lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java (.../DisplayGroupAction.java) (revision 4c7972524def37c1472ee59358f25f9e564a8fd3) @@ -141,11 +141,11 @@ moreLinks.add(new IndexLinkBean("index.classman", "javascript:openOrgManagement(" + org.getOrganisationId()+")", "manage-group-button", null)); } if(contains(roles, Role.ROLE_GROUP_MANAGER) || contains(roles,Role.ROLE_MONITOR)) - links.add(new IndexLinkBean("index.addlesson", "javascript:openAddLesson(" + org.getOrganisationId()+",'')", "add-lesson-button", null)); + links.add(new IndexLinkBean("index.addlesson", Configuration.get(ConfigurationKeys.SERVER_URL) + "/home.do?method=addLesson&courseID="+org.getOrganisationId()+"&classID=" + "" + "&KeepThis=true&TB_iframe=true&height=480&width=610", "add-lesson-button thickbox" + org.getOrganisationId(), null)); moreLinks.add(new IndexLinkBean("index.searchlesson", Configuration.get(ConfigurationKeys.SERVER_URL) + "/findUserLessons.do?dispatch=getResults&courseID=" + org.getOrganisationId()+"&KeepThis=true&TB_iframe=true&height=400&width=600", "search-lesson thickbox"+org.getOrganisationId(), "index.searchlesson.tooltip")); }else{//CLASS_TYPE if(contains(roles, Role.ROLE_GROUP_MANAGER) || contains(roles,Role.ROLE_MONITOR)) - links.add(new IndexLinkBean("index.addlesson","javascript:openAddLesson("+org.getParentOrganisation().getOrganisationId()+","+org.getOrganisationId()+")", "add-lesson-button", null)); + links.add(new IndexLinkBean("index.addlesson", Configuration.get(ConfigurationKeys.SERVER_URL) + "/home.do?method=addLesson&courseID="+org.getParentOrganisation().getOrganisationId()+"&classID="+org.getOrganisationId()+"&KeepThis=true&TB_iframe=true&height=480&width=610", "add-lesson-button thickbox"+org.getOrganisationId(), null)); } } orgBean.setLinks(links); Index: lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java =================================================================== diff -u -rc234c64ad9ff9d713f6d8e3331d0c20075e49303 -r4c7972524def37c1472ee59358f25f9e564a8fd3 --- lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java (.../HomeAction.java) (revision c234c64ad9ff9d713f6d8e3331d0c20075e49303) +++ lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java (.../HomeAction.java) (revision 4c7972524def37c1472ee59358f25f9e564a8fd3) @@ -40,6 +40,7 @@ import org.lamsfoundation.lams.lesson.service.ILessonService; import org.lamsfoundation.lams.usermanagement.Role; import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.Organisation; import org.lamsfoundation.lams.usermanagement.dto.UserDTO; import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; import org.lamsfoundation.lams.util.Configuration; @@ -278,8 +279,10 @@ try { log.debug("request addLesson"); + Integer courseId = WebUtil.readIntParam(req, AttributeNames.PARAM_COURSE_ID, false); Integer classId = WebUtil.readIntParam(req, AttributeNames.PARAM_CLASS_ID, true); + UserDTO user = getUser(); if (user == null) { log.error("admin: User missing from session. "); @@ -289,10 +292,11 @@ if (getService().isUserInRole(user.getUserID(), orgId, Role.MONITOR) || getService().isUserInRole(user.getUserID(), orgId, Role.GROUP_MANAGER)) { log.debug("user is staff"); - String serverUrl = Configuration.get(ConfigurationKeys.SERVER_URL); - req.setAttribute("serverUrl", serverUrl); - req.setAttribute(AttributeNames.PARAM_COURSE_ID, courseId); - req.setAttribute(AttributeNames.PARAM_CLASS_ID, classId); + String orgName = ((Organisation) getService().findById(Organisation.class, orgId)).getName(); + + req.setAttribute(AttributeNames.PARAM_ORGANISATION_ID, orgId); + req.setAttribute(AttributeNames.PARAM_ORGANISATION_NAME, orgName); + return mapping.findForward("addLesson"); } else { log.error("User " + user.getLogin() Index: lams_central/web/addLesson.jsp =================================================================== diff -u -r64938df458cbab9999f9a826ef2902d061648d7d -r4c7972524def37c1472ee59358f25f9e564a8fd3 --- lams_central/web/addLesson.jsp (.../addLesson.jsp) (revision 64938df458cbab9999f9a826ef2902d061648d7d) +++ lams_central/web/addLesson.jsp (.../addLesson.jsp) (revision 4c7972524def37c1472ee59358f25f9e564a8fd3) @@ -8,7 +8,7 @@ - &classID="/> + &orgName="/> <fmt:message key="title.add.lesson.window"/> Index: lams_central/web/groupContents.jsp =================================================================== diff -u -r286a134a420a0726c8c7bb47077280114b932e0d -r4c7972524def37c1472ee59358f25f9e564a8fd3 --- lams_central/web/groupContents.jsp (.../groupContents.jsp) (revision 286a134a420a0726c8c7bb47077280114b932e0d) +++ lams_central/web/groupContents.jsp (.../groupContents.jsp) (revision 4c7972524def37c1472ee59358f25f9e564a8fd3) @@ -48,8 +48,8 @@ ( ) - - + "> + Index: lams_central/web/main.jsp =================================================================== diff -u -rf95a0cef5daa3c1fdb65796bfe2073382411b172 -r4c7972524def37c1472ee59358f25f9e564a8fd3 --- lams_central/web/main.jsp (.../main.jsp) (revision f95a0cef5daa3c1fdb65796bfe2073382411b172) +++ lams_central/web/main.jsp (.../main.jsp) (revision 4c7972524def37c1472ee59358f25f9e564a8fd3) @@ -62,6 +62,11 @@ function refresh(){ document.location.reload(); } + + function closeWizard() { + setTimeout(refresh, 1000); + tb_remove(); + } //-->