/// <summary> /// Method for deserialization of a XML-String to the coressponding QuestionnaireData. /// </summary> /// /// <param name="str"> String containing the XML-QuestionnaireData for deserialization. </param> /// /// <returns> /// QuestionnaireData-type coressponding to the parameter "str" after deserialization. /// </returns> internal QuestionnaireData getQuestionnaireDataFromXmlString(String str) { XmlSerializer serializer = new XmlSerializer(typeof(QuestionnaireData)); using (TextReader reader = new StringReader(str)) { QuestionnaireData result = (QuestionnaireData)serializer.Deserialize(reader); return(result); } }
/// <summary> /// Method for storing Questionnaire data as html in a File. /// </summary> /// /// <param name="qd"> Questionnaire data to store. </param> /// <param name="fileId"> String containing the file identification. </param> internal void writeQuestionnaireDataToHTMLFile(QuestionnaireData qd, String fileId) { IDataStorage ids = PlayerProfilingAsset.Instance.getInterfaceFromAsset <IDataStorage>(); if (ids != null) { loggingPPA("Storing Questionnaire data to HTML File."); //testid given from program! ids.Save(fileId, qd.toHTMLString("testid")); } else { loggingPPA("No IDataStorage - Bridge implemented!", Severity.Warning); } }