Hinweis: Sie sind auf den Seiten der Moodle 1.9 Dokumentation. Die Dokumentation der aktuellsten Moodle-Version finden Sie hier: Berechnungsfragen.

Berechnungsfragen: Unterschied zwischen den Versionen

Aus MoodleDocs
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 5: Zeile 5:
Berechnungsfragen bieten die Möglichkeit, eigene mathematische Fragen, die auf einer Formel basieren, zu erstellen. Sie definieren die Formel unter Verwendung von Variablen in einer speziellen Syntax (z.B. '''{x}''' , '''{y}'''). Diese Variablen werden durch konkrete, aus einem bei der Konfiguration der Berechnungsfrage festgelegten Zahlenbereich zufällige gewählte Zahlenwerte ersetzt, wenn ein Nutzer einen [[Testversuch durchführen|Testversuch durchführt]].
Berechnungsfragen bieten die Möglichkeit, eigene mathematische Fragen, die auf einer Formel basieren, zu erstellen. Sie definieren die Formel unter Verwendung von Variablen in einer speziellen Syntax (z.B. '''{x}''' , '''{y}'''). Diese Variablen werden durch konkrete, aus einem bei der Konfiguration der Berechnungsfrage festgelegten Zahlenbereich zufällige gewählte Zahlenwerte ersetzt, wenn ein Nutzer einen [[Testversuch durchführen|Testversuch durchführt]].
   
   
Wenn Sie z.B. eine große Anzahl von Aufgaben der Art "Berechne die Fläche des Rechtecks mit den Seitenlängen '''a''' und '''b'''" für Übungszwecke generieren möchten, dann können Sie dies in Form einer [[Berechnungsfragen|Berechnungsfrage]] tun: Wählen Sie die Variablen '''{Breite}''', '''{Höhe}''', und geben Sie im als Formel für die richtige Antwort '''{Breite}''' * '''{Höhe}''' an, wobei * das Multiplikationszeichen ist.
Wenn Sie z.B. eine große Anzahl von Aufgaben der Art "Berechne die Fläche des Rechtecks" für Übungszwecke generieren möchten, dann können Sie dies in Form einer [[Berechnungsfragen|Berechnungsfrage]] tun: Wählen Sie die Variablen '''{Breite}''', '''{Höhe}''', und geben Sie im als Formel für die richtige Antwort '''{Breite}''' * '''{Höhe}''' an, wobei * das Multiplikationszeichen ist.


Sobald ein Nutzer einen Testversuch startet, wählt Moodle aus einem festgelegten Zahlenbereich zufällige Werte für die Breite und Höhe aus und bewertet die Antwort unter Nutzung der Formel für die richtige Antwort. Da die konkrete Zahlenwerte zufällig gewählt werden, ist es sehr unwahrscheinlich, dass die konkrete Aufgabe mehrfach gestellt wird, d.h. Sie haben mit nur einer Berechnungsfrage eine riesige Menge an konkreten Aufgaben zur Verfügung.
Sobald ein Nutzer einen Testversuch startet, wählt Moodle aus einem festgelegten Zahlenbereich zufällige Werte für die Breite und Höhe aus und bewertet die Antwort unter Nutzung der Formel für die richtige Antwort. Da die konkrete Zahlenwerte zufällig gewählt werden, ist es sehr unwahrscheinlich, dass die konkrete Aufgabe mehrfach gestellt wird, d.h. Sie haben mit nur einer Berechnungsfrage eine riesige Menge an konkreten Aufgaben zur Verfügung.


