mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Latest beta of gift, true-false and mc tweaks, stem style
This commit is contained in:
parent
82b904ef82
commit
7dbbfbfe65
7 changed files with 19 additions and 10 deletions
12
client/package-lock.json
generated
12
client/package-lock.json
generated
|
|
@ -21,7 +21,7 @@
|
|||
"axios": "^1.6.7",
|
||||
"dompurify": "^3.2.3",
|
||||
"esbuild": "^0.23.1",
|
||||
"gift-pegjs": "^2.0.0-beta.0",
|
||||
"gift-pegjs": "^2.0.0-beta.1",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"katex": "^0.16.11",
|
||||
"marked": "^14.1.2",
|
||||
|
|
@ -66,6 +66,9 @@
|
|||
"vite-plugin-environment": "^1.1.3"
|
||||
}
|
||||
},
|
||||
"../GIFT-grammar-PEG.js": {
|
||||
"extraneous": true
|
||||
},
|
||||
"node_modules/@adobe/css-tools": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz",
|
||||
|
|
@ -7439,9 +7442,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/gift-pegjs": {
|
||||
"version": "2.0.0-beta.0",
|
||||
"resolved": "https://registry.npmjs.org/gift-pegjs/-/gift-pegjs-2.0.0-beta.0.tgz",
|
||||
"integrity": "sha512-M/U4zue2F9TXGEmIIf+nL9JWwudAR5pK4gLDeF2pFfKDNPF1MoCgCS9Vf37NH0oP+Grc7SJbq8FVUefqPH99NA==",
|
||||
"version": "2.0.0-beta.1",
|
||||
"resolved": "https://registry.npmjs.org/gift-pegjs/-/gift-pegjs-2.0.0-beta.1.tgz",
|
||||
"integrity": "sha512-NFWSu3KjpjKrfnbIu/eQOyQqjCgOd/ONDe3+bKhtTQCrTgQPVoybme9cm8tqBmJz1YynloocrPlv9f2syQl/LQ==",
|
||||
"dependencies": {
|
||||
"pegjs": "^0.10.x"
|
||||
}
|
||||
|
|
@ -10718,7 +10721,6 @@
|
|||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/pegjs/-/pegjs-0.10.0.tgz",
|
||||
"integrity": "sha512-qI5+oFNEGi3L5HAxDwN2LA4Gg7irF70Zs25edhjld9QemOgp0CbvMtbFcMvFtEo1OityPrcCzkQFB8JP/hxgow==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"pegjs": "bin/pegjs"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
"axios": "^1.6.7",
|
||||
"dompurify": "^3.2.3",
|
||||
"esbuild": "^0.23.1",
|
||||
"gift-pegjs": "file:../GIFT-grammar-PEG.js",
|
||||
"gift-pegjs": "^2.0.0-beta.1",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"katex": "^0.16.11",
|
||||
"marked": "^14.1.2",
|
||||
|
|
|
|||
|
|
@ -72,6 +72,11 @@
|
|||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.present-question-stem {
|
||||
margin-bottom: 2vh;
|
||||
}
|
||||
|
||||
.preview-container {
|
||||
margin-bottom: 2vh;
|
||||
width: 60vw;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default function MultipleChoiceTemplate({
|
|||
type: 'Choix multiple',
|
||||
title: title
|
||||
}),
|
||||
`<p style="${ParagraphStyle(state.theme)}">${textType(formattedStem)}</p>`,
|
||||
`<p style="${ParagraphStyle(state.theme)}" class="present-question-stem">${textType(formattedStem)}</p>`,
|
||||
MultipleChoiceAnswers({ choices: choices }),
|
||||
formattedGlobalFeedback ? GlobalFeedback(formattedGlobalFeedback) : ''
|
||||
]
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ export default function Title({ type, title }: TitleOptions): string {
|
|||
<div style="${Container}">
|
||||
<span>
|
||||
${
|
||||
title !== null
|
||||
title
|
||||
? `<span style="${QuestionTitle}">${title}</span>`
|
||||
: `<span style="${OptionalTitle}"><em>(Sans titre)</em></span>`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ import GlobalFeedback from './GlobalFeedbackTemplate';
|
|||
import MultipleChoiceAnswersTemplate from './MultipleChoiceAnswersTemplate';
|
||||
import Title from './TitleTemplate';
|
||||
import { TextChoice, TrueFalseQuestion } from 'gift-pegjs';
|
||||
import { ParagraphStyle } from '../constants';
|
||||
import { state } from '.';
|
||||
import DOMPurify from 'dompurify';
|
||||
|
||||
type TrueFalseOptions = TemplateOptions & TrueFalseQuestion;
|
||||
|
|
@ -40,7 +42,7 @@ export default function TrueFalseTemplate({
|
|||
type: 'Vrai/Faux',
|
||||
title: title
|
||||
}),
|
||||
`<div dangerouslySetInnerHTML={{ __html: ${DOMPurify.sanitize(textType(formattedStem))} }} />`,
|
||||
`<p style="${ParagraphStyle(state.theme)}" class="present-question-stem">${DOMPurify.sanitize(textType(formattedStem))}</p>`,
|
||||
MultipleChoiceAnswersTemplate({ choices: choices }),
|
||||
formattedGlobalFeedback ? GlobalFeedback(formattedGlobalFeedback) : ``
|
||||
]
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
"supertest": "^6.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "18.x"
|
||||
"node": "20.x"
|
||||
},
|
||||
"jest": {
|
||||
"testEnvironment": "node",
|
||||
|
|
|
|||
Loading…
Reference in a new issue