Skip to content

Commit

Permalink
Format teacher view sum column as decimal
Browse files Browse the repository at this point in the history
  • Loading branch information
cxcorp authored Apr 10, 2019
1 parent dd2090e commit 79b1718
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions labtool2.0/src/components/pages/CoursePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -664,12 +664,12 @@ export class CoursePage extends React.Component {
</Table.Cell>
{createIndents(data.weeks, data.codeReviews, data.id)}
<Table.Cell>
{data.weeks.map(week => week.points).reduce((a, b) => {
{(data.weeks.map(week => week.points).reduce((a, b) => {
return a + b
}, 0) +
data.codeReviews.map(cr => cr.points).reduce((a, b) => {
return a + b
}, 0)}
}, 0)).toFixed(2).replace(/[.,]00$/, '')}
</Table.Cell>
<Table.Cell>
{data.teacherInstanceId && this.props.selectedInstance.teacherInstances ? (
Expand Down

0 comments on commit 79b1718

Please sign in to comment.