==Wann verwenden Sie Berechnungsfragen? ==
==Wann verwenden Sie Berechnungsfragen? ==
Eine Berechnungsfrage stellt eine Vielzahl von verschiedenen konkreten Aufgaben desselben Aufgabentyps bereit. Diese Aufgaben basieren auf einer Formel mit mindestens einer Variablen.  
Eine Berechnungsfrage stellt eine Vielzahl von verschiedenen konkreten Aufgaben desselben Aufgabentyps bereit. Diese Aufgaben basieren auf einer Formel mit mindestens einer Variablen.  
Zeile 21: Zeile 20:
Die Zahlenbereiche werden in der Konfiguration der Berechnungsfrage ''Datensätze'' genannt. Zu jeder Variablen der Lösungsformel muss ein solcher Datensatz festgelegt werde. Diese Datensätze können ''privat'' oder ''gemeinsam'' sein. Ein Datensatz ist ''privat'', wenn er für eine einzige Berechnungsfrage definiert ist. Ein Datensatz ist ''gemeinsam'', wenn er in allen Berechnungsfragen gilt, die die zugehörige Variable verwenden.
Die Zahlenbereiche werden in der Konfiguration der Berechnungsfrage ''Datensätze'' genannt. Zu jeder Variablen der Lösungsformel muss ein solcher Datensatz festgelegt werde. Diese Datensätze können ''privat'' oder ''gemeinsam'' sein. Ein Datensatz ist ''privat'', wenn er für eine einzige Berechnungsfrage definiert ist. Ein Datensatz ist ''gemeinsam'', wenn er in allen Berechnungsfragen gilt, die die zugehörige Variable verwenden.


Beispiel: Für die Variable '''{a}''' wird ein ''privater'' Datensatz definiert. Dann ersetzt Moodle bei einem Testversuch in der entsprechenden Berechnungsfrage die Variable '''{a}''' durch eine zufällige Zahl aus diesem Datensatz (Zahlenbereich). Wenn dagegen für die Variable '''{a}''' ein ''gemeinsamer'' Datensatz definiert wird, dann ersetzt Moodle bei einem Testversuch in allen Berechnungsfragen die Variable '''{a}''' durch eine zufällige Zahl aus diesem Datensatz (Zahlenbereich).   
'''Beispiel''': Für die Variable '''{a}''' wird ein ''privater'' Datensatz definiert. Dann ersetzt Moodle bei einem Testversuch in der entsprechenden Berechnungsfrage die Variable '''{a}''' durch eine zufällige Zahl aus diesem Datensatz (Zahlenbereich). Wenn dagegen für die Variable '''{a}''' ein ''gemeinsamer'' Datensatz definiert wird, dann ersetzt Moodle bei einem Testversuch in allen Berechnungsfragen die Variable '''{a}''' durch eine zufällige Zahl aus diesem Datensatz (Zahlenbereich).   


==Konfiguration einer Berechnungsfrage==
==Konfiguration einer Berechnungsfrage==
Zeile 106: Zeile 105:


==Syntax für die Formel für die richtige Antwort==
==Syntax für die Formel für die richtige Antwort==
 
===Verwenden Sie kein Gleichheitszeichen!===
*Verwenden Sie kein Gleichheitszeichen!
   
   
* In the recent versions of the calculated question type, you could have more than one answer formula and applied a specific grading value to each of them as long as there is at least one 100% correct answer formula.
* In the recent versions of the calculated question type, you could have more than one answer formula and applied a specific grading value to each of them as long as there is at least one 100% correct answer formula.

Version vom 22. Dezember 2008, 11:39 Uhr

Baustelle.png Diese Seite ist noch nicht vollständig übersetzt.

Siehe en:Calculated question type

Berechnungsfragen bieten die Möglichkeit, eigene mathematische Fragen, die auf einer Formel basieren, zu erstellen. Sie definieren die Formel unter Verwendung von Variablen in einer speziellen Syntax (z.B. {x} , {y}). Diese Variablen werden durch konkrete, aus einem bei der Konfiguration der Berechnungsfrage festgelegten Zahlenbereich zufällige gewählte Zahlenwerte ersetzt, wenn ein Nutzer einen Testversuch durchführt.

Wenn Sie z.B. eine große Anzahl von Aufgaben der Art "Berechne die Fläche des Rechtecks" für Übungszwecke generieren möchten, dann können Sie dies in Form einer Berechnungsfrage tun: Wählen Sie die Variablen {Breite}, {Höhe}, und geben Sie im als Formel für die richtige Antwort {Breite} * {Höhe} an, wobei * das Multiplikationszeichen ist.

Sobald ein Nutzer einen Testversuch startet, wählt Moodle aus einem festgelegten Zahlenbereich zufällige Werte für die Breite und Höhe aus und bewertet die Antwort unter Nutzung der Formel für die richtige Antwort. Da die konkrete Zahlenwerte zufällig gewählt werden, ist es sehr unwahrscheinlich, dass die konkrete Aufgabe mehrfach gestellt wird, d.h. Sie haben mit nur einer Berechnungsfrage eine riesige Menge an konkreten Aufgaben zur Verfügung.

