Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grading Overview: TS/Tremor -> AG/Blueprint Migration #2893

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
97a1ae4
added filterable columns in grading overview
InfinityTwo Feb 28, 2024
567a471
some cleanup code
InfinityTwo Feb 28, 2024
0c5df89
merge conflicts
InfinityTwo Mar 6, 2024
5a5eaab
moved some grading overview FE components from tremor to blueprint
InfinityTwo Mar 6, 2024
852da3c
missing code from previous commit
InfinityTwo Mar 6, 2024
c4f0ddf
halfway done for porting tanstack/tremor to ag grid/blueprint
InfinityTwo Mar 13, 2024
34f8d9a
Merge pull request #4 from InfinityTwo/grading-filterable-columns
InfinityTwo Mar 13, 2024
b22cb6f
more changes to grading table - animation whilst loading, filter/edit…
InfinityTwo Mar 20, 2024
30014c8
Merge pull request #5 from InfinityTwo/grading-filterable-columns
InfinityTwo Mar 20, 2024
63932c6
code refactoring
InfinityTwo Mar 23, 2024
5a4eb0d
Merge pull request #6 from InfinityTwo/grading-filterable-columns
InfinityTwo Mar 23, 2024
de27b6d
filterable columns, backend sorting shell, and some partial removal o…
InfinityTwo Mar 26, 2024
48684a5
more component migrations, refactoring and preparation for backend sort
InfinityTwo Mar 27, 2024
1e7eafc
multi -> single sorting, moved over all ts/tremor components to ag/bp…
InfinityTwo Mar 30, 2024
f7021b0
fix table cutoff on small horizontal resolution and missing hover eff…
InfinityTwo Mar 30, 2024
e54fe6e
refresh button for table
InfinityTwo Mar 30, 2024
6ae6df5
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Apr 1, 2024
c16e3ae
fixed richard's comments (mostly), and added a fix for josh's comment…
InfinityTwo Apr 3, 2024
d1d4a09
fixed edge case of attempted/submitted on filter from prev commit
InfinityTwo Apr 3, 2024
2db1749
mock files, change josh's pr 2nd issue to remove non-submitted filter…
InfinityTwo Apr 3, 2024
83f00cf
fixed wrong username and text overflow
InfinityTwo Apr 3, 2024
f1f8652
eslint
InfinityTwo Apr 6, 2024
2ed0eec
prettier checks
InfinityTwo Apr 6, 2024
2d5cae3
Merge branch 'source-academy:master' into grading-overview-ag-bp-migr…
InfinityTwo Apr 6, 2024
886c976
backend mock changes
InfinityTwo Apr 6, 2024
d901660
minor adjustments and cleanups
InfinityTwo Apr 6, 2024
768cb8a
minor ui adjustments for better mobile compatability
InfinityTwo Apr 6, 2024
20fe50a
Merge branch 'source-academy:master' into grading-overview-ag-bp-migr…
InfinityTwo Apr 10, 2024
ca6ac7e
preparation for P2 merge
InfinityTwo Apr 10, 2024
b73044b
Merge branch 'grading-overview-ag-bp-migration' of https://github.com…
InfinityTwo Apr 10, 2024
651e457
eslint prettier
InfinityTwo Apr 10, 2024
2dc8125
compile erros
InfinityTwo Apr 10, 2024
480bbfc
compile error and eslint
InfinityTwo Apr 10, 2024
2aa51e5
Merge branch 'source-academy:master' into grading-overview-ag-bp-migr…
InfinityTwo Apr 11, 2024
9dad80b
master conflicts
InfinityTwo Apr 14, 2024
f608c87
prettier checks
InfinityTwo Apr 14, 2024
e849778
minor ui adjustments
InfinityTwo Apr 14, 2024
fef4031
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Apr 14, 2024
3c4c939
Revert change back to raw strings
RichDom2185 Apr 14, 2024
d57f0d8
typescript v5 fixes and richard's comments
InfinityTwo Apr 14, 2024
4b76614
Merge branch 'source-academy:master' into grading-overview-ag-bp-migr…
InfinityTwo Apr 14, 2024
3c5edf1
more typescript v5 fixes
InfinityTwo Apr 14, 2024
fbba60a
prettier
InfinityTwo Apr 14, 2024
b03cfe9
some refactoring and bug fixing
InfinityTwo Apr 14, 2024
9b2348e
Merge branch 'source-academy:master' into grading-overview-ag-bp-migr…
InfinityTwo Apr 15, 2024
505de5f
null value error in empty cell & wider actions col
InfinityTwo Apr 16, 2024
d161760
added submitted to unpublished allowed filters
InfinityTwo Apr 16, 2024
a4ff982
Merge branch 'master' into grading-overview-ag-bp-migration
InfinityTwo Apr 18, 2024
db2961c
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 May 1, 2024
e93a8d5
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 May 3, 2024
04cc13e
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 May 3, 2024
8b02ad1
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 May 5, 2024
86a431b
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 May 6, 2024
c4134c0
Fix format
RichDom2185 May 12, 2024
f7ea428
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 May 12, 2024
7449edf
Fix compile error post-merge
RichDom2185 May 12, 2024
5428c57
Refactor GradingFlex
RichDom2185 May 12, 2024
ceebfb9
Refactor GradingText
RichDom2185 May 12, 2024
916680c
Update BackendSaga.ts
RichDom2185 May 12, 2024
8a1cad8
Refactor GradingFilterable.tsx
RichDom2185 May 12, 2024
847a6ab
Refactor GradingActions
RichDom2185 May 12, 2024
1f4108f
Simplify conditions in conditionals
RichDom2185 May 12, 2024
d2756bc
Refactor conditions
RichDom2185 May 12, 2024
71eb6d6
Refactor GradingColumnCustomHeaders.tsx
RichDom2185 May 12, 2024
a14c365
Refactor GradingColumnFilters.tsx
RichDom2185 May 12, 2024
70fbc0f
Refactor GradingBadges.tsx
RichDom2185 May 12, 2024
3d1ec43
Add missing React import
RichDom2185 May 12, 2024
0d91ae8
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 May 12, 2024
f79be42
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 May 12, 2024
da2e269
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 May 12, 2024
fa7a309
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 May 13, 2024
14b8360
Fix imports and format post merge
RichDom2185 May 13, 2024
e8e68c5
Merge branch 'master' into grading-overview-ag-bp-migration
lhw-1 May 16, 2024
72f301f
Merge branch 'master' of https://github.com/InfinityTwo/sourceacademy…
InfinityTwo Jun 4, 2024
e08d9b5
hw review changes and child key error fix
InfinityTwo Jun 4, 2024
086460d
Merge branch 'grading-overview-ag-bp-migration' of https://github.com…
InfinityTwo Jun 4, 2024
5f88cd2
fixed randomly broken grading table headers and merge conflicts
InfinityTwo Aug 6, 2024
a858c18
prettier
InfinityTwo Aug 6, 2024
f02d792
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 Aug 11, 2024
f6664ac
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 Aug 15, 2024
c9bf19c
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Aug 16, 2024
6d21dca
Reformat post-lint updates
RichDom2185 Aug 16, 2024
e48bb8f
Merge branch 'master' into grading-overview-ag-bp-migration
RichDom2185 Aug 17, 2024
d2db6d2
Add TODO
RichDom2185 Aug 19, 2024
057dd5a
Remove unused CSS class
RichDom2185 Aug 19, 2024
74aa4e7
Scope most styles to CSS modules
RichDom2185 Aug 19, 2024
9544a0c
Migrate more styles to CSS modules
RichDom2185 Aug 19, 2024
21fb5f6
Simplify to use new actions format
RichDom2185 Aug 19, 2024
286a204
Migrate more classes to CSS modules
RichDom2185 Aug 19, 2024
de628df
Refactor grading badge styles to separate module file
RichDom2185 Aug 19, 2024
23d330f
Remove hardcoded CSS namespace
RichDom2185 Aug 19, 2024
24fffed
Make fix less hacky
RichDom2185 Aug 19, 2024
5c95916
Remove unnecessary default with enum type
RichDom2185 Aug 19, 2024
8960ade
Refactor column builder to separate file
RichDom2185 Aug 19, 2024
874ae71
Remove unnecessary space
RichDom2185 Aug 19, 2024
1b32f44
Improve readability
RichDom2185 Aug 19, 2024
3abcdad
Remove unused param
RichDom2185 Aug 19, 2024
248c03f
Remove unnecessary `={true}`
RichDom2185 Aug 19, 2024
fedce2a
Add TODO
RichDom2185 Aug 19, 2024
9bc2656
Refactor grading badge
RichDom2185 Aug 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/commons/application/ApplicationTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { DashboardState } from '../../features/dashboard/DashboardTypes';
import { PlaygroundState } from '../../features/playground/PlaygroundTypes';
import { PlaybackStatus, RecordingStatus } from '../../features/sourceRecorder/SourceRecorderTypes';
import { StoriesEnvState, StoriesState } from '../../features/stories/StoriesTypes';
import { freshSortState } from '../../pages/academy/grading/subcomponents/GradingSubmissionsTable';
import { WORKSPACE_BASE_PATHS } from '../../pages/fileSystem/createInBrowserFileSystem';
import { FileSystemState } from '../fileSystem/FileSystemTypes';
import { SideContentManagerState, SideContentState } from '../sideContent/SideContentTypes';
Expand Down Expand Up @@ -441,7 +442,16 @@ export const defaultWorkspaceManager: WorkspaceManagerState = {
},
currentSubmission: undefined,
currentQuestion: undefined,
hasUnsavedChanges: false
hasUnsavedChanges: false,
// TODO: The below should be a separate state
// instead of using the grading workspace state
columnVisiblity: [],
requestCounter: 0,
allColsSortStates: {
currentState: freshSortState,
sortBy: ''
},
hasLoadedBefore: false
},
playground: {
...createDefaultWorkspace('playground'),
Expand Down
14 changes: 11 additions & 3 deletions src/commons/application/actions/SessionActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ import {
paginationToBackendParams,
unpublishedToBackendParams
} from 'src/features/grading/GradingUtils';
import { freshSortState } from 'src/pages/academy/grading/subcomponents/GradingSubmissionsTable';
import { OptionType } from 'src/pages/academy/teamFormation/subcomponents/TeamFormationForm';

import { GradingOverviews, GradingQuery } from '../../../features/grading/GradingTypes';
import {
AllColsSortStates,
GradingOverviews,
GradingQuery
} from '../../../features/grading/GradingTypes';
import { TeamFormationOverview } from '../../../features/teamFormation/TeamFormationTypes';
import {
Assessment,
Expand Down Expand Up @@ -52,13 +57,16 @@ const SessionActions = createActions('session', {
* many entries, starting from what offset, to get
* @param filterParams - param that contains columnFilters converted into JSON for
* processing into query parameters
* @param allColsSortStates - param that contains the sort states of all columns and
* the col it should be sorted by
*/
fetchGradingOverviews: (
filterToGroup = true,
publishedFilter = unpublishedToBackendParams(false),
pageParams = paginationToBackendParams(0, 10),
filterParams = {}
) => ({ filterToGroup, publishedFilter, pageParams, filterParams }),
filterParams = {},
allColsSortStates: AllColsSortStates = { currentState: freshSortState, sortBy: '' }
) => ({ filterToGroup, publishedFilter, pageParams, filterParams, allColsSortStates }),
fetchTeamFormationOverviews: (filterToGroup = true) => filterToGroup,
fetchStudents: () => ({}),
login: (providerId: string) => providerId,
Expand Down
17 changes: 13 additions & 4 deletions src/commons/application/actions/__tests__/SessionActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ import {
paginationToBackendParams,
unpublishedToBackendParams
} from 'src/features/grading/GradingUtils';
import { freshSortState } from 'src/pages/academy/grading/subcomponents/GradingSubmissionsTable';

import { GradingOverviews, GradingQuery } from '../../../../features/grading/GradingTypes';
import {
ColumnFields,
GradingOverviews,
GradingQuery
} from '../../../../features/grading/GradingTypes';
import { TeamFormationOverview } from '../../../../features/teamFormation/TeamFormationTypes';
import {
Assessment,
Expand Down Expand Up @@ -89,7 +94,8 @@ test('fetchGradingOverviews generates correct default action object', () => {
filterToGroup: true,
publishedFilter: unpublishedToBackendParams(false),
pageParams: paginationToBackendParams(0, 10),
filterParams: {}
filterParams: {},
allColsSortStates: { currentState: freshSortState, sortBy: '' }
}
});
});
Expand All @@ -99,19 +105,22 @@ test('fetchGradingOverviews generates correct action object', () => {
const publishedFilter = unpublishedToBackendParams(true);
const pageParams = { offset: 123, pageSize: 456 };
const filterParams = { abc: 'xxx', def: 'yyy' };
const allColsSortStates = { currentState: freshSortState, sortBy: ColumnFields.assessmentName };
const action = SessionActions.fetchGradingOverviews(
filterToGroup,
publishedFilter,
pageParams,
filterParams
filterParams,
allColsSortStates
);
expect(action).toEqual({
type: SessionActions.fetchGradingOverviews.type,
payload: {
filterToGroup: filterToGroup,
publishedFilter: publishedFilter,
pageParams: pageParams,
filterParams: filterParams
filterParams: filterParams,
allColsSortStates: allColsSortStates
}
});
});
Expand Down
33 changes: 33 additions & 0 deletions src/commons/grading/GradingFlex.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Property } from 'csstype';
import React from 'react';

const defaultStyles: React.CSSProperties = {
display: 'flex'
};
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved

type Props = {
justifyContent?: Property.JustifyContent;
alignItems?: Property.AlignItems;
flexDirection?: Property.FlexDirection;
children?: React.ReactNode;
style?: React.CSSProperties;
className?: string;
};

const GradingFlex: React.FC<Props> = ({
justifyContent,
alignItems,
flexDirection,
children,
style,
className
}) => {
const styles: React.CSSProperties = { ...style, justifyContent, alignItems, flexDirection };
return (
<div className={className} style={{ ...defaultStyles, ...styles }}>
{children}
</div>
);
};

export default GradingFlex;
28 changes: 28 additions & 0 deletions src/commons/grading/GradingText.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Classes, Text } from '@blueprintjs/core';
import classNames from 'classnames';
import React from 'react';

const defaultStyles: React.CSSProperties = {
width: 'max-content',
margin: 'auto 0'
};
lhw-1 marked this conversation as resolved.
Show resolved Hide resolved

type Props = {
children?: React.ReactNode;
style?: React.CSSProperties;
isSecondaryText?: boolean;
className?: string;
};

const GradingText: React.FC<Props> = ({ children, style, isSecondaryText, className }) => {
return (
<Text
className={classNames(Classes.UI_TEXT, className, isSecondaryText && Classes.TEXT_MUTED)}
style={{ ...defaultStyles, ...style }}
>
{children}
</Text>
);
};

