status of tutorial and belonging tasks
This commit is contained in:
@@ -13,20 +13,26 @@ import Typography from '@material-ui/core/Typography';
|
||||
class Assessment extends Component {
|
||||
|
||||
render() {
|
||||
var currentTutorialId = this.props.currentTutorialId;
|
||||
var step = this.props.step
|
||||
var tutorialId = this.props.currentTutorialId;
|
||||
var steps = this.props.steps;
|
||||
var currentTask = this.props.step;
|
||||
var tasks = steps.filter(task => task.type === 'task');
|
||||
var taskIndex = tasks.indexOf(currentTask);
|
||||
var status = this.props.status.filter(status => status.id === tutorialId)[0];
|
||||
var statusTask = status.tasks[taskIndex]
|
||||
|
||||
return (
|
||||
<div style={{width: '100%'}}>
|
||||
<Typography variant='h4' style={{marginBottom: '5px'}}>{step.headline}</Typography>
|
||||
<Typography variant='h4' style={{marginBottom: '5px'}}>{currentTask.headline}</Typography>
|
||||
<Grid container spacing={2} style={{marginBottom: '5px'}}>
|
||||
<Grid item xs={12} md={6} lg={8} style={{ position: 'relative' }}>
|
||||
<SolutionCheck />
|
||||
<BlocklyWindow initialXml={this.props.status[currentTutorialId].xml ? this.props.status[currentTutorialId].xml : null}/>
|
||||
<BlocklyWindow initialXml={statusTask.xml ? statusTask.xml : null}/>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={6} lg={4}>
|
||||
<Card style={{height: 'calc(50% - 30px)', padding: '10px', marginBottom: '10px'}}>
|
||||
<Typography variant='h5'>Arbeitsauftrag</Typography>
|
||||
<Typography>{step.text1}</Typography>
|
||||
<Typography>{currentTask.text1}</Typography>
|
||||
</Card>
|
||||
<div style={{height: '50%'}}>
|
||||
<CodeViewer />
|
||||
|
||||
Reference in New Issue
Block a user