From b659476cc2d4d9cb336a96bda2e9e21ec97c2453 Mon Sep 17 00:00:00 2001
From: srosse <none@none>
Date: Thu, 5 Apr 2012 10:16:48 +0200
Subject: [PATCH] FXOLAT-372: install help course for 8.1 release

---
 src/main/java/org/olat/course/CourseFactory.java        | 5 +++++
 src/main/java/org/olat/course/_spring/courseContext.xml | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/olat/course/CourseFactory.java b/src/main/java/org/olat/course/CourseFactory.java
index e3e3f481a88..f591e9134b4 100644
--- a/src/main/java/org/olat/course/CourseFactory.java
+++ b/src/main/java/org/olat/course/CourseFactory.java
@@ -44,6 +44,7 @@ import org.olat.basesecurity.SecurityGroup;
 import org.olat.commons.calendar.CalendarManager;
 import org.olat.commons.calendar.CalendarManagerFactory;
 import org.olat.commons.calendar.ui.components.KalendarRenderWrapper;
+import org.olat.core.CoreSpringFactory;
 import org.olat.core.commons.fullWebApp.LayoutMain3ColsController;
 import org.olat.core.commons.modules.bc.FolderConfig;
 import org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl;
@@ -88,6 +89,7 @@ import org.olat.core.util.tree.Visitor;
 import org.olat.core.util.vfs.VFSItem;
 import org.olat.core.util.xml.XStreamHelper;
 import org.olat.course.archiver.ScoreAccountingHelper;
+import org.olat.course.assessment.manager.UserCourseInformationsManager;
 import org.olat.course.config.CourseConfig;
 import org.olat.course.config.CourseConfigManagerImpl;
 import org.olat.course.config.ui.courselayout.CourseLayoutHelper;
@@ -581,6 +583,9 @@ public class CourseFactory extends BasicManager {
 		RepositoryEntry existingEntry = repositoryManager.lookupRepositoryEntryBySoftkey(softKey, false);
 		if (existingEntry != null) {
 			Tracing.logInfo("RepositoryEntry with softkey " + softKey + " already exists. Course will not be deployed.", CourseFactory.class);
+			//seem to be a problem
+			UserCourseInformationsManager userCourseInformationsManager = CoreSpringFactory.getImpl(UserCourseInformationsManager.class);
+			userCourseInformationsManager.deleteUserCourseInformations(existingEntry);
 			CourseFactory.deleteCourse(newCourseResource);
 			return existingEntry;
 		}
diff --git a/src/main/java/org/olat/course/_spring/courseContext.xml b/src/main/java/org/olat/course/_spring/courseContext.xml
index 404d0881756..21fa8a0f0b6 100644
--- a/src/main/java/org/olat/course/_spring/courseContext.xml
+++ b/src/main/java/org/olat/course/_spring/courseContext.xml
@@ -41,10 +41,10 @@
 			</bean>
 			<!-- this one is the help course which will server as the online help, helpAsser flag is TRUE! -->
 			<bean class="org.olat.course.DeployableCourseExport">
-				<property name="courseUrl" value="http://nexus.openolat.org/nexus/content/repositories/openolat/org/openolat/help/OpenOLAT-Help/8.0/OpenOLAT-Help-8.0.zip" />
-				<property name="identifier" value="OLAT Hilfe" />
+				<property name="courseUrl" value="http://nexus.openolat.org/nexus/content/repositories/openolat/org/openolat/help/OpenOLAT-Help/8.1/OpenOLAT-Help-8.1.zip" />
+				<property name="identifier" value="OLAT::help-course_de.zip" />
 				<property name="access" value="4" />
-				<property name="version" value="8.0" />
+				<property name="version" value="8.1" />
 				<property name="redeploy" value="true" />
 				<!-- 
 					Url to the course which should be used as help course. The specified course will be used 
-- 
GitLab