Wann verwenden Sie Berechnungsfragen?

Eine Berechnungsfrage stellt eine Vielzahl von verschiedenen konkreten Aufgaben desselben Aufgabentyps bereit. Diese Aufgaben basieren auf einer Formel mit mindestens einer Variablen.

Wenn Ihre Problemstellung kein variables Element enthält, dann verwenden Sie stattdessen besser eine Numerische Frage.

Variablen und zugehörige Zahlenbereiche

Wenn Moodle einem Nutzer in einem Testversuch eine Berechnungsfrage vorlegt, werden die Variablen in der Formel für die richtige Antwort durch konkrete Zahlenwerte ersetzt. Diese konkreten Zahlenwerte werden aus einem festgelegten Zahlenbereich zufällig ausgewählt. Durch Angabe eines Zahlenbereichs für jede einzelne Variable können Sie die konkreten Zahlenwerte beeinflussen, und z.B. sicherstellen, dass die Werte realistisch sind.

Die Zahlenbereiche werden in der Konfiguration der Berechnungsfrage Datensätze genannt. Zu jeder Variablen der Lösungsformel muss ein solcher Datensatz festgelegt werde. Diese Datensätze können privat oder gemeinsam sein. Ein Datensatz ist privat, wenn er für eine einzige Berechnungsfrage definiert ist. Ein Datensatz ist gemeinsam, wenn er in allen Berechnungsfragen gilt, die die zugehörige Variable verwenden.

Beispiel: Für die Variable {a} wird ein privater Datensatz definiert. Dann ersetzt Moodle bei einem Testversuch in der entsprechenden Berechnungsfrage die Variable {a} durch eine zufällige Zahl aus diesem Datensatz (Zahlenbereich). Wenn dagegen für die Variable {a} ein gemeinsamer Datensatz definiert wird, dann ersetzt Moodle bei einem Testversuch in allen Berechnungsfragen die Variable {a} durch eine zufällige Zahl aus diesem Datensatz (Zahlenbereich).

Konfiguration einer Berechnungsfrage

Bei der Erstellung einer Berechnungsfragen sind drei Konfigurationsseiten zu bearbeiten.

1. Seite: Berechnungsfrage bearbeiten

  1. Select the question category
  2. Any shared wildcards for this category are listed beneath. If you change category, you'll need to click the "Update the category" button to refresh this list. There may not be any shared wildcards yet - if not, you can create them later if you wish.
  3. Give the question a descriptive name - this allows you to identify it in the question bank.
  4. Enter the question text. This should be the question you want the student to answer, and it must include all the information they need to calculate an answer. Therefore it must contain at least one wildcard, inside curly braces. For example, if you wanted the student to sum numbers A and B, the question text might read: "What is {A} + {B}?"
  5. Select an image to display if you want to add a picture to the question. For the student, it appears immediately after the question text and before the choices. If you want more control over how the image appears, include it in the question text above, using the HTML editor.
  6. Set the default question grade (i.e. the maximum number of marks for this question).
  7. Set the Penalty factor (see Penalty factor below).
  8. Moodle 1.7+: If you wish, add general feedback. This is text that appears to the student after he/she has answered the question.
  9. Next add the formula for the answer. This formula must contain at least the wildcards that appear in the question text. See Correct answer formula syntax for further details.
  10. Choose the grade that the student will get for this question if they give this answer. This should be a percentage of the total marks available. For example, you could give 100% for a correct answer, and 50% for an answer that is nearly right. One of the answers must have a 100% grade.
  11. Determine the tolerance for error that you will accept in the answer. The tolerance and tolerance type settings combine to give a range of acceptable scores. So, if tolerance = t, correct answer = x and the difference between the user's answer and the correct answer is dx, then the tolerance types are as follows:
    1. Nominal - mark correct if dx <= t
    2. Relative - mark correct if dx / x <= t
    3. Geometric - mark correct if dx² / x² <= t²
  12. The next 2 settings, "Correct answer shows" and "Format" determine the precision of the answer. Use these to select the number of decimal places or significant figures you want to use.
  13. Add some feedback which the student will see if they enter this answer.
  14. You can specify as many answer formulae as you like - click "Add another answer blank" to add more.
  15. You can also specify units for the answers. For example, if you enter a unit of 'cm' here, and the accepted answer is 15, then the answers '15cm' and '15' are both accepted as correct. If you add more than one unit, you can also specify a multiplier. So, if your main answer was 5500 with unit W, you can also add the unit kW with a multiplier of 0.001. This means that the answers '5500', '5500W' or '5.5kW' would all be marked correct. Note that the accepted error is also multiplied, so an allowed error of 100W would become an error of 0.1kW.
  16. Finally (!) you can click "Next page" to save what you've done and move on. If you are editing an existing question, you can click "Next page (new question)" to create a completely new question based on an existing one.

