Skip to content

Commit

Permalink
[FEATURE] Ajouter dans le didacticiel un embed sans complétion requise (
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge committed Jul 9, 2024
2 parents 55e292d + d2a26b6 commit ac3bb35
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,55 @@
}
]
},
{
"id": "46577fb1-aadb-49ba-b3fd-721a11da8eb4",
"type": "activity",
"title": "Embed non-auto",
"components": [
{
"type": "element",
"element": {
"id": "0e3315fd-98ad-492f-9046-4aa867495d84",
"type": "embed",
"isCompletionRequired": false,
"title": "Application",
"url": "https://epreuves.pix.fr/fake2.html",
"height": 640
}
},
{
"type": "element",
"element": {
"id": "74d63ec2-f3e3-4ffe-9806-208d33588553",
"type": "qcm",
"instruction": "<p>Parcourez ces photos trouvées sur le Web : lesquelles correspondent à des situations fictives&#8239;?</p>",
"proposals": [
{
"id": "1",
"content": "Photo 1"
},
{
"id": "2",
"content": "Photo 2"
},
{
"id": "3",
"content": "Photo 3"
},
{
"id": "4",
"content": "Photo 4"
}
],
"feedbacks": {
"valid": "<span class=\"feedback__state\">Correct&#8239;!</span>",
"invalid": "<span class=\"feedback__state\">Et non&#8239;!</span>"
},
"solutions": ["1", "2", "4"]
}
}
]
},
{
"id": "7cf75e70-8749-4392-8081-f2c02badb0fb",
"type": "activity",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import Joi from 'joi';

import { htmlNotAllowedSchema, uuidSchema } from '../utils.js';

const embedSchema = Joi.object({
id: uuidSchema,
type: Joi.string().valid('embed').required(),
isCompletionRequired: Joi.boolean().valid(false).required(),
title: htmlNotAllowedSchema.required(),
url: Joi.string().uri().required(),
height: Joi.number().min(0).required(),
}).required();

export { embedSchema };
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { embedSchema } from './embed.js';
import { imageElementSchema } from './image.js';
import { qcmElementSchema } from './qcm.js';
import { qcuElementSchema } from './qcu.js';
Expand All @@ -8,6 +9,7 @@ import { videoElementSchema } from './video.js';
export {
blockInputSchema,
blockSelectSchema,
embedSchema,
imageElementSchema,
qcmElementSchema,
qcuElementSchema,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Joi from 'joi';

import {
embedSchema,
imageElementSchema,
qcmElementSchema,
qcuElementSchema,
Expand Down Expand Up @@ -31,6 +32,7 @@ const elementSchema = Joi.alternatives().conditional('.type', {
{ is: 'qcm', then: qcmElementSchema },
{ is: 'qrocm', then: qrocmElementSchema },
{ is: 'video', then: videoElementSchema },
{ is: 'embed', then: embedSchema },
],
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Fonctionnalité: Accessibilité de Modulix
Quand je vais au grain suivant
Quand je vais au grain suivant
Quand je vais au grain suivant
Quand je vais au grain suivant
Alors la page devrait être accessible
Quand je clique sur "Terminer"
Et que j'attends 500 ms
Expand Down

0 comments on commit ac3bb35

Please sign in to comment.