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

OO-3105: different restore path for course and the other learn resources

parent eefb596b
No related branches found
No related tags found
No related merge requests found
......@@ -378,7 +378,11 @@ public class RepositoryServiceImpl implements RepositoryService {
public RepositoryEntry restoreRepositoryEntry(RepositoryEntry entry) {
RepositoryEntry reloadedRe = repositoryEntryDAO.loadForUpdate(entry);
reloadedRe.setAccess(RepositoryEntry.ACC_OWNERS);
reloadedRe.setStatusCode(RepositoryEntryStatus.REPOSITORY_STATUS_CLOSED);
if("CourseModule".equals(reloadedRe.getOlatResource().getResourceableTypeName())) {
reloadedRe.setStatusCode(RepositoryEntryStatus.REPOSITORY_STATUS_CLOSED);
} else {
reloadedRe.setStatusCode(RepositoryEntryStatus.REPOSITORY_STATUS_OPEN);
}
reloadedRe = dbInstance.getCurrentEntityManager().merge(reloadedRe);
dbInstance.commit();
return reloadedRe;
......
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