Penalty factor

The 'penalty factor' only applies when the question is used in a quiz using adaptive mode - i.e. where the student is allowed multiple attempts at a question even within the same attempt at the quiz. If the penalty factor is more than 0, then the student will lose that proportion of the maximum grade upon each successive attempt. For example, if the default question grade is 10, and the penalty factor is 0.2, then each successive attempt after the first one will incur a penalty of 0.2 x 10 = 2 points.

2. Seite: Datensatzeigenschaften auswählen

Each wildcard that you specify in the answer formula must have an associated set of possible values - this is its dataset. Each of the wildcards is listed on this page along with a choice of dataset:

  • private i.e. only used by this question
  • shared i.e shared with other calculated questions in the same category

Using a shared dataset can save time when you are creating a lot of similar calculated questions.

If there is anything in the question text that looks like a wildcard, but does not appear in any of the answer formulae, you can specify whether or not this is meant to be a wildcard. If it is, you can choose whether it should use a private or shared dataset.

To continue, simply choose your preferred dataset for each wildcard, then click "Next Page".

3. Seite: Datensatz bearbeiten

Now we need to create the set of possible values that each wildcard can take. Warning - this page is a bit confusing!

There are two ways of creating values - you can type them in yourself and add them to the list, or you can have Moodle generate them for you.

Adding/deleting your own values

Adding individual values to the list is easy:

  1. In the 'Param' field for each wildcard, enter the value you want
  2. Scroll down to the 'Add' section and click the Add button (leaving the number of items set to 1)
  3. Repeat the above steps as many times as necessary (the maximum number of items is 100)

To delete values from the list:

  1. In the 'Delete' section, select the number of items to delete
  2. Click the Delete button

Letting Moodle create values

  1. Start with the "Range of Values" fields, and enter the lower and upper limits for the values you would accept
  2. Choose a number of decimal places for the value
  3. Choose the distribution of values between the limits - 'uniform' means any value between the limits is equally likely to be generated; 'loguniform' means that values towards the lower limit are more likely.
  4. Now move down to the 'Add' section and click on "force regeneration"
  5. In the menu next to the Add button, choose the number of sets of random values (items) you wish to add to the list. (Note that the maximum total number of items in your list is 100.)
  6. Finally, click Add to append the new values to the list
  7. Note: If you want more control over the items that Moodle adds, you can do them one at a time and preview the values before you add them. Click the "Get New Item to Add" button to make Moodle generate new values in the "Item to Add" section at the top. If you like them, click "Add" for 1 item; if not, click "Get New Item to Add" again to get new values.

Finishing off

Once your list of items (values) is complete, you are finished. It's up to you how many values you add - the more values you add, the more a question can be used by the students without them seeing the same values repeatedly.

Note that if you delete values from the list, you can put them back again. Change the "Next Item to Add" option to "reuse previous value if available", then the next time you add items, Moodle will restore your previously-deleted items from the dataset.

Once your list of values is complete, you can click 'Save changes' to finish.

What does the 'Update the datasets parameters' button do?

As far as I can tell, it has the same function as the "Get New Item to Add" button, i.e. it generates a new set of values and displays them in the "Item to Add" section. However, it is less conveniently placed that that button, so it is probably best ignored.

Syntax für die Formel für die richtige Antwort

  • Verwenden Sie kein Gleichheitszeichen!
  • In the recent versions of the calculated question type, you could have more than one answer formula and applied a specific grading value to each of them as long as there is at least one 100% correct answer formula.
