[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 Sun Jul 22 00:39:21 CEST 2018 using JIRA 7.4.0#74002-sha1:4bbb6c3997c184a0a30bb2830d61b4dc50b1a591.