<?xml version="1.0" encoding="UTF-8"?>
<quiz>
<!-- question: 8990875  -->
  <question type="stack">
    <name>
      <text>Checkbox</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Multiple-Choice</h5>
    <p>Mit STACK können auch Multiple-Choice-Fragen umgesetzt werden. Im Vergleich zu den Moodle-Fragetypen "Multiple-Choice" und "Berechnete Multiple-Choice" ist STACK deutlich flexibler, denn alle Features von STACK und dem CAS Maxima stehen hier wie gewohnt zur Verfügung. In dieser Beispielaufgabe bekommen die Studierenden im spezifischen Feedback nicht nur die Information, welche falschen Antwortoptionen sie angekreuzt haben und welche korrekten Optionen sie nicht angekreuzt haben. Das Feedback enthält auch einen Hinweis, wenn mehr als zwei Optionen angekreuzt wurden, obwohl ein Polynom zweiten Grades höchstens zwei Nullstellen besitzen kann.</p>
</div>

<p>Wählen Sie alle Nullstellen von \( f(x) = {@fx@} \) aus.</p>
<p>Antwort: [[input:ans1]] [[validation:ans1]]</p>
<p>[[feedback:prt1]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025073100</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[/*
Die Aufgabe „Checkbox“, Team E-Learning@Hochschule Ruhr West von Jonas Lache ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/). Letzte Änderung: 15.05.2025
*/

/* Als erstes werden Nullstellen des Polynoms generiert: */
n1: rand_with_step(1,5,1);
n2: rand_with_prohib(-5,-1,[-n1]);

/* Die Musterlösung der Aufgabe ist die Menge mit den beiden Nullstellen: */
ta: set(n1,n2);

/* Die folgende Variable wird für die Konfiguration des Multiple-Choice-Eingabefelds benötigt: */
Liste: [[n1,true],[n2,true],[n1-1,false],[n2+1,false]];
Liste: random_permutation(Liste);

/* Aus den Nullstellen wird das Polynom generiert und mit "expand" ausmultipliziert: */
fx: expand((x-n1)*(x-n2));]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>Nullstellen: {@ta@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<p>Richtige Antwort, gut gemacht!</p>]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<p>Ihre Antwort ist teilweise korrekt.</p>]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<p>Falsche Antwort.</p>]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>checkbox</type>
      <tans>Liste</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options>nonotanswered</options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text><![CDATA[/* ans1 ist eine Liste, die im Folgenden in eine Menge umgewandelt wird: */
SAns1: setify(ans1);

/* Menge mit angekreuzten falschen Optionen: */
falsche_eintraege: if is(length(setdifference(SAns1,ta))=0) then "keine" else sequenceify(setdifference(SAns1,ta));

/* Menge mit nicht angekreuzten korrekten Optioinen: */
fehlende_eintraege: if is(length(setdifference(ta,SAns1))=0) then "keine" else sequenceify(setdifference(ta,SAns1));]]></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description>Ist die Auswahl richtig?</description>
        <answertest>AlgEquiv</answertest>
        <sans>SAns1</sans>
        <tans>ta</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Sie haben die folgenden nicht korrekten Optionen angekreuzt: {@falsche_eintraege@}</p>
<p>Die folgenden Optionen korrekten Optionen haben Sie nicht angekreuzt: {@fehlende_eintraege@}</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description>Wurden mehr als zwei Optionen angekreuzt?</description>
        <answertest>GT</answertest>
        <sans>length(ans1)</sans>
        <tans>2</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Zudem haben Sie mehr als zwei Optionen angekreuzt. Da \(f\) ein Polynom zweiten Grades ist, kann es allerdings nur höchstens zwei Nullstellen besitzen.</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>186843942</deployedseed>
    <deployedseed>344463755</deployedseed>
    <deployedseed>1693119885</deployedseed>
    <deployedseed>417506761</deployedseed>
    <deployedseed>441692198</deployedseed>
    <deployedseed>447014554</deployedseed>
    <deployedseed>870764203</deployedseed>
    <deployedseed>1185532003</deployedseed>
    <deployedseed>897523534</deployedseed>
    <deployedseed>317002260</deployedseed>
    <deployedseed>784613564</deployedseed>
    <deployedseed>1082025936</deployedseed>
    <deployedseed>1111447187</deployedseed>
    <deployedseed>1562132416</deployedseed>
    <deployedseed>876520855</deployedseed>
    <deployedseed>1603823949</deployedseed>
    <deployedseed>1738159176</deployedseed>
    <deployedseed>1597780532</deployedseed>
    <deployedseed>1108903901</deployedseed>
    <deployedseed>544206185</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Korrekte Antwort</description>
      <testinput>
        <name>ans1</name>
        <value>mcq_correct(Liste)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8990887  -->
  <question type="stack">
    <name>
      <text>Drag-and-drop (Nullstellen)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Drag-and-drop</h5>
    <p>Mit STACK lassen sich auch Aufgaben umsetzen, in denen Textbausteine per Drag-and-drop verschoben werden müssen. Gegenüber den anderen Moodle-Fragetypen, die eine solche Funktion bieten, besitzt STACK den Vorteil, dass das Computeralgebrasystem weiterhin verfügbar ist (z. B. für die Randomisierung der Aufgabe) und auch die Funktionen für spezifisches Feedback wie gewohnt genutzt werden können.</p>
   <p>Der hier zu sehende Aufgabentyp, in dem Elemente in eine richtige Reihenfolge gebracht werden müssen, ist nur einer von mehreren möglichen Aufgabentypen. Mehr dazu finden Sie im entsprechenden Video-Tutorial in diesem Kurs.</p>
</div>

<p>Auf der rechten Seite sehen Sie verschiedene Schritte, um die Nullstellen der Funktion \(f(x)={@fx@}\) zu bestimmen. Bringen Sie die Schritte in die richtige Reihenfolge, indem Sie sie per Drag-and-drop in das linke Feld ziehen und dort anordnen.</p>