If more than one correct answer formula input field are displayed when editing, 
your site has the multiple answer feature. 


  • As a general rule, write these formulas like you would in a calculator e.g. 3 + 5 * sin (3/{x}) A notable exception is exponentiation, where x3 cannot be entered as {x}^3, but must (!?) be entered as exp(3*log({x})).
  • Each function's placeholders and other arguments should be in parentheses (brackets). For example, if you want students to calculate the sine of one angle and two times cosine of another, you would enter sin({a}) + cos({b}*2).
  • It's usually better to have too many parentheses (brackets) than too few. The server won't care, and the more specific you are about what you mean, the more likely it will like your complex formulas.
  • There is no implicit multiplication. To you, the human editor, "5(23)" or "5x" may seem perfectly obvious. To the server doing the math, it's crazy talk and won't be understood. Always use the "*" for multiplication.
  • Any special mathematical function must have parentheses around its values. Take the sine function in the first bullet point for instance. Notice that the 3 / x is wrapped in parentheses (brackets)--this is so the server can understand it properly. Without those parentheses, the server won't know if you mean "(sin 3) / x" or "sin (3 / x)" and will reject the entire formula accordingly.

Verfügbare mathematische Funktionen

Berechnungsfragen können nicht nur einfache arithmetische Operatoren verwenden, wie z.B. + oder -, sondern auch mathematische Funktionen. Die folgende Tabelle enthält eine Auflistung der verfügbaren mathematischen Funktionen.

Funktion Beschreibung
abs Absolutbetrag
acos Arkuskosinus - Umkehrfunktion des Kosinus. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
acosh Areakosinus Hyperbolicus - Umkehrfunktion des Kosinus Hyperbolicus. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
asin Arkussinus - Umkehrfunktion des Sinus. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
asinh Areasinus Hyperbolicus - Umkehrfunktion des Sinus Hyperbolicus. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
atan2 Arkustangens von zwei Variablen - Sie übergeben zwei Argumente (x,y) und erhalten als Ergebnis atanh (y/x) im korrekten Quadranten.
atan Arkustangens - Umkehrfunktion des Tangens. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
atanh Areatangens Hyperbolicus - Umkehrfunktion des Tangens Hyperbolicus. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
bindec Umrechnung von binär zu dezimal
ceil Aufrundungsfunktion
cos Kosinus - trigonometrische Funktion. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
cosh Kosinus Hyperbolicus - Hyperbelfunktion. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
decbin Umrechnung von dezimal zu binär
decoct Umrechnung von dezimal zu oktal
deg2rad Umrechnung einer Winkeleinheit von Grad zu Radiant
exp Exponentialfunktion
expm1 Spezielle Exponentialfunktion - Sie übergeben ein Argument x und erhalten als Ergebnis den korrekten Wert von e^x-1 auch dann, wenn x fast gleich Null ist.
floor Abrundungsfunktion
fmod Berechnung des Rests bei Division - Sie übergeben zwei Argumente (x,y) und erhalten als Ergebnis den Rest der Division x/y.
is_finite Prüft, ob das Argument eine endliche Zahl ist.
is_infinite Prüft, ob das Argument unendlich ist.
is_nan Prüft, ob das Argument keine Zahl ist (NaN - not a number).
log10 Logarithmus zur Basis 10
log1p Spezielle Logarithmusfunktion - Sie übergeben ein Argument x und erhalten als Ergebnis den korrekten Wert von log (x+1) auch dann, wenn x+1 fast gleich Null ist.
log Natürlicher Logarithmus
max Maximum einer Menge von Zahlen
min Minimum einer Menge von Zahlen
octdec Umrechnung von oktal zu dezimal
pi Zahlenwert von pi.jpg
pow Berechnung der Potenz - Sie übergeben zwei Argumente (x,y) und erhalten als Ergebnis x^y.
rad2deg Umrechnung einer Winkeleinheit von Radiant zu Grad
round Rundung auf Gleitkommazahl
sin Sinus - trigonometrische Funktion. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
sinh Sinus Hyperbolicus - Hyperbelfunktion. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
sqrt Wurzelfunktion
tan Tangens - trigonometrische Funktion. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!
tanh Tangens Hyperbolicus - Hyperbelfunktion. Das Argument muss in Radiant (nicht in Grad) angegeben werden!!!

Vordefinierte Konstanten

Derzeit gibt es keine vordefinierte Konstanten außer der Zahl pi.jpg, die als Funktion pi() ohne Parameter verwendet werden muss.