[OO-2401] RS after deleting a course Created: 02/Dec/16  Updated: 07/Jun/18  Resolved: 05/Dec/16

Status: Closed
Project: OpenOLAT
Component/s: Course
Affects Version/s: 11.1.1
Fix Version/s: 11.1.2

Type: Bug Priority: Major
Reporter: Stephan Clemenz Assignee: Stéphane Rossé
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 30 minutes
Original Estimate: Not Specified

Funded by: VCRP


After a course has been deleted, trying to reload the repository entry results in a RS:

cause::org.olat.core.logging.AssertException: No resourceable ID found. -> at org.olat.course.CourseFactory.loadCourse(CourseFactory.java:257) at org.olat.course.run.CourseRuntimeController.loadRepositoryEntry(CourseRuntimeController.java:277) at org.olat.course.run.CourseRuntimeController.event(CourseRuntimeController.java:830) at 

A quick fix is

diff --git a/src/main/java/org/olat/course/run/CourseRuntimeController.java b/src/main/java/org/olat/course/run/CourseRuntimeController.java
--- a/src/main/java/org/olat/course/run/CourseRuntimeController.java
+++ b/src/main/java/org/olat/course/run/CourseRuntimeController.java
@@ -827,7 +827,7 @@
 		} else if (lifeCycleChangeCtr == source) {
-			loadRepositoryEntry();
+			if (!event.getCommand().equals("deleted")) loadRepositoryEntry();
 		} else if (currentToolCtr == source) {
 			if (event == Event.DONE_EVENT) {
 				// special check for editor

Perhaps there exist a more elegant way...

Comment by Stéphane Rossé [ 05/Dec/16 ]


Generated at Mon Feb 18 17:01:30 CET 2019 using Jira 7.12.1#712002-sha1:609a50578ba6bc73dbf8b05dddd7c04a04b6807c.