Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Ajouter dans le didacticiel un embed sans complétion requise (PIX-13091) #9445

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reboucler avec Anaïs pour valider que le métier n'a pas besoin de relier fortement un embed à sa modalité

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