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 CSV #2657

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
b8ef27b
LLM Frontend
clementlemon02 Jul 16, 2023
7bceb47
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Sep 3, 2023
9589c55
Use optional chaining and reformat files
RichDom2185 Jul 18, 2023
b2cb352
Run yarn format
RichDom2185 Jul 18, 2023
a030c99
fix lint issues
clementlemon02 Aug 8, 2023
bbfa704
fix lint issues
clementlemon02 Aug 8, 2023
137eee2
fix lint issues
clementlemon02 Aug 8, 2023
21e606a
fix lint issues
clementlemon02 Aug 8, 2023
9a5fbfa
fix lint issues
clementlemon02 Aug 8, 2023
bd4b401
Remove unnecessary empty line
RichDom2185 Aug 10, 2023
5c75726
resolving comments
clementlemon02 Aug 12, 2023
7a2a8d6
fix format
clementlemon02 Aug 12, 2023
1f21138
Delete unused component
RichDom2185 Sep 3, 2023
77687cd
Delete unused action
RichDom2185 Sep 3, 2023
e5cf900
Remove LLM items
RichDom2185 Sep 3, 2023
afcefa2
Fix incorrect deletion
RichDom2185 Sep 3, 2023
df50842
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Jan 16, 2024
b83a6ff
Restore changes post-merge
RichDom2185 Jan 16, 2024
b31f3ce
Merge branch 'master' into grading-csv
RichDom2185 Jan 25, 2024
89f61a9
Merge branch 'master' into grading-csv
RichDom2185 Feb 3, 2024
35c1a7b
Merge branch 'master' into grading-csv
RichDom2185 Feb 5, 2024
0412dab
Merge branch 'master' into grading-csv
RichDom2185 Feb 11, 2024
886247c
Merge branch 'master' into grading-csv
RichDom2185 Feb 11, 2024
36744aa
Merge branch 'master' into grading-csv
RichDom2185 Feb 12, 2024
0c6d37a
Merge branch 'master' into grading-csv
RichDom2185 Feb 13, 2024
9cc0558
Merge branch 'master' into grading-csv
RichDom2185 Feb 14, 2024
bb32a92
Merge branch 'master' into grading-csv
RichDom2185 Feb 14, 2024
6cdf52e
Merge branch 'master' into grading-csv
RichDom2185 Feb 20, 2024
175fbdc
Merge branch 'master' of https://github.com/source-academy/frontend i…
RichDom2185 Feb 23, 2024
d967f62
Fix format
RichDom2185 Feb 23, 2024
671c665
Fix format
RichDom2185 Feb 23, 2024
0154b90
Merge branch 'master' into grading-csv
RichDom2185 Feb 23, 2024
059787e
Merge branch 'master' into grading-csv
RichDom2185 Feb 23, 2024
66075d6
Merge branch 'master' into grading-csv
RichDom2185 Feb 24, 2024
9376925
Merge branch 'master' into grading-csv
RichDom2185 Mar 17, 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
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,7 @@ test('updateGradingOverviews generates correct action object', () => {
assessmentNumber: 'M1A',
assessmentName: 'test assessment',
assessmentType: 'Contests',
questions: '',
initialXp: 0,
xpBonus: 100,
xpAdjustment: 50,
Expand Down
2 changes: 2 additions & 0 deletions src/commons/application/reducers/__tests__/SessionReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ const gradingOverviewTest1: GradingOverview[] = [
assessmentId: 1,
assessmentNumber: 'M1A',
assessmentName: 'test assessment',
questions: '',
assessmentType: 'Contests',
initialXp: 0,
xpBonus: 100,
Expand All @@ -525,6 +526,7 @@ const gradingOverviewTest2: GradingOverview[] = [
assessmentId: 2,
assessmentNumber: 'P2',
assessmentName: 'another assessment',
questions: '',
assessmentType: 'Quests',
initialXp: 20,
xpBonus: 250,
Expand Down
3 changes: 3 additions & 0 deletions src/commons/mocks/GradingMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const mockGradingOverviews: GradingOverview[] = [
assessmentNumber: 'M1A',
assessmentId: 0,
assessmentName: 'Mission 0 ',
questions: '',
currentXp: 69,
xpBonus: 10,
initialXp: 69,
Expand All @@ -37,6 +38,7 @@ export const mockGradingOverviews: GradingOverview[] = [
assessmentNumber: 'M2',
assessmentId: 1,
assessmentName: 'Mission 1',
questions: '',
currentXp: -2,
xpBonus: 12,
initialXp: 0,
Expand All @@ -57,6 +59,7 @@ export const mockGradingOverviews: GradingOverview[] = [
assessmentNumber: 'M3',
assessmentId: 0,
assessmentName: 'Mission 0',
questions: '',
currentXp: 1000,
xpBonus: 12,
initialXp: 996,
Expand Down
1 change: 1 addition & 0 deletions src/commons/sagas/RequestsSaga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,7 @@ export const getGradingOverviews = async (
studentId: overview.student.id,
studentUsername: overview.student.username,
studentName: overview.student.name,
questions: overview.questions,
submissionId: overview.id,
submissionStatus: overview.status,
groupName: overview.student.groupName,
Expand Down
1 change: 1 addition & 0 deletions src/features/grading/GradingTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export type GradingOverview = {
studentUsername: string;
submissionId: number;
submissionStatus: string;
questions: string;
groupName: string;
groupLeaderId?: number;
gradingStatus: GradingStatus;
Expand Down
8 changes: 2 additions & 6 deletions src/features/grading/GradingUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,15 @@ export const exportGradingCSV = (gradingOverviews: GradingOverview[] | undefined

const content = new Blob(
[
'"Assessment Number","Assessment Name","Student Name","Student Username","Group","Status","Grading","Question Count","Questions Graded","Initial XP","XP Adjustment","Current XP (excl. bonus)","Max XP","Bonus XP"\n',
'"Student Name","Student Username","Group","Status","Question","Initial XP","XP Adjustment","Current XP (excl. bonus)","Max XP","Bonus XP"\n',
...gradingOverviews.map(
e =>
[
e.assessmentNumber,
e.assessmentName,
e.studentName,
e.studentUsername,
e.groupName,
e.submissionStatus,
e.gradingStatus,
e.questionCount,
e.gradedCount,
e.questions,
e.initialXp,
e.xpAdjustment,
e.currentXp,
Expand Down
1 change: 1 addition & 0 deletions src/pages/academy/grading/subcomponents/GradingEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ type Props = {
maxXp: number;
studentName: string;
studentUsername: string;
questions: string;
comments: string;
graderName?: string;
gradedAt?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ const GradingWorkspace: React.FC<Props> = props => {
maxXp={grading!.answers[questionId].question.maxXp}
studentName={grading!.answers[questionId].student.name}
studentUsername={grading!.answers[questionId].student.username}
questions={''}
comments={grading!.answers[questionId].grade.comments ?? ''}
graderName={
grading!.answers[questionId].grade.grader
Expand Down
Loading