Commit 7b29fe4b authored by Anton Akhmerov's avatar Anton Akhmerov

Merge branch 'multiple-submissions-message' into 'master'

Add a message when student has multiple submissions

Closes #281

See merge request !117
parents 870b3c6a 299c8d4e
Pipeline #14492 passed with stages
in 2 minutes and 50 seconds
......@@ -121,6 +121,9 @@ class Grade extends React.Component {
const solution = submission.problems[this.state.pIndex]
const problem = exam.problems[this.state.pIndex]
const progress = exam.submissions.map(sub => sub.problems[this.state.pIndex])
const multiple = submission.student && exam.submissions.some(sub =>
(sub.id !== submission.id && sub.student && sub.student.id === submission.student.id)
)
return (
<div>
......@@ -198,6 +201,15 @@ class Grade extends React.Component {
<ProgressBar progress={progress} value={'graded_by'} />
{multiple
? <article className='message is-info'>
<div className='message-body'>
This student has multiple submissions!
Make sure that each applicable feedback option is only selected once.
</div>
</article> : null
}
<p className='box'>
<img src={exam.id ? ('api/images/solutions/' + exam.id + '/' +
problem.id + '/' + submission.id + '/' + (this.state.fullPage ? '1' : '0')) + '?' +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment