Index: lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java,v diff -u -r1.14 -r1.15 --- lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java 26 Mar 2009 14:23:40 -0000 1.14 +++ lams_central/src/java/org/lamsfoundation/lams/web/DisplayGroupAction.java 31 Mar 2009 03:17:28 -0000 1.15 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java,v diff -u -r1.31 -r1.32 --- lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java 28 Jan 2009 00:10:32 -0000 1.31 +++ lams_central/src/java/org/lamsfoundation/lams/web/HomeAction.java 31 Mar 2009 03:17:28 -0000 1.32 @@ -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 =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/addLesson.jsp,v diff -u -r1.8 -r1.9 --- lams_central/web/addLesson.jsp 5 Jun 2007 05:53:07 -0000 1.8 +++ lams_central/web/addLesson.jsp 31 Mar 2009 03:18:12 -0000 1.9 @@ -8,7 +8,7 @@ - &classID="/> + &orgName="/> <fmt:message key="title.add.lesson.window"/> Index: lams_central/web/groupContents.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/groupContents.jsp,v diff -u -r1.7 -r1.8 --- lams_central/web/groupContents.jsp 17 Nov 2008 04:32:49 -0000 1.7 +++ lams_central/web/groupContents.jsp 31 Mar 2009 03:18:12 -0000 1.8 @@ -48,8 +48,8 @@ ( ) - - + "> + Index: lams_central/web/main.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_central/web/main.jsp,v diff -u -r1.39 -r1.40 --- lams_central/web/main.jsp 11 Mar 2009 04:03:12 -0000 1.39 +++ lams_central/web/main.jsp 31 Mar 2009 03:18:12 -0000 1.40 @@ -62,6 +62,11 @@ function refresh(){ document.location.reload(); } + + function closeWizard() { + setTimeout(refresh, 1000); + tb_remove(); + } //-->