diff --git a/i18n/messages.en.js b/i18n/messages.en.js index 1833c530..dc86eb68 100644 --- a/i18n/messages.en.js +++ b/i18n/messages.en.js @@ -182,6 +182,11 @@ module.exports = { courseDev_decs_p1: 'Publish course analysis and course data for a completed course offering or edit a published course analysis.', courseDev_decs_p2: 'A published course analysis with course data is displayed on the page: Course development.', + courseDev_decs_alert_title: 'Please note!', + courseDev_decs_alert_p1: + 'In mid-December 2024, this tool for publishing and editing course analysis and course data will be discontinued. Last use is for courses taken during period 1 in HT24. Thereafter, from period 2 in HT24, the course analysis is filled in and published in Canvas.', + courseDev_decs_alert_p2: 'Read about the new automated system in Canvas here:', + courseDev_decs_alert_p2_link: 'New IT system support for course evaluation and course analysis', courseDev_btn_edit: 'Edit published', courseDev_btn_new: 'Publish new', }, diff --git a/i18n/messages.se.js b/i18n/messages.se.js index 6b8b9f81..5aab75ca 100644 --- a/i18n/messages.se.js +++ b/i18n/messages.se.js @@ -177,6 +177,11 @@ module.exports = { courseDev_decs_p1: 'Publicera kursanalys och kursdata för en avslutad kursomgång eller ändra en redan publicerad kursanalys.', courseDev_decs_p2: 'Publicerade kursanalyser och kursdata visas på sidan: Kursens utveckling.', + courseDev_decs_alert_title: 'Observera!', + courseDev_decs_alert_p1: + 'Under mitten av december 2024 avvecklas det här verktyget för publicering och redigering av kursanalyser och kursdata. Sista användning är för kurser som gått under period 1 i HT24. Efter det, från period 2 i HT24, fylls kursanalys i och publiceras i Canvas.', + courseDev_decs_alert_p2: 'Läs om det nya automatiserade systemet i Canvas här:', + courseDev_decs_alert_p2_link: 'Nytt IT-systemstöd för kursvärdering och kursanalys', courseDev_btn_edit: 'Ändra publicerad', courseDev_btn_new: 'Publicera ny', }, diff --git a/public/css/kursinfo-admin-web.scss b/public/css/kursinfo-admin-web.scss index 31d4605a..52269e52 100644 --- a/public/css/kursinfo-admin-web.scss +++ b/public/css/kursinfo-admin-web.scss @@ -92,9 +92,25 @@ h2 { } > :last-child { margin-block-end: 0; - } + } } + .kth-alert.info { + h4 { + margin: 0; + } + + p { + margin-block: .5rem; + > :first-child { + margin-block-start: 0; + } + > :last-child { + margin-block-end: 0; + } + } + } + .AdminStartPage__cardFooter { display: flex; align-items: baseline; diff --git a/public/js/app/pages/AdminStartPage.jsx b/public/js/app/pages/AdminStartPage.jsx index 95671fb0..fc3c9a98 100644 --- a/public/js/app/pages/AdminStartPage.jsx +++ b/public/js/app/pages/AdminStartPage.jsx @@ -9,8 +9,15 @@ import AlertMsg from '../components/AlertMsg' import AlertReminderMsg from '../components/AlertReminderMsg' import AlertReminderMsgNewPubMemo from '../components/AlertReminderMsgNewPubMemo' import { useWebContext } from '../context/WebContext' -import { ADMIN_COURSE_UTV, ADMIN_COURSE_PM, ADMIN_COURSE_PM_DATA, ADMIN_ABOUT_COURSE } from '../util/constants' +import { + ADMIN_COURSE_UTV, + ADMIN_COURSE_PM, + ADMIN_COURSE_PM_DATA, + ADMIN_ABOUT_COURSE, + NEW_COURSE_ANALYSIS_ADMIN_TOOL_URL, +} from '../util/constants' import { fetchParameters } from '../util/fetchUrlParams' +import Alert from '../components-shared/Alert' function AdminStartPage() { const [context] = useWebContext() @@ -100,6 +107,15 @@ function AdminStartPage() {

{startCards.courseDev_decs_p1}

{startCards.courseDev_decs_p2}

+ +

{startCards.courseDev_decs_alert_p1}

+

+ {startCards.courseDev_decs_alert_p2}{' '} + + {startCards.courseDev_decs_alert_p2_link} + +

+
diff --git a/public/js/app/util/constants.js b/public/js/app/util/constants.js index 2202ff1b..c386edf9 100644 --- a/public/js/app/util/constants.js +++ b/public/js/app/util/constants.js @@ -20,3 +20,8 @@ export const COURSE_INFO_IN_CANVAS = { en: 'https://intra.kth.se/en/utbildning/systemstod/canvas/guider/kursoversikt-1.1059436 ', sv: 'https://intra.kth.se/utbildning/systemstod/canvas/guider/kursoversikt-1.1059436', } + +export const NEW_COURSE_ANALYSIS_ADMIN_TOOL_URL = { + en: 'https://intra.kth.se/en/utbildning/systemstod/kursvardering-och-kursanalys/nytt-it-systemstod-for-kursvardering-och-kursanalys-1.1300051', + sv: 'https://intra.kth.se/utbildning/systemstod/kursvardering-och-kursanalys/nytt-it-systemstod-for-kursvardering-och-kursanalys-1.1300051', +} diff --git a/test/AdminStartPage.test.js b/test/AdminStartPage.test.js index 1d3c2702..bf92950c 100644 --- a/test/AdminStartPage.test.js +++ b/test/AdminStartPage.test.js @@ -44,7 +44,7 @@ describe(' (and subordinates)', () => { test('Has correct h4 heading in correct order', done => { const { getAllByRole } = renderEditPage() const allH4Headers = getAllByRole('heading', { level: 4 }) - expect(allH4Headers.length).toBe(3) + expect(allH4Headers.length).toBe(4) expect(allH4Headers[0]).toHaveTextContent(/^Sidan Inför kursval/) expect(allH4Headers[1]).toHaveTextContent(/^Kurs-PM/) expect(allH4Headers[2]).toHaveTextContent(/^Kursanalys och kursdata/) @@ -54,7 +54,7 @@ describe(' (and subordinates)', () => { test('Has correct buttons and links in correct order', done => { const { getAllByRole } = renderEditPage() const allLinks = getAllByRole('link') - expect(allLinks.length).toBe(8) + expect(allLinks.length).toBe(9) expect(allLinks[0]).toHaveTextContent(/^Om kursen/) expect(allLinks[0].href).toBe('https://www.kth.se/student/kurser/kurs/SF1624?l=sv') @@ -75,13 +75,13 @@ describe(' (and subordinates)', () => { expect(allLinks[5]).toHaveTextContent(/^Ladda upp kurs-PM som PDF/) expect(allLinks[5].href).toBe('http://localhost/kursinfoadmin/pm/SF1624?l=sv') - expect(allLinks[6]).toHaveTextContent(/^Publicera ny/) - expect(allLinks[6].href).toBe( + expect(allLinks[7]).toHaveTextContent(/^Publicera ny/) + expect(allLinks[7].href).toBe( 'http://localhost/kursinfoadmin/kursutveckling/SF1624?l=sv&status=n&serv=admin&title=Algebra%20och%20geometri_7.5' ) - expect(allLinks[7]).toHaveTextContent(/^Ändra publicerad/) - expect(allLinks[7].href).toBe( + expect(allLinks[8]).toHaveTextContent(/^Ändra publicerad/) + expect(allLinks[8].href).toBe( 'http://localhost/kursinfoadmin/kursutveckling/SF1624?l=sv&status=p&serv=admin&title=Algebra%20och%20geometri_7.5' ) done() diff --git a/test/RolesAdminStartPage.test.js b/test/RolesAdminStartPage.test.js index 049c868b..0f3afbde 100644 --- a/test/RolesAdminStartPage.test.js +++ b/test/RolesAdminStartPage.test.js @@ -116,7 +116,7 @@ describe('User roles for this course ', () => { test('User: only responsible. Show all cards: course memo, course description and course analysis', done => { const { getAllByRole } = renderEditPage(ONLY_RESPONSIBLE) const allH4Headers = getAllByRole('heading', { level: 4 }) - expect(allH4Headers.length).toBe(3) + expect(allH4Headers.length).toBe(4) expect(allH4Headers[0]).toHaveTextContent(/^Sidan Inför kursval/) expect(allH4Headers[1]).toHaveTextContent(/^Kurs-PM/) expect(allH4Headers[2]).toHaveTextContent(/^Kursanalys och kursdata/) @@ -126,7 +126,7 @@ describe('User roles for this course ', () => { test('User: only examinator. Show all cards: course memo, course description and course analysis', done => { const { getAllByRole } = renderEditPage(ONLY_EXAMINATOR) const allH4Headers = getAllByRole('heading', { level: 4 }) - expect(allH4Headers.length).toBe(3) + expect(allH4Headers.length).toBe(4) expect(allH4Headers[0]).toHaveTextContent(/^Sidan Inför kursval/) expect(allH4Headers[1]).toHaveTextContent(/^Kurs-PM/) expect(allH4Headers[2]).toHaveTextContent(/^Kursanalys och kursdata/) @@ -136,7 +136,7 @@ describe('User roles for this course ', () => { test('User: only superuser. Show all cards: course memo, course description and course analysis', done => { const { getAllByRole } = renderEditPage(ONLY_SUPERUSER) const allH4Headers = getAllByRole('heading', { level: 4 }) - expect(allH4Headers.length).toBe(3) + expect(allH4Headers.length).toBe(4) expect(allH4Headers[0]).toHaveTextContent(/^Sidan Inför kursval/) expect(allH4Headers[1]).toHaveTextContent(/^Kurs-PM/) expect(allH4Headers[2]).toHaveTextContent(/^Kursanalys och kursdata/) @@ -146,7 +146,7 @@ describe('User roles for this course ', () => { test('User has two roles: teacher and superuser. Show all cards: course memo, course description and course analysis', done => { const { getAllByRole } = renderEditPage(TEACHER_AND_SUPERUSER) const allH4Headers = getAllByRole('heading', { level: 4 }) - expect(allH4Headers.length).toBe(3) + expect(allH4Headers.length).toBe(4) expect(allH4Headers[0]).toHaveTextContent(/^Sidan Inför kursval/) expect(allH4Headers[1]).toHaveTextContent(/^Kurs-PM/) expect(allH4Headers[2]).toHaveTextContent(/^Kursanalys och kursdata/) @@ -156,7 +156,7 @@ describe('User roles for this course ', () => { test('User has two roles: teacher and examinator. Show all cards: course memo, course description and course analysis', done => { const { getAllByRole } = renderEditPage(TEACHER_AND_EXAMINATOR) const allH4Headers = getAllByRole('heading', { level: 4 }) - expect(allH4Headers.length).toBe(3) + expect(allH4Headers.length).toBe(4) expect(allH4Headers[0]).toHaveTextContent(/^Sidan Inför kursval/) expect(allH4Headers[1]).toHaveTextContent(/^Kurs-PM/) expect(allH4Headers[2]).toHaveTextContent(/^Kursanalys och kursdata/) @@ -166,7 +166,7 @@ describe('User roles for this course ', () => { test('User has two roles: teacher and resonsible. Show all cards: course memo, course description and course analysis', done => { const { getAllByRole } = renderEditPage(TEACHER_AND_RESPONSIBLE) const allH4Headers = getAllByRole('heading', { level: 4 }) - expect(allH4Headers.length).toBe(3) + expect(allH4Headers.length).toBe(4) expect(allH4Headers[0]).toHaveTextContent(/^Sidan Inför kursval/) expect(allH4Headers[1]).toHaveTextContent(/^Kurs-PM/) expect(allH4Headers[2]).toHaveTextContent(/^Kursanalys och kursdata/)