Skip to content

Commit 2d0b960

Browse files
authored
Merge branch 'master' into leaderboard
2 parents e6f590f + 7c1892f commit 2d0b960

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

src/features/cseMachine/CseMachineUtils.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,15 @@ export function getControlItemComponent(
817817
unhighlightOnHover,
818818
topItem
819819
);
820+
case InstrType.CONTINUE:
821+
return new ControlItemComponent(
822+
'continue',
823+
'Control items until continue marker will be skipped',
824+
stackHeight,
825+
highlightOnHover,
826+
unhighlightOnHover,
827+
topItem
828+
);
820829
case InstrType.CONTINUE_MARKER:
821830
return new ControlItemComponent(
822831
'cont mark',

src/pages/academy/grading/Grading.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import GradingSubmissionsTable from './subcomponents/GradingSubmissionsTable';
2525
import GradingWorkspace from './subcomponents/GradingWorkspace';
2626

2727
const groupOptions = [
28-
{ value: false, label: 'my groups' },
29-
{ value: true, label: 'all groups' }
28+
{ value: true, label: 'my groups' },
29+
{ value: false, label: 'all groups' }
3030
];
3131

3232
const showOptions = [
@@ -46,7 +46,7 @@ const Grading: React.FC = () => {
4646
const params = useParams<{ submissionId: string; questionId: string }>();
4747

4848
const isAdmin = role === Role.Admin;
49-
const [showAllGroups, setShowAllGroups] = useState(isAdmin || group === null);
49+
const [showUserGroups, setShowUserGroups] = useState(!isAdmin && group !== null);
5050

5151
const [pageSize, setPageSize] = useState(10);
5252
const [showAllSubmissions, setShowAllSubmissions] = useState(false);
@@ -71,23 +71,23 @@ const Grading: React.FC = () => {
7171
dispatch(WorkspaceActions.increaseRequestCounter());
7272
dispatch(
7373
SessionActions.fetchGradingOverviews(
74-
!showAllGroups,
74+
showUserGroups,
7575
unpublishedToBackendParams(showAllSubmissions),
7676
paginationToBackendParams(page, pageSize),
7777
filterParams,
7878
allColsSortStates
7979
)
8080
);
8181
},
82-
[dispatch, showAllGroups, showAllSubmissions, pageSize, allColsSortStates]
82+
[dispatch, showUserGroups, showAllSubmissions, pageSize, allColsSortStates]
8383
);
8484

8585
useEffect(() => {
8686
if (refreshQueried) {
8787
dispatch(WorkspaceActions.increaseRequestCounter());
8888
dispatch(
8989
SessionActions.fetchGradingOverviews(
90-
showAllGroups,
90+
showUserGroups,
9191
unpublishedToBackendParams(showAllSubmissions),
9292
paginationToBackendParams(refreshQueryData.page, pageSize),
9393
refreshQueryData.filterParams,
@@ -98,7 +98,7 @@ const Grading: React.FC = () => {
9898
}
9999
}, [
100100
dispatch,
101-
showAllGroups,
101+
showUserGroups,
102102
showAllSubmissions,
103103
pageSize,
104104
allColsSortStates,
@@ -152,7 +152,7 @@ const Grading: React.FC = () => {
152152
<ContentDisplay
153153
loadContentDispatch={() => {
154154
if (!hasLoadedBefore) {
155-
dispatch(SessionActions.fetchGradingOverviews(showAllGroups));
155+
dispatch(SessionActions.fetchGradingOverviews(showUserGroups));
156156
}
157157
}}
158158
display={
@@ -196,8 +196,8 @@ const Grading: React.FC = () => {
196196
<GradingText>submissions from</GradingText>
197197
<SimpleDropdown
198198
options={groupOptions}
199-
selectedValue={showAllGroups}
200-
onClick={setShowAllGroups}
199+
selectedValue={showUserGroups}
200+
onClick={setShowUserGroups}
201201
popoverProps={{ position: Position.BOTTOM }}
202202
buttonProps={{ minimal: true, rightIcon: 'caret-down' }}
203203
/>

0 commit comments

Comments
 (0)