diff --git a/Backend/services/core/src/main/java/org/edu_sharing/repository/server/jobs/quartz/NodeObjectReportJob.java b/Backend/services/core/src/main/java/org/edu_sharing/repository/server/jobs/quartz/NodeObjectReportJob.java index 6ab6e974c..27ed7e178 100644 --- a/Backend/services/core/src/main/java/org/edu_sharing/repository/server/jobs/quartz/NodeObjectReportJob.java +++ b/Backend/services/core/src/main/java/org/edu_sharing/repository/server/jobs/quartz/NodeObjectReportJob.java @@ -128,12 +128,11 @@ protected void executeInternal(JobExecutionContext jobExecutionContext) throws J } private Void createStats() { - LocalDate now = LocalDate.now(); - LocalDate to = now.minusDays(1); - + LocalDate to = LocalDate.now(); if (customDate != null) { to = customDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); } + to = to.minusDays(1); LocalDate from = to.withDayOfMonth(1); switch (type) { @@ -195,30 +194,9 @@ private String generateFilename(LocalDate from, LocalDate to) { StringBuilder sb = new StringBuilder(filename); if (appendDate) { sb.append("_"); - switch (type) { - case Yearly: - sb.append(from.format(DateTimeFormatter.ofPattern(("yyyy")))); - if(to.getMonthValue() != 12 && to.getDayOfMonth() != to.lengthOfMonth()){ - sb.append("_interim"); - } - break; - case Quarterly: - sb.append(from.format(DateTimeFormatter.ofPattern(("yyyy")))); - sb.append("-Q"); - sb.append(to.getMonthValue() / 3); - if(to.getMonth().firstMonthOfQuarter().getValue() + 3 != to.getMonthValue() && to.getDayOfMonth() != to.lengthOfMonth()){ - sb.append("_interim"); - } - break; - case Monthly: - sb.append(from.format(DateTimeFormatter.ofPattern(("yyyy-MM")))); - if(to.getDayOfMonth() != to.lengthOfMonth()){ - sb.append("_interim"); - } - break; - default: - throw new NotImplementedException(type.name()); - } + sb.append(from.format(DateTimeFormatter.ofPattern(("yyMMdd")))); + sb.append("-"); + sb.append(to.format(DateTimeFormatter.ofPattern(("yyMMdd")))); } sb.append(".csv"); diff --git a/Backend/services/core/src/main/java/org/edu_sharing/repository/server/rendering/RenderingServlet.java b/Backend/services/core/src/main/java/org/edu_sharing/repository/server/rendering/RenderingServlet.java index f86d5efd2..a821058f4 100644 --- a/Backend/services/core/src/main/java/org/edu_sharing/repository/server/rendering/RenderingServlet.java +++ b/Backend/services/core/src/main/java/org/edu_sharing/repository/server/rendering/RenderingServlet.java @@ -90,7 +90,7 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp) } response = renderingService.getDetails(ApplicationInfoList.getHomeRepository().getAppId(), node_id, version,DEFAULT_DISPLAY_MODE, params).getDetails(); - response = response.replace("{{{LMS_INLINE_HELPER_SCRIPT}}}", URLHelper.getNgRenderNodeUrl(node_id,version)+"?"); + response = response.replace("{{{LMS_INLINE_HELPER_SCRIPT}}}", URLHelper.getNgRenderNodeUrl(node_id,version,true)+"?"); // add nonce to render styles response = response.replace("