Skip to content

Commit

Permalink
Rename contest leaderboard to score leaderboard (#2779)
Browse files Browse the repository at this point in the history
* Rename contest leaderboard to score leaderboard

* Modify tests

* Update snapshots
  • Loading branch information
jayjay19630 authored Feb 13, 2024
1 parent 286a883 commit 1208290
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/commons/assessment/AssessmentTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export interface IContestVotingQuestion extends BaseQuestion {
prepend: string;
postpend: string;
contestEntries: ContestEntry[];
contestLeaderboard: ContestEntry[];
scoreLeaderboard: ContestEntry[];
type: 'voting';
}

Expand Down
6 changes: 3 additions & 3 deletions src/commons/assessmentWorkspace/AssessmentWorkspace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,15 +444,15 @@ const AssessmentWorkspace: React.FC<AssessmentWorkspaceProps> = props => {
id: SideContentType.contestVoting
},
{
label: 'Contest Leaderboard',
label: 'Score Leaderboard',
iconName: IconNames.CROWN,
body: (
<SideContentContestLeaderboard
handleContestEntryClick={handleContestEntryClick}
orderedContestEntries={(question as IContestVotingQuestion)?.contestLeaderboard ?? []}
orderedContestEntries={(question as IContestVotingQuestion)?.scoreLeaderboard ?? []}
/>
),
id: SideContentType.contestLeaderboard
id: SideContentType.scoreLeaderboard
}
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,13 @@ exports[`AssessmentWorkspace AssessmentWorkspace page with ContestVoting questio
</span>
</div>
<div
aria-controls="bp5-tab-panel_side-content-tabs_contest_leaderboard"
aria-controls="bp5-tab-panel_side-content-tabs_score_leaderboard"
aria-disabled="false"
aria-expanded="false"
aria-selected="false"
class="bp5-tab side-content-tab"
data-tab-id="contest_leaderboard"
id="bp5-tab-title_side-content-tabs_contest_leaderboard"
data-tab-id="score_leaderboard"
id="bp5-tab-title_side-content-tabs_score_leaderboard"
role="tab"
tabindex="-1"
>
Expand All @@ -486,7 +486,7 @@ exports[`AssessmentWorkspace AssessmentWorkspace page with ContestVoting questio
<div
aria-expanded="false"
class="side-content-tooltip"
id="contest_leaderboard-icon"
id="score_leaderboard-icon"
tabindex="0"
>
<span
Expand Down Expand Up @@ -735,9 +735,9 @@ exports[`AssessmentWorkspace AssessmentWorkspace page with ContestVoting questio
</div>
<div
aria-hidden="true"
aria-labelledby="bp5-tab-title_side-content-tabs_contest_leaderboard"
aria-labelledby="bp5-tab-title_side-content-tabs_score_leaderboard"
class="bp5-tab-panel side-content-tab"
id="bp5-tab-panel_side-content-tabs_contest_leaderboard"
id="bp5-tab-panel_side-content-tabs_score_leaderboard"
role="tabpanel"
>
<div
Expand Down Expand Up @@ -771,7 +771,7 @@ exports[`AssessmentWorkspace AssessmentWorkspace page with ContestVoting questio
class="bp5-button-text"
>
<span>
Contest Leaderboard
Score Leaderboard
</span>
<span
class="bp5-popover-target"
Expand Down
2 changes: 1 addition & 1 deletion src/commons/mocks/AssessmentMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ const mockContestEntryQuestion: Array<IContestVotingQuestion> = [
answer: { code: 'function voting_test() { return true; }' }
}
],
contestLeaderboard: [
scoreLeaderboard: [
{
submission_id: 1,
student_name: 'student_1',
Expand Down
2 changes: 1 addition & 1 deletion src/commons/sideContent/SideContentContestLeaderboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const SideContentContestLeaderboard: React.FunctionComponent<
minimal={true}
onClick={() => setShowLeaderboard(!showLeaderboard)}
>
<span>Contest Leaderboard</span>
<span>Score Leaderboard</span>
<Tooltip2 content={contestLeaderboardTooltipContent}>
<Icon icon={IconNames.HELP} />
</Tooltip2>
Expand Down
2 changes: 1 addition & 1 deletion src/commons/sideContent/SideContentTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum SideContentType {
autograder = 'autograder',
briefing = 'briefing',
contestVoting = 'contest_voting',
contestLeaderboard = 'contest_leaderboard',
scoreLeaderboard = 'score_leaderboard',
dataVisualizer = 'data_visualizer',
editorGrading = 'editor_grading',
editorAutograder = 'editor_autograder',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`SideContentContestLeaderboard matches snapshot 1`] = `
onClick={[Function]}
>
<span>
Contest Leaderboard
Score Leaderboard
</span>
<Blueprint5.Tooltip
compact={false}
Expand Down

0 comments on commit 1208290

Please sign in to comment.