[[parsons input="ans1"]]
{# parsons_encode(poly_steps) #}
[[/parsons ]]
<p>[[input:ans1]] [[validation:ans1]]</p>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025073100</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[/*
Die Aufgabe „Drag-and-drop (Nullstellen)“ von Jonas Lache, Team E-Learning@Hochschule Ruhr West, ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/). Sie basiert auf der Aufgabe „Parsons proofs 1- Minimal“, die als Teil der STACK-Fragenbibliothek ebenfalls unter CC BY-SA 4.0 lizenziert ist (https://github.com/maths/moodle-qtype_stack/blob/aa372f1b0c8aa6cfb86d15f36978c747dbbda9b5/samplequestions/stacklibrary/Doc-Examples/Specialist-Tools-Docs/ParsonsProof/Parsons-1-minimal.xml).  
*/

/* Einbinden einer Bibliothek, die viele Funktionen für Drag-und-Drop bietet: */
stack_include("contribl://prooflib.mac");

/* Generieren der Funktionsgleichung: */
fx: 0;
/* Der Koeffizient von x^2 soll nicht 0 sein */
while coeff(fx,x,2)=0 do(
   n1: rand_with_prohib(-2,2,[0]),
   n2: rand_with_prohib(-5,5,[0,n1,-n1]),
   n3: rand_with_prohib(-5,5,[0,n1,-n1,n2,-n2]),
   fx: expand(2*(x-n1)*(x-n2)*(x-n3))
);
/* Ergebnis der Polynomdivision: */
fx2: expand(2*(x-n2)*(x-n3));
/* Bestimme p und q: */
a1: coeff(fx2,x,2);
b1: coeff(fx2,x,1);
c1: coeff(fx2,x,0);
p1: b1/a1;
q1: c1/a1;
fx3: x^2+p1*x+q1;
/* Lösungsmenge: */
sol: {n1,n2,n3};

/* Konfiguration des Drag-and-drop: */
ta:proof("Raten","Polynomdivision","Umstellen","pqFormel","Berechnen","Loesungsmenge");
poly_steps:[
  ["Raten", sconcat("Rate eine mögliche Nullstelle des Polynoms \\(f(x) =", tex1(fx), "\\). Beispielsweise ist \\(x_1=", n1, "\\) eine Nullstelle von \\(f\\).")],
  ["Polynomdivision", sconcat("Führe die Polynomdivision von \\(f(x)=",tex1(fx),"\\) durch den Linearfaktor \\(",x-n1,"\\) durch, um ein quadratisches Polynom \\(g(x)\\) zu erhalten. Heraus kommt \\(g(x)=", tex1(fx2), "\\).")],
  ["Umstellen", sconcat("Stelle \\(g(x)\\) in die Standardform \\(x^2 + px + q = 0\\) um. Heraus kommt \\(0=",tex1(fx3),"\\).")],  
  ["pqFormel", sconcat("Verwende die pq-Formel \\(x = -\\frac{p}{2} \\pm \\sqrt{\\left(\\frac{p}{2}\\right)^2 - q}\\) mit \\(p=",p1,"\\) und \\(q=",q1,"\\).")],
  ["Berechnen", sconcat("Dies liefert die folgenden weiteren Lösungen: \\(x_2=",n2,"\\) und \\(x_3=",n3,"\\).")],
  ["Loesungsmenge", sconcat("Insgesamt lautet die Lösungsmenge also:  \\(\\mathbb{L} = ",tex1(sol),"\\).")]
];
poly_steps: random_permutation(poly_steps);

/*Korrekte Reihenfolge:*/
ta: proof("Raten", "Polynomdivision", "Umstellen", "pqFormel", "Berechnen", "Loesungsmenge");]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text>[[feedback:prt1]]</text>
    </specificfeedback>
    <questionnote format="html">
      <text>{@fx@}</text>
    </questionnote>
    <questiondescription format="markdown">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text>Richtige Antwort, gut gemacht!</text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text>Ihre Antwort ist teilweise korrekt.</text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text>Falsche Antwort.</text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>parsons</type>
      <tans>[ta, poly_steps]</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text>sa: parsons_decode(ans1);
[pd, saa]:proof_assessment(sa, proof_alternatives(ta));</text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description>Check distance to nearest correct proof.</description>
        <answertest>AlgEquiv</answertest>
        <sans>pd</sans>
        <tans>0</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text>{@proof_assessment_display(saa, poly_steps)@}</text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>927793447</deployedseed>
    <deployedseed>241245299</deployedseed>
    <deployedseed>652900190</deployedseed>
    <deployedseed>1939981977</deployedseed>
    <deployedseed>1718433118</deployedseed>
    <deployedseed>807051445</deployedseed>
    <deployedseed>384751437</deployedseed>
    <deployedseed>1676980459</deployedseed>
    <deployedseed>1130440700</deployedseed>
    <deployedseed>2053528474</deployedseed>
    <deployedseed>919027421</deployedseed>
    <deployedseed>1007806653</deployedseed>
    <deployedseed>2087601971</deployedseed>
    <deployedseed>456795132</deployedseed>
    <deployedseed>895693433</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Testfall, der annimmt, dass die Eingabe der Trainer/innen die volle Punktezahl erreicht.</description>
      <testinput>
        <name>ans1</name>
        <value>apply(parsons_answer,[ta, poly_steps])</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8990889  -->
  <question type="stack">
    <name>
      <text>Dropdown-Liste (+ Reveal-Block) Parabel</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Dropdown-Liste (+ Reveal-Block)</h5>
    <p>In dieser Beispielaufgabe beantworten die Studierenden zunächst eine Frage mittels einer Dropdown-Liste. Wird aus
        der Liste "Ja, der Punkt liegt auf dem Graphen von f" ausgewählt, öffnet sich ein weiterer Aufgabenteil, in dem die
        Studierenden die Gleichung der Tangente an \(f\) im Punkt \(P\) angeben sollen.</p>
</div>

<p><strong>(a)</strong> Überprüfen Sie, ob der Punkt \(P({@x0@}\mid{@y0@})\) auf dem Graphen der Funktion \(f(x)={@fx@}\) liegt.</p>

<p>Antwort: [[input:ans1]]. [[validation:ans1]]</p>

[[reveal input="ans1" value="1"]]
<div class="alert alert-dark">
   <p><strong>(b)</strong> Bestimmen Sie die Gleichung der Tangente \(t(x)\) an \(f\) im Punkt \(P\).</p>
   <p>Antwort: \(t(x)=\) [[input:ans2]] [[validation:ans2]]</p>
</div>
[[/reveal]]

<p>[[feedback:prt1]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025073100</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[/*
Die Aufgabe „Dropdown-Liste (+ Reveal-Block) Parabel“, Team E-Learning@Hochschule Ruhr West von Jonas Lache ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/).
*/

/* Konstruiere eine Funktion fx=x^2+bx+c, die durch den
randomisierten Punkt (x0,y0) sowie den festen Punkt (2,0) verläuft: */
x0: rand_with_step(3,6,1);
y0: rand_with_prohib(3,6,[x0]);
fx1(x):=x^2+b*x+c;
eq1: 0=fx1(2);
eq2: y0=x0^2+b*x0+c;
sol: solve([eq1,eq2],[b,c]);
b1: rhs(sol[1][1]);
c1: rhs(sol[1][2]);
fx: x^2+b1*x+c1;

/* Aufgabe (a): */
Liste: [[1,true,"Ja, der Punkt liegt auf dem Graphen von f"],[2,true,"Nein, der Punkt liegt nicht auf dem Graphen von f"]];

/* Aufgabe (b): */
dfx: diff(fx,x);
m1: subst(x=x0,dfx);
n1: y0-m1*x0;
tx: m1*x+n1;]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text></text>
    </specificfeedback>
    <questionnote format="html">
      <text>{@fx@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text>Richtige Antwort, gut gemacht!</text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text>Ihre Antwort ist teilweise korrekt.</text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text>Falsche Antwort.</text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>dropdown</type>
      <tans>Liste</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options></options>
    </input>
    <input>
      <name>ans2</name>
      <type>algebraic</type>
      <tans>tx</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options>allowempty</options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description>Aufgabe (a)</description>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>1</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0.2</truescore>
        <truepenalty></truepenalty>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>zu (a):</p>
<p>Richtige Antwort! Der Punkt \(P({@x0@}\mid{@y0@})\) liegt auf dem Graphen der Funktion \(f\), denn es gilt \(f({@x0@})={@subst(x=x0, fx), simp:false@} = {@y0, simp=true@}\).</p>]]></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Falsche Antwort. Der Punkt \(P({@x0@}\mid{@y0@})\) liegt auf dem Graphen der Funktion \(f\), denn es gilt \(f({@x0@})={@subst(x=x0, fx), simp=false@} = {@y0, simp=true@}\).</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description>Aufgabe (b) -- wurde das Feld ausgefüllt?</description>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>EMPTYANSWER</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>2</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description>Aufgabe (b) -- stimmt die Tangentengleichung?</description>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>tx</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.8</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-3-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<hr>
<p>zu (b):</p>
<p>Richtige Antwort! Die Gleichung der Tangente \(t(x)\) an \(f\) im Punkt \(P({@x0@}\mid{@y0@})\) lautet \(t(x)={@ans2@}\).</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-3-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<hr>
<p>zu (b):</p>
<p>Falsche Antwort. Die Gleichung der Tangente \(t(x)\) an \(f\) im Punkt \(P({@x0@}\mid{@y0@})\) lautet \(t(x)={@tx@}\).</p>]]></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>576203888</deployedseed>
    <deployedseed>419615283</deployedseed>
    <deployedseed>709475098</deployedseed>
    <deployedseed>374269589</deployedseed>
    <deployedseed>1239436320</deployedseed>
    <deployedseed>639319619</deployedseed>
    <deployedseed>1419919372</deployedseed>
    <deployedseed>1962875753</deployedseed>
    <deployedseed>1868792654</deployedseed>
    <deployedseed>2027390492</deployedseed>
    <deployedseed>1713390039</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Gibt richtige Antwort die volle Punktzahl?</description>
      <testinput>
        <name>ans1</name>
        <value>first(mcq_correct(Liste))</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>tx</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-3-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description><![CDATA[Fall, dass bei (a) "Nein" ausgewählt wird]]></description>
      <testinput>
        <name>ans1</name>
        <value>2</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>EMPTYANSWER</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty></expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description><![CDATA[Fall, dass bei (a) "Ja" ausgewählt wird, aber ans2 falsch ist]]></description>
      <testinput>
        <name>ans1</name>
        <value>first(mcq_correct(Liste))</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>tx+1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.2000000</expectedscore>
        <expectedpenalty></expectedpenalty>
        <expectedanswernote>prt1-3-F</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8990872  -->
  <question type="stack">
    <name>
      <text>Empirische Verteilungsfunktion zeichnen (ab STACK v4.4.3)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<style>
    .data-table {
        border-collapse: collapse;
        margin: 25px 0;
        font-size: 0.9em;
        min-width: 400px;
        border-radius: 5px 5px 0 0;
        overflow: hidden;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        background-color: #ffffff;
        color: #17365c;
    }

    .data-table thead tr {
        background-color: #17365c;
        color: #ffffff;
        text-align: left;
        font-weight: bold;
    }

    .data-table th,
    .data-table td {
        padding: 12px 15px;
    }

    .data-table tbody tr {
        border-bottom: 1px solid #e7e7e7;
    }

    .data-table tbody tr:nth-of-type(even) {
        background-color: #f3f3f3;
    }

    .data-table tbody tr:last-of-type {
        border-bottom: 2px solid #17365c;
    }

    .data-table tbody tr.active-row {
        font-weight: bold;
        color: #17365c;
    }
</style>

<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Empirische Verteilungsfunktion zeichnen (JSXGraph)</h5>
    <p>In dieser Beispielaufgabe müssen die Studierenden eine empirische Verteilungsfunktion zeichnen, indem sie in einer interaktiven Grafik Punkte einzeichnen. Die Aufgabe ist ein Beispiel für eine sehr fortgeschrittene Nutzung der JavaScript-Bibliothek JSXGraph zur Verwendung interaktiver Grafiken in STACK-Aufgaben. Zudem fungiert sie als Beispiel für den didaktischen Ansatz, Grafiken im Feedback einer digitalen Mathematikaufgabe zu verwenden. Die Aufgabe ist im Rahmen des Projekts <a href="https://rub.de/oer-stochastik-nrw" target="_blank">OER.Stochastik.nrw</a> entstanden.</p>
 </div>

