Enable answer count and [FIX] option copying
Add option to display number of answers to current prompt and ensure test options get copied to new tests that are created at the end of an existing test (with the restart test/restart test with incorrect buttons)
This commit is contained in:
@@ -72,6 +72,7 @@ export default withRouter(class LoggedInHome extends React.Component {
|
||||
sliderValue: 1,
|
||||
switchLanguage: false,
|
||||
ignoreCaps: false,
|
||||
showNumberOfAnswers: false,
|
||||
totalTestQuestions: 1,
|
||||
pendingDeletions: {},
|
||||
};
|
||||
@@ -200,6 +201,7 @@ export default withRouter(class LoggedInHome extends React.Component {
|
||||
mode: mode,
|
||||
limit: this.state.sliderValue,
|
||||
ignoreCaps: this.state.ignoreCaps,
|
||||
showNumberOfAnswers: this.state.showNumberOfAnswers,
|
||||
}).then((result) => {
|
||||
const progressId = result.data;
|
||||
this.stopLoading();
|
||||
@@ -358,6 +360,12 @@ export default withRouter(class LoggedInHome extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
handleShowNumberOfAnswersChange = (event) => {
|
||||
this.setState({
|
||||
showNumberOfAnswers: event.target.checked,
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
@@ -578,8 +586,10 @@ export default withRouter(class LoggedInHome extends React.Component {
|
||||
onSliderChange={this.changeSliderValue}
|
||||
switchLanguage={this.state.switchLanguage}
|
||||
ignoreCaps={this.state.ignoreCaps}
|
||||
showNumberOfAnswers={this.state.showNumberOfAnswers}
|
||||
handleSwitchLanguageChange={this.handleSwitchLanguageChange}
|
||||
handleIgnoreCapsChange={this.handleIgnoreCapsChange}
|
||||
handleShowNumberOfAnswersChange={this.handleShowNumberOfAnswersChange}
|
||||
loading={this.state.loading}
|
||||
/>
|
||||
}
|
||||
@@ -593,8 +603,10 @@ export default withRouter(class LoggedInHome extends React.Component {
|
||||
onSliderChange={this.changeSliderValue}
|
||||
switchLanguage={this.state.switchLanguage}
|
||||
ignoreCaps={this.state.ignoreCaps}
|
||||
showNumberOfAnswers={this.state.showNumberOfAnswers}
|
||||
handleSwitchLanguageChange={this.handleSwitchLanguageChange}
|
||||
handleIgnoreCapsChange={this.handleIgnoreCapsChange}
|
||||
handleShowNumberOfAnswersChange={this.handleShowNumberOfAnswersChange}
|
||||
loading={this.state.loading}
|
||||
/>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user