feat(backend): Rendering van meerkeuzevragen en open vragen (essay) toegevoegd + getest

This commit is contained in:
Gerald Schmittinger 2025-03-11 02:00:27 +01:00
parent 164a547dd1
commit bc0ac63c92
20 changed files with 126 additions and 16 deletions

View file

@ -0,0 +1,14 @@
<div class="learning-object-gift">
<div id="gift-q1" class="gift-question">
<h2 id="gift-q1-title" class="gift-title">MC basic</h2>
<p id="gift-q1-stem" class="gift-stem">Are you following along well with the class?</p>
<div class="gift-choice-div">
<input value="0" name="gift-q1-choices" id="gift-q1-choice-0" type="radio">
<label for="gift-q1-choice-0">[object Object]</label>
</div>
<div class="gift-choice-div">
<input value="1" name="gift-q1-choices" id="gift-q1-choice-1" type="radio">
<label for="gift-q1-choice-1">[object Object]</label>
</div>
</div>
</div>

View file

@ -3,6 +3,7 @@ import {LearningObject} from "../../../../src/entities/content/learning-object.e
import {loadTestAsset} from "../../../test-utils/load-test-asset";
import {EnvVars, getEnvVar} from "../../../../src/util/envvars";
import {Language} from "../../../../src/entities/content/language";
import {DwengoContentType} from "../../../../src/services/learning-objects/processing/content-type";
const example: LearningObjectExample = {
createLearningObject: () => {
@ -12,6 +13,7 @@ const example: LearningObjectExample = {
learningObject.version = 1;
learningObject.title = "Multiple choice question for testing";
learningObject.description = "This multiple choice question was only created for testing purposes.";
learningObject.contentType = DwengoContentType.GIFT;
learningObject.content = loadTestAsset("learning-objects/test-multiple-choice/content.txt");
return learningObject;
},