export default GradingText;
23 changes: 20 additions & 3 deletions src/commons/mocks/BackendMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import DashboardActions from 'src/features/dashboard/DashboardActions';
import {
GradingOverviews,
GradingQuery,
GradingQuestion
GradingQuestion,
SortStates
} from '../../features/grading/GradingTypes';
import SessionActions from '../application/actions/SessionActions';
import {
Expand Down Expand Up @@ -166,9 +167,25 @@ export function* mockBackendSaga(): SagaIterator {
SessionActions.fetchGradingOverviews.type,
function* (action: ReturnType<typeof actions.fetchGradingOverviews>): any {
const accessToken = yield select((state: OverallState) => state.session.accessToken);
const { filterToGroup, pageParams, filterParams } = action.payload;
const { filterToGroup, pageParams, filterParams, allColsSortStates } = action.payload;
const sortedBy = {
sortBy: allColsSortStates.sortBy,
sortDirection: ''
};

Object.keys(allColsSortStates.currentState).forEach(key => {
if (allColsSortStates.sortBy === key && key) {
if (allColsSortStates.currentState[key] !== SortStates.NONE) {
sortedBy.sortDirection = allColsSortStates.currentState[key];
} else {
sortedBy.sortBy = '';
sortedBy.sortDirection = '';
}
}
});

const gradingOverviews = yield call(() =>
mockFetchGradingOverview(accessToken, filterToGroup, pageParams, filterParams)
mockFetchGradingOverview(accessToken, filterToGroup, pageParams, filterParams, sortedBy)
);
if (gradingOverviews !== null) {
yield put(actions.updateGradingOverviews(gradingOverviews));
Expand Down
3 changes: 2 additions & 1 deletion src/commons/mocks/GradingMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ export const mockFetchGradingOverview = (
accessToken: string,
group: boolean,
pageParams: { offset: number; pageSize: number },
backendParams: object
backendParams: object,
sortedBy: { sortBy: string; sortDirection: string }
): GradingOverview[] | null => {
// mocks backend role fetching
const permittedRoles: Role[] = [Role.Admin, Role.Staff];
Expand Down
25 changes: 22 additions & 3 deletions src/commons/sagas/BackendSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import {
GradingOverview,
GradingOverviews,
GradingQuery,
GradingQuestion
GradingQuestion,
SortStates
} from '../../features/grading/GradingTypes';
import { SourcecastData } from '../../features/sourceRecorder/SourceRecorderTypes';
import SourcereelActions from '../../features/sourceRecorder/sourcereel/SourcereelActions';
Expand Down Expand Up @@ -358,15 +359,33 @@ const newBackendSagaOne = combineSagaHandlers(sagaActions, {
return;
}

const { filterToGroup, publishedFilter, pageParams, filterParams } = action.payload;
const { filterToGroup, publishedFilter, pageParams, filterParams, allColsSortStates } =
action.payload;

const sortedBy = {
sortBy: allColsSortStates.sortBy,
sortDirection: ''
};

Object.entries(allColsSortStates.currentState).forEach(([key, value]) => {
if (allColsSortStates.sortBy === key && key !== '') {
if (value !== SortStates.NONE) {
sortedBy.sortDirection = value;
} else {
sortedBy.sortBy = '';
sortedBy.sortDirection = '';
}
}
});

const gradingOverviews: GradingOverviews | null = yield call(
getGradingOverviews,
tokens,
filterToGroup,
publishedFilter,
pageParams,
filterParams
filterParams,
sortedBy
);
if (gradingOverviews) {
yield put(actions.updateGradingOverviews(gradingOverviews));
Expand Down
87 changes: 41 additions & 46 deletions src/commons/sagas/RequestsSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,10 +625,11 @@ export const getGradingOverviews = async (
group: boolean,
graded: Record<string, any> | undefined,
pageParams: Record<string, any>,
filterParams: Record<string, any>
filterParams: Record<string, any>,
sortedBy: Record<string, any>
): Promise<GradingOverviews | null> => {
// gradedQuery placed behind filterQuery to override progress filter if any
const params = new URLSearchParams({ ...pageParams, ...filterParams, ...graded });
const params = new URLSearchParams({ ...pageParams, ...filterParams, ...graded, ...sortedBy });
params.append('group', `${group}`);

const resp = await request(`${courseId()}/admin/grading?${params.toString()}`, 'GET', {
Expand All @@ -641,50 +642,44 @@ export const getGradingOverviews = async (

return {
count: gradingOverviews.count,
data: gradingOverviews.data
.map((overview: any) => {
const gradingOverview: GradingOverview = {
assessmentId: overview.assessment.id,
assessmentNumber: overview.assessment.assessmentNumber,
assessmentName: overview.assessment.title,
assessmentType: overview.assessment.type,
studentId: overview.student ? overview.student.id : -1,
studentName: overview.student ? overview.student.name : undefined,
studentNames: overview.team
? overview.team.team_members.map((member: { name: any }) => member.name)
: undefined,
studentUsername: overview.student ? overview.student.username : undefined,
studentUsernames: overview.team
? overview.team.team_members.map((member: { username: any }) => member.username)
: undefined,
submissionId: overview.id,
submissionStatus: overview.status,
groupName: overview.student ? overview.student.groupName : '-',
groupLeaderId: overview.student ? overview.student.groupLeaderId : undefined,
isGradingPublished: overview.isGradingPublished,
progress: backendParamsToProgressStatus(
overview.assessment.isManuallyGraded,
overview.isGradingPublished,
overview.status,
overview.gradedCount,
overview.assessment.questionCount
),
questionCount: overview.assessment.questionCount,
gradedCount: overview.gradedCount,
// XP
initialXp: overview.xp,
xpAdjustment: overview.xpAdjustment,
currentXp: overview.xp + overview.xpAdjustment,
maxXp: overview.assessment.maxXp,
xpBonus: overview.xpBonus
};
return gradingOverview;
})
.sort((subX: GradingOverview, subY: GradingOverview) =>
subX.assessmentId !== subY.assessmentId
? subY.assessmentId - subX.assessmentId
: subY.submissionId - subX.submissionId
)
data: gradingOverviews.data.map((overview: any) => {
const gradingOverview: GradingOverview = {
assessmentId: overview.assessment.id,
assessmentNumber: overview.assessment.assessmentNumber,
assessmentName: overview.assessment.title,
assessmentType: overview.assessment.type,
studentId: overview.student ? overview.student.id : -1,
studentName: overview.student ? overview.student.name : undefined,
studentNames: overview.team
? overview.team.team_members.map((member: { name: any }) => member.name)
: undefined,
studentUsername: overview.student ? overview.student.username : undefined,
studentUsernames: overview.team
? overview.team.team_members.map((member: { username: any }) => member.username)
: undefined,
submissionId: overview.id,
submissionStatus: overview.status,
groupName: overview.student ? overview.student.groupName : '-',
groupLeaderId: overview.student ? overview.student.groupLeaderId : undefined,
isGradingPublished: overview.isGradingPublished,
progress: backendParamsToProgressStatus(
overview.assessment.isManuallyGraded,
overview.isGradingPublished,
overview.status,
overview.gradedCount,
overview.assessment.questionCount
),
questionCount: overview.assessment.questionCount,
gradedCount: overview.gradedCount,
// XP
initialXp: overview.xp,
xpAdjustment: overview.xpAdjustment,
currentXp: overview.xp + overview.xpAdjustment,
maxXp: overview.assessment.maxXp,
xpBonus: overview.xpBonus
};
return gradingOverview;
})
};
};

Expand Down
9 changes: 8 additions & 1 deletion src/commons/workspace/WorkspaceActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { createAction } from '@reduxjs/toolkit';
import { Context, Result } from 'js-slang';
import { Chapter, Variant } from 'js-slang/dist/types';

import { AllColsSortStates, GradingColumnVisibility } from '../../features/grading/GradingTypes';
import { SALanguage } from '../application/ApplicationTypes';
import { ExternalLibraryName } from '../application/types/ExternalTypes';
import { Library } from '../assessment/AssessmentTypes';
Expand Down Expand Up @@ -264,7 +265,13 @@ const newActions = createActions('workspace', {
updateChangePointSteps: (changepointSteps: number[], workspaceLocation: WorkspaceLocation) => ({
changepointSteps,
workspaceLocation
})
}),
// For grading table
increaseRequestCounter: 0,
decreaseRequestCounter: 0,
setGradingHasLoadedBefore: () => true,
updateAllColsSortStates: (sortStates: AllColsSortStates) => ({ sortStates }),
updateGradingColumnVisibility: (filters: GradingColumnVisibility) => ({ filters })
});

export const updateLastDebuggerResult = createAction(
Expand Down
Loading
Loading