diff --git a/src/main/java/de/bps/course/assessment/AssessmentMainController.java b/src/main/java/de/bps/course/assessment/AssessmentMainController.java
index 0b90f817b78db3baffd6145642ecc4090e7452d5..81357d89fad85567fd3c5fb5a3c8c9b152fabe00 100644
--- a/src/main/java/de/bps/course/assessment/AssessmentMainController.java
+++ b/src/main/java/de/bps/course/assessment/AssessmentMainController.java
@@ -25,7 +25,7 @@
 */
 package de.bps.course.assessment;
 
-import java.rmi.RemoteException;
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
@@ -105,6 +105,7 @@ import org.olat.course.groupsandrights.CourseGroupManager;
 import org.olat.course.nodes.AssessableCourseNode;
 import org.olat.course.nodes.CourseNode;
 import org.olat.course.nodes.CourseNodeFactory;
+import org.olat.course.nodes.IQSURVCourseNode;
 import org.olat.course.nodes.STCourseNode;
 import org.olat.course.properties.CoursePropertyManager;
 import org.olat.course.run.userview.UserCourseEnvironment;
@@ -118,8 +119,7 @@ import org.olat.user.UserManager;
 
 import de.bps.onyx.plugin.OnyxModule;
 import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManager;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManagerFactory;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
 
 /**
  * Initial Date:  Jun 18, 2004
@@ -146,6 +146,10 @@ public class AssessmentMainController extends MainLayoutBasicController implemen
 	
 	private static final String CMD_SHOW_ONYXREPORT = "cmd.show.onyxreport";
 	public static final String KEY_IS_ONYX = "isOnyx";
+	//<OLATCE-1124>
+	private static final String CMD_SHOW_ONYXREPORT_SURVEY = "cmd.show.onyxreport_survey";
+	protected static final String KEY_IS_ONYX_SURVEY = "isOnyxSurvey";
+	//</OLATCE-1124>
 	
 
 	private static final int MODE_USERFOCUS		= 0;
@@ -210,7 +214,10 @@ public class AssessmentMainController extends MainLayoutBasicController implemen
 	
 	private Link showOnyxReporterButton;
 	private LayoutMain3ColsController columLayoutCtr;
-	
+	//<OLATCE-1124>
+	private OnyxReporterConnector connector;
+	private List<Identity> allUsersList;
+	//</OLATCE-1124>
 
 	/**
 	 * Constructor for the assessment tool controller.
@@ -244,7 +251,9 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 
 		Identity focusOnIdentity = null;
 		ICourse course = CourseFactory.loadCourse(ores);
-		boolean hasAssessableNodes = course.hasAssessableNodes();
+		//<OLATCE-1124>
+		boolean hasAssessableNodes = course.hasAssessableNodes() || checkForQTI21SurveyInTree(course.getRunStructure().getRootNode());
+		//</OLATCE-1124>
 		if (hasAssessableNodes) {
 			BusinessControl bc = getWindowControl().getBusinessControl();
 			ContextEntry ceIdentity = bc.popLauncherContextEntry();
@@ -348,6 +357,32 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 		course.getCourseEnvironment().getAssessmentManager().registerForAssessmentChangeEvents(this, ureq.getIdentity());
 	}
 
+	//<OLATCE-1124>
+	private boolean checkForQTI21Survey(CourseNode node){
+		boolean isSurvey = false;
+		if(node instanceof IQSURVCourseNode){
+			RepositoryEntry entry = node.getReferencedRepositoryEntry();
+			if (entry != null && OnyxModule.isOnyxTest(entry.getOlatResource())) {
+				isSurvey = true;
+			}
+		}
+		return isSurvey;
+	}
+
+	private boolean checkForQTI21SurveyInTree(CourseNode node){
+		boolean isSurvey = checkForQTI21Survey(node);
+		if(!isSurvey){
+			int count = node.getChildCount();
+			for (int i = 0; i < count; i++) {
+				CourseNode cn = (CourseNode) node.getChildAt(i);
+				isSurvey = checkForQTI21SurveyInTree(cn);
+				if(isSurvey)break;
+			}
+		}
+		return isSurvey;
+	}
+	//</OLATCE-1124>
+	
 	/**
 	 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 	 *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
@@ -399,7 +434,9 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 		} else if (source == showOnyxReporterButton) {
 			this.identitiesList = getGroupIdentitiesFromGroupmanagement(this.currentGroup);
 			this.onyxReporterBackLocation = "userChoose";
-			if (!showOnyxReporter(ureq)) {
+			//<OLATCE-1124>
+			if (!showOnyxReporter(ureq, currentCourseNode, false)) {
+			//</OLATCE-1124>
 				getWindowControl().setError(translate("onyxreporter.error"));
 			}
 		} else if (source == backLinkOR) {
@@ -417,19 +454,38 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 	 * This methods calls the OnyxReporter and shows it in an iframe.
 	 * @param ureq The UserRequest for getting the identity and role of the current user.
 	 */
