diff --git a/src/commons/XMLParser/XMLParserHelper.ts b/src/commons/XMLParser/XMLParserHelper.ts index 6f1d6e5c61..7b57f9bdae 100644 --- a/src/commons/XMLParser/XMLParserHelper.ts +++ b/src/commons/XMLParser/XMLParserHelper.ts @@ -87,7 +87,8 @@ const makeAssessmentOverview = (result: any, maxXpVal: number): AssessmentOvervi isGradingPublished: false, xp: 0, maxTeamSize: 1, - hasVotingFeatures: false + hasVotingFeatures: false, + hoursBeforeEarlyXpDecay: 0 }; }; diff --git a/src/commons/application/actions/__tests__/SessionActions.ts b/src/commons/application/actions/__tests__/SessionActions.ts index 199cd32b56..cf65144525 100644 --- a/src/commons/application/actions/__tests__/SessionActions.ts +++ b/src/commons/application/actions/__tests__/SessionActions.ts @@ -484,7 +484,8 @@ test('updateAssessmentOverviews generates correct action object', () => { xp: 0, isGradingPublished: false, maxTeamSize: 1, - hasVotingFeatures: false + hasVotingFeatures: false, + hoursBeforeEarlyXpDecay: 0 } ]; const action = SessionActions.updateAssessmentOverviews(overviews); diff --git a/src/commons/application/reducers/__tests__/SessionReducer.ts b/src/commons/application/reducers/__tests__/SessionReducer.ts index 5a4e3261ef..8a589c4aad 100644 --- a/src/commons/application/reducers/__tests__/SessionReducer.ts +++ b/src/commons/application/reducers/__tests__/SessionReducer.ts @@ -335,7 +335,8 @@ const assessmentOverviewsTest1: AssessmentOverview[] = [ xp: 0, isGradingPublished: false, maxTeamSize: 5, - hasVotingFeatures: false + hasVotingFeatures: false, + hoursBeforeEarlyXpDecay: 0 } ]; @@ -358,7 +359,8 @@ const assessmentOverviewsTest2: AssessmentOverview[] = [ xp: 1, isGradingPublished: false, maxTeamSize: 1, - hasVotingFeatures: false + hasVotingFeatures: false, + hoursBeforeEarlyXpDecay: 0 } ]; diff --git a/src/commons/assessment/Assessment.tsx b/src/commons/assessment/Assessment.tsx index d458dbf602..2fbfb5526c 100644 --- a/src/commons/assessment/Assessment.tsx +++ b/src/commons/assessment/Assessment.tsx @@ -25,6 +25,7 @@ import { useDispatch } from 'react-redux'; import { Navigate, useLoaderData, useParams } from 'react-router'; import { NavLink } from 'react-router-dom'; import { numberRegExp } from 'src/features/academy/AcademyTypes'; +import classes from 'src/styles/Academy.module.scss'; import defaultCoverImage from '../../assets/default_cover_image.jpg'; import SessionActions from '../application/actions/SessionActions'; @@ -38,7 +39,7 @@ import Markdown from '../Markdown'; import NotificationBadge from '../notificationBadge/NotificationBadge'; import { filterNotificationsByAssessment } from '../notificationBadge/NotificationBadgeHelper'; import Constants from '../utils/Constants'; -import { beforeNow, getPrettyDate } from '../utils/DateHelper'; +import { beforeNow, getPrettyDate, getPrettyDateAfterHours } from '../utils/DateHelper'; import { useResponsive, useSession } from '../utils/Hooks'; import { assessmentTypeLink, convertParamToInt } from '../utils/ParamParseHelper'; import AssessmentNotFound from './AssessmentNotFound'; @@ -179,12 +180,19 @@ const Assessment: React.FC = () => {