Index: lams_tool_spreadsheet/.classpath =================================================================== RCS file: /usr/local/cvsroot/lams_tool_spreadsheet/.classpath,v diff -u -r1.8.2.10 -r1.8.2.11 --- lams_tool_spreadsheet/.classpath 25 Nov 2014 10:47:39 -0000 1.8.2.10 +++ lams_tool_spreadsheet/.classpath 24 Feb 2016 04:18:58 -0000 1.8.2.11 @@ -6,7 +6,7 @@ - + @@ -26,5 +26,6 @@ + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml,v diff -u -r1.5.2.6 -r1.5.2.7 --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml 10 Aug 2015 15:24:49 -0000 1.5.2.6 +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/spreadsheetApplicationContext.xml 24 Feb 2016 04:18:39 -0000 1.5.2.7 @@ -84,6 +84,10 @@ + + + + Index: lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java,v diff -u -r1.14.2.6 -r1.14.2.7 --- lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java 18 Feb 2016 15:45:16 -0000 1.14.2.6 +++ lams_tool_spreadsheet/src/java/org/lamsfoundation/lams/tool/spreadsheet/service/SpreadsheetServiceImpl.java 24 Feb 2016 04:18:39 -0000 1.14.2.7 @@ -34,6 +34,7 @@ import java.util.TreeSet; import org.apache.log4j.Logger; +import org.lamsfoundation.lams.gradebook.service.IGradebookService; import org.lamsfoundation.lams.learning.service.ILearnerService; import org.lamsfoundation.lams.learningdesign.service.ExportToolContentException; import org.lamsfoundation.lams.learningdesign.service.IExportToolContentService; @@ -91,7 +92,9 @@ private IUserManagementService userManagementService; private IExportToolContentService exportContentService; private ICoreNotebookService coreNotebookService; + private IGradebookService gradebookService; + // ******************************************************************************* // Service method // ******************************************************************************* @@ -410,8 +413,15 @@ SpreadsheetMark mark = user.getUserModifiedSpreadsheet().getMark(); mark.setDateMarksReleased(new Date()); spreadsheetMarkDao.saveObject(mark); + + // send marks to gradebook where applicable + if (mark.getMarks() != null) { + Double doubleMark = new Double(mark.getMarks()); + gradebookService.updateActivityMark(doubleMark, null, user.getUserId().intValue(), sessionId, false); + } } } + } @Override @@ -638,6 +648,7 @@ coreNotebookService.deleteEntry(entry); } } + spreadsheetDao.delete(spreadsheet); } @@ -762,6 +773,14 @@ this.coreNotebookService = coreNotebookService; } + public IGradebookService getGradebookService() { + return gradebookService; + } + + public void setGradebookService(IGradebookService gradebookService) { + this.gradebookService = gradebookService; + } + @Override public Class[] getSupportedToolOutputDefinitionClasses(int definitionType) { return null;