From 77d60131448954a97c5c8ee8247ab1eaf2000049 Mon Sep 17 00:00:00 2001 From: FelixLjung Date: Wed, 1 Apr 2026 14:03:29 +0200 Subject: [PATCH 1/5] Removed UI submission button --- src/commons/assessment/Assessment.tsx | 26 +------------------ .../assessment/AssessmentOverviewCard.tsx | 6 ----- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/commons/assessment/Assessment.tsx b/src/commons/assessment/Assessment.tsx index fc674c05c5..545331c771 100644 --- a/src/commons/assessment/Assessment.tsx +++ b/src/commons/assessment/Assessment.tsx @@ -79,27 +79,6 @@ const Assessment: React.FC = () => { const sortAssessments = (assessments: AssessmentOverview[]) => sortBy(assessments, [a => -a.id]); - const makeSubmissionButton = (overview: AssessmentOverview) => ( - - - - ); - // Rendering Logic const assessmentConfigToLoad = useLoaderData() as AssessmentConfiguration; const assessmentOverviews = useMemo( @@ -160,10 +139,9 @@ const Assessment: React.FC = () => { overview={overview} renderAttemptButton={role !== Role.Student} renderGradingTooltip={false} - makeSubmissionButton={makeSubmissionButton} /> ) - ); + ) /** Opened assessments, that are released and can be attempted. */ const isOverviewOpened = (overview: AssessmentOverview) => @@ -178,7 +156,6 @@ const Assessment: React.FC = () => { overview={overview} renderAttemptButton renderGradingTooltip={false} - makeSubmissionButton={makeSubmissionButton} /> )); @@ -193,7 +170,6 @@ const Assessment: React.FC = () => { overview={overview} renderAttemptButton renderGradingTooltip - makeSubmissionButton={makeSubmissionButton} /> )); diff --git a/src/commons/assessment/AssessmentOverviewCard.tsx b/src/commons/assessment/AssessmentOverviewCard.tsx index 40a2b20e37..1d2d12949d 100644 --- a/src/commons/assessment/AssessmentOverviewCard.tsx +++ b/src/commons/assessment/AssessmentOverviewCard.tsx @@ -19,7 +19,6 @@ type AssessmentOverviewCardProps = { /** Will only render the attempt button if true, regardless of attempt status. */ renderAttemptButton: boolean; renderGradingTooltip: boolean; - makeSubmissionButton: (overview: AssessmentOverview) => JSX.Element; }; /** A card to display `AssessmentOverview`s. */ @@ -27,7 +26,6 @@ const AssessmentOverviewCard: React.FC = ({ overview, renderAttemptButton, renderGradingTooltip, - makeSubmissionButton }) => { const { isMobileBreakpoint } = useResponsive(); return ( @@ -49,7 +47,6 @@ const AssessmentOverviewCard: React.FC = ({
@@ -105,13 +102,11 @@ const AssessmentOverviewCard: React.FC = ({ type AssessmentOverviewCardTitleProps = { overview: AssessmentOverview; renderProgressStatus: boolean; - makeSubmissionButton: (overview: AssessmentOverview) => JSX.Element; }; const AssessmentOverviewCardTitle: React.FC = ({ overview, renderProgressStatus, - makeSubmissionButton }) => (
@@ -128,7 +123,6 @@ const AssessmentOverviewCardTitle: React.FC = {renderProgressStatus ? showGradingTooltip(overview.isGradingPublished) : null}
-
{makeSubmissionButton(overview)}
); From f6c58e6945c615f6ee91514f6dcf692595fffcee Mon Sep 17 00:00:00 2001 From: FelixLjung Date: Wed, 1 Apr 2026 14:08:25 +0200 Subject: [PATCH 2/5] recreated tests --- .../__snapshots__/Assessment.test.tsx.snap | 260 ------------------ 1 file changed, 260 deletions(-) diff --git a/src/commons/assessment/__tests__/__snapshots__/Assessment.test.tsx.snap b/src/commons/assessment/__tests__/__snapshots__/Assessment.test.tsx.snap index 1c3bb35079..e4a00fd6d6 100644 --- a/src/commons/assessment/__tests__/__snapshots__/Assessment.test.tsx.snap +++ b/src/commons/assessment/__tests__/__snapshots__/Assessment.test.tsx.snap @@ -144,50 +144,6 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f An Odessey to Runes (Duplicate) -
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
-
- - - -
Date: Wed, 1 Apr 2026 14:28:06 +0200 Subject: [PATCH 3/5] removed unused imports --- src/commons/assessment/Assessment.tsx | 3 --- src/commons/assessment/AssessmentOverviewCard.tsx | 1 - 2 files changed, 4 deletions(-) diff --git a/src/commons/assessment/Assessment.tsx b/src/commons/assessment/Assessment.tsx index 545331c771..4a21c590d8 100644 --- a/src/commons/assessment/Assessment.tsx +++ b/src/commons/assessment/Assessment.tsx @@ -1,15 +1,12 @@ import { - Button, Collapse, Dialog, DialogBody, DialogFooter, Intent, NonIdealState, - Position, Spinner, Text, - Tooltip } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { sortBy } from 'lodash'; diff --git a/src/commons/assessment/AssessmentOverviewCard.tsx b/src/commons/assessment/AssessmentOverviewCard.tsx index 1d2d12949d..d126b015ba 100644 --- a/src/commons/assessment/AssessmentOverviewCard.tsx +++ b/src/commons/assessment/AssessmentOverviewCard.tsx @@ -1,7 +1,6 @@ import { Card, Elevation, H4, H6, Icon, Intent, Position, Text, Tooltip } from '@blueprintjs/core'; import { IconName, IconNames } from '@blueprintjs/icons'; import classNames from 'classnames'; -import { JSX } from 'react'; import classes from 'src/styles/Academy.module.scss'; import defaultCoverImage from '../../assets/default_cover_image.jpg'; From d0236bcc3a65f7fb27a0bdabaa33e5ce5fc20d18 Mon Sep 17 00:00:00 2001 From: FelixLjung Date: Wed, 1 Apr 2026 14:48:05 +0200 Subject: [PATCH 4/5] makeSubmissionButton has been revived --- src/commons/assessment/Assessment.tsx | 29 ++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/commons/assessment/Assessment.tsx b/src/commons/assessment/Assessment.tsx index 4a21c590d8..35cbc962d6 100644 --- a/src/commons/assessment/Assessment.tsx +++ b/src/commons/assessment/Assessment.tsx @@ -1,12 +1,15 @@ import { + Button, Collapse, Dialog, DialogBody, DialogFooter, Intent, NonIdealState, + Position, Spinner, Text, + Tooltip } from '@blueprintjs/core'; import { IconNames } from '@blueprintjs/icons'; import { sortBy } from 'lodash'; @@ -76,6 +79,28 @@ const Assessment: React.FC = () => { const sortAssessments = (assessments: AssessmentOverview[]) => sortBy(assessments, [a => -a.id]); + +const makeSubmissionButton = (overview: AssessmentOverview) => ( + + + + ); + // Rendering Logic const assessmentConfigToLoad = useLoaderData() as AssessmentConfiguration; const assessmentOverviews = useMemo( @@ -138,7 +163,7 @@ const Assessment: React.FC = () => { renderGradingTooltip={false} /> ) - ) + ); /** Opened assessments, that are released and can be attempted. */ const isOverviewOpened = (overview: AssessmentOverview) => @@ -201,6 +226,8 @@ const Assessment: React.FC = () => { ); } + + // Define the warning text when finalising submissions const hasBonusXp = (betchaAssessment?.earlySubmissionXp as number) > 0; const warningText = hasBonusXp ? ( From 9eb5e046500394d5eb1a6f95ed57c07becee504c Mon Sep 17 00:00:00 2001 From: FelixLjung Date: Wed, 1 Apr 2026 15:42:19 +0200 Subject: [PATCH 5/5] Google Drive button is no more, tests have been updated --- src/pages/playground/Playground.tsx | 19 +----- .../__snapshots__/Playground.test.tsx.snap | 68 ------------------- 2 files changed, 3 insertions(+), 84 deletions(-) diff --git a/src/pages/playground/Playground.tsx b/src/pages/playground/Playground.tsx index d0aee7984a..05ce486e95 100644 --- a/src/pages/playground/Playground.tsx +++ b/src/pages/playground/Playground.tsx @@ -590,26 +590,13 @@ const Playground: React.FC = props => { ); // Compute this here to avoid re-rendering the button every keystroke + + const persistenceIsDirty = persistenceFile && (!persistenceFile.lastSaved || persistenceFile.lastSaved < lastEdit); const persistenceButtons = useMemo(() => { return ( - dispatch(PersistenceActions.persistenceSaveFileAs())} - onClickOpen={() => dispatch(PersistenceActions.persistenceOpenPicker())} - onClickSave={ - persistenceFile - ? () => dispatch(PersistenceActions.persistenceSaveFile(persistenceFile)) - : undefined - } - onClickLogOut={() => dispatch(SessionActions.logoutGoogle())} - onPopoverOpening={() => dispatch(PersistenceActions.persistenceInitialise())} - /> + null // Google Drive Button used to be here ); }, [isFolderModeEnabled, persistenceFile, persistenceUser, persistenceIsDirty, dispatch]); diff --git a/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap b/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap index 3502f5df4d..c885cbdfab 100644 --- a/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap +++ b/src/pages/playground/__tests__/__snapshots__/Playground.test.tsx.snap @@ -193,40 +193,6 @@ exports[`Playground tests > Playground renders correctly 1`] = ` - - - - - @@ -1790,40 +1756,6 @@ exports[`Playground tests > Playground with link renders correctly 1`] = ` - - - - -