diff --git a/src/components/Tutorial/Builder/BlocklyExample.js b/src/components/Tutorial/Builder/BlocklyExample.js index 18050c4..f93a282 100644 --- a/src/components/Tutorial/Builder/BlocklyExample.js +++ b/src/components/Tutorial/Builder/BlocklyExample.js @@ -86,7 +86,7 @@ class BlocklyExample extends Component { } if(!this.props.task){ // instruction can also display only one block, which does not necessarily - // have to be the initial block + // have to be the initial block xml = xml.replace('deletable="false"', 'deletable="true"'); } this.setState({xml: xml}); @@ -100,6 +100,7 @@ class BlocklyExample extends Component { var oldValue = this.state.checked; this.setState({checked: value}); if(oldValue !== value && !value){ + this.props.deleteError(this.props.index, 'xml'); this.props.deleteProperty(this.props.index, 'xml'); } } diff --git a/src/components/Tutorial/Builder/Id.js b/src/components/Tutorial/Builder/Id.js index 08d8aab..ad18dc2 100644 --- a/src/components/Tutorial/Builder/Id.js +++ b/src/components/Tutorial/Builder/Id.js @@ -48,7 +48,7 @@ class Id extends Component { else if(this.props.error){ this.props.deleteError(undefined, 'id'); } - if(!this.props.value){ + if(!this.props.value || !Number.isInteger(this.props.value)){ this.props.tutorialId(0+step); } else {