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

no-jira: remove the learning objectives automatically added to the root node

parent e8b93725
No related branches found
No related tags found
No related merge requests found
...@@ -412,6 +412,7 @@ public class CoursesWebService { ...@@ -412,6 +412,7 @@ public class CoursesWebService {
src = RepositoryManager.getInstance().lookupRepositoryEntry(copyFrom, false); src = RepositoryManager.getInstance().lookupRepositoryEntry(copyFrom, false);
} }
if(src == null) { if(src == null) {
log.warn("Cannot find course to copy from: " + copyFrom);
return null; return null;
} }
OLATResource originalOres = OLATResourceManager.getInstance().findResourceable(src.getOlatResource()); OLATResource originalOres = OLATResourceManager.getInstance().findResourceable(src.getOlatResource());
...@@ -519,7 +520,6 @@ public class CoursesWebService { ...@@ -519,7 +520,6 @@ public class CoursesWebService {
String description, String softKey, int access, boolean membersOnly, String authors, String location, String description, String softKey, int access, boolean membersOnly, String authors, String location,
String externalId, String externalRef, String managedFlags, CourseConfigVO courseConfigVO) { String externalId, String externalRef, String managedFlags, CourseConfigVO courseConfigVO) {
String learningObjectives = shortTitle + " (Example of creating a new course)";
if(!StringHelper.containsNonWhitespace(reDisplayName)) { if(!StringHelper.containsNonWhitespace(reDisplayName)) {
reDisplayName = shortTitle; reDisplayName = shortTitle;
} }
...@@ -552,7 +552,7 @@ public class CoursesWebService { ...@@ -552,7 +552,7 @@ public class CoursesWebService {
addedEntry = repositoryService.update(addedEntry); addedEntry = repositoryService.update(addedEntry);
// create an empty course // create an empty course
CourseFactory.createCourse(addedEntry, shortTitle, longTitle, learningObjectives); CourseFactory.createCourse(addedEntry, shortTitle, longTitle, "");
return prepareCourse(addedEntry, shortTitle, longTitle, courseConfigVO); return prepareCourse(addedEntry, shortTitle, longTitle, courseConfigVO);
} catch (Exception e) { } catch (Exception e) {
......
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