Commit f7e762d3 authored by Oruluk's avatar Oruluk

Basic embedding of LimeSurvey

parent 49df1fe8
......@@ -13,6 +13,7 @@ class SurveyScreen extends React.Component {
sessionId: this.props.match.params.sessionId,
blockId: this.props.match.params.blockId,
userId: this.props.viewer.user.id,
iframeLoadCount: 0,
}
onSubmitHandler = (ev) => {
......@@ -21,13 +22,19 @@ class SurveyScreen extends React.Component {
// this.props.router.push(nextScreen);
}
onLoadChange = (x) => {
var nextScreen = `/done/${this.state.sessionId}/${this.state.blockId}`
//this.props.router.push(nextScreen);
const iframeLoadCount = this.state.iframeLoadCount + 1
this.setState({iframeLoadCount: iframeLoadCount})
console.log(this.state.iframeLoadCount)
// dirty hack
if (iframeLoadCount == 2){
var nextScreen = `/done/${this.state.sessionId}/${this.state.blockId}`
this.props.router.push(nextScreen);
}
}
render() {
const lime_src = "https://experiment123.limequery.com/464639?lang=en&id="+this.state.sessionId+"|"+this.state.blockId
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment