diff --git a/client/index.jsx b/client/index.jsx index f68e6f890e39d7973915d4ef269e0c68e50505fb..ca21444da069fd9e57cd6b70abb8bbb6ad23cf7e 100644 --- a/client/index.jsx +++ b/client/index.jsx @@ -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" /> )} /> <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="/reset" component={Reset} /> diff --git a/client/views/Statistics.jsx b/client/views/Statistics.jsx index 756e617ddca6893fe6b4d82d17e96cb56ba8f73c..78e8f991960fe55ffb68d3ffc128856c4a3e4440 100644 --- a/client/views/Statistics.jsx +++ b/client/views/Statistics.jsx @@ -2,16 +2,30 @@ import React from 'react'; import Hero from '../components/Hero.jsx'; -const StatisticsDashboard = () => { - return ( - <div> +class Statistics extends React.Component { - <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;