Skip to content
Snippets Groups Projects
Commit a5486573 authored by srosse's avatar srosse
Browse files

OO-1672: hasPublishableChanges can be called without knowing if the editor is up-to-date, loaded...

parent 2f5d7104
No related branches found
No related tags found
No related merge requests found
...@@ -1178,6 +1178,9 @@ public class EditorMainController extends MainLayoutBasicController implements G ...@@ -1178,6 +1178,9 @@ public class EditorMainController extends MainLayoutBasicController implements G
} }
public boolean hasPublishableChanges(ICourse course) { public boolean hasPublishableChanges(ICourse course) {
if(cetm == null || course == null) {
return false;
}
PublishProcess publishProcess = PublishProcess.getInstance(course, cetm, getLocale()); PublishProcess publishProcess = PublishProcess.getInstance(course, cetm, getLocale());
PublishTreeModel publishTreeModel = publishProcess.getPublishTreeModel(); PublishTreeModel publishTreeModel = publishProcess.getPublishTreeModel();
return publishTreeModel.hasPublishableChanges(); return publishTreeModel.hasPublishableChanges();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment