diff --git a/src/components/Gradebook/gradebook.scss b/src/components/Gradebook/gradebook.scss index 8b36643..8fadb01 100644 --- a/src/components/Gradebook/gradebook.scss +++ b/src/components/Gradebook/gradebook.scss @@ -84,24 +84,15 @@ } .table tr th:first-child { - position: absolute; - width: 160px; - height: 50px; - display: block; border-bottom: none; } + .table tr th:first-child, .table tr td:first-child { - position: absolute; + position: sticky; width: 160px; - height: 50px; - display: block; - } - .table tr td:nth-child(2) { - box-sizing: content-box; - padding-left: 170px; - } - .table tr th:nth-child(2) { - padding-left: 170px; + left: 0; + z-index: 1; // to float over the following children in the side-scrolling case + background: white; } .table tbody th { diff --git a/src/components/Gradebook/index.jsx b/src/components/Gradebook/index.jsx index e0785cf..93aedf5 100644 --- a/src/components/Gradebook/index.jsx +++ b/src/components/Gradebook/index.jsx @@ -383,7 +383,14 @@ export default class Gradebook extends React.Component { formatter = { percent: (entries, areGradesFrozen) => entries.map((entry) => { const learnerInformation = this.getLearnerInformation(entry); - const results = { Username: learnerInformation, Email: entry.email }; + const results = { + Username: ( +
{learnerInformation}
+ ), + Email: ( + {entry.email} + ), + }; const assignments = entry.section_breakdown .reduce((acc, subsection) => { @@ -406,7 +413,14 @@ export default class Gradebook extends React.Component { absolute: (entries, areGradesFrozen) => entries.map((entry) => { const learnerInformation = this.getLearnerInformation(entry); - const results = { Username: learnerInformation, Email: entry.email }; + const results = { + Username: ( +
{learnerInformation}
+ ), + Email: ( + {entry.email} + ), + }; const assignments = entry.section_breakdown .reduce((acc, subsection) => { @@ -445,14 +459,18 @@ export default class Gradebook extends React.Component { const userInformationHeadingLabel = (
Username
-
Student Key
+
Student Key*
); + const emailHeadingLabel = 'Email*'; - headings = headings.map(heading => ({ label: heading, key: heading })); + headings = headings.map(heading => ({ label: heading, key: heading, width: 'col' })); // replace username heading label to include additional user data headings[0].label = userInformationHeadingLabel; + headings[0].width = 'col-2'; + headings[1].label = emailHeadingLabel; + headings[1].width = 'col-2'; } return headings; @@ -631,8 +649,8 @@ export default class Gradebook extends React.Component { state={this.props.showSpinner ? 'pending' : 'default'} className="ml-2" labels={{ - default: 'Interventions', - pending: 'Interventions', + default: 'Interventions*', + pending: 'Interventions*', }} icons={{ default: , @@ -652,10 +670,12 @@ export default class Gradebook extends React.Component { this.props.areGradesFrozen, )} rowHeaderColumnKey="username" + hasFixedColumnWidths /> {PageButtons(this.props)} +

* available for learners in the Master's track only