Skip to content

Commit

Permalink
Failed solutions can be accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
SemaiCZE committed Nov 2, 2017
1 parent 40b6d17 commit c00e6df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const AssignmentStatusIcon = ({ id, status, accepted = false }) => {
return (
<Status
id={id}
accepted={accepted}
icon={<Icon name="thumbs-o-down" className="text-red" />}
message={
<FormattedMessage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ const FailedSubmissionTableRow = ({
note,
submittedAt,
maxPoints,
evaluation: { score, points, bonusPoints }
}) => (
evaluation: { score, points, bonusPoints },
accepted
}) =>
<tr>
<td><AssignmentStatusIcon id={link} status="failed" /></td>
<td>
<AssignmentStatusIcon id={link} status="failed" accepted={accepted} />
</td>
<td>
<FormattedDate value={submittedAt * 1000} />
&nbsp;
Expand Down Expand Up @@ -49,8 +52,7 @@ const FailedSubmissionTableRow = ({
/>
</Link>
</td>
</tr>
);
</tr>;

FailedSubmissionTableRow.propTypes = {
link: PropTypes.string.isRequired,
Expand All @@ -60,7 +62,8 @@ FailedSubmissionTableRow.propTypes = {
evaluation: PropTypes.shape({
score: PropTypes.number.isRequired,
points: PropTypes.number.isRequired
}).isRequired
}).isRequired,
accepted: PropTypes.bool
};

export default FailedSubmissionTableRow;

0 comments on commit c00e6df

Please sign in to comment.