Skip to content
Snippets Groups Projects
Commit 43ae50e7 authored by Thomas Roos's avatar Thomas Roos
Browse files

Show statistics summary

parent 428e4f85
No related branches found
No related tags found
No related merge requests found
...@@ -128,7 +128,7 @@ class App extends React.Component { ...@@ -128,7 +128,7 @@ class App extends React.Component {
exam.submissions.length ? <Grade exam={exam} updateSubmission={this.updateSubmission}/> : <Fail message="No exams uploaded. Please do not bookmark URLs" /> exam.submissions.length ? <Grade exam={exam} updateSubmission={this.updateSubmission}/> : <Fail message="No exams uploaded. Please do not bookmark URLs" />
)} /> )} />
<Route path="/statistics" render={() => ( <Route path="/statistics" render={() => (
exam.submissions.length ? <Statistics /> : <Fail message="No exams uploaded. Please do not bookmark URLs" /> exam.submissions.length ? <Statistics exam={exam} /> : <Fail message="No exams uploaded. Please do not bookmark URLs" />
)} /> )} />
<Route path="/graders" component={Graders} /> <Route path="/graders" component={Graders} />
<Route path="/reset" component={Reset} /> <Route path="/reset" component={Reset} />
......
...@@ -2,16 +2,30 @@ import React from 'react'; ...@@ -2,16 +2,30 @@ import React from 'react';
import Hero from '../components/Hero.jsx'; import Hero from '../components/Hero.jsx';
const StatisticsDashboard = () => { class Statistics extends React.Component {
return (
<div>
<Hero title='Statistics Dashboard' subtitle='Review the grading' /> render() {
return (
<div>
<h1>React Router demo</h1> <Hero title='Statistics' subtitle="Analyse how to the exam was made" />
<section className="section">
<div className="container">
<figure className="image is-4by3">
<img src={'api/images/summary/' + this.props.exam.id} />
</figure>
</div>
</section>
</div >
)
}
</div>
)
} }
export default StatisticsDashboard; export default Statistics;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment