diff --git a/pom.xml b/pom.xml index 566f14d12874df100323d98aba0ffc7e97420f50..9e84b2b8a948fffb785fed5e329a38f28c01c47d 100644 --- a/pom.xml +++ b/pom.xml @@ -354,6 +354,8 @@ <version>2.1.1</version> <!-- <configuration> <webXml>target/web.xml</webXml> </configuration> --> <configuration> + <attachClasses>true</attachClasses> + <directory>src/main/java</directory> <!-- <webResources> --> <!-- <resource> --> <!-- <directory>src/main/java</directory> --> diff --git a/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java b/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java index 5ec7a121bdeac9fe411ab473243033a965079c5d..8d8746180cc9fe4954786cebf0de5d5d5ca3eb4a 100644 --- a/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java +++ b/src/main/java/org/olat/core/commons/editor/htmleditor/HTMLEditorController.java @@ -70,23 +70,23 @@ import org.olat.core.util.vfs.version.Versionable; */ public class HTMLEditorController extends FormBasicController { // HTML constants - static final String DOCTYPE = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; - static final String OPEN_HTML = "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"; - static final String OPEN_HEAD = "<head>"; - static final String CLOSE_HEAD = "</head>"; - static final String OPEN_TITLE = "<title>"; - static final String CLOSE_TITLE = "</title>"; - static final String EMTPY_TITLE = OPEN_TITLE + CLOSE_TITLE; - static final String CLOSE_HTML = "\n<html>"; - static final String CLOSE_BODY_HTML = "</body></html>"; - static final String CLOSE_HEAD_OPEN_BODY = "</head><body>"; + public static final String DOCTYPE = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; + public static final String OPEN_HTML = "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"; + public static final String OPEN_HEAD = "<head>"; + public static final String CLOSE_HEAD = "</head>"; + public static final String OPEN_TITLE = "<title>"; + public static final String CLOSE_TITLE = "</title>"; + public static final String EMTPY_TITLE = OPEN_TITLE + CLOSE_TITLE; + public static final String CLOSE_HTML = "\n<html>"; + public static final String CLOSE_BODY_HTML = "</body></html>"; + public static final String CLOSE_HEAD_OPEN_BODY = "</head><body>"; // Editor version metadata to check if file has already been edited with this editor - static final String GENERATOR = "olat-tinymce-"; - static final String GENERATOR_VERSION = "3"; - static final String GENERATOR_META = "<meta name=\"generator\" content=\"" + GENERATOR + GENERATOR_VERSION + "\" />\n"; + public static final String GENERATOR = "olat-tinymce-"; + public static final String GENERATOR_VERSION = "3"; + public static final String GENERATOR_META = "<meta name=\"generator\" content=\"" + GENERATOR + GENERATOR_VERSION + "\" />\n"; // Default char set for new files is UTF-8 - static final String UTF_8 = "utf-8"; - static final String UTF8CHARSET = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; + public static final String UTF_8 = "utf-8"; + public static final String UTF8CHARSET = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; private String preface; // null if no head, otherwise head is kept in memory private String body; // Content of body tag diff --git a/src/main/java/org/olat/core/commons/modules/glossary/GlossaryItemManager.java b/src/main/java/org/olat/core/commons/modules/glossary/GlossaryItemManager.java index 6aea25574aaaeb66b3429247e8cc7d085139f7cf..624c0a8756077bf702ce0b9dcf264e3f34a12e16 100644 --- a/src/main/java/org/olat/core/commons/modules/glossary/GlossaryItemManager.java +++ b/src/main/java/org/olat/core/commons/modules/glossary/GlossaryItemManager.java @@ -94,7 +94,7 @@ public class GlossaryItemManager extends BasicManager { * @param olatResource * @param glossItemList */ - protected void saveGlossaryItemList(VFSContainer glossaryFolder, ArrayList<GlossaryItem> glossItemList) { + public void saveGlossaryItemList(VFSContainer glossaryFolder, ArrayList<GlossaryItem> glossItemList) { VFSLeaf glossaryFile = getGlossaryFile(glossaryFolder); saveToFile(glossaryFile, glossItemList); glossItemList = removeEmptyGlossaryItems(glossItemList); diff --git a/src/main/java/org/olat/core/util/FileUtils.java b/src/main/java/org/olat/core/util/FileUtils.java index 88ce72a3f5330cabc84e1d87962651451b2cabcd..c4699cc9e5dca93d2c1b7f69277d3b487d1c790c 100644 --- a/src/main/java/org/olat/core/util/FileUtils.java +++ b/src/main/java/org/olat/core/util/FileUtils.java @@ -56,9 +56,9 @@ public class FileUtils { //windows: invalid characters for filenames: \ / : * ? " < > | //linux: invalid characters for file/folder names: /, but you have to escape certain chars, like ";$%&*" //OLAT reserved char: ":" - private static char[] FILE_NAME_FORBIDDEN_CHARS = { '/', '\n', '\r', '\t', '\f', '`', '?', '*', '\\', '<', '>', '|', '\"', ':' }; + public static char[] FILE_NAME_FORBIDDEN_CHARS = { '/', '\n', '\r', '\t', '\f', '`', '?', '*', '\\', '<', '>', '|', '\"', ':', ',' }; //private static char[] FILE_NAME_ACCEPTED_CHARS = { 'ä', 'Ä', 'ü', 'Ü', 'ö', 'Ö', ' '}; - private static char[] FILE_NAME_ACCEPTED_CHARS = { '\u0228', '\u0196', '\u0252', '\u0220', '\u0246', '\u0214', ' '}; + public static char[] FILE_NAME_ACCEPTED_CHARS = { '\u0228', '\u0196', '\u0252', '\u0220', '\u0246', '\u0214', ' '}; /** diff --git a/src/main/java/org/olat/modules/wiki/Wiki.java b/src/main/java/org/olat/modules/wiki/Wiki.java index 62eaa7ebbaf19b6a18bd42709ca7c6757862408a..86ae8d3e09f4828cc698aa2b71962a28d5ca488f 100644 --- a/src/main/java/org/olat/modules/wiki/Wiki.java +++ b/src/main/java/org/olat/modules/wiki/Wiki.java @@ -122,7 +122,7 @@ public class Wiki implements WikiContainer, Serializable { return page; } - protected void addPage(WikiPage page) { + public void addPage(WikiPage page) { String pageId = page.getPageId(); if (!wikiPages.containsKey(pageId)) wikiPages.put(pageId, page); } diff --git a/src/main/java/org/olat/modules/wiki/WikiManager.java b/src/main/java/org/olat/modules/wiki/WikiManager.java index bd3b5338f83236f009448d9769529b0570f7a4ad..c9b35469d48ae4b00ddd75b88140a26668a65e16 100644 --- a/src/main/java/org/olat/modules/wiki/WikiManager.java +++ b/src/main/java/org/olat/modules/wiki/WikiManager.java @@ -351,7 +351,7 @@ public class WikiManager extends BasicManager { * @param ores * @param page */ - protected void saveWikiPage(OLATResourceable ores, WikiPage page, boolean incrementVersion, Wiki wiki) { + public void saveWikiPage(OLATResourceable ores, WikiPage page, boolean incrementVersion, Wiki wiki) { //cluster_OK by guido VFSContainer versionsContainer = getWikiContainer(ores, VERSION_FOLDER_NAME); VFSContainer wikiContentContainer = getWikiContainer(ores, WIKI_RESOURCE_FOLDER_NAME); diff --git a/src/main/java/org/olat/modules/wiki/WikiPage.java b/src/main/java/org/olat/modules/wiki/WikiPage.java index 7ebf806ac8b759c5b3a9bb8451f58485cdd7164d..5a6bf7b22e8f711b5643bb919b5dbc68a2825645 100644 --- a/src/main/java/org/olat/modules/wiki/WikiPage.java +++ b/src/main/java/org/olat/modules/wiki/WikiPage.java @@ -58,7 +58,7 @@ public class WikiPage { * @param id * @param name */ - protected WikiPage(String name) { + public WikiPage(String name) { this.pageName = FilterUtil.normalizeWikiLink(name); this.pageId = WikiManager.generatePageId(pageName); } @@ -67,7 +67,7 @@ public class WikiPage { return content; } - protected void setContent(String content) { + public void setContent(String content) { this.content = content; dirty = true; } diff --git a/src/main/java/org/olat/restapi/_spring/restApiContext.xml b/src/main/java/org/olat/restapi/_spring/restApiContext.xml index 0f0d71a303ce5ac0f998550a8b9b472e9d012ceb..f9d361ec2b07bdffc4723e49b4a9418611d48aba 100644 --- a/src/main/java/org/olat/restapi/_spring/restApiContext.xml +++ b/src/main/java/org/olat/restapi/_spring/restApiContext.xml @@ -41,6 +41,7 @@ <value>org.olat.modules.fo.restapi.ForumCourseNodeWebService</value> <value>org.olat.catalog.restapi.CatalogWebService</value> <value>org.olat.notifications.restapi.NotificationsWebService</value> + <value>com.frentix.olat.restapi.MoodleImportWebService</value> </list> </property> <!-- property name="singletonBeans"> diff --git a/src/test/java/olat.local.properties b/src/test/java/olat.local.properties index 136c777ff02faac2e56fbe6e72c63415af7712cd..2523b06da8f84a07dcf9f7621613dd9f0481b2a6 100644 --- a/src/test/java/olat.local.properties +++ b/src/test/java/olat.local.properties @@ -1,52 +1,90 @@ -# local properties for unittesting +########## +# +# when you start OLAT with an empty olat.local.properties file it will start with an embedded hsqldb and +# the userdata dir will be java.io.tmpdir. +# +########## -# olatcore path must be available. normally this is relative path works. otherwhise try absolut path to your olatcore source dir -olatcore.src = src/main/java +tomcat.id=1 +node.id=1 +generate.index.at.startup=false +build.identifier=uzh71-devLocal -defaultlang=de -fallbacklang=de -enabledLanguages=all +guidemo.enabled=true -localization.cache=false -is.translation.server=enabled -# i18n test case needs the olat3 source dir. Assumes that it's available relative to olatcore -i18n.application.src.dir=${olatcore.src}/../../../../olat3/webapp/WEB-INF/src -i18n.core.src.dir=${olatcore.src} -# Change this path to the i18n projects if you have them configured -i18n.application.opt.src.dir=${i18n.application.src.dir} -i18n.core.opt.src.dir= ${olatcore.src} +# runtime application data directory +userdata.dir=/Users/jkraehemann/olatdata-JK +# name of the repository root +folder.root=${userdata.dir}/bcroot +# temporary workspace for the running application +temp.dir=${userdata.dir}/tmp -node.id=1 -db.name=olat -db.vendor=hsqldb -db.host=localhost -db.user=olat -db.pass=olat -db.host.port=0 -db.skip.install=true -db.url.options.mysql=?useOldUTF8Behavior=true&useUnicode=true&characterEncoding=UTF-8 -hibernate.caching.singlevm.class=net.sf.ehcache.hibernate.EhCacheProvider -#hibernate.caching.cluster.class=org.hibernate.cache.jbc2.SharedJBossCacheRegionFactory -hibernate.caching.cluster.class= -hibernate.use.second.level.cache=true -db.hibernate.ddl.auto=update -db.show_sql=false -folder.maxulmb=10 -folder.quotamb=10 -folder.root= -log.anonymous=false -server.contextpath=olat - -smtp.host=localhost + +######################################################################## +# SMTP (mail) settings +######################################################################## + +# mail support can be disabled by leaving the following entry blank or +# setting it to the keyword 'disabled' (without quotes!) +smtp.host=speedy.frentix.com +# if required by your local SMTP you may need to provide credentials smtp.user= smtp.pwd= -# enable SSL if you smtp server supports it -smtp.sslEnabled=false -smtp.sslCheckCertificate=false -# set this email to a mail address in your domain -adminemail=webmaster@myolat.com -# set this email to a mail address in your domain -supportemail=support@myolat.com +fromemail=admin@frentix.com +# set this email to a webmaster or admin mail address in your domain +adminemail=joel.kraehemann@frentix.com +# set this email to a support mail address in your domain +supportemail=joel.kraehemann@frentix.com + +######################################################################## +# OLAT identity settings +######################################################################## + +# OLAT instance ID (effects a unqiue namesapce for addressable items) +# ID should be no longer than 10 characters! This needs to be unique +# amongst nodes within a cluster, if you are not clustering then you +# can leave this value as is. +#instance.id=rholat + +######################################################################## +# Database settings +######################################################################## + +# supported vendors currently include "mysql" and "postgresql" +db.vendor=mysql +db.hibernate.ddl.auto=validate +#db.hibernate.ddl.auto=update +auto.upgrade.database=false + +# the name of the application database +db.name=olat-7_1-JK +# the name of the OLAT database user +db.user=fxolat70 +# the password of the OLAT database user +db.pass=fxolat70 + +db.admin.user=root +db.admin.pass=qu2SQL + +# JDBC options (e.g., to set character channel behaviour etc.) +db.jdbc.options=useUnicode=true&characterEncoding=UTF-8 + + +# only set this if you do not want unit tests to be performed during the build skip.unit.tests=true +# set to false if you do not require special fonts +unpack.fonts=false +# for developers set to true - velocity pages are NOT cached +olatcore.debug=true +# for developers set to false - i18n files are not cached +localization.cache=false +user.generateTestUsers=false +# When running in eclipse use "INFO, syslog, A1", for production use "INFO, syslog" +log.rootCategory = INFO, syslog, A1 + +# relative path to +relpathto.src=../../../src + -allow.loadtest.mode=false \ No newline at end of file +# if enabled then the IM Server must be running before OLAT is started! +instantMessaging.enable=false