<p>Eine Klimastation führt eine Statistik über die Jahresmitteltemperatur der Stadt. Die Jahresmitteltemperatur in den Jahren {#Jahre[1]#} bis {#Jahre[10]#} ist wie folgt verteilt:</p>

<div style="overflow-x:auto;">
	<table class="data-table">
		<thead>
		<tr>
			<th>Jahr</th>
			<td>{#Jahre[1]#}</td>
			<td>{#Jahre[2]#}</td>
			<td>{#Jahre[3]#}</td>
			<td>{#Jahre[4]#}</td>
			<td>{#Jahre[5]#}</td>
			<td>{#Jahre[6]#}</td>
			<td>{#Jahre[7]#}</td>
			<td>{#Jahre[8]#}</td>
			<td>{#Jahre[9]#}</td>
			<td>{#Jahre[10]#}</td>
		</tr>
		</thead>
		<tbody>
		<tr>
			<th>Temperatur [°C]</th>
			<td>{#a1#}</td>
			<td>{#a2#}</td>
			<td>{#a3#}</td>
			<td>{#a4#}</td>
			<td>{#a5#}</td>
			<td>{#a6#}</td>
			<td>{#a7#}</td>
			<td>{#a8#}</td>
			<td>{#a9#}</td>
			<td>{#a10#}</td>
		</tr>
		</tbody>
	</table>
</div>

 <br>

<p>Zeichnen Sie die empirische Verteilungsfunktion dieser Datenpunkte, indem Sie an den Sprungstellen der Funktion per Mausklick Punkte zum Koordinatensystem hinzufügen. Sie können einen bereits hinzugefügten Punkt entfernen, indem Sie auf ihn klicken.</p>

[[jsxgraph input-ref-jsxvar="jsxvarRef"]]
    [[style]]
    .jxgbox  {
        border-style:none;
        background: none;
    }
    [[/style]]

Array.prototype.remove = function ( index ) {
    return this.filter(item => item !== value);
};  

Array.prototype.insert = function ( index, item ) {
    this.splice( index, 0, item );
};        

Array.prototype.insertPos = function ( item ) {
    let pos=this.findIndex(function(number) {
            return number > item;
        });
    if(pos>-1) return pos; else return this.length;
};

JXG.Options.point.snapToGrid = true;
JXG.Options.point.snapSizeX = 0.1;
JXG.Options.point.snapSizeY = 0.1;
JXG.Options.point.withLabel = false;

const board = JXG.JSXGraph.initBoard(divid, {
    showCopyright: false,
    boundingbox: [7.5,1.09,11,-0.1],
    axis: true,
    showNavigation:false,
    pan:{enabled:false},
    zoom:{enabled:false}
});

board.defaultAxes.y.setAttribute({visible:'false'});
board.defaultAxes.x.setAttribute({visible:'false'});

var newXAxis = board.create('axis',[[0,0],[1,0]],{
    ticks:{
        drawZero:true,
        label: {offset: [0,-3], anchorX: 'middle', anchorY: 'top'}
    }
});

var newYAxis = board.create('axis',[[8,0],[8,1]],{
    ticks:{
        label: {offset: [-3,0], anchorX: 'right', anchorY: 'middle'}
    }
});

function unpack_input(value){
    var liste = [];
    var tmp = JSON.parse(value);
    var num_points = tmp.length;
    for (let i=0; i < num_points; i++) {
        let p_temp = [tmp[i].x, tmp[i].y];
        liste.push(p_temp);
    };
    return liste;
};

var linienende = 1000;

var jsxvar_inputfield = document.getElementById(jsxvarRef);
var listeP = [];
var liste_temp = (jsxvar_inputfield.value  == "") ? [] : unpack_input(jsxvar_inputfield.value);
var listeX = (jsxvar_inputfield.value  == "") ? [-1000.1] : liste_temp.map((point)=>point[0]);
var listeY = (jsxvar_inputfield.value  == "") ? [0] : liste_temp.map((point)=>point[1]);
var listeS = [];

for (let i=0;i<listeX.length;i++) {
    var X=JXG._round10(listeX[i],-1);
    var Y=JXG._round10(listeY[i],-1);
    var nextX=0;
    const p=board.create('point', [X, Y]);
    listeP.push(p);
    if(i<listeX.length-1){
        nextX=listeX[i+1];
    } else {
        nextX=linienende;
    };
    const s = board.create('segment', [[X,Y],[nextX, Y]],{
        highlight:false
    });
    listeS.push(s);
};

function getMouseCoords (e, i) {
    var cPos = board.getCoordsTopLeftCorner(e, i),
        absPos = JXG.getPosition(e, i),
        dx = absPos[0]-cPos[0],
        dy = absPos[1]-cPos[1];
    return new JXG.Coords(JXG.COORDS_BY_SCREEN, [dx, dy], board);
};

function down(e) {
    let canCreate = true, i, coords, el;
    if (e[JXG.touchProperty]) {
        // index of the finger that is used to extract the coordinates
        i = 0;
    }
    coords = getMouseCoords(e, i);
    for (let el in board.objects) {
        if(JXG.isPoint(board.objects[el]) && board.objects[el].hasPoint(coords.scrCoords[1], coords.scrCoords[2])) {
            i = listeX.indexOf(board.objects[el].X());
            if(i>-1){
                canCreate = false;
                board.removeObject(listeP[i]);
                board.removeObject(listeS[i]);
                if(i>0){
                    board.removeObject(listeS[i-1]);
                    if(i<listeX.length-1){
                        nextX = listeX[i+1];
                    } else {
                        nextX = linienende;
                    }
                    const s = board.create('segment', [[listeX[i-1],listeY[i-1]],[nextX, listeY[i-1]]],{
                        highlight:false
                    });
                    listeS[i-1]=s;
                };
                listeX.splice(i,1);
                listeY.splice(i,1);
                listeP.splice(i,1);
                listeS.splice(i,1);
            break;
        };
    };
};

if(canCreate && coords.usrCoords[2]>=0 && coords.usrCoords[2]<=1){
    const p = board.create('point', [coords.usrCoords[1], coords.usrCoords[2]]);
    if(listeX.indexOf(p.X())==-1) {
        i = listeX.insertPos(p.X())
            if(i>0){
                board.removeObject(listeS[i-1]);
                const s = board.create('segment',[
                    [listeX[i-1],listeY[i-1]],
                    [p.X(), listeY[i-1]]
                ],{
                        highlight:false
                });
                listeS[i-1] = s;
            };  

            listeX.insert(i,p.X());
            listeY.insert(i,p.Y());
            listeP.insert(i,p);
            stack_jxg.register_object(jsxvarRef, p, serializer);
            if(i<listeX.length-1){
                nextX=listeX[i+1];
            } else {
                nextX=linienende;
            };
            const s = board.create('segment', [[p.X(),p.Y()],[nextX, p.Y()]],{
                highlight:false
            });
            listeS.insert(i,s);
        } else {
            i = listeX.indexOf(p.X());
            board.removeObject(listeP[i]);
            board.removeObject(listeS[i]);
            if(i<listeX.length-1){
                nextX=listeX[i+1];
            } else {
                nextX=linienende;
            };
            const s = board.create('segment', [[p.X(),p.Y()],[nextX, p.Y()]]);
            listeS[i]=s;
            listeY[i]=p.Y();
            listeP[i]=p;
            stack_jxg.register_object(jsxvarRef, p, serializer);
        };
    };
};

board.on('down', down);

function serializer(){
    var r = [];
    for (let i=0; i < listeP.length; i++) {
        r.push({x:listeP[i].X(),y:listeP[i].Y()});
    };
    return JSON.stringify(r);
}; 

function deserializer(value){};

stack_jxg.custom_bind(jsxvarRef, serializer, deserializer, listeP);
[[/jsxgraph]]

<p>Bitte klicken Sie nach dem Zeichnen auf "Prüfen".</p>

<div style="display:none;">
    [[input:jsxvar]] [[validation:jsxvar]]
</div>

[[feedback:prt1]]]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025073100</text>
    </stackversion>
    <questionvariables>
      <text><![CDATA[/*
  Empirische Verteilungsfunktion zeichnen

  wurde entwickelt von
  
    Jonas Lache <jonas.lache[at]ruhr-uni-bochum.de>
    Michael Kallweit <michael.kallweit[at]ruhr-uni-bochum.de>

  unter Mithilfe von

    Daniel Meißner <daniel.meissner-i4k[at]ruhr-uni-bochum.de>

  an der Ruhr-Universität Bochum.

  Dieses Werk ist lizenziert unter einer Creative Commons
  Namensnennung-Weitergabe unter gleichen Bedingungen 4.0 International
  Lizenz. Um eine Kopie der Lizenz zu erhalten, besuchen Sie
  http://creativecommons.org/licenses/by-sa/4.0/.

  SPDX-License-Identifier: CC-BY-SA-4.0

  Technische Informationen:
  
  Der Fragetext dieser Aufgabe enthält Jahreszahlen. Es empfiehlt sich,
  die entsprechende Maxima-Variable `Jahre` zu aktualisieren, damit die
  Jahreszahlen nicht veraltet wirken.

  Die interaktive Grafik enthält Teile des Codes der Universität Bayreuth, siehe 
  https://jsxgraph.uni-bayreuth.de/wiki/index.php?title=Browser_event_and_coordinates

  Diese Aufgabe ist ursprünglich im Landesportal ORCA.nrw
  erschienen:
  https://www.twillo.de/edu-sharing/components/render/e80c5ca0-c53d-45fc-b2c2-4e34b85f2e0e

  Bei der vorliegenden Version handelt es sich um eine von Jonas Lache
  an der Hochschule Ruhr West bearbeitete Version (letzte Änderung: 25.09.2025).
*/

/* ALLGEMEINE FUNKTIONEN/EINSTELLUNGEN: */
fpprintprec: 4; /*Anzahl der gedruckten Stellen*/
summe(L):= sum(L[k],k,1,length(L)); /*Funktion für Summe der Elemente der Liste L*/
dp(x):= decimalplacesfun(x,2,false);
/* Überprüft, ob eine Antwort mit Sprungstellen in der Liste L monoton steigend ist: */
monotonp(L):= is(sort(makelist((sort(L))[k][2],k,1,length(sort(L))))=makelist((sort(L))[k][2],k,1,length(sort(L))));
/* Häufigkeit von x in der Liste L: */
haeuf(L,x):= length(sublist(L,lambda([z],z=x)));

unpack_coordinates(m) := block([],
 if not ev(listp(m) and is(unique(map(is_stackmap,m))=[true]), simp) then return(und), 
 if is(map(lambda([x],listp(x) and is(length(x)=3)),m)=[false]) then return(und),
 return(makelist([m[i][2][2],m[i][3][2]],i,1,length(m)))
);

/* AUFGABENSTELLUNG: */
/* Folgende Variable ggf. aktualisieren, damit die Daten nicht veraltet wirken: */
Jahre: makelist(2015+i,i,0,9);
/* Eindeutige Datenwerte: */
wert1: rand_with_step(85,105,1); /*Ein Wert kommt dreimal vor*/
wert2: rand_with_prohib(85,105,[wert1]); /*Ein Wert kommt zweimal vor*/
wert3: rand_with_prohib(85,105,[wert1,wert2]); /*Auch dieser Wert kommt zweimal vor*/
wert4: rand_with_prohib(85,105,[wert1,wert2,wert3]); /*usw.*/
wert5: rand_with_prohib(85,105,[wert1,wert2,wert3,wert4]);
wert6: rand_with_prohib(85,105,[wert1,wert2,wert3,wert4,wert5]);
/* Die endgültigen Datenwerte (doppelte möglich): */
AListe: [wert1,wert1,wert1,wert2,wert2,wert3,wert3,wert4,wert5,wert6];
AListe: map(lambda([x],dp(x/10)),AListe);
AListe: random_permutation(AListe);
a1: AListe[1]; /*Wert Jahr 1*/
a2: AListe[2]; /*Wert Jahr 2*/
a3: AListe[3]; /*Wert Jahr 3*/
a4: AListe[4]; /*Wert Jahr 4*/
a5: AListe[5]; /*Wert Jahr 5*/
a6: AListe[6]; /*Wert Jahr 6*/
a7: AListe[7]; /*Wert Jahr 7*/
a8: AListe[8]; /*Wert Jahr 8*/
a9: AListe[9]; /*Wert Jahr 9*/
a10: AListe[10]; /*Wert Jahr 10*/
A: summe(AListe); /*Summe*/

/* BERECHNUNG DER KORREKTEN FUNKTION: */
/* Liste mit Listen [i, f(i)], wobei i alle Zahlen vom kleinsten bis zum größten Datenwert in 0.1-Schritten sind. f(i) ist die absolute Häufigkeit dieser Zahlen im Datensatz: */
Ahaeuf1: makelist(
    [k/10, haeuf(AListe,k/10)],
    k,
    10*lmin(AListe),
    10*lmax(AListe)
);

/* Aus Ahaeuf1 werden alle Elemente [i,f(i)] entfernt, bei denen f(i)=0 ist: */
Ahaeuf2: sort(
    sublist(Ahaeuf1,lambda([L],is(L[2]#0)))
);

/* Ahaeuf2 wird so umgewandelt, dass die Liste nun Elemente [i,p(i)] enthält, wobei p(i) relative Häufigkeiten sind: */
Ahaeuf3: makelist([Ahaeuf2[k][1], float(Ahaeuf2[k][2]/length(AListe))],k,1,length(Ahaeuf2));

/* Ahaeuf3 wird so umgewandelt, dass die Liste nun Elemente [i,P(i)] enthält, wobei P(i) kumulierte relative Häufigkeiten sind: */
Ahaeuf4: makelist([Ahaeuf3[k][1], sum(Ahaeuf3[i][2],i,1,k)],k,1,length(Ahaeuf3));

/* Es wird noch eine Rundungsfunktion angewendet, damit es keine Probleme mit Fließkommazahlen gibt: */
empVert: map(dp,Ahaeuf4);

/* Unwandeln in eine Menge: */
TAns1: setify( map(lambda([x], dp(x)), empVert));

/* String für die Musterlösung: */
empVert_var:cons([-1000.0,0],empVert);
TAns1_string: makelist(sconcat("{\"x\":",  empVert_var[i][1],  ",",  "\"y\":",  empVert_var[i][2],  "},"),i,1,length(empVert_var)-1);
TAns1_string: endcons(sconcat("{\"x\":",  last(empVert_var)[1],  ",",  "\"y\":",  last(empVert_var)[2],  "}"),TAns1_string);
TAns1_string: apply(sconcat,TAns1_string);
TAns1_string: sconcat("[",  TAns1_string,  "]");]]></text>
    </questionvariables>
    <specificfeedback format="html">
      <text></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>{#AListe#}</text>
    </questionnote>
    <questiondescription format="html">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:green;"><i class="fa fa-check"></i></span> Richtige Antwort, gut gemacht!]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:orange;"><i class="fa fa-adjust"></i></span> Ihre Antwort ist teilweise korrekt.]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<span style="font-size: 1.5em; color:red;"><i class="fa fa-times"></i></span> Falsche Antwort.]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>jsxvar</name>
      <type>string</type>
      <tans>TAns1_string</tans>
      <boxsize>40</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text><![CDATA[/* String parsen und in eine Liste mit Punkten umwandeln: */
parsed_ans: stackjson_parse(jsxvar);
jsxvar_liste: unpack_coordinates(parsed_ans);

/* Umwandlung der Antwort in Dezimalzahlen, dann alle Punkte mit x-Koordinate < 7.5 aus der Liste löschen: */
SAns: dp(jsxvar_liste);
SAns: sublist(SAns,lambda([l],l[1]>=7.5));

/* Unwandeln der Antwort in eine Menge: */
SAns1: setify(map(dp, SAns));

/* Liste, in denen nur die y-Werte der Punkte vorhanden sind: */
SAns1_y: makelist(sort(listify(SAns1))[k][2],k,1,length(SAns1));

/* Überprüfen, ob die Funktion im Limes 1 erreicht: */
erreicht_eins: is(last(SAns1_y)=1.0);

/* ============================
Analyse der Antwort der Studierenden:
 ============================ */

/* ==== TEIL 1: Angegebene Punkte, die nicht in der Musterlösung vorkommen ==== */
/* Punkte, deren x-Werte nicht in AListe vorkommen: */
SAnsFalscherXWert: sublist(SAns,lambda([L],not member(L[1],AListe)));

/* Gibt den eigentlich korrekten y-Wert für den gegebenen x-Wert zurück: */
korr_y(pkt):= block([L,el],
	/* Liste aller korrekten Punkte, deren x-Wert kleiner als der angegebene Punkt p sind: */
	L: sublist(empVert,lambda([L],L[1]<pkt[1])),
	/* Wenn Liste nicht leer, dann gib den y-Wert dieses Punkts zurück (sonst 0): */
	el: if L#[] then last(sort(L))[2] else 0,
	return(el)
);

/* Alle überflüssigen Punkte (d. h. alle, deren y-Wert mit dem des korrekten Punkts übereinstimmt, dessen x-Wert der nächstkleinere aus der Liste der korrekten Antworten ist): */
ueberfluessige_Punkte: sublist(SAnsFalscherXWert, lambda([L],dp(korr_y(L))=L[2]));

/* Punke, deren x-Wert nicht im Datensatz enthalten ist: */
Punkte_falscher_x_Wert: sublist(SAnsFalscherXWert, lambda([L], not member(L, ueberfluessige_Punkte)));

/* ==== TEIL 2: Punkte, die in der Musterlösung vorkommen, aber in der Antwort fehlen ==== */
/* Alle richtig genannten Punkte: */
richtige_Punkte: sublist(SAns, lambda([L], member(L, empVert)));
richtige_Punkte: map(dp,richtige_Punkte);

/* Datenpunkte, die evtl. nicht als x-Werte vorkommen: */
evtl_fehlende_Datenwerte: sublist(unique(AListe), lambda([el], length(sublist(richtige_Punkte, lambda([L],L[1]=el)))=0));

/* Punkte mit x-Wert aus den Daten, aber falschem y-Wert: */
Punkte_falscher_y_Wert: sublist(SAns, lambda([L], member(L[1], evtl_fehlende_Datenwerte)));

/* Datenwert, für den gar kein Punkt angegeben wurde: */
tatsaechlich_fehlende_Datenwerte: block([L, L2],
    L: evtl_fehlende_Datenwerte,
    L2: makelist(Punkte_falscher_y_Wert[i][1],i,1,length(Punkte_falscher_y_Wert)),
    for i:1 thru length(L2) do L: delete(L2[i], L),
    return(L)
);

/* String für den Feedbacktext: */
string_punkte_ueberfluessig: if length(ueberfluessige_Punkte)>1 then "die Punkte" else "den Punkt";]]></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description>Wurde mindestens ein Punkt gezeichnet?</description>
        <answertest>AlgEquiv</answertest>
        <sans><![CDATA[is(length(SAns1)>0)]]></sans>
        <tans>true</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>1</truenextnode>
        <trueanswernote>jsxgraph-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>jsxgraph-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[[[ comment ]] Es wurden keine Punkte platziert. [[/ comment ]]
<p>Bitte zeichnen Sie Punkte ein, indem Sie per Mausklick Punkte zum Koordinatensystem hinzufügen. Klicken Sie dann erneut auf "Prüfen".</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description>Ist die empirische Verteilungsfunktion komplett richtig?</description>
        <answertest>AlgEquiv</answertest>
        <sans>SAns1</sans>
        <tans>TAns1</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>jsxgraph-2-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[[[ comment ]] Funktion ist korrekt. [[/ comment ]]
<p>Hier ist noch einmal Ihre Funktion – sie ist korrekt.</p>
[[jsxgraph]]
    [[style]]
    .jxgbox  {
        border-style:none;
        background: none;
    }
    [[/style]]

JXG.Options.point.withLabel = false;

const board = JXG.JSXGraph.initBoard(divid, {
    showCopyright: false,
    boundingbox: [7.5,1.09,11,-0.1],
    axis: true,
    showNavigation:false,
    pan:{enabled:false},
    zoom:{enabled:false}
});

board.defaultAxes.y.setAttribute({visible:'false'});
board.defaultAxes.x.setAttribute({visible:'false'});

var newXAxis = board.create('axis',[[0,0],[1,0]],{
    ticks:{
        drawZero:true,
        label: {offset: [0,-3], anchorX: 'middle', anchorY: 'top'}
    }
});

var newYAxis = board.create('axis',[[8,0],[8,1]],{
    ticks:{
        label: {offset: [-3,0], anchorX: 'right', anchorY: 'middle'}
    }
});

var ans = {#SAns#};

var punkte = [];
var strecken = [];

//Punkte hinzufügen:
for(let p of ans){
    punkte.push(
        board.create('point',p,{
            fixed:true,
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        [-1000,0],
        [punkte[0].X(), 0]
    ],{
        fixed:true,
        highlight:false
    })
);

for(let i=1; i<punkte.length; i++){
    strecken.push(
        board.create('segment', [
            punkte[i-1],
            [punkte[i].X(), punkte[i-1].Y()]
        ],{
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        punkte[punkte.length-1],
        [1000, punkte[punkte.length-1].Y()]
    ],{
        highlight:false
    })
);
[[/jsxgraph]]

<hr>

<p>Herzlichen Glückwunsch, Sie sind am Ende der Aufgabe angelangt! Sie sollten nun eine empirische Verteilungsfunktion aus einem gegebenen Datensatz zeichnen können.</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>2</falsenextnode>
        <falseanswernote>jsxgraph-2-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description>Sind alle Punkte richtig, aber noch überflüssige hinzugefügt?</description>
        <answertest>AlgEquiv</answertest>
        <sans>setdifference(SAns1, setify(ueberfluessige_Punkte))</sans>
        <tans>TAns1</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.5</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>jsxgraph-3-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[[[ comment ]] Funktion ist richtig bis auf "unnötige" Punkte außerhalb der Sprungstellen. [[/ comment ]]
<p>Ihre Funktion ist grundsätzlich richtig, aber enthält mindestens einen Punkt, ohne den die Funktion ebenfalls richtig gewesen wäre:</p>

<p>Wenn Sie {@string_punkte_ueberfluessig@} {@sequenceify(ueberfluessige_Punkte)@} weglassen, ändert sich die Funktion nicht. In der folgenden Grafik sind diese Punkte mit einer schwarzen Box umrandet.</p>

[[jsxgraph]]
    [[style]]
    .jxgbox  {
        border-style:none;
        background: none;
    }
    [[/style]]

JXG.Options.point.withLabel = false;

const board = JXG.JSXGraph.initBoard(divid, {
    showCopyright: false,
    boundingbox: [7.5,1.09,11,-0.1],
    axis: true,
    showNavigation:false,
    pan:{enabled:false},
    zoom:{enabled:false}
});

board.defaultAxes.y.setAttribute({visible:'false'});
board.defaultAxes.x.setAttribute({visible:'false'});

var newXAxis = board.create('axis',[[0,0],[1,0]],{
    ticks:{
        drawZero:true,
        label: {offset: [0,-3], anchorX: 'middle', anchorY: 'top'}
    }
});

var newYAxis = board.create('axis',[[8,0],[8,1]],{
    ticks:{
        label: {offset: [-3,0], anchorX: 'right', anchorY: 'middle'}
    }
});

var ans = {#empVert#};
var ueberfluessig = {#ueberfluessige_Punkte#};

var punkte = [];
var ueberfluessige_punkte = [];
var strecken = [];

//Punkte hinzufügen:
for(let p of ans){
    punkte.push(
        board.create('point',p,{
            fixed:true,
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        [-1000,0],
        [punkte[0].X(), 0]
    ],{
        fixed:true,
        highlight:false
    })
);

for(let i=1; i<punkte.length; i++){
    strecken.push(
        board.create('segment', [
            punkte[i-1],
            [punkte[i].X(), punkte[i-1].Y()]
        ],{
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        punkte[punkte.length-1],
        [1000, punkte[punkte.length-1].Y()]
    ],{
        highlight:false
    })
);

//Überflüssige Punkte hinzufügen:
for(let p of ueberfluessig){
    ueberfluessige_punkte.push(
        board.create('point',p,{
            fixed:true,
            highlight:false
        })
    );
    board.create('point',p,{
        fixed:true,
        face:'[]',
        fillColor:'transparent',
        strokeColor:'black',
        highlight:false,
        size:7
    });
};
[[/jsxgraph]]

<p>Bitte entfernen Sie die überflüssigen Punkte in der Grafik im Fragetext und klicken Sie dann erneut auf "Prüfen".</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>3</falsenextnode>
        <falseanswernote>jsxgraph-3-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description>Ist die Funktion monoton wachsend?</description>
        <answertest>AlgEquiv</answertest>
        <sans>monotonp(jsxvar_liste)</sans>
        <tans>true</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>4</truenextnode>
        <trueanswernote>jsxgraph-4-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>4</falsenextnode>
        <falseanswernote>jsxgraph-4-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[[[ comment ]] Funktion ist nicht monoton wachsend. [[/ comment ]]
<p>Ihre Funktion ist nicht monoton wachsend. Eine empirische Verteilungsfunktion muss aber immer monoton wachsend sein.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>4</name>
        <description>Erreicht die Funktion die 1?</description>
        <answertest>AlgEquiv</answertest>
        <sans>erreicht_eins</sans>
        <tans>true</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>5</truenextnode>
        <trueanswernote>jsxgraph-5-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>5</falsenextnode>
        <falseanswernote>jsxgraph-5-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[[[ comment ]] Funktion erreicht nicht die 1. [[/ comment ]]

[[ if test='is(monotonp(jsxvar_liste))']]
<p>Ihre Funktion erfüllt nicht die Eigenschaft, dass sie für \(x\rightarrow\infty\) den Wert 1 annimmt. Eine empirische Verteilungsfunktion muss sich im Limes aber immer 1 annähern.</p>
[[ else ]]
<p>Zudem erfüllt sie nicht die Eigenschaft, dass sie für \(x\rightarrow\infty\) den Wert 1 annimmt. Eine empirische Verteilungsfunktion muss sich im Limes aber immer 1 annähern.</p>
[[/ if ]]]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>5</name>
        <description>Ist die Anzahl der Datenwerte, für die es keinen Punkt gibt, =0?</description>
        <answertest>AlgEquiv</answertest>
        <sans>length(tatsaechlich_fehlende_Datenwerte)</sans>
        <tans>0</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>6</truenextnode>
        <trueanswernote>jsxgraph-6-T</trueanswernote>
        <truefeedback format="html">
          <text>[[ comment ]] D. h. für jeden der Datenwerte gibt es einen Punkt [[/ comment ]]</text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>jsxgraph-6-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[[[ comment ]] D. h. es gibt mindestens einen Datenwert ohne Punkt [[/ comment ]]

<p>Wenn eine empirische Verteilungsfunktion gezeichnet wird, dann muss für jeden Wert \(x_i\), der in den zugrundeliegenden Daten vorhanden ist, ein Punkt \([x_i, y_i]\) gezeichnet werden. </p>

<p>Allerdings gibt es mindestens einen Datenwert, für den Sie einen solchen Punkt nicht eingezeichnet haben.<!--, nämlich die folgenden: {@sequenceify(tatsaechlich_fehlende_Datenwerte)@}-->
</p>

<p>In der folgenden Grafik sehen Sie noch einmal Ihre empirische Verteilungsfunktion.<br>
Die x-Stellen, an denen ein Datenwert liegt, Sie aber keinen Punkt gezeichnet haben, sind durch gestrichelte vertikale Linien markiert.</p>

[[jsxgraph]]
    [[style]]
    .jxgbox  {
        border-style:none;
        background: none;
    }
    [[/style]]

JXG.Options.point.withLabel = false;

const board = JXG.JSXGraph.initBoard(divid, {
    showCopyright: false,
    boundingbox: [7.5,1.09,11,-0.1],
    axis: true,
    showNavigation:false,
    pan:{enabled:false},
    zoom:{enabled:false}
});

board.defaultAxes.y.setAttribute({visible:'false'});
board.defaultAxes.x.setAttribute({visible:'false'});

var newXAxis = board.create('axis',[[0,0],[1,0]],{
    ticks:{
        drawZero:true,
        label: {offset: [0,-3], anchorX: 'middle', anchorY: 'top'}
    }
});

var newYAxis = board.create('axis',[[8,0],[8,1]],{
    ticks:{
        label: {offset: [-3,0], anchorX: 'right', anchorY: 'middle'}
    }
});

var ans = {#SAns#};

var punkte = [];
var strecken = [];

//Punkte hinzufügen:
for(let p of ans){
    punkte.push(
        board.create('point',p,{
            fixed:true,
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        [-1000,0],
        [punkte[0].X(), 0]
    ],{
        fixed:true,
        highlight:false
    })
);

for(let i=1; i<punkte.length; i++){
    strecken.push(
        board.create('segment', [
            punkte[i-1],
            [punkte[i].X(), punkte[i-1].Y()]
        ],{
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        punkte[punkte.length-1],
        [1000, punkte[punkte.length-1].Y()]
    ],{
        highlight:false
    })
);

//Stellen Werten, wo keine Punkte sind, obwohl Datenwert dort existiert
var fehlendeDatenwerte = {#tatsaechlich_fehlende_Datenwerte#};
for(let x of fehlendeDatenwerte){
	board.create('line',[[x,-1],[x,1]],{
		dash:2,
		highlight:false,
		color:'black',
		fixed:true,
                strokeWidth:1
	})
};
[[/jsxgraph]]

<p>Bitte korrigieren Sie Ihre Lösung in der Grafik im Fragetext und klicken Sie dann noch einmal auf "Prüfen".</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>6</name>
        <description>Sind Punkte dabei, deren x-Koordinate keinem Datenwert entspricht?</description>
        <answertest>AlgEquiv</answertest>
        <sans>length(SAnsFalscherXWert)</sans>
        <tans>0</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>7</truenextnode>
        <trueanswernote>jsxgraph-7-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>jsxgraph-7-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[[[ comment ]] Es gibt mindestens einen Punkt, dessen x-Koordinate keinem Datenwert entspricht [[/ comment ]]

<p>Ihre Funktion enthält mindestens einen Punkt, dessen x-Koordinate nicht mit einem Wert aus dem Datensatz übereinstimmt.</p>

<p>In der folgenden Grafik sehen Sie noch einmal Ihre empirische Verteilungsfunktion.<br>
Die Punkte, die an x-Stellen liegen, die keinem Datenwert entsprechen, sind mit einer schwarzen Box umrandet.</p>

[[jsxgraph]]
    [[style]]
    .jxgbox  {
        border-style:none;
        background: none;
    }
    [[/style]]

JXG.Options.point.withLabel = false;

const board = JXG.JSXGraph.initBoard(divid, {
    showCopyright: false,
    boundingbox: [7.5,1.09,11,-0.1],
    axis: true,
    showNavigation:false,
    pan:{enabled:false},
    zoom:{enabled:false}
});

board.defaultAxes.y.setAttribute({visible:'false'});
board.defaultAxes.x.setAttribute({visible:'false'});

var newXAxis = board.create('axis',[[0,0],[1,0]],{
    ticks:{
        drawZero:true,
        label: {offset: [0,-3], anchorX: 'middle', anchorY: 'top'}
    }
});

var newYAxis = board.create('axis',[[8,0],[8,1]],{
    ticks:{
        label: {offset: [-3,0], anchorX: 'right', anchorY: 'middle'}
    }
});

var ans = {#SAns#};

var punkte = [];
var strecken = [];

//Punkte hinzufügen:
for(let p of ans){
	punkte.push(
        board.create('point',p,{
            fixed:true,
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        [-1000,0],
        [punkte[0].X(), 0]
    ],{
        fixed:true,
        highlight:false
    })
);

for(let i=1; i<punkte.length; i++){
    strecken.push(
        board.create('segment', [
            punkte[i-1],
            [punkte[i].X(), punkte[i-1].Y()]
        ],{
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        punkte[punkte.length-1],
        [1000, punkte[punkte.length-1].Y()]
    ],{
        highlight:false
    })
);

//Punkte markieren, an denen kein Datenwert liegt:
var PunkteKeinDatenwert = {#SAnsFalscherXWert#};
for(let p of PunkteKeinDatenwert){
    board.create('point',p,{
        fixed:true,
        face:'[]',
        fillColor:'transparent',
        strokeColor:'black',
        highlight:false,
        size:7
    });
};
[[/jsxgraph]]

<p>Bitte korrigieren Sie Ihre Lösung in der Grafik im Fragetext und klicken Sie dann noch einmal auf "Prüfen".</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>7</name>
        <description>Entsprechen die y-Werte den relativen Häufigkeiten?</description>
        <answertest>AlgEquiv</answertest>
        <sans>SAns1</sans>
        <tans>setify(Ahaeuf3)</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>jsxgraph-8-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[[[ comment ]] x-Stellen der Punkte sind korrekt, aber scheinbar entsprechen die y-Werte den relativen Häufigkeiten [[/ comment ]]


<p>Ihre Funktion enthält Punkte an allen Stellen, die Werten im gegebenen Datensatz entsprechen. Allerdings gibt es mindestens einen Punkt, der eine falsche y-Koordinate besitzt.</p>

<p>Kann es sein, dass Sie als y-Koordinaten die relative Häufigkeit des jeweiligen Datenwertes verwendet haben? Bei einer empirischen Verteilungsfunktion müssen allerdings die <em>kumulierten</em> relativen Häufigkeiten verwendet werden, d. h. die Summe der relativen Häufigkeiten aller Werte, die kleiner als der betrachtete Wert oder gleich ihm sind.</p>

<p>In der folgenden Grafik sehen Sie noch einmal Ihre empirische Verteilungsfunktion. Die Punkte, die an einem korrekten Datenwert liegen, aber einen falschen y-Wert haben, sind schwarz umkreist.
</p>

[[jsxgraph]]
    [[style]]
    .jxgbox  {
        border-style:none;
        background: none;
    }
    [[/style]]

JXG.Options.point.withLabel = false;

const board = JXG.JSXGraph.initBoard(divid, {
    showCopyright: false,
    boundingbox: [7.5,1.09,11,-0.1],
    axis: true,
    showNavigation:false,
    pan:{enabled:false},
    zoom:{enabled:false}
});

board.defaultAxes.y.setAttribute({visible:'false'});
board.defaultAxes.x.setAttribute({visible:'false'});

var newXAxis = board.create('axis',[[0,0],[1,0]],{
    ticks:{
        drawZero:true,
        label: {offset: [0,-3], anchorX: 'middle', anchorY: 'top'}
    }
});

var newYAxis = board.create('axis',[[8,0],[8,1]],{
    ticks:{
        label: {offset: [-3,0], anchorX: 'right', anchorY: 'middle'}
    }
});

var ans = {#SAns#};

var punkte = [];
var strecken = [];

//Punkte hinzufügen:
for(let p of ans){
    punkte.push(
        board.create('point',p,{
            fixed:true,
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        [-1000,0],
        [punkte[0].X(), 0]
    ],{
        fixed:true,
        highlight:false
    })
);

for(let i=1; i<punkte.length; i++){
    strecken.push(
        board.create('segment', [
            punkte[i-1],
            [punkte[i].X(), punkte[i-1].Y()]
        ],{
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        punkte[punkte.length-1],
        [1000, punkte[punkte.length-1].Y()]
    ],{
        highlight:false
    })
);

//Punkte markieren, bei denen der y-Wert falsch ist:
var PunkteFalscherXWert = {#Punkte_falscher_y_Wert#};
for(let p of PunkteFalscherXWert){
    board.create('point',p,{
        fixed:true,
        face:'o',
        strokeColor:'black',
        fillColor:'transparent',
        highlight:false,
        size:7
    });
};
[[/jsxgraph]]

<p>Bitte korrigieren Sie Ihre Lösung in der Grafik im Fragetext und klicken Sie dann noch einmal auf "Prüfen".</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>jsxgraph-8-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[[[ comment ]] x-Stellen der Punkte sind korrekt, aber mindestens ein falscher y-Wert [[/ comment ]]

<p>Ihre Funktion enthält Punkte an allen Stellen, die Werten im gegebenen Datensatz entsprechen. Allerdings gibt es mindestens einen Punkt, der eine falsche y-Koordinate besitzt.</p>

<p>In der folgenden Grafik sehen Sie noch einmal Ihre empirische Verteilungsfunktion. Die Punkte, die an einem korrekten Datenwert liegen, aber einen falschen y-Wert haben, sind schwarz umkreist.
</p>

[[jsxgraph]]
    [[style]]
    .jxgbox  {
        border-style:none;
        background: none;
    }
    [[/style]]

JXG.Options.point.withLabel = false;

const board = JXG.JSXGraph.initBoard(divid, {
    showCopyright: false,
    boundingbox: [7.5,1.09,11,-0.1],
    axis: true,
    showNavigation:false,
    pan:{enabled:false},
    zoom:{enabled:false}
});

board.defaultAxes.y.setAttribute({visible:'false'});
board.defaultAxes.x.setAttribute({visible:'false'});

var newXAxis = board.create('axis',[[0,0],[1,0]],{
    ticks:{
        drawZero:true,
        label: {offset: [0,-3], anchorX: 'middle', anchorY: 'top'}
    }
});

var newYAxis = board.create('axis',[[8,0],[8,1]],{
    ticks:{
        label: {offset: [-3,0], anchorX: 'right', anchorY: 'middle'}
    }
});

var ans = {#SAns#};

var punkte = [];
var strecken = [];

//Punkte hinzufügen:
for(let p of ans){
    punkte.push(
        board.create('point',p,{
            fixed:true,
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        [-1000,0],
        [punkte[0].X(), 0]
    ],{
        fixed:true,
        highlight:false
    })
);

for(let i=1; i<punkte.length; i++){
    strecken.push(
        board.create('segment', [
            punkte[i-1],
            [punkte[i].X(), punkte[i-1].Y()]
        ],{
            highlight:false
        })
    );
};

strecken.push(
    board.create('segment',[
        punkte[punkte.length-1],
        [1000, punkte[punkte.length-1].Y()]
    ],{
        highlight:false
    })
);

//Punkte markieren, bei denen der y-Wert falsch ist:
var PunkteFalscherXWert = {#Punkte_falscher_y_Wert#};
for(let p of PunkteFalscherXWert){
    board.create('point',p,{
        fixed:true,
        face:'o',
        strokeColor:'black',
        fillColor:'transparent',
        highlight:false,
        size:7
    });
};
[[/jsxgraph]]

<p>Bitte korrigieren Sie Ihre Lösung in der Grafik im Fragetext und klicken Sie dann noch einmal auf "Prüfen".</p>]]></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>2113543810</deployedseed>
    <deployedseed>518728290</deployedseed>
    <deployedseed>977686642</deployedseed>
    <deployedseed>625392613</deployedseed>
    <deployedseed>419613540</deployedseed>
    <deployedseed>546541248</deployedseed>
    <deployedseed>901152908</deployedseed>
    <deployedseed>2114373628</deployedseed>
    <deployedseed>473415785</deployedseed>
    <deployedseed>1319798863</deployedseed>
    <deployedseed>1827996118</deployedseed>
    <deployedseed>1377738284</deployedseed>
    <deployedseed>1146938707</deployedseed>
    <deployedseed>1649252600</deployedseed>
    <deployedseed>1340042614</deployedseed>
    <deployedseed>1806623013</deployedseed>
    <deployedseed>175594256</deployedseed>
    <deployedseed>1935287162</deployedseed>
    <deployedseed>1232219398</deployedseed>
    <deployedseed>632400565</deployedseed>
    <deployedseed>1887803909</deployedseed>
    <deployedseed>922667474</deployedseed>
    <deployedseed>127099428</deployedseed>
    <deployedseed>1888683775</deployedseed>
    <deployedseed>559817050</deployedseed>
    <deployedseed>221847889</deployedseed>
    <deployedseed>149940121</deployedseed>
    <deployedseed>156905201</deployedseed>
    <deployedseed>710540382</deployedseed>
    <deployedseed>800091485</deployedseed>
    <deployedseed>1526168687</deployedseed>
    <deployedseed>557180573</deployedseed>
    <deployedseed>1642629653</deployedseed>
    <deployedseed>594727517</deployedseed>
    <deployedseed>1606422572</deployedseed>
    <deployedseed>864119331</deployedseed>
    <deployedseed>1780065340</deployedseed>
    <deployedseed>842347566</deployedseed>
    <deployedseed>1172114908</deployedseed>
    <deployedseed>459727824</deployedseed>
    <deployedseed>140001064</deployedseed>
    <deployedseed>261129400</deployedseed>
    <deployedseed>1248514742</deployedseed>
    <deployedseed>2110534384</deployedseed>
    <deployedseed>2064177855</deployedseed>
    <deployedseed>98547081</deployedseed>
    <deployedseed>18662775</deployedseed>
    <deployedseed>402877091</deployedseed>
    <deployedseed>2143584712</deployedseed>
    <deployedseed>1438659174</deployedseed>
    <deployedseed>332256278</deployedseed>
    <deployedseed>823811409</deployedseed>
    <deployedseed>2048176229</deployedseed>
    <deployedseed>752099367</deployedseed>
    <deployedseed>1041438219</deployedseed>
    <deployedseed>968141737</deployedseed>
    <deployedseed>1956112194</deployedseed>
    <deployedseed>1838836537</deployedseed>
    <deployedseed>1320409124</deployedseed>
    <deployedseed>138669644</deployedseed>
    <deployedseed>288815200</deployedseed>
    <deployedseed>607887934</deployedseed>
    <deployedseed>1448362307</deployedseed>
    <deployedseed>2137251412</deployedseed>
    <deployedseed>840792350</deployedseed>
    <deployedseed>1338370660</deployedseed>
    <deployedseed>1800316761</deployedseed>
    <deployedseed>1509530448</deployedseed>
    <deployedseed>1895991643</deployedseed>
    <deployedseed>1564636420</deployedseed>
    <deployedseed>1169742506</deployedseed>
    <deployedseed>1354145323</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Testfall, der annimmt, dass die Eingabe der Trainer/innen die volle Punktezahl erreicht.</description>
      <testinput>
        <name>jsxvar</name>
        <value>TAns1_string</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>jsxgraph-2-T</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8738593  -->
  <question type="stack">
    <name>
      <text>Equivalence reasoning</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Equivalence reasoning</h5>
    <p>Dies ist eine Beispielaufgabe für den STACK-Eingabetyp "Equivalence reasoning", der Studierende beim Umformen von
        Gleichungen oder Termen unterstützt. Die Studierenden verwenden für jeden Umformungsschritt eine eigene Zeile
        und bekommen jeweils in Echtzeit ein Feedback, ob die Umformung korrekt ist.</p>
</div>
<p>Bitte lösen die Gleichung {@(make_multsgn("onum"), eq)@} nach \(x\) auf, wobei \(b\ne0\). Vereinfachen Sie so weit
    wie möglich.</p>
<p>Antwort: \(x=\) [[input:ans1]] [[validation:ans1]]</p>
<p>[[feedback:prt1]]</p>
<hr>
<p>Die folgende Box kann Ihnen bei der Umformung helfen. Geben Sie einen Umformungsschritt pro Zeile ein. Das System
    gibt Ihnen ein sofortiges Feedback.</p>
<p>[[input:ans2]] [[validation:ans2]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025012100</text>
    </stackversion>
    <questionvariables>
      <text>/*
Die Aufgabe „Equivalence reasoning“, Team E-Learning@Hochschule Ruhr West von Jonas Lache ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/). Letzte Änderung: 15.05.2025
*/

/* Variablen für die in der Gleichung vorkommenden Zahlen: */
c1: rand_with_step(-5,-2,1);
c2: rand_with_step(2,5,1);
c3: 2*c1;

/* Ursprüngliche Gleichung: */
eq: c1*b*(c2-x+a)=c3;

/* Nach x aufgelöste Gleichung (Musterlösung für erstes Eingabefeld): */
ta: expand(rhs(solve(eq,x)[1]));

/* Liste mit allen geforderten Umformungsschritten (Musterlösung für zweites Eingabefeld): */
Liste: [eq,x=ta];</text>
    </questionvariables>
    <specificfeedback format="html">
      <text></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>Umzuformende Gleichung: {@eq@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<p>Richtige Antwort, gut gemacht!</p>]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<p>Ihre Antwort ist teilweise korrekt.</p>]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<p>Falsche Antwort.</p>]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>algebraic</type>
      <tans>ta</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <input>
      <name>ans2</name>
      <type>equiv</type>
      <tans>Liste</tans>
      <boxsize>30</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description></description>
        <answertest>EqualComAss</answertest>
        <sans>ans1</sans>
        <tans>ta</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>764397582</deployedseed>
    <deployedseed>9386895</deployedseed>
    <deployedseed>2145437004</deployedseed>
    <deployedseed>29120644</deployedseed>
    <deployedseed>47985610</deployedseed>
    <deployedseed>1046487504</deployedseed>
    <deployedseed>172218745</deployedseed>
    <deployedseed>932745789</deployedseed>
    <deployedseed>145199808</deployedseed>
    <deployedseed>482938229</deployedseed>
    <deployedseed>270198801</deployedseed>
    <deployedseed>1613984399</deployedseed>
    <deployedseed>143150281</deployedseed>
    <deployedseed>670906810</deployedseed>
    <deployedseed>1010036474</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Korrekte Antwort</description>
      <testinput>
        <name>ans1</name>
        <value>ta</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>Liste</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8738596  -->
  <question type="stack">
    <name>
      <text>Gerade mit Steigung 0 (JSXGraph)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Gerade mit Steigung 0 (JSXGraph)</h5>
    <p>In dieser Beispielaufgabe wird die JavaScript-Bibliothek JSXGraph verwendet, um eine interaktive Grafik einzubauen. Diese Grafik dient als Eingabe, das heißt die Studierenden lösen die Aufgabe, indem sie den Punkt in der Grafik verschieben. Im Hintergrund werden die Koordinaten des Punkts in ein verstecktes Eingabefeld geschrieben. Die Aufgabe besitzt theoretisch unendlich viele korrekte Lösungen, die STACK alle akzeptiert.</p>
 </div>

<p>Verschieben Sie den Punkt \(P\) so, dass die Gerade eine Steigung von 0 hat.</p>

[[jsxgraph input-ref-ans1="ans1Ref"]]
var board = JXG.JSXGraph.initBoard(divid,{
    boundingbox:[-5,5,5,-5], /* Achsenabschnitte: -x,y,x,-y */
    axis:true,
    showCopyright:false
});

var p1 = board.create("point", {#p1#}, {
   fixed:true,
   visible:false
});

var p2 = board.create("point", {#p2#}, {
   snapToGrid:true,
   snapSizeX:0.1,
   snapSizeY:0.1,
   name:"P",
   color:'green'
});
stack_jxg.bind_point(ans1Ref, p2);

var gerade = board.create("line",[p1, p2]);

[[/jsxgraph]]

<p style="display:none">[[input:ans1]] [[validation:ans1]]</p>]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025012100</text>
    </stackversion>
    <questionvariables>
      <text>/*
Die Aufgabe „Gerade mit Steigung 0 (JSXGraph)“, Team E-Learning@Hochschule Ruhr West von Jonas Lache ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/). Letzte Änderung: 15.05.2025
*/

p1: [-2,1];
p2: [3,rand([3,4])];
ta: [3,1];</text>
    </questionvariables>
    <specificfeedback format="html">
      <text>[[feedback:prt1]]</text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>Startkoordinaten des bewegbaren Punktes: {@p2@}</text>
    </questionnote>
    <questiondescription format="html">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text>Richtige Antwort, gut gemacht!</text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text>Ihre Antwort ist teilweise korrekt.</text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text>Falsche Antwort.</text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>algebraic</type>
      <tans>ta</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>0</mustverify>
      <showvalidation>0</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description>Wurde der Punkt auf die gleiche x-Koordinate gesetzt wie der andere Punkt?</description>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>p1</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text>Sie haben den Punkt so platziert, dass er genau auf dem Punkt {@ntupleify(p1)@} liegt, durch den die Gerade ebenfalls verläuft. Aus diesem Grund entsteht in diesem Fall keine Gerade.</text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description>Hat die entstehende Gerade Steigung 0?</description>
        <answertest>AlgEquiv</answertest>
        <sans>ans1[2]</sans>
        <tans>1</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-2-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-2-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>359077903</deployedseed>
    <deployedseed>815439095</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Korrekte Antwort</description>
      <testinput>
        <name>ans1</name>
        <value>ta</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-2-T</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8738600  -->
  <question type="stack">
    <name>
      <text>Herkömmliche Aufgabe und Umkehraufgabe (Nullstellen)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Herkömmliche Aufgabe und Umkehraufgabe</h5>
    <p>In Teilaufgabe (a) dieser Aufgabe gehen die Studierenden wie gewöhnlich vor und bestimmen die Nullstellen eines
        Polynoms (z. B. mithilfe der p-q-Formel). Im Fall einer falschen Antwort erscheint ein Tipp, der sich über den Klick auf
        einen Button öffnet. Teilaufgabe (b) ist eine Umkehraufgabe dieses Aufgabentyps: Hier sind
        die Nullstellen bereits gegeben und die Studierenden sollen ein Polynom angeben, das an diesen Stellen
        Nullstellen hat. Diese Aufgabe besitzt unendlich viele Lösungen. Dadurch, dass die eingegebene Lösung von STACK
        auf mathematische Eigenschaften überprüft wird (Ist \(q\) ein Polynom? Hat \(q\) Nullstellen bei \(x_1={@x1@}\)
        und \(x_2={@x2@}\)?), werden alle Funktionen mit den geforderten Eigenschaften auch als korrekt akzeptiert. Wird
        (b) korrekt beantwortet, enthält das Feedback zudem eine automatisch generierte Grafik, in der die angegebene
        Funktion zu sehen ist und die Nullstellen bei \(x_1={@x1@}\) und \(x_2={@x2@}\) markiert sind.</p>
</div>
<p><strong>(a)</strong> Bitte geben Sie die Nullstellen des Polynoms \( p(x)={@px@}\) an.</p>
<p><em>Bitte geben Sie die Antwort als Menge ein, zum Beispiel <code>{1,2,3}</code>.</em></p>
<p>Antwort: [[input:ans1]] [[validation:ans1]]</p>
[[feedback:prt1]]

<hr>

<p><strong>(b)</strong> Bitte geben Sie ein Polynom \(q(x)\) an, das Nullstellen bei \(x_1={@x1@}\) und \(x_2={@x2@}\)
    hat.</p>
<p>Antwort: \(q(x)=\) [[input:ans2]] [[validation:ans2]]</p>
[[feedback:prt2]]]]></text>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025012100</text>
    </stackversion>
    <questionvariables>
      <text>/*
Die Aufgabe „Herkömmliche Aufgabe und Umkehraufgabe (Nullstellen)“, Team E-Learning@Hochschule Ruhr West von Jonas Lache ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/). Letzte Änderung: 15.05.2025
*/

/* Zu (a): Nullstellen zufällig generiert, dann daraus das Polynom konstruiert.
  Die Musterlösung ist die Menge mit den beiden Nullstellen */
nst1: rand(6)+1;
nst2: rand_with_prohib(-5,5,[-nst1,nst1,0]);
px: expand((x-nst1)*(x-nst2));
TAa: set(nst1,nst2);

/* Zu (b): Nullstellen zufällig generiert, dann *eine* mögliche Lösung daraus konstruiert */
x1: rand_with_step(-1,5,1);
x2: rand_with_prohib(-5,5,[0,nst1,nst2,x1]);
TAb: expand((x-x1)*(x-x2));</text>
    </questionvariables>
    <specificfeedback format="html">
      <text></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text><![CDATA[(a) \(p(x)={@px@}\)<br> (b) \(x_1={@x1@}\); \(x_2={@x2@}\)]]></text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text>Richtige Antwort, gut gemacht!</text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text>Ihre Antwort ist teilweise korrekt.</text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text>Falsche Antwort.</text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>algebraic</type>
      <tans>TAa</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <input>
      <name>ans2</name>
      <type>algebraic</type>
      <tans>TAb</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>0</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>1</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description></description>
        <answertest>Sets</answertest>
        <sans>ans1</sans>
        <tans>TAa</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Die Nullstellen des Polynoms \(p\) sind in der Tat {@ans1@}. Man kann diese Aufgabe mithilfe der p-q-Formel lösen.</p>]]></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<br>
[[hint title="Zeige einen Tipp"]]
<p>Tipp: Verwenden Sie die p-q-Formel:</p>
<p>\begin{equation}
x_{1;2}=-\frac{p}{2}\pm\sqrt{\left(\frac{p}{2}\right)^2-q}
\end{equation}</p>
[[/hint]]]]></text>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text>/* Enthält die Antwort nur die Variable x oder aber gar keine Variable? */
variablen: is(length(setdifference(setify(listofvars(ans2)), set(x)))=0);</text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description>Enthält \(q\) nur die Variable \(x\) oder gar keine?</description>
        <answertest>AlgEquiv</answertest>
        <sans>variablen</sans>
        <tans>true</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Ihre Antwort sollte ausschließlich die Variable \(x\) enthalten, sie enthält aber folgende Variablen: {@sequenceify(listofvars(ans2))@}. Bitte überprüfen Sie Ihre Antwort.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description>Ist \(q\) ein Polynom?</description>
        <answertest>AlgEquiv</answertest>
        <sans>polynomialp(ans2,[x])</sans>
        <tans>true</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>2</truenextnode>
        <trueanswernote>prt2-2-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-2-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>Ihre Antwort ist kein Polynom. Bitte geben Sie einen Ausdruck der Form \(a_n x^n+a_{n-1}x^{n-1}+\dots+a_1x+a_0\) (wobei \(a_i\in\mathbb{R}\) und \(i\in\{0,1,\dots,n\}\)).</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>2</name>
        <description>Ist \(x_1\) eine Nullstelle von \(q\)?</description>
        <answertest>AlgEquiv</answertest>
        <sans>subst(x1,x,ans2)</sans>
        <tans>0</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.5</truescore>
        <truepenalty></truepenalty>
        <truenextnode>3</truenextnode>
        <trueanswernote>prt2-3-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Prima! \(x_1={@x1@}\) ist eine Nullstelle Ihrer Funktion.</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>3</falsenextnode>
        <falseanswernote>prt2-3-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>\(x_1={@x1@}\) ist leider keine Nullstelle Ihrer Funktion. Setzt man {@x1@} in Ihre Funktion ein, kommt \(q(x_1)={@subst(x1,x,ans2)@}\) heraus. Es sollte aber 0 heraus kommen.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>3</name>
        <description>Ist \(x_2\) eine Nullstelle von \(q\)?</description>
        <answertest>AlgEquiv</answertest>
        <sans>subst(x2,x,ans2)</sans>
        <tans>0</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0.5</truescore>
        <truepenalty></truepenalty>
        <truenextnode>4</truenextnode>
        <trueanswernote>prt2-4-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Prima! \(x_2={@x2@}\) ist eine Nullstelle Ihrer Funktion.</p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>4</falsenextnode>
        <falseanswernote>prt2-4-F</falseanswernote>
        <falsefeedback format="html">
          <text><![CDATA[<p>\(x_2={@x2@}\) ist leider keine Nullstelle Ihrer Funktion. Setzt man {@x2@} in Ihre Funktion ein, kommt \(q(x_2)={@subst(x2,x,ans2)@}\) heraus. Es sollte aber 0 heraus kommen.</p>]]></text>
        </falsefeedback>
      </node>
      <node>
        <name>4</name>
        <description>Sind \(x_1\) und \(x_2\) Nullstellen von \(q\)?</description>
        <answertest>AlgEquiv</answertest>
        <sans>[subst(x1,x,ans2),subst(x2,x,ans2)]</sans>
        <tans>[0,0]</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-5-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<hr>
<p>Ihre Antwort ist somit richtig. Sie können Ihre Funktion in der folgenden Grafik sehen. Die Nullstellen bei \(x_1={@x1@}\) und \(x_2={@x2@}\) sind markiert.</p>
[[jsxgraph]]
  const board = JXG.JSXGraph.initBoard(divid, {
    boundingbox: [-6, 5,6, -5],
    axis: true,
    showCopyright: false
  });
  const nst1 = {#float(x1)#};
  const nst2 = {#float(x2)#};
  const f = board.jc.snippet('{#ans2#}', true, 'x', true);
  const f_graph = board.create('functiongraph', [f]);
  const nst1_pt = board.create('point', [nst1, f(nst1)],{
    color:"green",
    fixed:true,
    withLabel:false,
    highlight:false
});
  const nst2_pt = board.create('point', [nst2, f(nst2)],{
    color:"green",
    fixed:true,
    withLabel:false,
    highlight:false
});

[[/jsxgraph]]]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-5-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1691811206</deployedseed>
    <deployedseed>555354960</deployedseed>
    <deployedseed>1075698019</deployedseed>
    <deployedseed>1993754274</deployedseed>
    <deployedseed>1970265681</deployedseed>
    <deployedseed>1100326039</deployedseed>
    <deployedseed>2050293696</deployedseed>
    <deployedseed>660863538</deployedseed>
    <deployedseed>156247175</deployedseed>
    <deployedseed>523310384</deployedseed>
    <deployedseed>826751639</deployedseed>
    <deployedseed>1014617501</deployedseed>
    <deployedseed>1555508704</deployedseed>
    <deployedseed>2131583526</deployedseed>
    <deployedseed>894194367</deployedseed>
    <deployedseed>990667562</deployedseed>
    <deployedseed>528952350</deployedseed>
    <deployedseed>1252152944</deployedseed>
    <deployedseed>345465937</deployedseed>
    <deployedseed>1804318362</deployedseed>
    <deployedseed>1899654559</deployedseed>
    <deployedseed>1868623410</deployedseed>
    <deployedseed>2036555301</deployedseed>
    <deployedseed>940971352</deployedseed>
    <deployedseed>198821857</deployedseed>
    <deployedseed>1867053486</deployedseed>
    <deployedseed>1713348005</deployedseed>
    <deployedseed>174507238</deployedseed>
    <deployedseed>1117271765</deployedseed>
    <deployedseed>1995156423</deployedseed>
    <deployedseed>2060768920</deployedseed>
    <deployedseed>2071634582</deployedseed>
    <deployedseed>1858882617</deployedseed>
    <deployedseed>1976407012</deployedseed>
    <deployedseed>1558604082</deployedseed>
    <deployedseed>1276024636</deployedseed>
    <deployedseed>332768898</deployedseed>
    <deployedseed>179708085</deployedseed>
    <deployedseed>613482372</deployedseed>
    <deployedseed>91900197</deployedseed>
    <deployedseed>534637905</deployedseed>
    <deployedseed>883907445</deployedseed>
    <deployedseed>1219267142</deployedseed>
    <deployedseed>1865784318</deployedseed>
    <deployedseed>1926229366</deployedseed>
    <deployedseed>131755227</deployedseed>
    <deployedseed>2127891352</deployedseed>
    <deployedseed>989963255</deployedseed>
    <deployedseed>10045437</deployedseed>
    <deployedseed>692278741</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Korrekte Antwort</description>
      <testinput>
        <name>ans1</name>
        <value>TAa</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>TAb</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-5-T</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8990873  -->
  <question type="stack">
    <name>
      <text>Matrizen</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Matrizen</h5>
    <p>In dieser Beispielaufgabe werden zwei Möglichkeiten demonstriert, wie Studierende Matrizen eingeben können (mit bzw. ohne Vorgabe der Dimensionen). Im spezifischen Feedback für den zweiten Aufgabenteil ist zudem eine Rückmeldung hinterlegt, wenn die Studierenden den häufigen Fehler machen, die Matrizen komponentenweise multiplizieren, anstatt die nicht-kommutative Multiplikation von Matrizen anzuwenden.</p>
</div>

<p>Gegeben seien die Matrizen \(M_1 = {@m1@}\) und \(M_2 = {@m2@}\).</p>

<p><strong>(a)</strong> Bestimmen Sie die Summe der beiden Matrizen.</p>
<p>Antwort: \(M_1 + M_2 = \) [[input:ans1]] [[validation:ans1]]</p>
<p>[[feedback:prt1]]</p>

<p><strong>(b)</strong> Bestimmen Sie das Produkt der beiden Matrizen.</p>
<p>Antwort: \(M_1 \cdot M_2 = \) [[input:ans2]] [[validation:ans2]]</p>
<p><em>Hinweis: Verwenden Sie Leerzeichen und Zeilenumbrüche, um die einzelnen Einträge voneinander zu trennen.</em></p>
<p>[[feedback:prt2]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025073100</text>
    </stackversion>
    <questionvariables>
      <text>/*
Die Aufgabe „Matrizen“, Team E-Learning@Hochschule Ruhr West von Jonas Lache ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/). Letzte Änderung: 15.05.2025
*/

/* Generierung zweier zufälliger 3x3-Matrizen: */
m1: rand(matrix([5,5],[5,5]))+matrix([1,1],[1,1]);
m2: rand(matrix([5,5],[5,5]))+matrix([1,1],[1,1]);

/* 1. Musterlösung: Summe der beiden Matrizen: */
ta1: m1+m2;

/* 1. Musterlösung: (Nicht-kommutatives) Produkt der beiden Matrizen: */
ta2: m1.m2;

/* Häufiger Fehler, dass Matrizen komponentenweise multipliziert werden: */
ta2_f: m1*m2;</text>
    </questionvariables>
    <specificfeedback format="html">
      <text></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>\(M_1={@m1@}\) und \(M_2={@m2@}\)</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text>Richtige Antwort, gut gemacht!</text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text>Ihre Antwort ist teilweise korrekt.</text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text>Falsche Antwort.</text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>(</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>matrix</type>
      <tans>ta1</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <input>
      <name>ans2</name>
      <type>varmatrix</type>
      <tans>ta2</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description></description>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
    </prt>
    <prt>
      <name>prt2</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description></description>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta2</tans>
        <testoptions></testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-1-T</trueanswernote>
        <truefeedback format="html">
          <text></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>1</falsenextnode>
        <falseanswernote>prt2-1-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
      <node>
        <name>1</name>
        <description></description>
        <answertest>AlgEquiv</answertest>
        <sans>ans2</sans>
        <tans>ta2_f</tans>
        <testoptions></testoptions>
        <quiet>1</quiet>
        <truescoremode>+</truescoremode>
        <truescore>0</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt2-2-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Kann es sein, dass Sie die Matrizen komponentenweise multipliziert haben? Dieser Ansatz ist leider falsch. </p>]]></text>
        </truefeedback>
        <falsescoremode>-</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt2-2-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1345411222</deployedseed>
    <deployedseed>1311266384</deployedseed>
    <deployedseed>1897498786</deployedseed>
    <deployedseed>1623196549</deployedseed>
    <deployedseed>80876857</deployedseed>
    <deployedseed>1745993863</deployedseed>
    <deployedseed>1713333493</deployedseed>
    <deployedseed>1055163920</deployedseed>
    <deployedseed>1206919165</deployedseed>
    <deployedseed>1565836441</deployedseed>
    <deployedseed>587284506</deployedseed>
    <deployedseed>1839250855</deployedseed>
    <deployedseed>1940931230</deployedseed>
    <deployedseed>580483552</deployedseed>
    <deployedseed>772509721</deployedseed>
    <deployedseed>833899620</deployedseed>
    <deployedseed>1160009524</deployedseed>
    <deployedseed>250242438</deployedseed>
    <deployedseed>1172803241</deployedseed>
    <deployedseed>1981203892</deployedseed>
    <deployedseed>443044518</deployedseed>
    <deployedseed>1517367274</deployedseed>
    <deployedseed>618326023</deployedseed>
    <deployedseed>1906144483</deployedseed>
    <deployedseed>203963539</deployedseed>
    <deployedseed>1830018418</deployedseed>
    <deployedseed>293673040</deployedseed>
    <deployedseed>2070704383</deployedseed>
    <deployedseed>1514761274</deployedseed>
    <deployedseed>1698632799</deployedseed>
    <deployedseed>1804496936</deployedseed>
    <deployedseed>835891582</deployedseed>
    <deployedseed>1913362681</deployedseed>
    <deployedseed>245378591</deployedseed>
    <deployedseed>1439744884</deployedseed>
    <deployedseed>2016782837</deployedseed>
    <deployedseed>2076382359</deployedseed>
    <deployedseed>801608753</deployedseed>
    <deployedseed>1345768204</deployedseed>
    <deployedseed>14891744</deployedseed>
    <deployedseed>1196373047</deployedseed>
    <deployedseed>1639585225</deployedseed>
    <deployedseed>2130426978</deployedseed>
    <deployedseed>51259124</deployedseed>
    <deployedseed>152452715</deployedseed>
    <deployedseed>1585699023</deployedseed>
    <deployedseed>1858961851</deployedseed>
    <deployedseed>1803494234</deployedseed>
    <deployedseed>35992939</deployedseed>
    <deployedseed>1346096617</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Korrekte Antwort</description>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt2-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description>Komponentenweise Multiplikation bei b)</description>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <testinput>
        <name>ans2</name>
        <value>ta2_f</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
      <expected>
        <name>prt2</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty></expectedpenalty>
        <expectedanswernote>prt2-2-T</expectedanswernote>
      </expected>
    </qtest>
  </question>

<!-- question: 8990891  -->
  <question type="stack">
    <name>
      <text>Physikalische Einheiten</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<div class="alert alert-info border border-info">
    <h5 class="alert-heading">Physikalische Einheiten</h5>
    <p>In dieser Beispielaufgabe ist die Eingabe von physikalischen Einheiten gefordert. Die Antwort kann dabei sowohl in Metern als auch in Kilometern angegeben werden: Beide Varianten werden von STACK akzeptiert. Zudem gibt es die Besonderheiten, dass Antworten ohne Einheit bereits auf Ebene der Validierung als ungültig deklariert werden und Studierende im spezifischen Feedback eine gezielte Rückmeldung bekommen, wenn ihre Antwort eine nicht passende Einheit (z. B. Sekunden) enthält.</p>
</div>

<p>Ein Auto fährt mit einer konstanten Geschwindigkeit von {@v1@}. Welche Wegstrecke legt es in {@t1@} zurück?</p>
<p>Antwort: [[input:ans1]] [[validation:ans1]]</p>
<p>[[feedback:prt1]]</p>]]></text>
    </questiontext>
    <generalfeedback format="html">
      <text></text>
    </generalfeedback>
    <defaultgrade>1.0000000</defaultgrade>
    <penalty>0.1000000</penalty>
    <hidden>0</hidden>
    <idnumber></idnumber>
    <stackversion>
      <text>2025073100</text>
    </stackversion>
    <questionvariables>
      <text>/*
Die Aufgabe „Physikalische Einheiten“, Team E-Learning@Hochschule Ruhr West von Jonas Lache ist lizenziert unter einer CC BY-SA 4.0 International Lizenz (https://creativecommons.org/licenses/by-sa/4.0/).
*/

/* Variablen für die Geschwindigkeit und die Zeitdauer: */
v1_value: rand_with_step(15,25,1);
v1: stackunits(v1_value,m/s);
t1_value: rand_with_step(40,48,1);
t1: stackunits(t1_value,s);

/* Lösung der Aufgabe (Einheit wird automatisch berechnet): */
ta: v1*t1;</text>
    </questionvariables>
    <specificfeedback format="html">
      <text></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text><![CDATA[<p>\(v={@v1@}\), \(t={@t1@}\)</p>]]></text>
    </questionnote>
    <questiondescription format="html">
      <text></text>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<p>Richtige Antwort, gut gemacht!</p>]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<p>Ihre Antwort ist teilweise korrekt.</p>]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<p>Falsche Antwort.</p>]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed></variantsselectionseed>
    <input>
      <name>ans1</name>
      <type>units</type>
      <tans>ta</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>4</insertstars>
      <syntaxhint></syntaxhint>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords></forbidwords>
      <allowwords></allowwords>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options></options>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text></text>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description></description>
        <answertest>UnitsAbsolute</answertest>
        <sans>ans1</sans>
        <tans>ta</tans>
        <testoptions>0</testoptions>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1</truescore>
        <truepenalty></truepenalty>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text><![CDATA[<p>Das Auto legt eine Strecke von \({@v1@}\cdot{@t1@}={@ta@}\) zurück.</p>]]></text>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0</falsescore>
        <falsepenalty></falsepenalty>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text></text>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>1850170805</deployedseed>
    <deployedseed>552670154</deployedseed>
    <deployedseed>683252193</deployedseed>
    <deployedseed>2003315441</deployedseed>
    <deployedseed>63780515</deployedseed>
    <deployedseed>18950725</deployedseed>
    <deployedseed>375029506</deployedseed>
    <deployedseed>710278475</deployedseed>
    <deployedseed>373974296</deployedseed>
    <deployedseed>2093456284</deployedseed>
    <deployedseed>536359112</deployedseed>
    <deployedseed>340138981</deployedseed>
    <deployedseed>1130166588</deployedseed>
    <deployedseed>1196182336</deployedseed>
    <deployedseed>1677566844</deployedseed>
    <deployedseed>832719461</deployedseed>
    <deployedseed>1888817613</deployedseed>
    <deployedseed>1623144561</deployedseed>
    <deployedseed>1772899581</deployedseed>
    <deployedseed>1860183475</deployedseed>
    <deployedseed>2058433810</deployedseed>
    <deployedseed>1316238806</deployedseed>
    <deployedseed>333801286</deployedseed>
    <deployedseed>1921582766</deployedseed>
    <deployedseed>1095052435</deployedseed>
    <deployedseed>1200868957</deployedseed>
    <deployedseed>1724488274</deployedseed>
    <deployedseed>857540253</deployedseed>
    <deployedseed>1525334906</deployedseed>
    <deployedseed>1232719784</deployedseed>
    <deployedseed>1928576221</deployedseed>
    <deployedseed>1142919920</deployedseed>
    <deployedseed>2107276339</deployedseed>
    <deployedseed>1433886418</deployedseed>
    <deployedseed>734492513</deployedseed>
    <deployedseed>1517024903</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description>Testfall, der annimmt, dass die Eingabe der Trainer/innen die volle Punktezahl erreicht.</description>
      <testinput>
        <name>ans1</name>
        <value>ta</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description>Nutze km als Einheit</description>
      <testinput>
        <name>ans1</name>
        <value>stackunits(v1_value*t1_value/1000,km)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>3</testcase>
      <description>Falsche Antwort</description>
      <testinput>
        <name>ans1</name>
        <value>stackunits(v1_value*t1_value+1,m)</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty></expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>

</quiz>