Skip to content

Commit

Permalink
feat: Added 3 new columns in module activity report.
Browse files Browse the repository at this point in the history
  • Loading branch information
saleem-latif committed Feb 25, 2025
1 parent da16b85 commit 57282e0
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/components/Admin/tabs/ModuleActivityReport.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,30 @@ const ModuleActivityReport = ({ enterpriseId }) => {
}),
accessor: 'log_viewed',
},
{
Header: intl.formatMessage({
id: 'adminPortal.LPR.moduleActivityReport.table.header.learningOutcomesBefore',
defaultMessage: 'Learning Outcomes: Before',
description: 'Header for the learning outcomes before the user has started the course column in the module activity report table',
}),
accessor: 'avg_before_lo_score',
},
{
Header: intl.formatMessage({
id: 'adminPortal.LPR.moduleActivityReport.table.header.learningOutcomesAfter',
defaultMessage: 'Learning Outcomes: After',
description: 'Header for the learning outcomes after the user has completed the course column in the module activity report table',
}),
accessor: 'avg_after_lo_score',
},
{
Header: intl.formatMessage({
id: 'adminPortal.LPR.moduleActivityReport.table.header.learningOutcomesPercentageDifference',
defaultMessage: 'Learning Outcomes % Difference',
description: 'Header for the learning outcomes percentage difference for learning outcome before and after the course column in the module activity report table',
}),
accessor: 'avg_lo_percentage_difference',
},
]}
tableActions={[
<DownloadCsvButton
Expand Down
6 changes: 6 additions & 0 deletions src/components/Admin/tabs/ModuleActivityReport.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const getMockData = ({ count }) => {
percentage_completed_activities: `${(i % 100)}%`,
hours_online: `${i} Hours Online`,
log_viewed: `${i} Log Views`,
avg_before_lo_score: 3.00,
avg_after_lo_score: 5.00,
avg_lo_percentage_difference: 50,
});
}
return data;
Expand Down Expand Up @@ -59,5 +62,8 @@ describe('ModuleActivityReport', () => {
expect(screen.getByText('% Activities Complete')).toBeInTheDocument();
expect(screen.getByText('Learning Hours')).toBeInTheDocument();
expect(screen.getByText('Log Views')).toBeInTheDocument();
expect(screen.getByText('Learning Outcomes: Before')).toBeInTheDocument();
expect(screen.getByText('Learning Outcomes: After')).toBeInTheDocument();
expect(screen.getByText('Learning Outcomes % Difference')).toBeInTheDocument();
});
});

0 comments on commit 57282e0

Please sign in to comment.