Skip to content

Commit 2901c34

Browse files
committed
Show the number of locked students on the Exam page during the exam.
1 parent aa8faef commit 2901c34

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

src/components/widgets/Box/Box.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class Box extends Component {
8585
<Card.Title className={flexTitle ? 'd-flex justify-content-between float-none' : null}>
8686
{title}
8787

88-
<span className="whenTargetted text-warning">
88+
<span className="whenTargeted text-warning">
8989
<Icon
9090
icon="highlighter"
9191
gapLeft={2}

src/containers/App/recodex.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,11 +234,11 @@ a:focus {
234234
}
235235

236236

237-
.whenTargetted {
237+
.whenTargeted {
238238
display: none;
239239
}
240240

241-
:target .whenTargetted {
241+
:target .whenTargeted {
242242
display: initial;
243243
}
244244

src/pages/GroupExams/GroupExams.js

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -159,17 +159,30 @@ class GroupExams extends Component {
159159
<Col xs={12}>
160160
<Box
161161
title={
162-
this.state.examInProgress ? (
163-
<FormattedMessage
164-
id="app.groupExams.studentsBoxTitle"
165-
defaultMessage="Participating students"
166-
/>
167-
) : (
168-
<FormattedMessage
169-
id="app.groupExams.locksBoxTitle"
170-
defaultMessage="Recorded student locking events"
171-
/>
172-
)
162+
<>
163+
{this.state.examInProgress ? (
164+
<FormattedMessage
165+
id="app.groupExams.studentsBoxTitle"
166+
defaultMessage="Participating students"
167+
/>
168+
) : (
169+
<FormattedMessage
170+
id="app.groupExams.locksBoxTitle"
171+
defaultMessage="Recorded student locking events"
172+
/>
173+
)}
174+
</>
175+
}
176+
customIcons={
177+
this.state.examInProgress && lockedStudents && lockedStudents.length >= 0 ? (
178+
<small className="text-body-secondary opacity-50 me-3">
179+
<FormattedMessage
180+
id="app.groupExams.studentsCount"
181+
defaultMessage="({count, plural, one {# student} other {# students}})"
182+
values={{ count: lockedStudents ? lockedStudents.length : 0 }}
183+
/>
184+
</small>
185+
) : null
173186
}
174187
noPadding
175188
unlimitedHeight>

0 commit comments

Comments
 (0)