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

OO-1499: remove references in course elements if the course is not imported with the references

parent ebea85c5
No related branches found
No related tags found
No related merge requests found
......@@ -246,6 +246,8 @@ public abstract class AbstractFeedCourseNode extends GenericCourseNode {
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(),
rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
FeedNodeEditController.setReference(re, getModuleConfiguration());
} else {
FeedNodeEditController.removeReference(getModuleConfiguration());
}
}
}
......@@ -298,6 +298,8 @@ public class CPCourseNode extends AbstractAccessableCourseNode {
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(),
rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
CPEditController.setCPReference(re, getModuleConfiguration());
} else {
CPEditController.removeCPReference(getModuleConfiguration());
}
}
......
......@@ -260,6 +260,8 @@ public class IQSELFCourseNode extends AbstractAccessableCourseNode implements Se
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(),
rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
IQEditController.setIQReference(re, getModuleConfiguration());
} else {
IQEditController.removeIQReference(getModuleConfiguration());
}
}
......
......@@ -303,6 +303,8 @@ public class IQSURVCourseNode extends AbstractAccessableCourseNode implements QT
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(),
rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
IQEditController.setIQReference(re, getModuleConfiguration());
} else {
IQEditController.removeIQReference(getModuleConfiguration());
}
}
......
......@@ -501,6 +501,8 @@ public class IQTESTCourseNode extends AbstractAccessableCourseNode implements As
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(),
rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
IQEditController.setIQReference(re, getModuleConfiguration());
} else {
IQEditController.removeIQReference(getModuleConfiguration());
}
}
......
......@@ -432,7 +432,11 @@ public class PortfolioCourseNode extends AbstractAccessableCourseNode implements
EPFrontendManager ePFMgr = CoreSpringFactory.getImpl(EPFrontendManager.class);
PortfolioStructure map = ePFMgr.loadPortfolioStructure(re.getOlatResource());
PortfolioCourseNodeEditController.setReference(re, map, getModuleConfiguration());
} else {
PortfolioCourseNodeEditController.removeReference(getModuleConfiguration());
}
} else {
PortfolioCourseNodeEditController.removeReference(getModuleConfiguration());
}
}
}
\ No newline at end of file
......@@ -340,6 +340,8 @@ public class ScormCourseNode extends AbstractAccessableCourseNode implements Ass
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(),
rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
ScormEditController.setScormCPReference(re, getModuleConfiguration());
} else {
CPEditController.removeCPReference(getModuleConfiguration());
}
}
......
......@@ -198,6 +198,8 @@ public class WikiCourseNode extends AbstractAccessableCourseNode {
RepositoryEntry re = handler.importResource(owner, rie.getInitialAuthor(), rie.getDisplayName(),
rie.getDescription(), false, locale, rie.importGetExportedFile(), null);
WikiEditController.setWikiRepoReference(re, getModuleConfiguration());
} else {
WikiEditController.removeWikiReference(getModuleConfiguration());
}
}
......
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