Index: lams_gradebook/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/build.xml,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/build.xml 9 Apr 2009 04:55:56 -0000 1.1 +++ lams_gradebook/build.xml 14 Apr 2009 06:18:51 -0000 1.1.2.1 @@ -5,17 +5,17 @@ ]> - - + + - - - - - - + + + + + + @@ -28,8 +28,7 @@ - + @@ -40,8 +39,7 @@ - + @@ -55,19 +53,16 @@ - + - - + + @@ -86,23 +81,22 @@ - - + + - - - - - + + + + + - + You must download several jar files before you can build Middlegen. Execute the "download-deps" target. Then try to @@ -120,154 +114,114 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - + - + - - + + - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - + - + @@ -295,7 +249,6 @@ - Index: lams_gradebook/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/conf/language/lams/ApplicationResources.properties,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/conf/language/lams/ApplicationResources.properties 9 Apr 2009 04:55:58 -0000 1.1 +++ lams_gradebook/conf/language/lams/ApplicationResources.properties 14 Apr 2009 06:18:51 -0000 1.1.2.1 @@ -2,4 +2,50 @@ #language code: en #locale code: AU +heading.general.error =Error +error.authorisation =You are not authorised to do this. +error.general.1 =Sorry, there has been an error. +error.general.2 =There is a problem processing this request. Close the browser window and try again. +error.general.3 =If the problem persists please contact your system administrator or the technical forums on http://lamscommunity.org/. +gradebook.title.window.lessonMonitor =Gradebook Lesson Monitor +gradebook.title.window.courseMonitor =Gradebook Course Monitor +gradebook.title.window.myGradebook =My Gradebook +gradebook.title.courseMonitor =Course Gradebook for {0} +gradebook.title.lessonGradebook =Lesson Gradebook for {0} +gradebook.title.myGradebook =Gradebook for {0} + +gradebook.gridtitle.usergrid =Learner Lesson View +gradebook.gridtitle.activitygrid =Activity View +gradebook.columntitle.name =Name +gradebook.columntitle.progress =Progress +gradebook.columntitle.timeTaken =Time Taken +gradebook.columntitle.lessonFeedback =Lesson Feedback +gradebook.columntitle.lessonName =Lesson Name +gradebook.columntitle.subGroup =Sub-Group +gradebook.columntitle.startDate =Start Date +gradebook.columntitle.completeDate =Complete Date +gradebook.columntitle.mark =Mark +gradebook.columntitle.activity =Activity +gradebook.columntitle.activityFeedback =Activity Feedback +gradebook.columntitle.outputs =Tool Outputs +gradebook.columntitle.competences =Competences +gradebook.columntitle.averageTimeTaken =Average Time Taken +gradebook.columntitle.averageMark =Average Mark +gradebook.columntitle.learnerName =Learner Name + +gradebook.function.window.showColumns =Show/Hide Columns +gradebook.function.error.enterNumber =Please enter a number value +gradebook.function.search.title =Search Grid +gradebook.function.search.contains =contains +gradebook.function.search.endsWith =ends with +gradebook.function.search.startsWith =starts with +gradebook.function.search.equalTo =equal to +gradebook.function.search.notEqualTo =not equal to + +gradebook.error.loaderror =There was an error loading the grid. If this problem persists, please contact your system administrator. + +label.ok =OK +label.cancel =Cancel +label.find =Find +label.reset =Reset \ No newline at end of file Index: lams_gradebook/conf/language/lams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/conf/language/lams/ApplicationResources_en_AU.properties,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/conf/language/lams/ApplicationResources_en_AU.properties 9 Apr 2009 04:55:58 -0000 1.1 +++ lams_gradebook/conf/language/lams/ApplicationResources_en_AU.properties 14 Apr 2009 06:18:50 -0000 1.1.2.1 @@ -1,3 +1,51 @@ appName = gradebook #language code: en -#locale code: AU \ No newline at end of file +#locale code: AU + +heading.general.error =Error +error.authorisation =You are not authorised to do this. +error.general.1 =Sorry, there has been an error. +error.general.2 =There is a problem processing this request. Close the browser window and try again. +error.general.3 =If the problem persists please contact your system administrator or the technical forums on http://lamscommunity.org/. + +gradebook.title.window.lessonMonitor =Gradebook Lesson Monitor +gradebook.title.window.courseMonitor =Gradebook Course Monitor +gradebook.title.window.myGradebook =My Gradebook +gradebook.title.courseMonitor =Course Gradebook for {0} +gradebook.title.lessonGradebook =Lesson Gradebook for {0} +gradebook.title.myGradebook =Gradebook for {0} + +gradebook.gridtitle.usergrid =Learner Lesson View +gradebook.gridtitle.activitygrid =Activity View +gradebook.columntitle.name =Name +gradebook.columntitle.progress =Progress +gradebook.columntitle.timeTaken =Time Taken +gradebook.columntitle.lessonFeedback =Lesson Feedback +gradebook.columntitle.lessonName =Lesson Name +gradebook.columntitle.subGroup =Sub-Group +gradebook.columntitle.startDate =Start Date +gradebook.columntitle.completeDate =Complete Date +gradebook.columntitle.mark =Mark +gradebook.columntitle.activity =Activity +gradebook.columntitle.activityFeedback =Activity Feedback +gradebook.columntitle.outputs =Tool Outputs +gradebook.columntitle.competences =Competences +gradebook.columntitle.averageTimeTaken =Average Time Taken +gradebook.columntitle.averageMark =Average Mark +gradebook.columntitle.learnerName =Learner Name + +gradebook.function.window.showColumns =Show/Hide Columns +gradebook.function.error.enterNumber =Please enter a number value +gradebook.function.search.title =Search Grid +gradebook.function.search.contains =contains +gradebook.function.search.endsWith =ends with +gradebook.function.search.startsWith =starts with +gradebook.function.search.equalTo =equal to +gradebook.function.search.notEqualTo =not equal to + +gradebook.error.loaderror =There was an error loading the grid. If this problem persists, please contact your system administrator. + +label.ok =OK +label.cancel =Cancel +label.find =Find +label.reset =Reset Index: lams_gradebook/conf/language/rams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/conf/language/rams/Attic/ApplicationResources.properties,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/conf/language/rams/ApplicationResources.properties 9 Apr 2009 04:55:57 -0000 1.1 +++ lams_gradebook/conf/language/rams/ApplicationResources.properties 14 Apr 2009 06:18:51 -0000 1.1.2.1 @@ -1,3 +1,51 @@ appName = gradebook #language code: en -#locale code: AU \ No newline at end of file +#locale code: AU + +heading.general.error =Error +error.authorisation =You are not authorised to do this. +error.general.1 =Sorry, there has been an error. +error.general.2 =There is a problem processing this request. Close the browser window and try again. +error.general.3 =If the problem persists please contact your system administrator or the technical forums on http://lamscommunity.org/. + +gradebook.title.window.lessonMonitor =Gradebook Lesson Monitor +gradebook.title.window.courseMonitor =Gradebook Course Monitor +gradebook.title.window.myGradebook =My Gradebook +gradebook.title.courseMonitor =Course Gradebook for {0} +gradebook.title.lessonGradebook =Lesson Gradebook for {0} +gradebook.title.myGradebook =Gradebook for {0} + +gradebook.gridtitle.usergrid =Learner Lesson View +gradebook.gridtitle.activitygrid =Activity View +gradebook.columntitle.name =Name +gradebook.columntitle.progress =Progress +gradebook.columntitle.timeTaken =Time Taken +gradebook.columntitle.lessonFeedback =Lesson Feedback +gradebook.columntitle.lessonName =Lesson Name +gradebook.columntitle.subGroup =Sub-Group +gradebook.columntitle.startDate =Start Date +gradebook.columntitle.completeDate =Complete Date +gradebook.columntitle.mark =Mark +gradebook.columntitle.activity =Activity +gradebook.columntitle.activityFeedback =Activity Feedback +gradebook.columntitle.outputs =Tool Outputs +gradebook.columntitle.competences =Competences +gradebook.columntitle.averageTimeTaken =Average Time Taken +gradebook.columntitle.averageMark =Average Mark +gradebook.columntitle.learnerName =Learner Name + +gradebook.function.window.showColumns =Show/Hide Columns +gradebook.function.error.enterNumber =Please enter a number value +gradebook.function.search.title =Search Grid +gradebook.function.search.contains =contains +gradebook.function.search.endsWith =ends with +gradebook.function.search.startsWith =starts with +gradebook.function.search.equalTo =equal to +gradebook.function.search.notEqualTo =not equal to + +gradebook.error.loaderror =There was an error loading the grid. If this problem persists, please contact your system administrator. + +label.ok =OK +label.cancel =Cancel +label.find =Find +label.reset =Reset \ No newline at end of file Index: lams_gradebook/conf/language/rams/ApplicationResources_en_AU.properties =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/conf/language/rams/Attic/ApplicationResources_en_AU.properties,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/conf/language/rams/ApplicationResources_en_AU.properties 9 Apr 2009 04:55:58 -0000 1.1 +++ lams_gradebook/conf/language/rams/ApplicationResources_en_AU.properties 14 Apr 2009 06:18:51 -0000 1.1.2.1 @@ -1,3 +1,51 @@ appName = gradebook #language code: en -#locale code: AU \ No newline at end of file +#locale code: AU + +heading.general.error =Error +error.authorisation =You are not authorised to do this. +error.general.1 =Sorry, there has been an error. +error.general.2 =There is a problem processing this request. Close the browser window and try again. +error.general.3 =If the problem persists please contact your system administrator or the technical forums on http://lamscommunity.org/. + +gradebook.title.window.lessonMonitor =Gradebook Lesson Monitor +gradebook.title.window.courseMonitor =Gradebook Course Monitor +gradebook.title.window.myGradebook =My Gradebook +gradebook.title.courseMonitor =Course Gradebook for {0} +gradebook.title.lessonGradebook =Lesson Gradebook for {0} +gradebook.title.myGradebook =Gradebook for {0} + +gradebook.gridtitle.usergrid =Learner Lesson View +gradebook.gridtitle.activitygrid =Activity View +gradebook.columntitle.name =Name +gradebook.columntitle.progress =Progress +gradebook.columntitle.timeTaken =Time Taken +gradebook.columntitle.lessonFeedback =Lesson Feedback +gradebook.columntitle.lessonName =Lesson Name +gradebook.columntitle.subGroup =Sub-Group +gradebook.columntitle.startDate =Start Date +gradebook.columntitle.completeDate =Complete Date +gradebook.columntitle.mark =Mark +gradebook.columntitle.activity =Activity +gradebook.columntitle.activityFeedback =Activity Feedback +gradebook.columntitle.outputs =Tool Outputs +gradebook.columntitle.competences =Competences +gradebook.columntitle.averageTimeTaken =Average Time Taken +gradebook.columntitle.averageMark =Average Mark +gradebook.columntitle.learnerName =Learner Name + +gradebook.function.window.showColumns =Show/Hide Columns +gradebook.function.error.enterNumber =Please enter a number value +gradebook.function.search.title =Search Grid +gradebook.function.search.contains =contains +gradebook.function.search.endsWith =ends with +gradebook.function.search.startsWith =starts with +gradebook.function.search.equalTo =equal to +gradebook.function.search.notEqualTo =not equal to + +gradebook.error.loaderror =There was an error loading the grid. If this problem persists, please contact your system administrator. + +label.ok =OK +label.cancel =Cancel +label.find =Find +label.reset =Reset \ No newline at end of file Index: lams_gradebook/conf/xdoclet/web-security.xml =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/conf/xdoclet/web-security.xml,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/conf/xdoclet/web-security.xml 9 Apr 2009 04:55:55 -0000 1.1 +++ lams_gradebook/conf/xdoclet/web-security.xml 14 Apr 2009 06:18:50 -0000 1.1.2.1 @@ -9,6 +9,8 @@ GROUP MANAGER GROUP ADMIN SYSADMIN + LEARNER + MONITOR @@ -35,4 +37,10 @@ SYSADMIN + + LEARNER + + + MONITOR + Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/gradebookApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/gradebookApplicationContext.xml,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/gradebookApplicationContext.xml 9 Apr 2009 04:55:57 -0000 1.1 +++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/gradebookApplicationContext.xml 14 Apr 2009 06:18:50 -0000 1.1.2.1 @@ -9,7 +9,8 @@ - + + Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/service/GradebookService.java =================================================================== RCS file: /usr/local/cvsroot/lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/service/GradebookService.java,v diff -u -r1.1 -r1.1.2.1 --- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/service/GradebookService.java 9 Apr 2009 04:55:58 -0000 1.1 +++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/service/GradebookService.java 14 Apr 2009 06:18:50 -0000 1.1.2.1 @@ -57,7 +57,9 @@ import org.lamsfoundation.lams.tool.ToolSession; import org.lamsfoundation.lams.tool.service.ILamsCoreToolService; import org.lamsfoundation.lams.usermanagement.Organisation; +import org.lamsfoundation.lams.usermanagement.Role; import org.lamsfoundation.lams.usermanagement.User; +import org.lamsfoundation.lams.usermanagement.service.IUserManagementService; import org.lamsfoundation.lams.util.Configuration; import org.lamsfoundation.lams.util.ConfigurationKeys; import org.lamsfoundation.lams.web.util.AttributeNames; @@ -77,6 +79,7 @@ private ILamsCoreToolService toolService; private IGradebookDAO gradebookDAO; private ILessonService lessonService; + private IUserManagementService userService; /** * @see org.lamsfoundation.lams.gradebook.service.IGradebookService#getGBActivityRowsForLearner(org.lamsfoundation.lams.lesson.Lesson, @@ -127,7 +130,7 @@ } return gradebookActivityDTOs; } - + /** * @see org.lamsfoundation.lams.gradebook.service.IGradebookService#getGBActivityRowsForLesson(org.lamsfoundation.lams.lesson.Lesson) */ @@ -221,8 +224,6 @@ } - - /** * @see org.lamsfoundation.lams.gradebook.service.IGradebookService#getGBUserRowsForLesson(org.lamsfoundation.lams.lesson.Lesson) */ @@ -365,56 +366,64 @@ if (lessons != null) { for (Lesson lesson : lessons) { - if (lesson.getLessonClass().isStaffMember(user)) { - GBLessonGridRowDTO lessonRow = new GBLessonGridRowDTO(); - lessonRow.setLessonName(lesson.getLessonName()); - lessonRow.setId(lesson.getLessonId()); - lessonRow.setStartDate(getLocaleDateString(user, lesson.getStartDateTime())); - if (view == GBGridView.MON_COURSE) { - - // Setting the averages for monitor view - lessonRow.setAverageTimeTaken(gradebookDAO.getAverageDurationLesson(lesson.getLessonId())); - lessonRow.setAverageMark(gradebookDAO.getAverageMarkForLesson(lesson.getLessonId())); + // Dont include lesson in list if the user doesnt have permission + if (!(view == GBGridView.MON_COURSE + && (lesson.getLessonClass().isStaffMember(user) || userService.isUserInRole(user + .getUserId(), organisation.getOrganisationId(), Role.GROUP_MANAGER)) || view == GBGridView.LRN_COURSE + && lesson.getAllLearners().contains(user))) { + continue; + } - // Set the gradebook monitor url - String gbMonURL = Configuration.get(ConfigurationKeys.SERVER_URL) - + "gradebook/gradebookMonitoring.do?lessonID=" + lesson.getLessonId().toString(); - lessonRow.setGradebookMonitorURL(gbMonURL); - } else if (view == GBGridView.LRN_COURSE) { - - GradebookUserLesson gbLesson = gradebookDAO.getGradebookUserDataForLesson(lesson.getLessonId(), user.getUserId()); - - lessonRow.setAverageTimeTaken(gradebookDAO.getAverageDurationLesson(lesson.getLessonId())); - lessonRow.setAverageMark(gradebookDAO.getAverageMarkForLesson(lesson.getLessonId())); - - if (gbLesson != null) { - lessonRow.setMark(gbLesson.getMark()); - lessonRow.setFeedback(gbLesson.getFeedback()); - } - - LearnerProgress learnerProgress = monitoringService.getLearnerProgress(user.getUserId(), lesson - .getLessonId()); - lessonRow.setStatus(getLessonStatusStr(learnerProgress)); - if (learnerProgress != null) { - if (learnerProgress.getStartDate() != null && learnerProgress.getFinishDate() != null) { - lessonRow.setTimeTaken(learnerProgress.getFinishDate().getTime() - - learnerProgress.getStartDate().getTime()); - } - - lessonRow.setFinishDate(getLocaleDateString(user, learnerProgress.getFinishDate())); - } - } + GBLessonGridRowDTO lessonRow = new GBLessonGridRowDTO(); + lessonRow.setLessonName(lesson.getLessonName()); + lessonRow.setId(lesson.getLessonId()); + lessonRow.setStartDate(getLocaleDateString(user, lesson.getStartDateTime())); - if (lesson.getOrganisation().getOrganisationId() != organisation.getOrganisationId()) { - lessonRow.setSubGroup(lesson.getOrganisation().getName()); - } else { - lessonRow.setSubGroup("-"); + if (view == GBGridView.MON_COURSE) { + + // Setting the averages for monitor view + lessonRow.setAverageTimeTaken(gradebookDAO.getAverageDurationLesson(lesson.getLessonId())); + lessonRow.setAverageMark(gradebookDAO.getAverageMarkForLesson(lesson.getLessonId())); + + // Set the gradebook monitor url + String gbMonURL = Configuration.get(ConfigurationKeys.SERVER_URL) + + "gradebook/gradebookMonitoring.do?lessonID=" + lesson.getLessonId().toString(); + lessonRow.setGradebookMonitorURL(gbMonURL); + } else if (view == GBGridView.LRN_COURSE) { + + GradebookUserLesson gbLesson = gradebookDAO.getGradebookUserDataForLesson(lesson.getLessonId(), + user.getUserId()); + + lessonRow.setAverageTimeTaken(gradebookDAO.getAverageDurationLesson(lesson.getLessonId())); + lessonRow.setAverageMark(gradebookDAO.getAverageMarkForLesson(lesson.getLessonId())); + + if (gbLesson != null) { + lessonRow.setMark(gbLesson.getMark()); + lessonRow.setFeedback(gbLesson.getFeedback()); } - lessonRows.add(lessonRow); + LearnerProgress learnerProgress = monitoringService.getLearnerProgress(user.getUserId(), lesson + .getLessonId()); + lessonRow.setStatus(getLessonStatusStr(learnerProgress)); + if (learnerProgress != null) { + if (learnerProgress.getStartDate() != null && learnerProgress.getFinishDate() != null) { + lessonRow.setTimeTaken(learnerProgress.getFinishDate().getTime() + - learnerProgress.getStartDate().getTime()); + } + lessonRow.setFinishDate(getLocaleDateString(user, learnerProgress.getFinishDate())); + } } + + if (lesson.getOrganisation().getOrganisationId() != organisation.getOrganisationId()) { + lessonRow.setSubGroup(lesson.getOrganisation().getName()); + } else { + lessonRow.setSubGroup("-"); + } + + lessonRows.add(lessonRow); + } } @@ -429,7 +438,7 @@ if (user == null || date == null) { return null; } - + Locale locale = new Locale(user.getLocale().getLanguageIsoCode(), user.getLocale().getCountryIsoCode()); String dateStr = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM, locale).format(date); return dateStr; @@ -656,7 +665,7 @@ // Fix up outputs html if there are not outputs available if (noOutputs) { - toolOutputsStr = "No output available."; + toolOutputsStr = "-"; } else { toolOutputsStr = "