-	private boolean showOnyxReporter(UserRequest ureq) {
-		if (OnyxModule.isOnyxTest(currentCourseNode.getReferencedRepositoryEntry().getOlatResource())) {
-			OnyxReporterWebserviceManager onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
+	//<OLATCE-1124>
+	private boolean showOnyxReporter(UserRequest ureq, CourseNode node, boolean forSurvey) {
+		if (OnyxModule.isOnyxTest(node.getReferencedRepositoryEntry().getOlatResource())) {
+	//</OLATCE-1124>
+			//<ONYX-705>
+			OnyxReporterConnector onyxReporter = null;
+			
+			try{
+				onyxReporter = new OnyxReporterConnector();
+			} catch (OnyxReporterException e){
+				log.error("unable to connect to onyxreporter!", e);
+			}
+			//</ONYX-705>
 			if (onyxReporter != null) {
 				if (this.identitiesList == null) {
 					this.identitiesList = getAllIdentitisFromGroupmanagement();
 				}
 				String iframeSrc = "";
 				try {
-					iframeSrc = onyxReporter.startReporter(ureq, this.identitiesList, currentCourseNode, false);
-				} catch (RemoteException e) {
-					e.printStackTrace();
-					return false;
+					//<OLATCE-1124>
+					if(forSurvey){
+						ICourse course = CourseFactory.loadCourse(ores);
+						if(node instanceof IQSURVCourseNode){
+							iframeSrc = onyxReporter.startReporterGUIForSurvey(ureq.getIdentity(), node, course.getCourseBaseContainer()
+								.getBasefile() + File.separator + node.getIdent() + File.separator);
+						} else {
+							iframeSrc = onyxReporter.startReporterGUI(ureq.getIdentity(), this.identitiesList, node, null, false, true);	
+						}
+					} else {
+						iframeSrc = onyxReporter.startReporterGUI(ureq.getIdentity(), this.identitiesList, node, null, false, false);
+					}
+					//</OLATCE-1124>
 				} catch (OnyxReporterException orE) {
 					if (orE.getMessage().equals("noresults")) {
 						onyxReporterVC.contextPut("iframeOK", Boolean.FALSE);
@@ -563,7 +619,17 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 					CourseNode node = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
 					this.currentCourseNode = (AssessableCourseNode) node;
 					this.onyxReporterBackLocation = "nodeListCtr";
-					if (!showOnyxReporter(ureq)) {
+					//<OLATCE-1124>
+					if (!showOnyxReporter(ureq, node, false)) {
+						getWindowControl().setError(translate("onyxreporter.error"));
+					}
+				} else if (actionid.equals(CMD_SHOW_ONYXREPORT_SURVEY)) {
+					int rowid = te.getRowId();
+					Map<String,Object> nodeData = (Map<String,Object>) nodeTableModel.getObject(rowid);
+					CourseNode node = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
+					this.onyxReporterBackLocation = "nodeListCtr";
+					if (!showOnyxReporter(ureq, node, true)) {
+					//<OLATCE-1124>
 						getWindowControl().setError(translate("onyxreporter.error"));
 					}
 				}
@@ -712,30 +778,34 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 	 * @return List of all course participants
 	 */
 	List<Identity> getAllIdentitisFromGroupmanagement() {
-		List<Identity> allUsersList = new ArrayList<Identity>();
-		BaseSecurity secMgr = BaseSecurityManager.getInstance();
-		Iterator<BusinessGroup> iter = this.coachedGroups.iterator();
-		while (iter.hasNext()) {
-			BusinessGroup group = iter.next();
-			SecurityGroup secGroup = group.getPartipiciantGroup();
-			List<Identity> identities = secMgr.getIdentitiesOfSecurityGroup(secGroup);
-			for (Iterator<Identity> identitiyIter = identities.iterator(); identitiyIter.hasNext();) {
-				Identity identity = identitiyIter.next();
-				if (!PersistenceHelper.listContainsObjectByKey(allUsersList, identity)) {
-					// only add if not already in list
-					allUsersList.add(identity);
+		//<OLATCE-1124>
+		if(allUsersList == null){
+			allUsersList = new ArrayList<Identity>();
+			BaseSecurity secMgr = BaseSecurityManager.getInstance();
+			Iterator<BusinessGroup> iter = this.coachedGroups.iterator();
+			while (iter.hasNext()) {
+				BusinessGroup group = iter.next();
+				SecurityGroup secGroup = group.getPartipiciantGroup();
+				List<Identity> identities = secMgr.getIdentitiesOfSecurityGroup(secGroup);
+				for (Iterator<Identity> identitiyIter = identities.iterator(); identitiyIter.hasNext();) {
+					Identity identity = identitiyIter.next();
+					if (!PersistenceHelper.listContainsObjectByKey(allUsersList, identity)) {
+						// only add if not already in list
+						allUsersList.add(identity);
+					}
 				}
 			}
-		}
-		//fxdiff VCRP-1,2: access control of resources
-		RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntry(ores, false);
-		if(re.getParticipantGroup() != null) {
-			for (Identity identity : secMgr.getIdentitiesOfSecurityGroup(re.getParticipantGroup())) {
-				if (!PersistenceHelper.listContainsObjectByKey(allUsersList, identity)) {
-					allUsersList.add(identity);
+			//fxdiff VCRP-1,2: access control of resources
+			RepositoryEntry re = RepositoryManager.getInstance().lookupRepositoryEntry(ores, false);
+			if(re.getParticipantGroup() != null) {
+				for (Identity identity : secMgr.getIdentitiesOfSecurityGroup(re.getParticipantGroup())) {
+					if (!PersistenceHelper.listContainsObjectByKey(allUsersList, identity)) {
+						allUsersList.add(identity);
+					}
 				}
 			}
 		}
+		//</OLATCE-1124>
 		return allUsersList;
 	}
 
@@ -921,7 +991,10 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 		
 		nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.overallselect", 2,
 				CMD_SHOW_ONYXREPORT, ureq.getLocale()));
-		
+		//<OLATCE-1124>
+		nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.surveyselect", 3,
+				CMD_SHOW_ONYXREPORT_SURVEY, ureq.getLocale()));
+		//</OLATCE-1124>
 
 		// get list of course node data and populate table data model
 		CourseNode rootNode = course.getRunStructure().getRootNode();
@@ -969,7 +1042,9 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 		}
 
 		boolean hasDisplayableValuesConfigured = false;
-		if (childrenData.size() > 0 || courseNode instanceof AssessableCourseNode) {
+		//<OLATCE-1124>
+		if (childrenData.size() > 0 || courseNode instanceof AssessableCourseNode || courseNode instanceof IQSURVCourseNode) {
+		//</OLATCE-1124>
 			// Store node data in hash map. This hash map serves as data model for
 			// the user assessment overview table. Leave user data empty since not used in
 			// this table. (use only node data)
@@ -980,21 +1055,37 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 			nodeData.put(AssessmentHelper.KEY_TYPE, courseNode.getType());
 			nodeData.put(AssessmentHelper.KEY_TITLE_SHORT, courseNode.getShortTitle());
 			
-			if (courseNode.getReferencedRepositoryEntry() != null) {
-				if (OnyxModule.isOnyxTest(courseNode.getReferencedRepositoryEntry().getOlatResource())) {
-					nodeData.put(KEY_IS_ONYX, Boolean.TRUE);
-					if (getAllIdentitisFromGroupmanagement().size() <= 0) {
-						nodeData.put(KEY_IS_ONYX, Boolean.FALSE);
-					}
-				} else {
-					nodeData.put(KEY_IS_ONYX, Boolean.FALSE);
-				}
-			}
 			
 			nodeData.put(AssessmentHelper.KEY_TITLE_LONG, courseNode.getLongTitle());
 			nodeData.put(AssessmentHelper.KEY_IDENTIFYER, courseNode.getIdent());
 
 			if (courseNode instanceof AssessableCourseNode) {
+				//<OLATCE-1124>
+				if (courseNode.getReferencedRepositoryEntry() != null) {
+					if (OnyxModule.isOnyxTest(courseNode.getReferencedRepositoryEntry().getOlatResource())) {
+						nodeData.put(KEY_IS_ONYX, Boolean.FALSE);
+
+						List<Identity> identities = getAllIdentitisFromGroupmanagement();
+						if (identities.size() > 0) {
+							try{
+								if(connector == null){
+									connector = new OnyxReporterConnector();									
+								}
+							} catch (OnyxReporterException ore){
+								getWindowControl().setWarning("reporter.unavailable");
+							}
+							
+							if(connector != null){
+								boolean hasResults = connector.hasAnyResults(false, identities , null , courseNode);
+								if(hasResults){
+									nodeData.put(KEY_IS_ONYX, Boolean.TRUE);
+									nodeData.put(KEY_IS_ONYX_SURVEY, Boolean.TRUE);
+								}
+							}
+						}
+					}
+				}
+				//</OLATCE-1124>
 				AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode;
 				if ( assessableCourseNode.hasDetails()
 					|| assessableCourseNode.hasAttemptsConfigured()
@@ -1017,6 +1108,30 @@ AssessmentMainController(UserRequest ureq, WindowControl wControl, OLATResourcea
 					// (e.g. a st node with no defined rule
 					nodeData.put(AssessmentHelper.KEY_SELECTABLE, Boolean.FALSE);
 				}
+			//<OLATCE-1124>
+			} else if (checkForQTI21Survey(courseNode)){
+				nodeData.put(KEY_IS_ONYX_SURVEY, Boolean.FALSE);
+				List<Identity> identities = getAllIdentitisFromGroupmanagement();
+				if (identities.size() > 0) {
+					try{
+						if(connector == null){
+							connector = new OnyxReporterConnector();									
+						}
+					} catch (OnyxReporterException ore){
+						getWindowControl().setWarning("reporter.unavailable");
+					}
+					
+					if(connector != null){
+						ICourse course = CourseFactory.loadCourse(ores);
+						
+						boolean hasResults = connector.hasAnyResults(true, null , course.getCourseBaseContainer().getBasefile() + File.separator + courseNode.getIdent() + File.separator , courseNode);
+						if(hasResults){
+							nodeData.put(KEY_IS_ONYX_SURVEY, Boolean.TRUE);
+						}
+					}
+				}
+				hasDisplayableValuesConfigured = true;
+			//</OLATCE-1124>
 			} else {
 				// Not assessable nodes are not selectable. (e.g. a node that
 				// has an assessable child node but is itself not assessable)
diff --git a/src/main/java/de/bps/course/assessment/NodeTableDataModelOnyx.java b/src/main/java/de/bps/course/assessment/NodeTableDataModelOnyx.java
index 97ae237adfa8d872edff1ead088663df963224be..1b61b2b91b749f7a69ca7e05b36a8b1c4045871d 100644
--- a/src/main/java/de/bps/course/assessment/NodeTableDataModelOnyx.java
+++ b/src/main/java/de/bps/course/assessment/NodeTableDataModelOnyx.java
@@ -63,7 +63,9 @@ public class NodeTableDataModelOnyx extends DefaultTableDataModel {
     		// node, select
       	
     		//return 2;
-    		return 3;
+    	//<OLATCE-1124>
+    		return 4;
+    	//</OLATCE-1124>
       	
     }
 
@@ -80,7 +82,9 @@ public class NodeTableDataModelOnyx extends DefaultTableDataModel {
 				case 1:
 					// selection command
 					Boolean courseNodeEditable = (Boolean) nodeData.get(AssessmentHelper.KEY_SELECTABLE);
-					if (courseNodeEditable.booleanValue()) return trans.translate("table.action.selectparticipant");
+					//<OLATCE-1124>
+					if (courseNodeEditable != null && courseNodeEditable.booleanValue()) return trans.translate("table.action.selectparticipant");
+					//</OLATCE-1124>
 					else return null;
 				case 2:
 					//show OnyxReport
@@ -89,8 +93,16 @@ public class NodeTableDataModelOnyx extends DefaultTableDataModel {
 						return trans.translate("table.action.showOnyxReporter");
 					} else {
 						return "";
-					}					
-								
+					}
+				//<OLATCE-1124>
+				case 3://show OnyxReporter --> statistical overview
+					Boolean courseNodeIsOnyxSurvey = (Boolean) nodeData.get(AssessmentMainController.KEY_IS_ONYX_SURVEY);
+					if (courseNodeIsOnyxSurvey != null && courseNodeIsOnyxSurvey.booleanValue()) {
+						return trans.translate("table.action.showOnyxReporter");
+					} else {
+						return "";
+					}
+				//</OLATCE-1124>
 				default:
 					return "error";
 			}
diff --git a/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_de.properties b/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_de.properties
index 063ed7e768050b0ad159cba357d52ae6192e8ffe..6aacfb81c14a89cdd86a02349a9ce1f6db02e516 100644
--- a/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_de.properties
+++ b/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_de.properties
@@ -2,6 +2,9 @@
 cmd.showOnyxReporter=Gesamtauswertung
 table.header.singleselect = Einzelauswertung
 table.header.overallselect = Gesamtauswertung
+##<OLATCE-1124>
+table.header.surveyselect = Statistische Auswertung
+##</OLATCE-1124>
 table.action.selectparticipant = Teilnehmer w\u00e4hlen
 table.action.showOnyxReporter = anzeigen
 no.testresults = <font color="red">kein Ergebnis vorhanden</font>			
diff --git a/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_en.properties b/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_en.properties
index 7a854eac779db8c1b80e4507e11fbf2e8a3cb3e3..5403f47d6f5f5382e4a27a0180799763f183306b 100644
--- a/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_en.properties
+++ b/src/main/java/de/bps/course/assessment/_i18n/LocalStrings_en.properties
@@ -7,4 +7,7 @@ onyxreporter.error=Error\: the Onyx Reporter does not respond\!
 table.action.selectparticipant=Select participants
 table.action.showOnyxReporter=show
 table.header.overallselect=Total score
+##<OLATCE-1124>
+table.header.surveyselect =Statistical evaluation
+##</OLATCE-1124>
 table.header.singleselect=Single score
diff --git a/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeAnumFunction.java b/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeAnumFunction.java
index d2524d8e1ad8fe55efd94d2f6d051db38b93b281..b7d4242b2eaa76c903202b85d05a2c129c1e7298 100644
--- a/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeAnumFunction.java
+++ b/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeAnumFunction.java
@@ -21,14 +21,12 @@
 
 package de.bps.course.condition.interpreter.score;
 
-import java.rmi.RemoteException;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.olat.core.id.Identity;
 import org.olat.core.id.IdentityEnvironment;
+import org.olat.core.logging.OLog;
 import org.olat.core.logging.Tracing;
 import org.olat.course.CourseFactory;
 import org.olat.course.condition.interpreter.AbstractFunction;
@@ -40,16 +38,17 @@ import org.olat.course.nodes.AssessableCourseNode;
 import org.olat.course.nodes.CourseNode;
 import org.olat.course.run.userview.UserCourseEnvironment;
 
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManager;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManagerFactory;
-
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
 
 /**
  * @author Ingmar Kroll
  */
 public class GetOnyxTestOutcomeAnumFunction extends AbstractFunction {
 	public static final String name = "getOnyxTestOutcomeZK";
-
+	//<ONYX-705>
+	private final static OLog log = Tracing.createLoggerFor(GetOnyxTestOutcomeAnumFunction.class);
+	//</ONYX-705>
 	/**
 	 * Default constructor to use the current date
 	 *
@@ -82,6 +81,7 @@ public class GetOnyxTestOutcomeAnumFunction extends AbstractFunction {
 				name, "", "error.argtype.coursnodeidexpeted", "solution.example.node.infunction"));
 		String varId = (String) inStack[1];
 
+		
 		/*
 		 * check reference integrity
 		 */
@@ -94,91 +94,110 @@ public class GetOnyxTestOutcomeAnumFunction extends AbstractFunction {
 			// remember the reference to the node id for this condtion
 			cev.addSoftReference("courseNodeId", nodeId);
 		}
+		
 
+		//<OLATCE-1088>
 		/*
 		 * the real function evaluation which is used during run time
 		 */
-
 		try {
+			
 			//if the parameter is not in the list of the Onyx-Test's outcome-parameters add an error
-			OnyxReporterWebserviceManager onyxReporter = null;
+			//<ONYX-705>
+			OnyxReporterConnector onyxReporter = new OnyxReporterConnector();
+			//</ONYX-705>
 			UserCourseEnvironment uce = getUserCourseEnv();
 			AssessableCourseNode node = null;
+			boolean editorMode = false;
 			if (uce.getClass().equals(EditorUserCourseEnvironmentImpl.class)) {
+				editorMode = true;
 				CourseEditorEnv cee = ((EditorUserCourseEnvironmentImpl) uce).getCourseEditorEnv();
-			//TODO: anders holen siehe GetScoreWithCourseId L. 75
-//				CourseNode cnode = ((CourseEditorEnvImpl) cee).getNode(nodeId);
-//				node = (AssessableCourseNode) cnode;
+				CourseNode cnode = ((CourseEditorEnvImpl) cee).getNode(nodeId);
+				node = (AssessableCourseNode) cnode;
 			} else {
 				long courseResourceableId = getUserCourseEnv().getCourseEnvironment().getCourseResourceableId();
 				node = (AssessableCourseNode) CourseFactory.loadCourse(courseResourceableId).getEditorTreeModel().getCourseNode(nodeId);
 			}
+			
+			//begin course-editor-mode
 			Map<String, String> outcomes = new HashMap<String, String>();
-			// node can be null e.g. when it has been deleted
-			if (node != null && node.getUserAttempts(uce) > 0) {
+			if (editorMode) {
+				if(node == null){
+					return handleException( new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND, name, nodeId,
+							"error.notfound.coursenodeid", "solution.copypastenodeid"));
+				}
+				
 				try {
-					onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
-					if (onyxReporter != null) {
-						outcomes = onyxReporter.getOutcomes(node);
-					} else {
-						throw new UnsupportedOperationException("could not connect to onyx reporter");
-					}
-				} catch (Exception e) {
-					e.printStackTrace();
+				//<ONYX-705>
+					outcomes = onyxReporter.getPossibleOutcomeVariables(node);
+				} catch (OnyxReporterException e) {
+				//</ONYX-705>
+					log.error("Unable to get possible test-outcomes!", e);
+				}
+				if (!(outcomes.keySet().contains(varId))) {
+					return handleException(new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND,
+							name, "", "error.argtype.outcome.undefined", ""));
+				} else {
+					return defaultValue();
 				}
 			}
-			if (!(outcomes.keySet().contains(varId))) {
-				return handleException(new ArgumentParseException(ArgumentParseException.WRONG_ARGUMENT_FORMAT,
-				name, "", "error.argtype.coursnodeidexpeted", "solution.example.node.infunction"));
-			}
-
-			if (getUserCourseEnv().getClass().equals(EditorUserCourseEnvironmentImpl.class)) {
+			// end course-editor-mode
+			
+			
+			// node can be null e.g. when it has been deleted
+			if(node == null){
+				log.warn("Coursenode for : "+nodeId+" does not exist!");
 				return defaultValue();
 			}
 
 			IdentityEnvironment ienv = getUserCourseEnv().getIdentityEnvironment();
 			Identity identity = ienv.getIdentity();
 
-			long courseResourceableId = getUserCourseEnv().getCourseEnvironment().getCourseResourceableId();
-			node = (AssessableCourseNode) CourseFactory.loadCourse(courseResourceableId).getEditorTreeModel().getCourseNode(nodeId);
-
-			List<String[]> liste = new ArrayList<String[]>();
+			//<ONYX-705>
+			Map<String, String> results = null;
 
 			try {
-				onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
-				if (onyxReporter != null) {
-							liste = onyxReporter.getResults(node, identity);
-				} else {
-					throw new UnsupportedOperationException("could not connect to onyx reporter");
+				if(identity != null){
+					results = onyxReporter.getResults(node, identity);
 				}
-			} catch (RemoteException e) {
-				e.printStackTrace();
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-
-			if (liste.size() > 0) {
-				for (String[] outcome : liste) {
-					if (outcome[0].equals(varId)) {
-						if (Integer.valueOf(outcome[1]) != null) {
-							return Integer.valueOf(outcome[1]);
-						} else if (Double.valueOf(outcome[1]) != null) {
-							return Double.valueOf(outcome[1]);
-						} else {
-							return outcome[1];
-						}
-					}
+			} catch (OnyxReporterException e) {
+				log.error("Unable to get Results! Identity "+(identity!=null?identity.getName():"NULL")+" courseNode "+(node!=null?node.getShortName():"null"), e);
+			} finally {
+				if(results == null){
+					return defaultValue();
 				}
 			}
+			
+			String retVal = results.get(varId);
+			
+			if(retVal == null){
+				return defaultValue();
+			}
+			
+			try{
+				return Integer.parseInt(retVal);
+			} catch (NumberFormatException nfeI){
+				log.warn("retVal "+retVal+" is not a Integer!", nfeI);
+				try{
+					return Double.parseDouble(retVal);
+				} catch (NumberFormatException nfeD){
+					log.warn("retVal "+retVal+" is not a Double!", nfeD);
+					
+					return retVal;
+				}	
+			}
 
+		} catch (OnyxReporterException e) {
+			log.error(e.getMessage(), e);
 		} catch (org.olat.core.logging.AssertException e) {
-			Tracing.logDebug(e.getMessage(), this.getClass());
+			log.error(e.getMessage(), e);
 		}
+		//</ONYX-705>
 
 		// finally check existing value
 
-		return new String();
-
+		return defaultValue();
+		//</OLATCE-1088>
 	}
 
 	/**
diff --git a/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeNumFunction.java b/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeNumFunction.java
index 2e2731fff8159708172390d51c74e9bff9e6c4a9..bda29c9925e44ca2ffdbcab31d55bc54f20760af 100644
--- a/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeNumFunction.java
+++ b/src/main/java/de/bps/course/condition/interpreter/score/GetOnyxTestOutcomeNumFunction.java
@@ -21,14 +21,12 @@
 
 package de.bps.course.condition.interpreter.score;
 
-import java.rmi.RemoteException;
-import java.util.ArrayList;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 
 import org.olat.core.id.Identity;
 import org.olat.core.id.IdentityEnvironment;
+import org.olat.core.logging.OLog;
 import org.olat.core.logging.Tracing;
 import org.olat.course.CourseFactory;
 import org.olat.course.condition.interpreter.AbstractFunction;
@@ -40,15 +38,17 @@ import org.olat.course.nodes.AssessableCourseNode;
 import org.olat.course.nodes.CourseNode;
 import org.olat.course.run.userview.UserCourseEnvironment;
 
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManager;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManagerFactory;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
 
 /**
  * @author Ingmar Kroll
  */
 public class GetOnyxTestOutcomeNumFunction extends AbstractFunction {
 	public static final String name = "getOnyxTestOutcome";
-
+	//<ONYX-705>
+	private final static OLog log = Tracing.createLoggerFor(GetOnyxTestOutcomeNumFunction.class);
+	//</ONYX-705>
 	/**
 	 * Default constructor to use the current date
 	 *
@@ -95,92 +95,108 @@ public class GetOnyxTestOutcomeNumFunction extends AbstractFunction {
 			cev.addSoftReference("courseNodeId", nodeId);
 		}
 		
-
+		//<OLATCE-1088>
 		/*
 		 * the real function evaluation which is used during run time
 		 */
 		try {
 			
 			//if the parameter is not in the list of the Onyx-Test's outcome-parameters add an error
-			OnyxReporterWebserviceManager onyxReporter = null;
+			//<ONYX-705>
+			OnyxReporterConnector onyxReporter = new OnyxReporterConnector();
+			//</ONYX-705>
 			UserCourseEnvironment uce = getUserCourseEnv();
 			AssessableCourseNode node = null;
+			boolean editorMode = false;
 			if (uce.getClass().equals(EditorUserCourseEnvironmentImpl.class)) {
+				editorMode = true;
 				CourseEditorEnv cee = ((EditorUserCourseEnvironmentImpl) uce).getCourseEditorEnv();
-				//TODO: anders holen siehe GetScoreWithCourseId L. 75
-//				CourseNode cnode = ((CourseEditorEnvImpl) cee).getNode(nodeId);
-//				node = (AssessableCourseNode) cnode;
+				CourseNode cnode = ((CourseEditorEnvImpl) cee).getNode(nodeId);
+				node = (AssessableCourseNode) cnode;
 			} else {
 				long courseResourceableId = getUserCourseEnv().getCourseEnvironment().getCourseResourceableId();
 				node = (AssessableCourseNode) CourseFactory.loadCourse(courseResourceableId).getEditorTreeModel().getCourseNode(nodeId);
 			}
+			
+			//begin course-editor-mode
 			Map<String, String> outcomes = new HashMap<String, String>();
-			// node can be null e.g. when it has been deleted
-			if (node != null && node.getUserAttempts(uce) > 0) {
+			if (editorMode) {
+				if(node == null){
+					return handleException( new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND, name, nodeId,
+							"error.notfound.coursenodeid", "solution.copypastenodeid"));
+				}
+				
 				try {
-					onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
-					if (onyxReporter!= null ) {
-						outcomes = onyxReporter.getOutcomes(node);
-					} else {
-						throw new UnsupportedOperationException("could not connect to onyx reporter");
-					}
-				} catch (Exception e) {
-					e.printStackTrace();
+				//<ONYX-705>
+					outcomes = onyxReporter.getPossibleOutcomeVariables(node);
+				} catch (OnyxReporterException e) {
+				//</ONYX-705>
+					log.error("Unable to get possible test-outcomes!", e);
+				}
+				if (!(outcomes.keySet().contains(varId))) {
+					return handleException(new ArgumentParseException(ArgumentParseException.REFERENCE_NOT_FOUND,
+							name, "", "error.argtype.outcome.undefined", ""));
+				} else {
+					return defaultValue();
 				}
 			}
-			if (!(outcomes.keySet().contains(varId))) {
-				return handleException(new ArgumentParseException(ArgumentParseException.WRONG_ARGUMENT_FORMAT,
-				name, "", "error.argtype.coursnodeidexpeted", "solution.example.node.infunction"));
-			}
+			// end course-editor-mode
 			
-
-			if (getUserCourseEnv().getClass().equals(EditorUserCourseEnvironmentImpl.class)) {
+			
+			// node can be null e.g. when it has been deleted
+			if(node == null){
+				log.warn("Coursenode for : "+nodeId+" does not exist!");
 				return defaultValue();
 			}
+
 			IdentityEnvironment ienv = getUserCourseEnv().getIdentityEnvironment();
 			Identity identity = ienv.getIdentity();
 
-			//long courseResourceableId = getUserCourseEnv().getCourseEnvironment().getCourseResourceableId();
-			//AssessableCourseNode node = (AssessableCourseNode) CourseFactory.loadCourse(courseResourceableId).getEditorTreeModel().getCourseNode(nodeId);
-
-			List<String[]> liste = new ArrayList<String[]>();
+			//<ONYX-705>
+			Map<String, String> results = null;
 
 			try {
-//				onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
-				if (onyxReporter != null) {
-							liste = onyxReporter.getResults(node, identity);
-				} else {
-					throw new UnsupportedOperationException("could not connect to onyx reporter");
+				if(identity != null){
+					results = onyxReporter.getResults(node, identity);
 				}
-			} catch (RemoteException e) {
-				Tracing.logWarn("Unable to get results from OnyxReporter for user " + identity.getName(), this.getClass());
-				//e.printStackTrace();
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-
-			if (liste.size() > 0) {
-				for (String[] outcome : liste) {
-					if (outcome[0].equals(varId)) {
-						if (Integer.valueOf(outcome[1]) != null) {
-							return Integer.valueOf(outcome[1]);
-						} else if (Double.valueOf(outcome[1]) != null) {
-							return Double.valueOf(outcome[1]);
-						} else {
-							return outcome[1];
-						}
-					}
+			} catch (OnyxReporterException e) {
+				log.error("Unable to get Results! Identity "+(identity!=null?identity.getName():"NULL")+" courseNode "+(node!=null?node.getShortName():"null"), e);
+			} finally {
+				if(results == null){
+					return defaultValue();
 				}
 			}
+			
+			String retVal = results.get(varId);
+			
+			if(retVal == null){
+				return defaultValue();
+			}
+			
+			try{
+				return Integer.parseInt(retVal);
+			} catch (NumberFormatException nfeI){
+				log.warn("retVal "+retVal+" is not a Integer!", nfeI);
+				try{
+					return Double.parseDouble(retVal);
+				} catch (NumberFormatException nfeD){
+					log.warn("retVal "+retVal+" is not a Double!", nfeD);
+					
+					return retVal;
+				}	
+			}
 
+		} catch (OnyxReporterException e) {
+			log.error(e.getMessage(), e);
 		} catch (org.olat.core.logging.AssertException e) {
-			Tracing.logDebug(e.getMessage(), this.getClass());
+			log.error(e.getMessage(), e);
 		}
+		//</ONYX-705>
 
 		// finally check existing value
 
-		return Double.MIN_VALUE;
-
+		return defaultValue();
+		//</OLATCE-1088>
 	}
 
 	/**
diff --git a/src/main/java/de/bps/ims/qti/QTIResultDetailsController.java b/src/main/java/de/bps/ims/qti/QTIResultDetailsController.java
index 8d7d75a5571791558b0e6aeae1d6d9317a5e6f7f..6e3e2c3f8336c683b5a35437e4d06042df516fe3 100644
--- a/src/main/java/de/bps/ims/qti/QTIResultDetailsController.java
+++ b/src/main/java/de/bps/ims/qti/QTIResultDetailsController.java
@@ -28,7 +28,6 @@
 */
 package de.bps.ims.qti;
 
-import java.rmi.RemoteException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -48,8 +47,11 @@ import org.olat.core.gui.control.controller.BasicController;
 import org.olat.core.gui.control.generic.closablewrapper.CloseableModalController;
 import org.olat.core.gui.translator.Translator;
 import org.olat.core.id.Identity;
+import org.olat.core.logging.OLog;
+import org.olat.core.logging.Tracing;
 import org.olat.core.util.Util;
 import org.olat.course.CourseFactory;
+import org.olat.course.ICourse;
 import org.olat.course.nodes.AssessableCourseNode;
 import org.olat.course.nodes.CourseNode;
 import org.olat.ims.qti.QTIResultManager;
@@ -60,9 +62,10 @@ import org.olat.ims.qti.render.LocalizedXSLTransformer;
 import org.olat.repository.RepositoryEntry;
 
 import de.bps.onyx.plugin.OnyxModule;
+import de.bps.onyx.plugin.OnyxResultManager;
+import de.bps.onyx.plugin.course.nodes.iq.IQEditController;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
 import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManager;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManagerFactory;
 
 /**
  * Initial Date:  12.01.2005
@@ -83,7 +86,9 @@ public class QTIResultDetailsController extends BasicController {
 	private TableController tableCtr;
 	
 	private CloseableModalController cmc;
-	
+	//<ONYX-705>
+	private final static OLog log = Tracing.createLoggerFor(QTIResultDetailsController.class);
+	//</ONYX-705>
 	/**
 	 * @param courseResourceableId
 	 * @param nodeIdent
@@ -182,21 +187,28 @@ public class QTIResultDetailsController extends BasicController {
 	 * @param ureq The UserRequest for getting the identity and role of the current user.
 	 */
 	private boolean showOnyxReporter(UserRequest ureq, long assassmentId) {
-
-			OnyxReporterWebserviceManager onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
+			//<ONYX-705>
+			OnyxReporterConnector onyxReporter = null;
+			
+			try{
+				onyxReporter = new OnyxReporterConnector();
+			} catch (OnyxReporterException e) {
+				log.error(e.getMessage(), e);
+			}
+			//</ONYX-705>
 			if (onyxReporter != null) {
 				//make a list of this one student because onyxReporter needs a list
 				List<Identity> identityList = new ArrayList<Identity>();
 				identityList.add(identity);
 				
 				CourseNode cn = CourseFactory.loadCourse(courseResourceableId).getEditorTreeModel().getCourseNode(this.nodeIdent);
-				onyxReporter.setAssassmentId(assassmentId);
 				String iframeSrc = "";
 				try {
-					iframeSrc = onyxReporter.startReporter(ureq, identityList, (AssessableCourseNode) cn, true);
-				} catch (RemoteException e) {
-					e.printStackTrace();
-					return false;
+					//<OLATCE-1124>
+					//<ONYX-705>
+					iframeSrc = onyxReporter.startReporterGUI(ureq.getIdentity(), identityList, (AssessableCourseNode) cn, assassmentId, true, false);
+					//</ONYX-705>
+					//</OLATCE-1124>
 				} catch (OnyxReporterException e) {
 					// TODO Auto-generated catch block
 					e.printStackTrace();
diff --git a/src/main/java/de/bps/ims/qti/repository/handlers/QTISurveyHandlerOnyx.java b/src/main/java/de/bps/ims/qti/repository/handlers/QTISurveyHandlerOnyx.java
index a013f239d666aa7723813862db8161f92aa8c050..4752c486e3e00202b1f0b910c72f7c043eb9c891 100644
--- a/src/main/java/de/bps/ims/qti/repository/handlers/QTISurveyHandlerOnyx.java
+++ b/src/main/java/de/bps/ims/qti/repository/handlers/QTISurveyHandlerOnyx.java
@@ -35,27 +35,22 @@ import org.olat.core.commons.fullWebApp.LayoutMain3ColsController;
 import org.olat.core.gui.UserRequest;
 import org.olat.core.gui.control.Controller;
 import org.olat.core.gui.control.WindowControl;
+import org.olat.core.gui.control.generic.layout.MainLayoutController;
 import org.olat.core.id.OLATResourceable;
 import org.olat.core.logging.AssertException;
-import org.olat.core.util.controller.OLATResourceableListeningWrapperController;
 import org.olat.ims.qti.editor.AddNewQTIDocumentController;
-import org.olat.ims.qti.editor.QTIEditorMainController;
 import org.olat.ims.qti.fileresource.SurveyFileResource;
 import org.olat.ims.qti.process.AssessmentInstance;
-import org.olat.ims.qti.process.ImsRepositoryResolver;
-import org.olat.ims.qti.process.Resolver;
 import org.olat.ims.qti.repository.handlers.QTISurveyHandler;
-import org.olat.modules.iq.IQDisplayController;
-import org.olat.modules.iq.IQManager;
-import org.olat.modules.iq.IQPreviewSecurityCallback;
-import org.olat.modules.iq.IQSecurityCallback;
 import org.olat.repository.RepositoryEntry;
 import org.olat.repository.controllers.AddFileResourceController;
 import org.olat.repository.controllers.IAddController;
 import org.olat.repository.controllers.RepositoryAddCallback;
 import org.olat.repository.controllers.RepositoryAddController;
 import org.olat.repository.controllers.WizardCloseResourceController;
-import org.olat.resource.references.ReferenceManager;
+
+import de.bps.onyx.plugin.OnyxModule;
+import de.bps.onyx.plugin.run.OnyxRunController;
 
 
 /**
@@ -96,6 +91,8 @@ class QTISurveyHandlerOnyx extends QTISurveyHandler {
 	 * @see org.olat.repository.handlers.RepositoryHandler#supportsLaunch()
 	 */
 	public boolean supportsLaunch() { return LAUNCHEABLE; }
+
+	//<OLATCE-1025>	
 	/**
 	 * @see org.olat.repository.handlers.RepositoryHandler#supportsDownload()
 	 */
@@ -103,7 +100,19 @@ class QTISurveyHandlerOnyx extends QTISurveyHandler {
 	/**
 	 * @see org.olat.repository.handlers.RepositoryHandler#supportsEdit()
 	 */
-	public boolean supportsEdit() { return EDITABLE; }
+	public boolean supportsEdit(RepositoryEntry repoEntry) {
+		if (OnyxModule.isOnyxTest(repoEntry.getOlatResource())) {
+			return false;
+		}
+		return EDITABLE; 
+		}
+	//</OLATCE-1025>	
+	
+	//<OLATCE-1025>	
+	public MainLayoutController createLaunchController(OLATResourceable res, String initialViewIdentifier, UserRequest ureq, WindowControl wControl) {
+		return (MainLayoutController) getLaunchController( res,  ureq,  wControl);
+	}
+	//</OLATCE-1025>	
 	
 	/**
 	 * @param res
@@ -112,33 +121,50 @@ class QTISurveyHandlerOnyx extends QTISurveyHandler {
 	 * @return Controller
 	 */
 	public Controller getLaunchController(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
-		Resolver resolver = new ImsRepositoryResolver(res);
-		IQSecurityCallback secCallback = new IQPreviewSecurityCallback();
-		Controller runController = IQManager.getInstance().createIQDisplayController(res, resolver, AssessmentInstance.QMD_ENTRY_TYPE_SURVEY, secCallback, ureq, wControl);
-		// use on column layout
-		LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, null, null, runController.getInitialComponent(), null);
-		layoutCtr.addDisposableChildController(runController); // dispose content on layout dispose
-		return layoutCtr;
+	//<OLATCE-1025>	
+		if (OnyxModule.isOnyxTest(res)) {
+//			Resolver resolver = new ImsRepositoryResolver(res);
+//			IQSecurityCallback secCallback = new IQPreviewSecurityCallback();
+			// <OLATCE-1054>
+			Controller runController = new OnyxRunController(ureq, wControl, res, false);
+			// </OLATCE-1054>
+//			Controller runController = IQManager.getInstance().createIQDisplayController(res, resolver, AssessmentInstance.QMD_ENTRY_TYPE_SURVEY, secCallback, ureq, wControl);
+			// use on column layout
+			LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, null, null, runController.getInitialComponent(), null);
+			layoutCtr.addDisposableChildController(runController); // dispose content on layout dispose
+			return layoutCtr;
+		} else {
+			return super.getLaunchController(res, ureq, wControl);
+		}
+		//<OLATCE-1025>	
 	}
 
 	/**
 	 * @see org.olat.repository.handlers.RepositoryHandler#getEditorController(org.olat.core.id.OLATResourceable org.olat.core.gui.UserRequest, org.olat.core.gui.control.WindowControl)
 	 */
 	public Controller createEditorController(OLATResourceable res, UserRequest ureq, WindowControl wControl) {
-		SurveyFileResource fr = new SurveyFileResource();
-		fr.overrideResourceableId(res.getResourceableId());
-		
-		//check if we can edit in restricted mode -> only typos 
-		ReferenceManager refM = ReferenceManager.getInstance();
-		List referencees = refM.getReferencesTo(res);
-		//String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
-		//boolean restrictedEdit = referencesSummary != null;
-		QTIEditorMainController editor =  new QTIEditorMainController(referencees,ureq, wControl, fr);
-		if (editor.isLockedSuccessfully()) {
-			return editor;
-		} else {
+		//<OLATCE-1025>	
+		if (OnyxModule.isOnyxTest(res)) {
 			return null;
+		} else {
+			return super.createEditorController(res, ureq, wControl);
 		}
+		
+//		SurveyFileResource fr = new SurveyFileResource();
+//		fr.overrideResourceableId(res.getResourceableId());
+//		
+//		//check if we can edit in restricted mode -> only typos 
+//		ReferenceManager refM = ReferenceManager.getInstance();
+//		List referencees = refM.getReferencesTo(res);
+//		//String referencesSummary = refM.getReferencesToSummary(res, ureq.getLocale());
+//		//boolean restrictedEdit = referencesSummary != null;
+//		QTIEditorMainController editor =  new QTIEditorMainController(referencees,ureq, wControl, fr);
+//		if (editor.isLockedSuccessfully()) {
+//			return editor;
+//		} else {
+//			return null;
+//		}
+		//</OLATCE-1025>	
 	}
 
 	/**
diff --git a/src/main/java/de/bps/ims/qti/repository/handlers/QTITestHandlerOnyx.java b/src/main/java/de/bps/ims/qti/repository/handlers/QTITestHandlerOnyx.java
index 7cbfe1095a265ac9ba23c14641dbbbc4771d4f56..dbc755a1763aeeb43cced52a5d2a8f295b53af5e 100644
--- a/src/main/java/de/bps/ims/qti/repository/handlers/QTITestHandlerOnyx.java
+++ b/src/main/java/de/bps/ims/qti/repository/handlers/QTITestHandlerOnyx.java
@@ -132,7 +132,9 @@ public class QTITestHandlerOnyx extends QTITestHandler {
 		if (OnyxModule.isOnyxTest(res)) {
 			Resolver resolver = new ImsRepositoryResolver(res);
 			IQSecurityCallback secCallback = new IQPreviewSecurityCallback();
-			Controller runController = new OnyxRunController(ureq, wControl, res);
+			// <OLATCE-1054>
+			Controller runController = new OnyxRunController(ureq, wControl, res, false);
+			// </OLATCE-1054>
 //				IQManager.getInstance().createIQDisplayController(res, resolver, AssessmentInstance.QMD_ENTRY_TYPE_SELF, secCallback, ureq, wControl);
 			// use on column layout
 			LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, null, null, runController.getInitialComponent(), null);
diff --git a/src/main/java/de/bps/onyx/plugin/OnyxModule.java b/src/main/java/de/bps/onyx/plugin/OnyxModule.java
index e586b46bd028f46824625f15e52ffd0d5e98b24c..216bc3039edb5eb687cbf0ef6135d63e10da1a67 100644
--- a/src/main/java/de/bps/onyx/plugin/OnyxModule.java
+++ b/src/main/java/de/bps/onyx/plugin/OnyxModule.java
@@ -24,10 +24,12 @@ import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileReader;
 import java.util.ArrayList;
+import java.util.List;
 
 import org.olat.core.configuration.AbstractOLATModule;
 import org.olat.core.configuration.PersistedProperties;
 import org.olat.core.id.OLATResourceable;
+import org.olat.core.util.ZipUtil;
 import org.olat.ims.qti.fileresource.SurveyFileResource;
 import org.olat.ims.qti.fileresource.TestFileResource;
 import org.olat.ims.qti.process.ImsRepositoryResolver;
@@ -43,7 +45,11 @@ public class OnyxModule extends AbstractOLATModule {
 	/* holds the local config name which is sent to the remote onyxplugin -> onyxplugin must have 
 	 * a config corresponding to this name */
 	private static String configName;
-
+	// <OLATCE-713>
+	private static String onyxUserViewLocation;
+	private static String onyxReporterUserViewLocation;
+	// </OLATCE-713>
+	
 	/**
 	 * @return Returns the configName.
 	 */
@@ -69,7 +75,9 @@ public class OnyxModule extends AbstractOLATModule {
 	 * @return Returns the userViewLocation.
 	 */
 	public static String getUserViewLocation() {
-		return onyxPluginWSLocation + "/onyxrun";
+		// <OLATCE-713>
+		return onyxUserViewLocation;
+		// </OLATCE-713>
 	}
 
 	/**
@@ -142,6 +150,17 @@ public class OnyxModule extends AbstractOLATModule {
 }
 
 public static boolean isOnyxTest(File zipfile){
+	// <OLTACE-72>
+	File unzippedDir = null;
+	if (zipfile.getName().toLowerCase().endsWith(".zip")) {
+		unzippedDir = new File(zipfile.getAbsolutePath().substring(0, zipfile.getAbsolutePath().length() - 4) + "__unzipped");
+		if (!unzippedDir.exists()) {
+			unzippedDir.mkdir();
+		}
+		ZipUtil.unzip(zipfile, unzippedDir);
+		zipfile = unzippedDir;
+	}
+	// </OLTACE-72>
 	BufferedReader br = null;
 	try {
 			File mani = new File(zipfile.getAbsolutePath()+"/imsmanifest.xml");
@@ -152,6 +171,11 @@ public static boolean isOnyxTest(File zipfile){
 						l.indexOf("imsqti_test_xmlv2p1") != -1 ||
 						l.indexOf("imsqti_assessment_xmlv2p1") != -1) {
 					br.close();
+					// <OLTACE-72>
+					if (unzippedDir != null) {
+						unzippedDir.delete();
+					}
+					// </OLTACE-72>
 					return true;
 					}
 			}
@@ -163,9 +187,33 @@ public static boolean isOnyxTest(File zipfile){
 				// TODO Auto-generated catch block
 			}
 		}
-
+		// <OLTACE-72>
+		if (unzippedDir != null) {
+			unzippedDir.delete();
+		}
+		// </OLTACE-72>
 		return false;
 
 	}
+
+	// <OLATCE-713>
+	public static String getOnyxUserViewLocation() {
+		return onyxUserViewLocation;
+	}
+	
+	public void setOnyxUserViewLocation(String onyxUserViewLocation) {
+		OnyxModule.onyxUserViewLocation = onyxUserViewLocation;
+	}
+
+	public static String getOnyxReporterUserViewLocation() {
+		return onyxReporterUserViewLocation;
+	}
+
+	public void setOnyxReporterUserViewLocation(
+			String onyxReporterUserViewLocation) {
+		OnyxModule.onyxReporterUserViewLocation = onyxReporterUserViewLocation;
+	}
+	
+	// </OLATCE-713>
 }
 
diff --git a/src/main/java/de/bps/onyx/plugin/OnyxResultManager.java b/src/main/java/de/bps/onyx/plugin/OnyxResultManager.java
index eeb1298a2ebb2c28856da768b664552ded332e38..94c0c06b251ee403ce27ce50706d303073707ae4 100644
--- a/src/main/java/de/bps/onyx/plugin/OnyxResultManager.java
+++ b/src/main/java/de/bps/onyx/plugin/OnyxResultManager.java
@@ -20,11 +20,11 @@
  */
 package de.bps.onyx.plugin;
 
+import java.io.File;
 import java.io.FileFilter;
-import java.rmi.RemoteException;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 import org.hibernate.Hibernate;
 import org.hibernate.type.Type;
@@ -33,7 +33,7 @@ import org.olat.core.commons.modules.bc.vfs.OlatRootFolderImpl;
 import org.olat.core.commons.persistence.DB;
 import org.olat.core.commons.persistence.DBFactory;
 import org.olat.core.id.Identity;
-import org.olat.core.id.IdentityEnvironment;
+import org.olat.core.logging.OLog;
 import org.olat.core.logging.Tracing;
 import org.olat.core.util.CodeHelper;
 import org.olat.core.util.FileUtils;
@@ -41,24 +41,26 @@ import org.olat.core.util.WebappHelper;
 import org.olat.core.util.ZipUtil;
 import org.olat.course.CourseFactory;
 import org.olat.course.ICourse;
-import org.olat.course.nodes.AssessableCourseNode;
+import org.olat.course.nodes.AbstractAccessableCourseNode;
 import org.olat.course.nodes.CourseNode;
+import org.olat.course.nodes.IQSELFCourseNode;
 import org.olat.course.nodes.IQTESTCourseNode;
 import org.olat.course.nodes.iq.IQEditController;
-import org.olat.course.run.scoring.ScoreEvaluation;
 import org.olat.course.run.userview.UserCourseEnvironment;
-import org.olat.course.run.userview.UserCourseEnvironmentImpl;
 import org.olat.ims.qti.QTIResultSet;
 
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManager;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManagerFactory;
-import java.io.File;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
 
 /**
  * @author Ingmar Kroll
  */
 public class OnyxResultManager {
-
+	//<ONYX-705>
+	private static final String PASS = "pass";
+	private static final String SCORE = "score";
+	//</ONYX-705>
+	
 	private static final String RES_REPORTING = "resreporting";
 	
 	private static final String REPORTER_NOT_FINISHED = "reporter_not_finshed";
@@ -66,12 +68,14 @@ public class OnyxResultManager {
 	public static String getResReporting() {
 		return RES_REPORTING;
 	}
+	
+	public static OLog LOGGER = Tracing.createLoggerFor(OnyxResultManager.class);
 
 	public static void persistOnyxResults(QTIResultSet qtiResultSet, String resultfile) {
 
 		//if onyx was started from learningressources or bookmark no results are persisted
-		if (qtiResultSet == null || qtiResultSet == null) {
-			Tracing.createLoggerFor(OnyxResultManager.class).info("persit onyx result: qtiResultSet is null!!!");
+		if (qtiResultSet == null) {
+			LOGGER.info("persit onyx result: qtiResultSet is null!!!");
 			return;
 		}
 
@@ -80,10 +84,12 @@ public class OnyxResultManager {
 		CourseNode courseNode = course.getRunStructure().getNode(qtiResultSet.getOlatResourceDetail());
 
 		Boolean isSurvey = false;
-		if (!courseNode.getClass().equals(IQTESTCourseNode.class)) {
+		// <OLATBPS-363>
+		if (!courseNode.getClass().equals(IQTESTCourseNode.class) && !courseNode.getClass().equals(IQSELFCourseNode.class)) {
+		// </OLATBPS-363>
 			isSurvey = true;
 		}
-		Tracing.createLoggerFor(OnyxResultManager.class).info("persit onyx result: identiyname=" + qtiResultSet.getIdentity().getName() + "  nodeident=" + courseNode.getIdent() + "  resultfile="
+		LOGGER.info("persit onyx result: identiyname=" + qtiResultSet.getIdentity().getName() + "  nodeident=" + courseNode.getIdent() + "  resultfile="
 				+ resultfile);
 		String path = null;
 		if (isSurvey) {
@@ -126,8 +132,13 @@ public class OnyxResultManager {
 		}
 
 		//before asking onyxReporter for resultsets, save the QTIResultSet with the flag "reporterFinsished = false"
+		qtiResultSet = (QTIResultSet) DBFactory.getInstance().loadObject(qtiResultSet);
 		qtiResultSet.setLastModified(new Date());
-		DBFactory.getInstance().saveObject(qtiResultSet);
+		try {
+			DBFactory.getInstance().saveObject(qtiResultSet);
+		} catch (Exception e) {
+			LOGGER.error("Unable to initialy save the QTIResultSet after finishing Onyx Test.", e);
+		}
 
 		performOnyxReport(qtiResultSet, file_s);
 	}
@@ -198,66 +209,64 @@ public class OnyxResultManager {
 		ICourse course = CourseFactory.loadCourse(qtiResultSet.getOlatResource());
 		CourseNode courseNode = course.getRunStructure().getNode(qtiResultSet.getOlatResourceDetail());
 
-		AssessableCourseNode node = null;
-		if (courseNode.getClass().equals(IQTESTCourseNode.class)) {
-			node = (AssessableCourseNode) courseNode;
+		//<OLATCE-1048> SelfTests and Surveys are not AssessableCourseNode --> no assessments saved --> Switched to AbstractAssessableCourseNode
+		AbstractAccessableCourseNode node = null;
+		if (courseNode instanceof AbstractAccessableCourseNode) {
+			node = (AbstractAccessableCourseNode) courseNode;
+		} else {
+			LOGGER.warn("Tried to perform an OnyxReport with a non-assessable course node! "+(courseNode!=null?(courseNode.getShortName()+" Class: "+courseNode.getClass()):"NULL"));
 		}
-		ScoreEvaluation sc = new ScoreEvaluation(null, null, qtiResultSet.getAssessmentID());
-		//do not increment attempts again
-		IdentityEnvironment ienv = new IdentityEnvironment();
-		ienv.setIdentity(qtiResultSet.getIdentity());
-		UserCourseEnvironment uce = new UserCourseEnvironmentImpl(ienv, course.getCourseEnvironment());
-
-		node.updateUserScoreEvaluation(sc, uce, qtiResultSet.getIdentity(),false);
-		uce.getScoreAccounting().scoreInfoChanged(node, sc);
-
-		List<String[]> liste = new ArrayList<String[]>();
-
+		//</OLATCE-1048>
+		//<ONYX-705>
+		Map<String, String> results = null;
+		//</ONYX-705>
 		//if no file was given use the qtiresultset to get the file
 		if (file_s == null) {
 			String path = WebappHelper.getUserDataRoot() + File.separator + RES_REPORTING + File.separator + qtiResultSet.getIdentity().getName()
 			+ File.separator + courseNode.getModuleConfiguration().get(IQEditController.CONFIG_KEY_TYPE).toString() + File.separator;
 			file_s = new File(path + courseNode.getIdent() + "v" + qtiResultSet.getAssessmentID() + ".xml");
 			if (!file_s.exists()) {
-				Tracing.createLoggerFor(OnyxResultManager.class).error("performOnyxReport was called but no result.xml exists with path: " + file_s.getAbsolutePath());
+				LOGGER.error("performOnyxReport was called but no result.xml exists with path: " + file_s.getAbsolutePath());
 				return false;
 			}
 		}
 
 		try {
-			OnyxReporterWebserviceManager onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
-			if (onyxReporter != null) {
-						liste = onyxReporter.getResults(file_s, node);
-			} else {
-				LifeCycleManager.createInstanceFor(qtiResultSet).markTimestampFor(REPORTER_NOT_FINISHED);
-				reporterFinsished = false;
-				Tracing.createLoggerFor(OnyxResultManager.class).warn("OnyxReporter was unreachable during get the results. An entry in Lifecyclemanager is done and the report will be finshed with a job.");
-			}
-		} catch (RemoteException e) {
+		//<ONYX-705>
+			OnyxReporterConnector onyxReporter = new OnyxReporterConnector();
+			
+			// <OLATBPS-363>
+				results = onyxReporter.getResults(file_s, node, qtiResultSet.getIdentity());
+			// </OLATBPS-363>
+		} catch (OnyxReporterException e) {
+		//</ONYX-705>
 			LifeCycleManager.createInstanceFor(qtiResultSet).markTimestampFor(REPORTER_NOT_FINISHED);
 			reporterFinsished = false;
-			Tracing.createLoggerFor(OnyxResultManager.class).warn("OnyxReporter was unreachable during get the results. An entry in Lifecyclemanager is done and the report will be finshed with a job.");
+			LOGGER.warn("OnyxReporter was unreachable during get the results. An entry in Lifecyclemanager is done and the report will be finshed with a job.");
 		}
 
 		String score = null, passed = null;
-		for (String[] vars : liste) {
-			if(vars.length==2) {
-				// only testoutcomes "score" and "passed" are stored at olat db
-				if (vars[0].equalsIgnoreCase("score")) {
-					score = vars[1];
-				}	else if (vars[0].equalsIgnoreCase("pass")) {
-						passed = vars[1];
-				} else {
-					Tracing.logInfo("TestOutCome "+vars[0]+ " is not stored in OLAT DB", OnyxResultManager.class);
-				}
+		
+		//<ONYX-705>
+		for (String vars : results.keySet()) {
+			// only testoutcomes "score" and "passed" are stored at olat db
+			if (SCORE.equalsIgnoreCase(vars)) {
+				score = results.get(vars);
+			}	else if (PASS.equalsIgnoreCase(vars)) {
+					passed = results.get(vars);
+			} else {
+				LOGGER.info("TestOutCome "+results.get(vars)+ " is not stored in OLAT DB");
 			}
 		}
+		//</ONYX-705>
 		if (score != null || passed != null) {
 			if (score != null) {
 				qtiResultSet.setScore(Float.valueOf(score));
 				//if own cutvalue for passed is configured use this instead of the PASS variable from onyx test.
 				if (courseNode.getModuleConfiguration().get(IQEditController.CONFIG_KEY_CUTVALUE) != null) {
-					if (Float.valueOf(score) >= courseNode.getModuleConfiguration().getIntegerSafe(IQEditController.CONFIG_KEY_CUTVALUE, 0)) {
+					// <OLATBPS-508>
+					if (Float.valueOf(score) >= ((Float) courseNode.getModuleConfiguration().get(IQEditController.CONFIG_KEY_CUTVALUE))) {
+					// </OLATBPS-508>
 						passed = "true";
 					}
 				}
@@ -265,17 +274,10 @@ public class OnyxResultManager {
 			if (passed != null) {
 				qtiResultSet.setIsPassed(Boolean.valueOf(passed));
 			}
-
-			//update score and passed info
-			ScoreEvaluation sceval = new ScoreEvaluation(score != null ? Float.valueOf(score) : null, passed != null ? Boolean.valueOf(passed) : null,
-					qtiResultSet.getAssessmentID());
-			//do not increment attempts again
-			node.updateUserScoreEvaluation(sceval, uce, qtiResultSet.getIdentity(),false);
-			uce.getScoreAccounting().scoreInfoChanged(node, sceval);
 		}
 		qtiResultSet.setLastModified(new Date());
 		DBFactory.getInstance().saveObject(qtiResultSet);
-		
+		DBFactory.getInstance().commit();
 		return reporterFinsished;
 	}
 
diff --git a/src/main/java/de/bps/onyx/plugin/_spring/onyxContext.xml b/src/main/java/de/bps/onyx/plugin/_spring/onyxContext.xml
index 44395b731e4f41ff22bec5d79e459a519e001a1c..a139e6a4140598bd696ae032f42b161613736120 100644
--- a/src/main/java/de/bps/onyx/plugin/_spring/onyxContext.xml
+++ b/src/main/java/de/bps/onyx/plugin/_spring/onyxContext.xml
@@ -12,6 +12,10 @@
 
 <bean id="onyxModule" class="de.bps.onyx.plugin.OnyxModule">
 	<property name="onyxPluginWSLocation" value="${onyx.plugin.wslocation}" />
+	<!-- <OLATCE-713> -->
+	<property name="onyxUserViewLocation" value="${onyx.plugin.userviewlocation}" />
+	<property name="onyxReporterUserViewLocation" value="${onyx.reporter.userviewlocation}" />
+	<!-- </OLATCE-713> -->
 	<property name="configName" value="${onyx.plugin.configname}" />
 	
 	<property name="persistedProperties">
diff --git a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQControllerCreatorOnyx.java b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQControllerCreatorOnyx.java
index c736cc51c75c34f00d32276017d6c9bee934bb3f..addba4247c85b3818a90634bc6b945b25ef61cbd 100644
--- a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQControllerCreatorOnyx.java
+++ b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQControllerCreatorOnyx.java
@@ -151,7 +151,9 @@ public class IQControllerCreatorOnyx extends IQControllerCreatorOlat {
 		boolean qti2 = config.get(IQEditController.CONFIG_KEY_TYPE_QTI)!=null && config.get(IQEditController.CONFIG_KEY_TYPE_QTI).equals(IQEditController.CONFIG_VALUE_QTI2);
 
 		if (qti2) {
-			controller = new OnyxRunController(ureq, wControl, courseNode.getReferencedRepositoryEntry().getOlatResource());
+			// <OLATCE-1054>
+			controller = new OnyxRunController(ureq, wControl, courseNode.getReferencedRepositoryEntry().getOlatResource(), true);
+			// </OLATCE-1054>
 		} else {
 			controller = super.createIQTestPreviewController(ureq, wControl, userCourseEnv, ne, courseNode);
 		}
diff --git a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditController.java b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditController.java
index 3985fa13e533258e42d567dfd4418aa5558f6074..df8ed6721823b3171b7f4e5ad35c9eab3cf65e93 100644
--- a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditController.java
+++ b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditController.java
@@ -76,7 +76,6 @@ import org.olat.course.condition.ConditionEditController;
 import org.olat.course.editor.NodeEditController;
 import org.olat.course.groupsandrights.CourseGroupManager;
 import org.olat.course.nodes.AbstractAccessableCourseNode;
-import org.olat.course.nodes.AssessableCourseNode;
 import org.olat.course.nodes.CourseNodeFactory;
 import org.olat.course.nodes.IQSELFCourseNode;
 import org.olat.course.nodes.IQSURVCourseNode;
@@ -101,8 +100,8 @@ import org.olat.repository.handlers.RepositoryHandlerFactory;
 import org.olat.resource.OLATResource;
 
 import de.bps.onyx.plugin.OnyxModule;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManager;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManagerFactory;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
 
 /**
  * Description:<BR/>
@@ -161,7 +160,9 @@ public class IQEditController extends ActivateableTabbableDefaultController impl
 	public static final String CONFIG_KEY_ALLOW_RELATIVE_LINKS = "allowRelativeLinks";
 	/** configuration key: enable 'show score infos' on start page */
 	public static final String CONFIG_KEY_ENABLESCOREINFO = "enableScoreInfo";
-
+	//<OLATCE-982>
+	public static final String CONFIG_KEY_ALLOW_SHOW_SOLUTION = "showSolution";
+	//</OLATCE-982>
 	public static final String CONFIG_KEY_DATE_DEPENDENT_RESULTS = "dateDependentResults";
 	public static final String CONFIG_KEY_RESULTS_START_DATE = "resultsStartDate";
 	public static final String CONFIG_KEY_RESULTS_END_DATE = "resultsEndDate";
@@ -344,14 +345,16 @@ public class IQEditController extends ActivateableTabbableDefaultController impl
 				myContent.contextPut("showOutcomes", new Boolean(true));
 				Map<String, String> outcomes = new HashMap<String, String>();
 				try {
-					OnyxReporterWebserviceManager onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
-					if (onyxReporter != null) {
-						outcomes = onyxReporter.getOutcomes((AssessableCourseNode) courseNode);
-					} else {
-						throw new UnsupportedOperationException("could not connect to onyx reporter");
-					}
-				} catch (Exception e) {
-					e.printStackTrace();
+				//<ONYX-705>	
+					OnyxReporterConnector onyxReporter = new OnyxReporterConnector();
+					// <OLATBPS-363>
+					outcomes = onyxReporter.getPossibleOutcomeVariables(courseNode);
+					// </OLATBPS-363>
+				} catch (OnyxReporterException e) {
+					//<OLATCE-935>
+					getWindowControl().setWarning(translate("reporter.unavailable"));
+					//</OLATCE-935>
+					//</ONYX-705>
 				}
 				myContent.contextPut("outcomes", outcomes);
 			} else {
@@ -368,7 +371,10 @@ public class IQEditController extends ActivateableTabbableDefaultController impl
 
 		
 		//construct the config form after check for onyx
-		modConfigForm = new IQEditForm(ureq, wControl, moduleConfiguration);
+		//<OLATCE-1012>
+		//modConfigForm = new IQEditForm(ureq, wControl, moduleConfiguration);
+		modConfigForm = new IQEditForm(ureq, wControl, moduleConfiguration, re);
+		//</OLATCE-1012>
 		modConfigForm.addControllerListener(this);
 		myContent.put("iqeditform",modConfigForm.getInitialComponent());
 		
@@ -578,6 +584,9 @@ public class IQEditController extends ActivateableTabbableDefaultController impl
 					moduleConfiguration.set(CONFIG_KEY_RESULTS_START_DATE, modConfigForm.getShowResultsStartDate());
 					moduleConfiguration.set(CONFIG_KEY_RESULTS_END_DATE, modConfigForm.getShowResultsEndDate());
 					moduleConfiguration.set(CONFIG_KEY_RESULT_ON_HOME_PAGE, modConfigForm.isShowResultsOnHomePage());
+					//<OLATCE-982>
+					moduleConfiguration.set(CONFIG_KEY_ALLOW_SHOW_SOLUTION, modConfigForm.allowShowSolution());
+					//</OLATCE-982>
 				} else {
 				
 
@@ -627,7 +636,9 @@ public class IQEditController extends ActivateableTabbableDefaultController impl
 				if (this.type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY)) {
 					moduleConfiguration.set(CONFIG_KEY_IS_SURVEY, Boolean.TRUE);
 				}
-				modConfigForm = new IQEditForm(urequest, getWindowControl(), moduleConfiguration);
+				// <OLATCE-1012>
+				modConfigForm = new IQEditForm(urequest, getWindowControl(), moduleConfiguration, re);
+				// </OLATCE-1012>
 				modConfigForm.addControllerListener(this);
 				if (!this.type.equals(AssessmentInstance.QMD_ENTRY_TYPE_SURVEY) && OnyxModule.isOnyxTest(re.getOlatResource())) {
 					if (moduleConfiguration.get(CONFIG_KEY_ATTEMPTS) == null) {
@@ -708,6 +719,10 @@ public class IQEditController extends ActivateableTabbableDefaultController impl
 				if (isOnyx) {
 					myContent.contextPut("onyxDisplayName",re.getDisplayname());
 					moduleConfiguration.set(CONFIG_KEY_TYPE_QTI, CONFIG_VALUE_QTI2);
+					// <OLATCE-473>
+					moduleConfiguration.set(CONFIG_KEY_CUTVALUE, null);
+					myContent.contextRemove(CONFIG_KEY_CUTVALUE);
+					// </OLATCE-473>
 				}else{
 					moduleConfiguration.set(CONFIG_KEY_TYPE_QTI, CONFIG_VALUE_QTI1);
 					// If of type test, get min, max, cut - put in module config and push
diff --git a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java
index 3c30c393d5c7afad215c12f821afaa2ec2180f0c..59be193f5b2ab553666889eb38d4b1d6038774b5 100644
--- a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java
+++ b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/IQEditForm.java
@@ -29,6 +29,7 @@
 package de.bps.onyx.plugin.course.nodes.iq;
 
 import java.util.Date;
+import java.util.Map;
 import java.util.Scanner;
 
 import org.olat.core.gui.UserRequest;
@@ -36,6 +37,7 @@ import org.olat.core.gui.components.form.flexible.FormItem;
 import org.olat.core.gui.components.form.flexible.FormItemContainer;
 import org.olat.core.gui.components.form.flexible.elements.DateChooser;
 import org.olat.core.gui.components.form.flexible.elements.IntegerElement;
+import org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement;
 import org.olat.core.gui.components.form.flexible.elements.SelectionElement;
 import org.olat.core.gui.components.form.flexible.elements.SingleSelection;
 import org.olat.core.gui.components.form.flexible.elements.TextElement;
@@ -45,13 +47,17 @@ import org.olat.core.gui.control.Controller;
 import org.olat.core.gui.control.Event;
 import org.olat.core.gui.control.WindowControl;
 import org.olat.core.gui.translator.Translator;
+import org.olat.core.logging.OLog;
 import org.olat.core.logging.Tracing;
 import org.olat.core.util.Util;
 import org.olat.ims.qti.process.AssessmentInstance;
 import org.olat.modules.ModuleConfiguration;
+import org.olat.repository.RepositoryEntry;
 
 import de.bps.onyx.plugin.OnyxModule;
 import de.bps.onyx.plugin.OnyxModule.PlayerTemplate;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
 
 /**
  * Test configuration form.
@@ -63,6 +69,10 @@ import de.bps.onyx.plugin.OnyxModule.PlayerTemplate;
  */
 public class IQEditForm extends FormBasicController {
 
+	//<OLATCE-982>
+	private static final String ALLOW = "allow";
+	private MultipleSelectionElement allowShowSolutionBox;
+	//</OLATCE-982>
 	private SelectionElement enableMenu;
 	private SelectionElement displayMenu;
 	private SelectionElement displayScoreProgress;
@@ -95,16 +105,27 @@ public class IQEditForm extends FormBasicController {
 	
 
 	private boolean isAssessment, isSelfTest, isSurvey;
+	//<OLATCE-1012>
+	private RepositoryEntry repoEntry;
+	private final static OLog log = Tracing.createLoggerFor(IQEditForm.class);
+	//</OLATCE-1012>
 
 	/**
 	 * Constructor for the qti configuration form
 	 * @param ureq
 	 * @param wControl
 	 * @param modConfig
+	 * @param repoEntry Used to check if this is a onyx-test and if this onyx-test has the outcome-variable PASS defined
 	 */
-	public IQEditForm(UserRequest ureq, WindowControl wControl, ModuleConfiguration modConfig) {
+	// <OLATCE-654>
+//	public IQEditForm(UserRequest ureq, WindowControl wControl, ModuleConfiguration modConfig) {
+	public IQEditForm(UserRequest ureq, WindowControl wControl, ModuleConfiguration modConfig,RepositoryEntry repoEntry) {
+	// </OLATCE-654>
 		super (ureq, wControl);
-		
+
+		//<OLATCE-1012>		
+		this.repoEntry = repoEntry;
+		//</OLATCE-1012>
 		Translator translator = Util.createPackageTranslator(org.olat.course.nodes.iq.IQEditController.class, getTranslator().getLocale(), getTranslator());
 		setTranslator(translator);
 		
@@ -205,6 +226,20 @@ public class IQEditForm extends FormBasicController {
 
 		
 		if (isOnyx) {
+			//<OLATCE-982>
+			Boolean confAllowShowSolution = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_ALLOW_SHOW_SOLUTION);
+			String[] allowShowSolution=new String[]{ALLOW};
+			String[] valuesShowSolution = new String[]{""};
+			//Surveys do not have a solution
+			if(!isSurvey){
+				allowShowSolutionBox = uifactory.addCheckboxesVertical("allowShowSolution", "qti.form.allowShowSolution", formLayout, allowShowSolution, valuesShowSolution, null, 1);
+				if(confAllowShowSolution!=null){
+					allowShowSolutionBox.select(ALLOW, confAllowShowSolution);
+				} else if (isSelfTest){
+					allowShowSolutionBox.select(ALLOW, true);
+				}
+			}
+			//</OLATCE-982>
 			//select onyx template
 			String[] values = new String[OnyxModule.PLAYERTEMPLATES.size()];
 			String[] keys = new String[OnyxModule.PLAYERTEMPLATES.size()];
@@ -218,7 +253,20 @@ public class IQEditForm extends FormBasicController {
 			template = uifactory.addDropdownSingleselect("qti.form.onyx.template", formLayout, keys, values, null);
 			try {
 				if (modConfig.get(IQEditController.CONFIG_KEY_TEMPLATE) != null) {
-					template.select(modConfig.get(IQEditController.CONFIG_KEY_TEMPLATE).toString(), true);
+					// <OLATCE-499>
+					String templateId = modConfig.get(IQEditController.CONFIG_KEY_TEMPLATE).toString();
+					boolean isTemplateValid = false;
+					for (PlayerTemplate template : OnyxModule.PLAYERTEMPLATES) {
+						if (template.id.equals(templateId)) {
+							isTemplateValid = true;
+							break;
+						}
+					}
+					if (!isTemplateValid) {
+						templateId = OnyxModule.PLAYERTEMPLATES.get(0).id;
+					}
+					template.select(templateId, true);
+					// </OLATCE-499>
 				}
 			} catch (RuntimeException e) {
 				Tracing.logWarn("Template not found", e, this.getClass());
@@ -233,6 +281,19 @@ public class IQEditForm extends FormBasicController {
 				else {
 					cutValue.setValue("");
 				}
+				//<OLATCE-1012>				
+				if(isOnyx){
+					try {
+						OnyxReporterConnector onyxReporter = new OnyxReporterConnector();
+						Map<String, String> outcomes = onyxReporter.getPossibleOutcomeVariables(repoEntry);
+						if(outcomes.containsKey("PASS")){
+							uifactory.addStaticTextElement("qti.form.onyx.cutvalue.passed.overwrite", null, translate("qti.form.onyx.cutvalue.passed.overwrite"), formLayout);
+						}
+					} catch (OnyxReporterException e) {
+						log.warn("Unable to get outcome variables for the test!", e);
+					}
+				}
+				//</OLATCE-1012>
 			}
 
 		} else {
@@ -319,10 +380,6 @@ public class IQEditForm extends FormBasicController {
 
 		uifactory.addSpacerElement("s2", formLayout, true);
 		
-		//end of "!isOnyx"
-		}
-		
-
 		//Show score infos on start page
 		Boolean bEnableScoreInfos = (Boolean)modConfig.get(IQEditController.CONFIG_KEY_ENABLESCOREINFO);
 	  boolean enableScoreInfos = (bEnableScoreInfos != null) ? bEnableScoreInfos.booleanValue() : true;
@@ -335,6 +392,10 @@ public class IQEditForm extends FormBasicController {
 			// isSurvey
 			scoreInfo.setVisible(false);
 		}
+		// <OLATCE-380>
+		//end of "!isOnyx"
+		}
+		// </OLATCE-380>
 
 
 		//migration: check if old tests have no summary
@@ -384,12 +445,16 @@ public class IQEditForm extends FormBasicController {
 		}
 
 
-		Boolean showResultOnFinish = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_RESULT_ON_FINISH);
-		boolean confEnableShowResultOnFinish = (showResultOnFinish != null) ? showResultOnFinish.booleanValue() : true;
-		confEnableShowResultOnFinish = !noSummary && confEnableShowResultOnFinish;
-		showResultsAfterFinishTest = uifactory.addCheckboxesVertical("qti_enableResultsOnFinish", "qti.form.results.onfinish", formLayout, new String[]{"xx"}, new String[]{null}, null, 1);
-		showResultsAfterFinishTest.select("xx", confEnableShowResultOnFinish);
-		showResultsAfterFinishTest.addActionListener(this, FormEvent.ONCLICK);
+		// <OLATCE-380>
+		if (!isOnyx) {
+			Boolean showResultOnFinish = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_RESULT_ON_FINISH);
+			boolean confEnableShowResultOnFinish = (showResultOnFinish != null) ? showResultOnFinish.booleanValue() : true;
+			confEnableShowResultOnFinish = !noSummary && confEnableShowResultOnFinish;
+			showResultsAfterFinishTest = uifactory.addCheckboxesVertical("qti_enableResultsOnFinish", "qti.form.results.onfinish", formLayout, new String[]{"xx"}, new String[]{null}, null, 1);
+			showResultsAfterFinishTest.select("xx", confEnableShowResultOnFinish);
+			showResultsAfterFinishTest.addActionListener(this, FormEvent.ONCLICK);
+		}
+		// </OLATCE-380>
 
 		String[] summaryKeys = new String[] {
 				AssessmentInstance.QMD_ENTRY_SUMMARY_COMPACT,
@@ -576,6 +641,16 @@ public class IQEditForm extends FormBasicController {
 	protected void doDispose() {
 		//
 	}
-
+	
+	//<OLATCE-982>
+	public boolean allowShowSolution(){
+		boolean allow = false;
+		if(allowShowSolutionBox != null){
+			allow = allowShowSolutionBox.isAtLeastSelected(1);			
+		}
+		return allow;
+	}
+	//</OLATCE-982>
+	
 }
 
diff --git a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_de.properties b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_de.properties
index 07b0ed8f9234287e5b71c15a1a72940354d15d80..f80efa73b464b95adc0987858a611dfa1f7b5375 100644
--- a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_de.properties
+++ b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_de.properties
@@ -5,4 +5,13 @@ templatewithtree = Onyx-Original
 templatewithouttree = Onyx-Original ohne Navigation
 templateHTWDD= HTW Dresden
 configonyx = Playerkonfiguration
-outcomes.title = Ausgabevariablen dieses Tests:
\ No newline at end of file
+outcomes.title = Ausgabevariablen dieses Tests:
+#<OLATCE-982>
+qti.form.allowShowSolution=L\u00f6sungen anzeigen
+#</OLATCE-982>
+##<OLATCE-1012>
+qti.form.onyx.cutvalue.passed.overwrite=<span class="onyx_passed_warning">In diesem Test ist bereits ein Bestanden-Level definiert. Wenn Sie hier einen Wert eintragen kann dies zu Unstimmigkeiten in der Onyx-Test-Auswertung und der Auswertung in der Lernplattform f\u00fchren und m\u00f6glicherweise Ihre Nutzer verwirren.</span>
+##</OLATCE-1012>
+##<OLATCE-935>
+reporter.unavailable=Der OnyxReporter kann derzeit nicht erreicht werden. Die m\u00f6glichen Ausgabevariablen k\u00f6nnen daher nicht angezeigt werden.
+##</OLATCE-935>
\ No newline at end of file
diff --git a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_en.properties b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_en.properties
index 08c1a3dfef3a570b441c331e788691fcd4a18ac1..7b110e501d45bf6f9215471edfecd6b2864ac9d7 100644
--- a/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_en.properties
+++ b/src/main/java/de/bps/onyx/plugin/course/nodes/iq/_i18n/LocalStrings_en.properties
@@ -6,3 +6,12 @@ qti.form.onyx.template=Template selection
 templateHTWDD=HTW Dresden
 templatewithouttree=Original Onyx without any navigation
 templatewithtree=Original Onyx
+#<OLATCE-982>
+qti.form.allowShowSolution=Show solutions
+#</OLATCE-982>
+##<OLATCE-1012>
+qti.form.onyx.cutvalue.passed.overwrite=<span class="onyx_passed_warning">There is already a passed-level defined for this onyx-test. If you set a value here, this could lead to discrepancies between the results shown after the onyx test and the results saved in the learning management system. This might confuse your users.</span>
+##</OLATCE-1012>
+##<OLATCE-935>
+reporter.unavailable=The OnyxReporter is temporary not available. Therefore, it is currently impossible to display outcome variables.
+##</OLATCE-935>
\ No newline at end of file
diff --git a/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java b/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java
index cb7e982febbdc56b343bbad5ff97fc629537d664..3e3fcc03fd3672151310d2b1e990b7f34a40a141 100644
--- a/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java
+++ b/src/main/java/de/bps/onyx/plugin/run/OnyxRunController.java
@@ -26,10 +26,13 @@ import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStreamReader;
+import java.text.DateFormat;
 import java.util.ArrayList;
+import java.util.Date;
 import java.util.List;
 
 import org.olat.core.gui.UserRequest;
+import org.olat.core.gui.WindowManager;
 import org.olat.core.gui.Windows;
 import org.olat.core.gui.components.Component;
 import org.olat.core.gui.components.htmlsite.HtmlStaticPageComponent;
@@ -44,28 +47,33 @@ import org.olat.core.gui.control.generic.closablewrapper.CloseableModalControlle
 import org.olat.core.gui.control.generic.iframe.IFrameDisplayController;
 import org.olat.core.id.Identity;
 import org.olat.core.id.OLATResourceable;
+import org.olat.core.logging.OLog;
 import org.olat.core.logging.Tracing;
 import org.olat.core.util.vfs.VFSContainer;
 import org.olat.core.util.vfs.VFSLeaf;
 import org.olat.course.assessment.AssessmentHelper;
+import org.olat.course.assessment.AssessmentManager;
+import org.olat.course.nodes.AssessableCourseNode;
 import org.olat.course.nodes.CourseNode;
 import org.olat.course.nodes.IQSELFCourseNode;
 import org.olat.course.nodes.IQSURVCourseNode;
 import org.olat.course.nodes.IQTESTCourseNode;
-import de.bps.onyx.plugin.course.nodes.iq.IQEditController;
 import org.olat.course.run.scoring.ScoreEvaluation;
 import org.olat.course.run.userview.UserCourseEnvironment;
 import org.olat.fileresource.FileResourceManager;
+import org.olat.ims.qti.QTIResultManager;
+import org.olat.ims.qti.QTIResultSet;
 import org.olat.modules.ModuleConfiguration;
 import org.olat.modules.iq.IQSecurityCallback;
 
-import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManager;
-import de.bps.webservices.clients.onyxreporter.OnyxReporterWebserviceManagerFactory;
 import de.bps.onyx.plugin.OnyxModule;
+import de.bps.onyx.plugin.OnyxModule.PlayerTemplate;
 import de.bps.onyx.plugin.OnyxResultManager;
+import de.bps.onyx.plugin.course.nodes.iq.IQEditController;
 import de.bps.onyx.plugin.wsclient.OnyxPluginServices;
 import de.bps.onyx.plugin.wsclient.PluginService;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterConnector;
+import de.bps.webservices.clients.onyxreporter.OnyxReporterException;
 
 /**
  * @author Ingmar Kroll
@@ -82,7 +90,11 @@ public class OnyxRunController extends BasicController {
 	private IFrameDisplayController iFrameCtr;
 	private String CP;
 	private String uniqueId;
-	private OnyxModalController onyxPluginController;
+	// <OLATCE-99>
+	private CloseableModalController onyxPluginController;
+	// </OLATCE-99>
+	private boolean isAjaxEnabled;
+	WindowManager wManager;
 
 	private final static int NOENTRYVIEW = -1;
 	private final static int DISCVIEW = 0;
@@ -91,9 +103,20 @@ public class OnyxRunController extends BasicController {
 
 	private Link showOnyxReporterButton;
 
-	public OnyxRunController(UserRequest ureq, WindowControl wControl, OLATResourceable fileResource) {
+	//<ONYX-705>
+	private final static OLog log = Tracing.createLoggerFor(OnyxRunController.class);
+	//</ONYX-705>
+	
+	//<OLATCE-1124>
+	private boolean isCourseCoach = false;
+	//</OLATCE-1124>
+
+	// <OLATCE-1054>
+	// add boolean activateModalController
+	public OnyxRunController(UserRequest ureq, WindowControl wControl, OLATResourceable fileResource, boolean activateModalController) {
 		super(ureq, wControl);
-		VelocityContainer vc = showOnyxTestInModalController(ureq, fileResource);
+		VelocityContainer vc = showOnyxTestInModalController(ureq, fileResource, activateModalController);
+		// </OLATCE-1054>
 		putInitialPanel(vc);
 	}
 	
@@ -116,7 +139,9 @@ public class OnyxRunController extends BasicController {
 		this.courseNodeSurvey = courseNode;
 		this.CP = getCP(courseNode.getReferencedRepositoryEntry().getOlatResource());
 		putInitialPanel(myContent);
-		Windows.getWindows(ureq).getWindowManager().setAjaxEnabled(false);
+		//<OLATCE-1124>
+		this.isCourseCoach = userCourseEnv.getCourseEnvironment().getCourseGroupManager().isIdentityCourseAdministrator(ureq.getIdentity()) || userCourseEnv.getCourseEnvironment().getCourseGroupManager().isIdentityCourseCoach(ureq.getIdentity());
+		//</OLATCE-1124>
 		showView(ureq, SURVEYVIEW);
 	}
 
@@ -139,8 +164,20 @@ public class OnyxRunController extends BasicController {
 		this.courseNodeSelf = courseNode;
 		this.CP = getCP(courseNode.getReferencedRepositoryEntry().getOlatResource());
 		putInitialPanel(myContent);
-		Windows.getWindows(ureq).getWindowManager().setAjaxEnabled(false);
-		showView(ureq, DISCVIEW);
+		// <OLATBPS-363>
+		int confValue = 0;
+		AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
+		if (moduleConfiguration.get(IQEditController.CONFIG_KEY_ATTEMPTS) != null) {
+			confValue = Integer.valueOf(moduleConfiguration.get(IQEditController.CONFIG_KEY_ATTEMPTS).toString()).intValue();
+		}
+		if (confValue == 0 || am.getNodeAttempts(courseNode, ureq.getIdentity()).intValue() < confValue) {
+			// running allowed
+			showView(ureq, DISCVIEW);
+		} else {
+			// only one time allowed
+			showView(ureq, NOENTRYVIEW);
+		}
+		// </OLATBPS-363>
 	}
 
 	/**
@@ -162,11 +199,10 @@ public class OnyxRunController extends BasicController {
 		this.courseNodeTest= courseNode;
 		this.CP=getCP(courseNode.getReferencedRepositoryEntry().getOlatResource());
 		putInitialPanel(myContent);
-		Windows.getWindows(ureq).getWindowManager().setAjaxEnabled(false);
-		int confValue = 1;
-		if (moduleConfiguration.get(IQEditController.CONFIG_KEY_ATTEMPTS) == null) {
-			confValue = 0;
-		} else {
+		int confValue = 0;
+		// <OLATBPS-363>
+		if (moduleConfiguration.get(IQEditController.CONFIG_KEY_ATTEMPTS) != null) {
+		// </OLATBPS-363>
 			confValue = Integer.valueOf(moduleConfiguration.get(IQEditController.CONFIG_KEY_ATTEMPTS).toString()).intValue();
 		}
 		if (confValue == 0 || courseNode.getUserAttempts(userCourseEnv).intValue() < confValue) {
@@ -180,22 +216,56 @@ public class OnyxRunController extends BasicController {
 
 	private void showView(UserRequest ureq, int viewmode) {
 		myContent.contextPut("viewmode", new Integer(viewmode));
-		int c = 1; //per default
-
-		try {
-			c = Integer.valueOf(modConfig.get(IQEditController.CONFIG_KEY_ATTEMPTS).toString()).intValue();
-		} catch (Exception e) {
-			// nothing to do
+		// <OLATBPS-363>
+		int confValue = 0; //per default
+		if (modConfig.get(IQEditController.CONFIG_KEY_ATTEMPTS) != null) {
+			confValue = Integer.valueOf(modConfig.get(IQEditController.CONFIG_KEY_ATTEMPTS).toString()).intValue();
 		}
-
-		if (c != 0) {
-			myContent.contextPut("attemptsConfig", String.valueOf(c));
+		if (confValue != 0) {
+			myContent.contextPut("attemptsConfig", String.valueOf(confValue));
 		}
+		// </OLATBPS-363>
 
 		if (viewmode != SURVEYVIEW) {
 			ScoreEvaluation se = null;
+			
+			//<OLATCE-1232>
+			boolean isVisibilityPeriod = AssessmentHelper.isResultVisible(modConfig);
+			
+			if(!isVisibilityPeriod){
+			  Date startDate = (Date)modConfig.get(IQEditController.CONFIG_KEY_RESULTS_START_DATE);
+			  Date endDate = (Date)modConfig.get(IQEditController.CONFIG_KEY_RESULTS_END_DATE);
+			  String visibilityStartDate = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, ureq.getLocale()).format(startDate);
+			  String visibilityEndDate = "-";
+			  if(endDate!=null) {
+			    visibilityEndDate = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, ureq.getLocale()).format(endDate);
+			  }
+			  String visibilityPeriod = getTranslator().translate("showResults.visibility", new String[] { visibilityStartDate, visibilityEndDate});
+				myContent.contextPut("visibilityPeriod",visibilityPeriod);
+				myContent.contextPut("showResultsVisible",Boolean.FALSE);
+			} else {
+				myContent.contextPut("showResultsVisible",Boolean.TRUE);
+			}
+			//</OLATCE-1232>
+				
 			if (courseNodeTest != null) {
-				myContent.contextPut("attempts", courseNodeTest.getUserAttempts(userCourseEnv));
+				// <OLATCE-498>
+				Integer attempts = courseNodeTest.getUserAttempts(userCourseEnv);
+				myContent.contextPut("attempts", attempts);
+				Boolean hasResults = false;
+				if (attempts > 0) {
+					//<ONYX-705>
+					try{
+						OnyxReporterConnector onyxReporter = new OnyxReporterConnector();
+						String assessmentType = courseNodeTest.getModuleConfiguration().get(IQEditController.CONFIG_KEY_TYPE).toString();
+						hasResults = onyxReporter.hasResultXml(ureq.getIdentity().getName(), assessmentType, "" + courseNodeTest.getIdent());
+					} catch (OnyxReporterException e) {
+						log.error(e.getMessage(), e);
+					}
+					//</ONYX-705>
+				}
+				myContent.contextPut("hasResults", hasResults.booleanValue());
+				// </OLATCE-498>
 				myContent.contextPut("comment", courseNodeTest.getUserUserComment(userCourseEnv));
 
 				if (courseNodeTest.getUserAttempts(userCourseEnv) > 0) {
@@ -203,6 +273,26 @@ public class OnyxRunController extends BasicController {
 				}
 			} else if (courseNodeSelf != null) {
 				myContent.contextPut("self", Boolean.TRUE);
+				// <OLATBPS-363>
+				AssessmentManager am = userCourseEnv.getCourseEnvironment().getAssessmentManager();
+				// <OLATCE-498>
+				Integer attempts = am.getNodeAttempts(courseNodeSelf, ureq.getIdentity());
+				myContent.contextPut("attempts", attempts);
+				Boolean hasResults = false;
+				if (attempts > 0) {
+					try{
+						OnyxReporterConnector onyxReporter = new OnyxReporterConnector();
+						String assessmentType = courseNodeSelf.getModuleConfiguration().get(IQEditController.CONFIG_KEY_TYPE).toString();
+						// <OLATCE-643>
+						hasResults = onyxReporter.hasResultXml(ureq.getIdentity().getName(), assessmentType, "" + courseNodeSelf.getIdent());
+						// </OLATCE-643>
+					} catch (OnyxReporterException e) {
+						log.error(e.getMessage(), e);
+					}
+				}
+				myContent.contextPut("hasResults", hasResults.booleanValue());
+				// </OLATCE-498>
+				// <OLATBPS-363>
 				se = courseNodeSelf.getUserScoreEvaluation(userCourseEnv);
 			}
 			boolean hasResult = se != null && se.getScore() != null;
@@ -257,9 +347,11 @@ public class OnyxRunController extends BasicController {
 				myContent.contextPut("attempts", courseNodeSurvey.getUserAttempts(userCourseEnv));
 				startButton = LinkFactory.createButton("startapplet", myContent, this);
 
-				boolean isAuthor = ureq.getUserSession().getRoles().isAuthor() ||
-					ureq.getUserSession().getRoles().isOLATAdmin();
-				if (isAuthor) {
+				//<OLATCE-1124>
+				// <OLATBPS-96>
+				if (isCourseCoach && existsResultsForSurvey()) {
+				// </OLATBPS-96>
+				//</OLATCE-1124>
 					myContent.contextPut("showReporter", Boolean.TRUE);
 					showOnyxReporterButton = LinkFactory.createCustomLink("cmd.showOnyxReporter", "cmd.showOnyxReporter", "onyxreporter.button.survey",  Link.BUTTON_SMALL, myContent, this);
 				}
@@ -298,6 +390,32 @@ public class OnyxRunController extends BasicController {
 		}
 	}
 
+	// <OLATBPS-451>
+	/**
+	 * This method looks for the latest qtiResultSet in the DB which belongs to this course node and user
+	 * and updates the UserScoreEvaluation.
+	 */
+	private void updateUserScoreEvaluationFromQtiResult(Long courseResourceableId, AssessableCourseNode courseNode) {
+		QTIResultManager qrm = QTIResultManager.getInstance();
+		List<QTIResultSet> resultSets = qrm.getResultSets(courseResourceableId, courseNode.getIdent(), courseNode.getReferencedRepositoryEntry().getKey(), userCourseEnv.getIdentityEnvironment().getIdentity());
+		QTIResultSet latestResultSet = null;
+		for (QTIResultSet resultSet : resultSets) {
+			if (latestResultSet == null) {
+				latestResultSet = resultSet;
+				continue;
+			}
+			// if a best score is given select the latest resultset with the best score
+			if (resultSet.getLastModified().after(latestResultSet.getLastModified())) {
+				latestResultSet = resultSet;
+			}
+		}
+		if (latestResultSet != null) {
+			ScoreEvaluation sc = new ScoreEvaluation(latestResultSet.getScore(), latestResultSet.getIsPassed(), latestResultSet.getAssessmentID());
+			courseNode.updateUserScoreEvaluation(sc, userCourseEnv, userCourseEnv.getIdentityEnvironment().getIdentity(), false);
+		}
+	}
+	// </OLATBPS-451>
+
 	/**
 	 * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
 	 *      org.olat.core.gui.components.Component,
@@ -308,12 +426,16 @@ public class OnyxRunController extends BasicController {
 			if  (courseNodeSurvey != null) {
 				showView(ureq, SURVEYVIEW);
 			} else if (courseNodeTest != null) {
-				int confValue = 1;
-				try {
-					confValue = Integer.valueOf(modConfig.get(IQEditController.CONFIG_KEY_ATTEMPTS).toString()).intValue();
-				} catch (NullPointerException e) {
-					Tracing.createLoggerFor(this.getClass()).error("Onyx-Test Anzahl Ausfuehrungen nicht in Konfig", e);
+				
+				// <OLATBPS-451>
+				updateUserScoreEvaluationFromQtiResult(userCourseEnv.getCourseEnvironment().getCourseResourceableId(), courseNodeTest);
+				// </OLATBPS-451>
+				// <OLATBPS-363>
+				int confValue = 0;
+				if (modConfig.get(IQEditController.CONFIG_KEY_ATTEMPTS) != null) {
+						confValue = Integer.valueOf(modConfig.get(IQEditController.CONFIG_KEY_ATTEMPTS).toString()).intValue();
 				}
+				// </OLATBPS-363>
 				int userAttempts = 0;
 				userAttempts = courseNodeTest.getUserAttempts(userCourseEnv).intValue();
 				if (confValue == 0 || userAttempts < confValue) {
@@ -329,6 +451,7 @@ public class OnyxRunController extends BasicController {
 			//tell the RunMainController that it has to be updated
 			userCourseEnv.getScoreAccounting().evaluateAll();
 			fireEvent(ureq, Event.DONE_EVENT);
+			Windows.getWindows(ureq).getWindowManager().setAjaxEnabled(isAjaxEnabled);
 		}
 	}
 
@@ -339,37 +462,9 @@ public class OnyxRunController extends BasicController {
 	 */
 	public void event(UserRequest ureq, Component source, Event event) {
 		if (source == startButton) {
-			//increase attempts when starting the test -> attempts do not depend on test
-			//running correct
-			onyxPlugin = createVelocityContainer("onyxstart");
-			String onyxBackLabel = "onyx.back";
-			if (courseNodeTest != null) {
-				onyxPlugin.contextPut("isSurvey", Boolean.FALSE);
-			} else if (courseNodeSurvey != null) {
-				onyxPlugin.contextPut("isSurvey", Boolean.TRUE);
-				onyxBackLabel = "onyx.survey.back";
-			}
-			try {
-				connectToOnyxWS(ureq);
-				String urlonyxplugin = OnyxModule.getUserViewLocation() + "?id=" + this.uniqueId;
-				onyxPlugin.contextPut("urlonyxplugin", urlonyxplugin);
-				onyxPluginController = new OnyxModalController(getWindowControl(), "close", onyxPlugin, false);
-				onyxBack = LinkFactory.createCustomLink("onyx.back", "onyx.back", onyxBackLabel, Link.BUTTON_SMALL, onyxPlugin, onyxPluginController);
-				onyxPluginController.setBackButton(onyxBack);
-				listenTo(onyxPluginController);
-				onyxPluginController.activate();
-				//now increase attampts; if an exception occurred before, this will be not reached
-				if (courseNodeTest != null) {
-					courseNodeTest.incrementUserAttempts(userCourseEnv);
-				} else if (courseNodeSurvey != null) {
-					courseNodeSurvey.incrementUserAttempts(userCourseEnv);
-				} else if(courseNodeSelf != null){
-					courseNodeSelf.incrementUserAttempts(userCourseEnv);
- 				}
-			} catch(Exception e) {
-				getWindowControl().setError(translate("error.connectonyxws"));
-				Tracing.createLoggerFor(this.getClass()).warn("could not connect to OnyxPlugin webservice", e);
-			}
+			// <OLATCE-654>
+			startOnyx(ureq);
+			// </OLATCE-654>
 			return;
 		} else if (source == showOnyxReporterButton) {
 			onyxReporterVC = createVelocityContainer("onyxreporter");
@@ -389,6 +484,47 @@ public class OnyxRunController extends BasicController {
 		showView(ureq, ENDVIEW);
 	}
 
+	// <OLATCE-654>
+	public void startOnyx(UserRequest ureq){
+		//increase attempts when starting the test -> attempts do not depend on test
+		//running correct
+		// <OLATCE-445>
+		isAjaxEnabled = Windows.getWindows(ureq).getWindowManager().isAjaxEnabled();
+		Windows.getWindows(ureq).getWindowManager().setAjaxEnabled(false);
+		// </OLATCE-445>
+		onyxPlugin = createVelocityContainer("onyxstart");
+		String onyxBackLabel = "onyx.back";
+		if (courseNodeTest != null) {
+			onyxPlugin.contextPut("isSurvey", Boolean.FALSE);
+		} else if (courseNodeSurvey != null) {
+			onyxPlugin.contextPut("isSurvey", Boolean.TRUE);
+			onyxBackLabel = "onyx.survey.back";
+		}
+		try {
+			connectToOnyxWS(ureq);
+			String urlonyxplugin = OnyxModule.getUserViewLocation() + "?id=" + this.uniqueId;
+			onyxPlugin.contextPut("urlonyxplugin", urlonyxplugin);
+			// <OLATCE-99>
+			onyxPluginController = new CloseableModalController(getWindowControl(), "close", onyxPlugin, true);
+			onyxPlugin.contextPut("showHint", Boolean.TRUE);
+			// </OLATCE-99>
+			onyxBack = LinkFactory.createCustomLink("onyx.back", "onyx.back", onyxBackLabel, Link.BUTTON_SMALL, onyxPlugin, onyxPluginController);
+			listenTo(onyxPluginController);
+			onyxPluginController.activate();
+			//now increase attampts; if an exception occurred before, this will be not reached
+			if (courseNodeTest != null) {
+				courseNodeTest.incrementUserAttempts(userCourseEnv);
+			} else if (courseNodeSurvey != null) {
+				courseNodeSurvey.incrementUserAttempts(userCourseEnv);
+			} else if(courseNodeSelf != null){
+				courseNodeSelf.incrementUserAttempts(userCourseEnv);
+				}
+		} catch(Exception e) {
+			getWindowControl().setError(translate("error.connectonyxws"));
+			Tracing.createLoggerFor(this.getClass()).warn("could not connect to OnyxPlugin webservice", e);
+		}
+	}
+	// </OLATCE-654>
 	/**
 	 * This methods calls the OnyxReporter and shows it in an iframe.
 	 * @param ureq The UserRequest for getting the identity and role of the current user.
@@ -397,7 +533,14 @@ public class OnyxRunController extends BasicController {
 	 * 					2 ERROR
 	 */
 	private int showOnyxReporter(UserRequest ureq) {
-			OnyxReporterWebserviceManager onyxReporter = OnyxReporterWebserviceManagerFactory.getInstance().fabricate("OnyxReporterWebserviceClient");
+		//<ONYX-705>
+		OnyxReporterConnector onyxReporter = null;
+			try{
+				onyxReporter = new OnyxReporterConnector();
+			} catch (OnyxReporterException e) {
+				log.error(e.getMessage(), e);
+			}
+		//</ONYX-705>			
 			if (onyxReporter != null) {
 				List<Identity> identity = new ArrayList<Identity>();
 				String iframeSrc = "";
@@ -405,12 +548,25 @@ public class OnyxRunController extends BasicController {
 					if (courseNodeTest != null) {
 						identity.add(userCourseEnv.getIdentityEnvironment().getIdentity());
 						long assasmentId = courseNodeTest.getUserScoreEvaluation(userCourseEnv).getAssessmentID();
-						onyxReporter.setAssassmentId(assasmentId);
-						iframeSrc = onyxReporter.startReporter(ureq, identity, courseNodeTest, true);
+						//<OLATCE-1124>
+						//<ONYX-705>
+						iframeSrc = onyxReporter.startReporterGUI(ureq.getIdentity(), identity, courseNodeTest, assasmentId, true, false);
+						//</ONYX-705>
+						//</OLATCE-1124>
+					//<OLATCE-1048>
+					} else if (courseNodeSelf != null){
+						identity.add(userCourseEnv.getIdentityEnvironment().getIdentity());
+						long assasmentId = courseNodeSelf.getUserScoreEvaluation(userCourseEnv).getAssessmentID();
+						//<OLATCE-1124>
+						iframeSrc = onyxReporter.startReporterGUI(ureq.getIdentity(), identity, courseNodeSelf, assasmentId, true, false);
+						//</OLATCE-1124>
+					//</OLATCE-1048>
 					} else {
-						String path = userCourseEnv.getCourseEnvironment().getCourseBaseContainer()
-								.getBasefile() + File.separator + courseNodeSurvey.getIdent() + File.separator;
-						iframeSrc = onyxReporter.startReporterForSurvey(ureq, courseNodeSurvey, path);
+						//<ONYX-705>
+						// <OLATBPS-96>
+						iframeSrc = onyxReporter.startReporterGUIForSurvey(ureq.getIdentity(), courseNodeSurvey, getSurveyResultPath());
+						// </OLATBPS-96>
+						//</ONYX-705>
 					}
 				} catch (OnyxReporterException oE) {
 					if (oE.getMessage().equals("noresults")) {
@@ -428,13 +584,39 @@ public class OnyxRunController extends BasicController {
 				return 2;
 			}
 	}
+	
+	// <OLATBPS-96>
+	/**
+	 * This method checks if the directory where the results are stored for this survey exists.
+	 * @return
+	 */
+	private boolean existsResultsForSurvey() {
+		File surveyDir = new File(getSurveyResultPath());
+		if (surveyDir.exists()) {
+			return true;
+		} else {
+			return false;
+		}
+	}
+	
+	/**
+	 * This method generates the path to the results directory for a survey
+	 * @return A String representing the path
+	 */
+	private String getSurveyResultPath() {
+		return userCourseEnv.getCourseEnvironment().getCourseBaseContainer()
+			.getBasefile() + File.separator + courseNodeSurvey.getIdent() + File.separator;
+	}
+	// </OLATBPS-96>
 
 	/**
 	 * Static metohd to start the an onyx test as learningressource or bookmark.
 	 * @param ureq
 	 * @param repositoryEntry
 	 */
-	public VelocityContainer showOnyxTestInModalController(UserRequest ureq, OLATResourceable fileResource) {
+	// <OLATCE-1054>
+	public VelocityContainer showOnyxTestInModalController(UserRequest ureq, OLATResourceable fileResource, boolean activateModalController) {
+	// </OLATCE-1054>
 		OnyxPluginServices onyxplugin = null;
 		try {
 			onyxplugin = new PluginService().getOnyxPluginServicesPort(); 
@@ -470,24 +652,35 @@ public class OnyxRunController extends BasicController {
 		onyxPlugin.contextPut("isSurvey", Boolean.FALSE);
 		onyxPlugin.contextPut("urlonyxplugin", urlonyxplugin);
 		onyxPlugin.contextPut("nohint", Boolean.TRUE);
-		onyxPluginController = new OnyxModalController(getWindowControl(), "close", onyxPlugin, false);
+		// <OLATCE-99>
+		onyxPluginController = new CloseableModalController(getWindowControl(), "close", onyxPlugin, true);
+		// </OLATCE-99>
 		onyxBack = LinkFactory.createCustomLink("onyx.back", "onyx.back", "onyx.back", Link.BUTTON_SMALL, onyxPlugin, onyxPluginController);
 		onyxBack.setVisible(false);
-		onyxPluginController.setBackButton(onyxBack);
+		// <OLATBPS-102>
+		// <OLATCE-1054>
+		if (activateModalController) {
+			onyxPluginController.activate();
+		}
+		// </OLATCE-1054>
+		// </OLATBPS-102>
 		return onyxPlugin;
 	}
 
 	private void connectToOnyxWS(UserRequest ureq) {
 		OnyxPluginServices onyxplugin = new PluginService().getOnyxPluginServicesPort(); 
 		CourseNode courseNode = null;
-		boolean allowShowSolution = false;
+		//<OLATCE-982>
+		Boolean allowShowSolution = (Boolean) modConfig.get(IQEditController.CONFIG_KEY_ALLOW_SHOW_SOLUTION);
+		// set allowShowSolution either to the configured value (!= null) or to defaultvalue false if test or survey, if selftest then the default is true 
+		allowShowSolution = allowShowSolution!=null ? allowShowSolution : courseNodeSelf != null;
+		//</OLATCE-982>
 		if (courseNodeTest != null) {
 			courseNode = courseNodeTest;
 		} else if  (courseNodeSurvey != null) {
 			courseNode = courseNodeSurvey;
 		} else if  (courseNodeSelf != null) {
 			courseNode = courseNodeSelf;
-			allowShowSolution = true;
 		}
 		this.uniqueId = OnyxResultManager.getUniqueId(ureq.getIdentity(), courseNode, this.userCourseEnv);
 	  String instructions = new String();
@@ -506,12 +699,29 @@ public class OnyxRunController extends BasicController {
 			Tracing.createLoggerFor(this.getClass()).error("could not read disclaimer");
 		}
 		String language = ureq.getLocale().toString().toLowerCase();
-		String tempalteId = "onyxdefault";
-
-		String tempalteId_config=(String) modConfig.get(IQEditController.CONFIG_KEY_TEMPLATE);
-		if(tempalteId_config!=null&&tempalteId_config.length()>0){
-			tempalteId=tempalteId_config;
+		// <OLATCE-499>
+		String templateId = "onyxdefault";
+		String tempalteId_config = (String) modConfig.get(IQEditController.CONFIG_KEY_TEMPLATE);
+		if(tempalteId_config != null && tempalteId_config.length() > 0) {
+			templateId = tempalteId_config;
+			boolean isTemplateValid = false;
+			for (PlayerTemplate template : OnyxModule.PLAYERTEMPLATES) {
+				if (template.id.equals(templateId)) {
+					isTemplateValid = true;
+					break;
+				}
+			}
+			if (!isTemplateValid) {
+				templateId = OnyxModule.PLAYERTEMPLATES.get(0).id;
+			}
+		}
+		// </OLATCE-499>
+		// <ONYX-673>
+		if (courseNodeSurvey != null) {
+			// if this is a survey
+			templateId += "_survey";
 		}
+		// </ONYX-673>
 
 		try {
 
@@ -521,7 +731,9 @@ public class OnyxRunController extends BasicController {
 				System.out.println("CP : "+CP);
 				java.io.FileInputStream inp = new java.io.FileInputStream(cpFile);
 				inp.read(byteArray);
-				onyxplugin.run(this.uniqueId, byteArray, language, instructions, tempalteId, OnyxModule.getConfigName(), allowShowSolution);
+				// <OLATCE-499>
+				onyxplugin.run(this.uniqueId, byteArray, language, instructions, templateId, OnyxModule.getConfigName(), allowShowSolution);
+				// </OLATCE-499>
 			} catch (FileNotFoundException e) {
 				Tracing.createLoggerFor(this.getClass()).error("Cannot find CP of Onyx Test with assassmentId: " + uniqueId, e);
 			} catch (IOException e) {
@@ -555,44 +767,6 @@ public class OnyxRunController extends BasicController {
 
 	@Override
 	protected void doDispose() {
-		if (onyxPluginController != null && onyxPluginController.isOpen()) {
-			onyxPluginController.close();
-		}
-	}
-
-	private class OnyxModalController extends CloseableModalController {
-		public OnyxModalController(WindowControl wControl, String closeButtonText, Component modalContent, boolean showCloseIcon) {
-			super(wControl, closeButtonText, modalContent, showCloseIcon);
-		}
-
-		private Link backButton;
-		private boolean open = false;
-
-		public void activate() {
-			super.activate();
-			open = true;
-		}
-
-		public boolean isOpen() {
-			return open;
-		}
-
-		public void setBackButton(Link button) {
-			backButton = button;
-		}
-
-		public void close() {
-			open = false;
-			getWindowControl().pop();
-		}
-
-		public void event(UserRequest ureq, Component source, Event event) {
-			if (source == backButton) {
-				close();
-				fireEvent(ureq, CLOSE_MODAL_EVENT);
-			}
-		}
 	}
-
 }
 
diff --git a/src/main/java/de/bps/onyx/plugin/run/_content/onyxrun.html b/src/main/java/de/bps/onyx/plugin/run/_content/onyxrun.html
index 9ebcd948f11703d6fe2e9b6594aea4f8c79dcca6..9e62fb14f1404d3fa826b38e7ef711bcad54b754 100644
--- a/src/main/java/de/bps/onyx/plugin/run/_content/onyxrun.html
+++ b/src/main/java/de/bps/onyx/plugin/run/_content/onyxrun.html
@@ -4,6 +4,11 @@
 
 #if( $viewmode == 0 || $viewmode == -1 ) 
 	<p>
+
+##<OLATCE-1281>
+#if($showResultsOnHomePage)
+	#if($showResultsVisible)
+##</OLATCE-1281>
 	<div class="o_course_run_scoreinfo">
 	<p>
 	<table>
@@ -52,6 +57,9 @@
 				$score
 			</td>
 		</tr>
+		##<OLATCE-1014> hide status - line if there is no passed value set
+		#if($passed != "")
+		##</OLATCE-1014>
 		<tr>
 			<td>$r.translate("assessment.state"): </td>
 			<td>
@@ -62,6 +70,9 @@
 			#end
 			</td>
 		</tr>
+		##<OLATCE-1014>
+		#end
+		##</OLATCE-1014>
 		#else
 		<tr>
 			<td>
@@ -91,6 +102,12 @@
 	</table>
 	</p>
 	</div>
+##<OLATCE-1281> else-block of showResultsVisible
+	#else
+		$visibilityPeriod
+	#end
+	#end
+##<OLATCE-1281> end of $showResultsOnHomePage
 	</p>
 	#if($viewmode == -1) 
 		<b> $r.translate("onyx.onlyonetime") </b>
diff --git a/src/main/java/de/bps/onyx/plugin/run/_content/onyxstart.html b/src/main/java/de/bps/onyx/plugin/run/_content/onyxstart.html
index 1161259c8b91d2355fcba1fde57096f0cb9c7171..67e106099bdc00cbc7b7d830496f744c59c0c148 100644
--- a/src/main/java/de/bps/onyx/plugin/run/_content/onyxstart.html
+++ b/src/main/java/de/bps/onyx/plugin/run/_content/onyxstart.html
@@ -1,41 +1,15 @@
-<center>
-<table width="60%">
-	<tr>
-		<td align="center" >
-			<div class="o_course_run_statusinfo">
-			#if ($isSurvey)
-				$r.translate("onyx.waiting.info.survey")
-				<br>
-				<hr></hr>
-				<b>$r.translate("onyx.cancel.info.survey")</b>
-			#else
-				$r.translate("onyx.waiting.info")
-				<br>
-				<!--  -->
-				#if($nohint)
-				#else
-				<hr></hr>
-				<b>$r.translate("onyx.cancel.info")</b>
-				#end
-				<!--  -->
-			#end
-			</div>
-		</td>
-	</tr>
-	<tr>
-		<td align="center">
-			<div>$r.render($"onyx.back")</div>
-		</td>
-	</tr>
-	<tr>
-		<td>
-			<div>
-				<center>
-					<iframe style="min-height:300px;border:none;" frameborder="0" src="$urlonyxplugin" height="400" width="90%"></iframe>
-				</center>
-			</div>
-		</td>
-	</tr>
-</table>	
-</center>
-	
\ No newline at end of file
+## <OLATCE-99>
+#if ($showHint)
+<script type="text/javascript">
+o_info.close_onyx = "$r.translate("onyx.modalcontroller.close.yesno.message")";
+function o2cl() {
+	var doreq = confirm(o_info.close_onyx);
+	if (doreq) o_beforeserver();
+	return doreq;
+}
+</script>
+#end
+<div>
+	<iframe class="onyx_iframe" src="$urlonyxplugin"></iframe>
+</div>
+## </OLATCE-99>	
\ No newline at end of file
diff --git a/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_de.properties b/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_de.properties
index 5a7781805917ca7bab880a90b0ddf91c18aeb364..68fc9ed484adf2c81f075847d1fd5206ff273a19 100644
--- a/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_de.properties
+++ b/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_de.properties
@@ -16,6 +16,9 @@ onyx.back = Test abschlie\u00dfen
 onyx.survey.back = Fragebogen abschlie\u00dfen
 onyx.end = Onyx-Test wurde beendet.
 onyx.end.errors = Es sind Fehler aufgetreten. Bitte informieren Sie Ihren Betreuer!
+# <OLATCE-99>
+onyx.modalcontroller.close.yesno.message=Bitte schlie\u00dfen Sie dieses Fenster erst nach Abschlie\u00dfen des Tests. Bitte stellen Sie sicher, dass Ihre Testergebnisse erfolgreich gespeichert wurden. M\u00f6chten Sie das Fenster wirklich schlie\u00dfen?
+# </OLATCE-99>
 assessment.state= Status
 assessment.testresults.finished=Bewertung abgeschlossen
 assessment.testresults.open	 = Bewertung noch nicht abgeschlossen
@@ -38,4 +41,7 @@ error1 =
 # 
 intro.self=Dr\u00FCcken Sie Start, um mit dem Selbsttest zu beginnen.
 info.selfassessment = Bei diesem Selbsttest k\u00F6nnen Ihre Resultate von den Administratoren und den Betreuern dieses Kurses <b>nicht</b> eingesehen werden.
-# 
\ No newline at end of file
+# 
+## <OLATCE-1232>
+showResults.visibility=Die Resultate werden von {0} bis {1} angezeigt.
+## </OLATCE-1232>
\ No newline at end of file
diff --git a/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_en.properties b/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_en.properties
index 5b2e8508fa4d2cdfd62f94a52c785cd71c39c1ab..4b8dc439f16a1379f7053817f5f063d65e81e590 100644
--- a/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_en.properties
+++ b/src/main/java/de/bps/onyx/plugin/run/_i18n/LocalStrings_en.properties
@@ -24,6 +24,9 @@ onyx.cancel.info=Please click first on "Finish test" when completing your test.
 onyx.cancel.info.survey=Please click first on "Finish questionnaire" when completing your questionnaire. When clicking too soon this questionnaire will be cancelled immediately and you will not be able to fill it in again.
 onyx.end=Onyx test was terminated.
 onyx.end.errors=Some errors occurred. Please tell your supervisor\!
+# <OLATCE-99>
+onyx.modalcontroller.close.yesno.message=Bitte schlie\u00dfen Sie dieses Fenster erst nach Abschlie\u00dfen des Tests. Andernfalls werden Ihre bisherigen Antworten nicht gespeichert. M\u00f6chten Sie das Fenster wirklich schlie\u00dfen?
+# </OLATCE-99>
 onyx.onlyonetime=This test can not be started again.
 onyx.survey.back=Complete questionnaire
 onyx.waiting.info=Loading test. Please be patient. Depending on network and processor this can take some time.
@@ -36,3 +39,6 @@ passed.yes=Passed
 score.yourscore=Your score
 showResults.title=Results
 startapplet=Start
+## <OLATCE-1232>
+showResults.visibility=Your results will be displayed from {0} until {1}.
+## </OLATCE-1232>
diff --git a/src/main/java/de/bps/webservices/_spring/webservicesContext.xml b/src/main/java/de/bps/webservices/_spring/webservicesContext.xml
index 4b1007ca8c908fb7b541dff31ad3dda06982294b..c26341ee582495c56f1d46b6e9935c59dc5aded3 100644
--- a/src/main/java/de/bps/webservices/_spring/webservicesContext.xml
+++ b/src/main/java/de/bps/webservices/_spring/webservicesContext.xml
@@ -10,19 +10,10 @@
 
 <context:property-placeholder location="classpath:serviceconfig/olat.properties, classpath:olat.local.properties" />
 
-	<bean id="webservicesModule" class="de.bps.webservices.WebServiceModule" init-method="init">
-		<property name="services">
-			<map>
-				<entry key="OnyxReporterWebserviceClient">
-					<list>
-						<!-- webservice id -->
-						<value>"201"</value>
-						<!-- webservice adress -->
-						<value>${onyx.reporter.webservice}</value>
-					</list>
-				</entry>
-			</map>
-		</property>
+	<!-- <ONYX-705> -->
+	<bean id="OnyxReporterWebserviceClient" class="de.bps.webservices.clients.onyxreporter.OnyxReporterTarget">
+		<constructor-arg name="target" value="${onyx.reporter.webservice}" />
 	</bean>
+	<!-- </ONYX-705> -->
 	
 </beans>
diff --git a/src/main/java/de/bps/webservices/clients/onyxreporter/OnyxReporterException.java b/src/main/java/de/bps/webservices/clients/onyxreporter/OnyxReporterException.java
index 78c24df177a37189491944b342db387c9d798850..e8827960539518e5aa6588d53f68c83a1f89cad9 100644
--- a/src/main/java/de/bps/webservices/clients/onyxreporter/OnyxReporterException.java
+++ b/src/main/java/de/bps/webservices/clients/onyxreporter/OnyxReporterException.java
@@ -29,7 +29,17 @@ package de.bps.webservices.clients.onyxreporter;
  */
 public class OnyxReporterException extends Exception {
 
-	public OnyxReporterException(String msg) {
+	/**
+	 * 			//<ONYX-705>
+	 */
+	private static final long serialVersionUID = -3120820706663500150L;
+
+	OnyxReporterException(String msg) {
 		super(msg);
 	}
+	//<ONYX-705>
+	OnyxReporterException(String msg, Throwable cause) {
+		super(msg, cause);
+	}
+	//</ONYX-705>
 }
diff --git a/src/main/java/org/olat/core/gui/control/generic/closablewrapper/_content/index.html b/src/main/java/org/olat/core/gui/control/generic/closablewrapper/_content/index.html
index fe6b9fa5d039b1cbd97980449270743ac80cd426..75ac1da346a2300fae62f77fa3b297820270ae60 100644
--- a/src/main/java/org/olat/core/gui/control/generic/closablewrapper/_content/index.html
+++ b/src/main/java/org/olat/core/gui/control/generic/closablewrapper/_content/index.html
@@ -32,4 +32,16 @@
 ## always show top of modal dialog when on long pages
 <script type="text/javascript">
 	Effect.ScrollTo('b_top');
+	var bodyHeight = document.getElementById('b_body').parentNode.offsetHeight;
+	var windowHeight = window.innerHeight;
+	var finalHeight = Math.min(bodyHeight, windowHeight)-20;
+	var wrapper = document.getElementById("$r.getId("b_closablewapper_")");
+	if(wrapper.className.indexOf('onyx_overlay')>-1){
+		wrapper.style.height=finalHeight+'px';
+		iframe = wrapper.getElementsByTagName('iframe')[0];
+		if(iframe!= undefined){
+			finalHeight = finalHeight-28;
+			iframe.style.height=finalHeight+'px';
+		}
+	}
 </script>
\ No newline at end of file
diff --git a/src/main/java/org/olat/course/condition/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/course/condition/_i18n/LocalStrings_de.properties
index 9266ad83dc1dce946a1418e83ad3b0ab3c5d185d..62466ce81771e32eba63f36e85ac3713f3b5cde7 100644
--- a/src/main/java/org/olat/course/condition/_i18n/LocalStrings_de.properties
+++ b/src/main/java/org/olat/course/condition/_i18n/LocalStrings_de.properties
@@ -15,6 +15,9 @@ error.argtype.date=Die Zeitangabe f\u00FCr die "{0}"-Funktion muss wie folgt def
 error.argtype.institutionalname=Die "{0}"-Funktion muss mit einem Institutsnamen aufgerufen werden.
 error.argtype.username=Die "{0}"-Funktion muss mit einem Benutzernamen aufgerufen werden.
 error.fewerargs=Die "{0}"-Funktion hat weniger Argumente.
+##<OLATCE-1088>
+error.argtype.outcome.undefined=Die angeforderte Ergebnisvariable existiert im ausgew\u00e4hlten Test nicht!
+##</OLATCE-1088>
 error.fix=Erstellen
 error.illegal.operation.at=Die Operation bei  Zeichen {0} ist nicht erlaubt, konsultieren Sie die Hilfe f\u00FCr m\u00F6gliche Operationen.
 error.inexpression.at=Der Bedingungsausdruck hat einen Fehler an der Position {0}.
diff --git a/src/main/java/org/olat/course/condition/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/course/condition/_i18n/LocalStrings_en.properties
index 19c01a3c5252e50d8ea326c40893f45f64014ff8..1d2c833f3be9d6418657403c157b7f3b2fbb4cdc 100644
--- a/src/main/java/org/olat/course/condition/_i18n/LocalStrings_en.properties
+++ b/src/main/java/org/olat/course/condition/_i18n/LocalStrings_en.properties
@@ -15,6 +15,9 @@ error.argtype.date=The "{0}" function has to indicate a point in time defined li
 error.argtype.institutionalname=The "{0}" function must contain an institutional name
 error.argtype.username=The "{0}" function must contain a user name.
 error.fewerargs=The "{0}" function has fewer arguments than specified.
+##<OLATCE-1088>
+error.argtype.outcome.undefined=The requested outcome-variable does not exist in the given test!
+##</OLATCE-1088>
 error.fix=Create
 error.illegal.operation.at=The operation at position {0} is not allowed, see Help for possible operations.
 error.inexpression.at=This condition expression has an error at position {0}.
diff --git a/src/main/java/org/olat/course/editor/CourseEditorEnv.java b/src/main/java/org/olat/course/editor/CourseEditorEnv.java
index bea94b71b1aa1aa68d809e2a680107854c84f5ff..8cae5e7ee0182d16f9c02cab18c50ede7f9a01bc 100644
--- a/src/main/java/org/olat/course/editor/CourseEditorEnv.java
+++ b/src/main/java/org/olat/course/editor/CourseEditorEnv.java
@@ -33,6 +33,7 @@ import org.olat.course.condition.interpreter.ConditionErrorMessage;
 import org.olat.course.condition.interpreter.ConditionExpression;
 import org.olat.course.condition.interpreter.ConditionInterpreter;
 import org.olat.course.groupsandrights.CourseGroupManager;
+import org.olat.course.nodes.CourseNode;
 
 /**
  * Description:<br>
@@ -165,4 +166,11 @@ public interface CourseEditorEnv {
 	 */
 	public CourseGroupManager getCourseGroupManager();
 
+	// <OLATCE-91>
+	/**
+	 * @return the requested course nod from the current course of this courseenvironement
+	 */
+	public CourseNode getNode(String nodeId);
+	// </OLATCE-91>
+
 }
diff --git a/src/main/java/org/olat/course/editor/CourseEditorEnvImpl.java b/src/main/java/org/olat/course/editor/CourseEditorEnvImpl.java
index 9092c340283a8ecc5ae15b8fe637828f01a435e1..2e3aa93be3ec6ae60da599cc096cd85edf96acba 100644
--- a/src/main/java/org/olat/course/editor/CourseEditorEnvImpl.java
+++ b/src/main/java/org/olat/course/editor/CourseEditorEnvImpl.java
@@ -149,6 +149,17 @@ public class CourseEditorEnvImpl implements CourseEditorEnv {
 		boolean retVal = cen != null && !cen.isDeleted();
 		return retVal;
 	}
+	
+	// <OLATCE-91>
+	/**
+	 * @see org.olat.course.editor.CourseEditorEnv#getNode(java.lang.String)
+	 */
+	@Override
+	public CourseNode getNode(String nodeId) {
+		CourseNode cen = cetm.getCourseNode(nodeId);
+		return cen;
+	}
+	// </OLATCE-91>
 
 	/**
 	 * @see org.olat.course.editor.CourseEditorEnv#existsGroup(java.lang.String)
diff --git a/src/main/java/org/olat/ims/qti/QTIResultSet.java b/src/main/java/org/olat/ims/qti/QTIResultSet.java
index f9d0aa7ce62b6952dbd634c4000a8b8300592efc..abc28fe1096aa16c7466e51b50f25ef0145126ab 100644
--- a/src/main/java/org/olat/ims/qti/QTIResultSet.java
+++ b/src/main/java/org/olat/ims/qti/QTIResultSet.java
@@ -44,7 +44,9 @@ public class QTIResultSet extends PersistentObject {
 	private Identity identity;
 	private int qtiType;
 	private long assessmentID;
-	private boolean isPassed;
+	//<OLATCE-1014> allow null for "not set"
+	private Boolean isPassed;
+	//</OLATCE-1014>
 	private float score;
 	private Long duration;
 	private Date lastModified;
@@ -87,7 +89,7 @@ public class QTIResultSet extends PersistentObject {
 	/**
 	 * @return
 	 */
-	public boolean getIsPassed() {
+	public Boolean getIsPassed() {
 		return isPassed;
 	}
 
@@ -143,8 +145,10 @@ public class QTIResultSet extends PersistentObject {
 	/**
 	 * @param b
 	 */
-	public void setIsPassed(boolean b) {
+	public void setIsPassed(Boolean b) {
+		//<OLATCE-1014> allow NULL value as "not set"
 		isPassed = b;
+		//</OLATCE-1014>
 	}
 
 	/**
diff --git a/src/main/java/org/olat/ims/qti/export/QTIExportSet.java b/src/main/java/org/olat/ims/qti/export/QTIExportSet.java
index 763d4611946f8c24b25510d1e81523c761041b96..4755623f1c0c0f4c272ca7ab6028661ea9123e6d 100644
--- a/src/main/java/org/olat/ims/qti/export/QTIExportSet.java
+++ b/src/main/java/org/olat/ims/qti/export/QTIExportSet.java
@@ -64,7 +64,10 @@ public class QTIExportSet {
 	}
 	
 	public boolean getIsPassed(){
-		return qtir.getResultSet().getIsPassed();
+		//<OLATCE-982>
+		Boolean passed = qtir.getResultSet().getIsPassed();
+		return passed!=null?passed:false;
+		//</OLATCE-982>
 	}
 	
 	public String getIp(){
diff --git a/src/main/java/org/olat/repository/controllers/AddFileResourceController.java b/src/main/java/org/olat/repository/controllers/AddFileResourceController.java
index 096272c0eb6370896fccfbbee9516ec1208cbf90..ecbef0f64008228c52497ddf99485cb5bcdb3d40 100644
--- a/src/main/java/org/olat/repository/controllers/AddFileResourceController.java
+++ b/src/main/java/org/olat/repository/controllers/AddFileResourceController.java
@@ -44,8 +44,11 @@ import org.olat.core.util.vfs.filters.VFSItemFileTypeFilter;
 import org.olat.fileresource.FileResourceManager;
 import org.olat.fileresource.types.AddingResourceException;
 import org.olat.fileresource.types.FileResource;
+import org.olat.ims.qti.fileresource.SurveyFileResource;
 import org.olat.repository.RepositoryEntry;
 
+import de.bps.onyx.plugin.OnyxModule;
+
 /**
  * <!--**************-->
  * <h3>Responsability:</h3>
@@ -201,7 +204,13 @@ public class AddFileResourceController extends BasicController implements IAddCo
 					return;
 				}
 				try {				
-					newFileResource = frm.addFileResource(f, fName);
+				// <OLATCE-72>
+					if (limitTypes != null && limitTypes.size() > 0 && limitTypes.get(0).equals(SurveyFileResource.TYPE_NAME) && OnyxModule.isOnyxTest(f)) {
+						newFileResource = frm.addFileResource(f, fName, new SurveyFileResource());
+					}else{
+						newFileResource = frm.addFileResource(f, fName);
+					}
+				// </OLATCE-72>
 				} catch (AddingResourceException e) {
 					showError(e.getErrorKey());
 					addCallback.failed(urequest);
diff --git a/src/main/resources/serviceconfig/olat.properties b/src/main/resources/serviceconfig/olat.properties
index 145606dd3546cedc322c4d1bf992942b7d41132f..225be8c46225730e293c05cc128d9717176acee5 100644
--- a/src/main/resources/serviceconfig/olat.properties
+++ b/src/main/resources/serviceconfig/olat.properties
@@ -200,13 +200,17 @@ onyx.truststore.type=JKS
 #####
 # Onyx Reporter Webservice
 #####
-onyx.reporter.webservice=http://onyx.bps-system.de/reporter/services/onyx_reporter
+onyx.reporter.webservice=http://next.bps-system.de/onyx/reporterservices
 onyx.update.results.job=disabled
 
 #####
 # Onyx Plugin
 #####
 onyx.plugin.wslocation=http://onyx.bps-system.de/plugin
+# <OLATCE-713>
+onyx.plugin.userviewlocation=${onyx.plugin.wslocation}/onyxrun
+onyx.reporter.userviewlocation=
+# <OLATCE-713>
 onyx.plugin.configname=[yourregisteredname]
 
 ########################################################################
diff --git a/src/main/webapp/static/themes/default/all/brasato.css b/src/main/webapp/static/themes/default/all/brasato.css
index 21f46824d3f515bdbe7a21d8918568bf95f9caaf..b9f805378bfff3755e9a2b53b2c7309d0091c961 100644
--- a/src/main/webapp/static/themes/default/all/brasato.css
+++ b/src/main/webapp/static/themes/default/all/brasato.css
@@ -179,6 +179,14 @@
 	input.b_checkbox, input.b_radio { height: 1em; width: 1em; border: 0; margin: 0 2px 0 0;}
 	label.b_checkbox_label, label.b_radio_label { padding-left: 0.5em; }
 	div.b_form div.b_form_element div.b_form_example{ display: inline; font-size: 80%; color: #504D4E;}
+	/*<OLATCE-1012>*/
+	body#b_body .b_form .b_form_element_wrapper .b_form_element .onyx_passed_warning {
+	color: #504D4E;
+    font-size: 90%;
+	background: url(../images/icons/exclamation-small.png) no-repeat 0 -1px transparent;
+	padding-left: 16px;
+	}
+	/*</OLATCE-1012>*/
 	.b_inline_editable { padding: 1px 20px 1px 0; vertical-align: middle; min-height: 16px; }
 	.b_inline_editable:hover { background-position: 100% 50%; background-repeat: no-repeat; background-image: url(../images/brasato/page_edit_tiny.png);}
 	/* disabled form elements */
diff --git a/src/main/webapp/static/themes/default/all/olat.css b/src/main/webapp/static/themes/default/all/olat.css
index fe2b6375ec195f2b338dcc1c46adfaeebc423fd6..5984ec5b4b578320ecc935ca34504424bebc3f0e 100644
--- a/src/main/webapp/static/themes/default/all/olat.css
+++ b/src/main/webapp/static/themes/default/all/olat.css
@@ -271,6 +271,10 @@
 	.o_course_editor_publish {}
 	.o_course_editor_publish .o_course_editor_categories { padding-top: 10px; }
 	
+	/* <OLATCE-99> */
+	iframe.onyx_iframe { height:920px; width: 100%; border:none; }
+	/* </OLATCE-99> */
+	
 	span.o_passed { background: url(../images/olat/tick.png) no-repeat right 50%; padding: 0 25px 0 0; color: #009900 }
 	span.o_notpassed { background: url(../images/olat/cross.png) no-repeat right 50%; padding: 0 25px 0 0; color: #990000 }