Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-1122

RS when deleting corrupted courses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 9.4.1
    • Fix Version/s: 9.4.2
    • Component/s: Course
    • Labels:
      None

      Description

      In changeset http://hg.openolat.org/openolat94/rev/406e1ddfeed0 there are four lines added to CourseFactory.java which cause a RedScreen when deleting a corrupted course (a course without runstructure.xml):

      diff -r c5bdd5eed2f8 -r 406e1ddfeed0 src/main/java/org/olat/course/CourseFactory.java
      --- a/src/main/java/org/olat/course/CourseFactory.java	Wed Nov 20 16:23:52 2013 +0100
      +++ b/src/main/java/org/olat/course/CourseFactory.java	Mon Nov 25 09:12:31 2013 +0100
      @@ -49,6 +49,7 @@
       import org.olat.core.commons.modules.bc.FolderConfig;
       import org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl;
       import org.olat.core.commons.persistence.DBFactory;
      +import org.olat.core.commons.services.taskexecutor.TaskExecutorManager;
       import org.olat.core.gui.UserRequest;
       import org.olat.core.gui.components.htmlheader.jscss.CustomCSS;
       import org.olat.core.gui.components.stack.StackedController;
      @@ -391,6 +392,10 @@
       			CourseConfigManagerImpl.getInstance().deleteConfigOf(course);
       		}
       		
      +		//clean up tasks
      +		OLATResource resource = course.getCourseEnvironment().getCourseGroupManager().getCourseResource();
      +		CoreSpringFactory.getImpl(TaskExecutorManager.class).delete(resource);
      +		
       		// delete course group- and rightmanagement
       		CourseGroupManager courseGroupManager = PersistingCourseGroupManager.getInstance(res);
       		courseGroupManager.deleteCourseGroupmanagement();
      

      I don't know the side effects, but a quick solution that works: if (course != null)

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Tester:
            Florian Gnägi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 45 minutes
                45m