[LON-CAPA-cvs] cvs: loncom /html/adm/help/tex/de Creating_Math_Response_Problems.tex doc/loncapafiles loncapafiles.lpml

bisitz bisitz at source.lon-capa.org
Tue Dec 3 13:32:12 EST 2013


bisitz		Tue Dec  3 18:32:12 2013 EDT

  Added files:                 
    /loncom/html/adm/help/tex/de	Creating_Math_Response_Problems.tex 

  Modified files:              
    /doc/loncapafiles	loncapafiles.lpml 
  Log:
  German Translation of Help File "mathresponse creation"
  
  
Index: doc/loncapafiles/loncapafiles.lpml
diff -u doc/loncapafiles/loncapafiles.lpml:1.868 doc/loncapafiles/loncapafiles.lpml:1.869
--- doc/loncapafiles/loncapafiles.lpml:1.868	Mon Dec  2 22:31:26 2013
+++ doc/loncapafiles/loncapafiles.lpml	Tue Dec  3 18:32:09 2013
@@ -2,7 +2,7 @@
  "http://lpml.sourceforge.net/DTD/lpml.dtd">
 <!-- loncapafiles.lpml -->
 
-<!-- $Id: loncapafiles.lpml,v 1.868 2013/12/02 22:31:26 raeburn Exp $ -->
+<!-- $Id: loncapafiles.lpml,v 1.869 2013/12/03 18:32:09 bisitz Exp $ -->
 
 <!--
 
@@ -3690,6 +3690,7 @@
 Course_Convert_To_CSV.tex;
 Course_Create_Class_List.tex;
 Course_Self_Enrollment.tex;
+Creating_Math_Response_Problems.tex;
 Docs_About_Bulletin_Board.tex;
 Docs_About_Group_Files.tex;
 Docs_About_My_Personal_Info.tex;

Index: loncom/html/adm/help/tex/de/Creating_Math_Response_Problems.tex
+++ loncom/html/adm/help/tex/de/Creating_Math_Response_Problems.tex
\label{Creating_Math_Response_Problems}

Aufgaben mit mathematischer Antwort ("mathresponse") verwenden ein
Computer-Algebra-System ("CAS"), um die studentische Antwort auszuwerten.
Welches CAS verwendet werden soll, wird im CAS-Argument des mathresponse-Tags
angegeben. Derzeit werden "Maxima" sowie "R" unterstützt. "Maxima" und "R"
sind auch als eigenständige Programme sehr mächtig und können auf den meisten
Betriebssystemen installiert werden. Falls Sie Interesse haben, "Maxima"-
oder "R"-Aufgaben zu erstellen, wird empfohlen, das entsprechende Programm auf
dem lokalen Rechner zu installieren. So haben Sie Zugriff auf die Hilfe, lernen
Sie die Syntax kennen und können Ihre Antworten testen, ohne auf LON-CAPA
zugreifen zu müssen. Siehe auch: \texttt{http://maxima.sourceforge.net/} bzw.
\texttt{http://www.r-project.org/}

LON-CAPA kennt zwei reservierte Arrays im Antwortblock des
Computer-Algebra-Systems: RESPONSE und LONCAPALIST. RESPONSE enthält die
studentische Eingabe in einer durch Kommata getrennten Struktur. Wird beispielsweise
"3,42,17" durch den/die Student/in eingegeben, dann enthält RESPONSE[2] den Wert
42. LONCAPALIST wird aus den Werten erstellt, die an das Argumente-Array
\texttt{args} übergeben werden. Dieses Array enthält Werte, die im Skript-Block
zugewiesen wurden.

Das \texttt{answer}-Tag enthält die Maxima-Kommandos (und Syntax), die an
Maxima übergeben werden, nachdem die Werte RESPONSE und LONCAPALIST ersetzt
wurden (siehe Beispiel unten). Tragen Sie in das \texttt{answerdisplay}-Attribut
den Text ein, der angezeigt werden soll, wenn sich die Aufgabe im
"Zeige Antwort"-Modus befindet. Sie sollten dieses Feld ausfüllen, damit die
Studierenden die korrekte Antwort angezeigt bekommen, sofern das
Antwortverfügbarkeitsdatum im Kurs parametrisiert und erreicht wurde. Beachten
Sie in dem Zusammenhang den Text im
\texttt{postanswerdate}\index{postanswerdate}-Tag, der angezeigt wird, wenn
das Antwortverfügbarkeitsdatum erreicht ist.

Das folgende Beispiel veranschaulicht die oben erläuterten Punkte.
\begin{verbatim}
<problem>
  <script type="loncapa/perl">
$a1 = random(-6,6,4);
$a2 = random(-6,6,4);
$n1 = random(3,11,2);
$n2 = random(2,10,2);
$function = "$a1*cos($n1*x)+$a2*sin($n2*x)";
# reformat next two lines as single line if you copy/paste into a script
$example=&xmlparse('An example would be 
<m eval="on">$(sin($n1\cdot x)+cos($n2\cdot x))/\sqrt{2}$</m>');
  </script>

<startouttext />
  Give an example of a function
  <ol>
    <li>
        which is orthogonal to <algebra>$function</algebra> with respect to the
        scalar product
        <m>
           \[<g \mid h> =
               \frac{1}{\pi} \int_{-\pi}^{\pi}dx g(x) \cdot h(x)\]
        </m>
    </li>
    <li>
        whose norm is 1.
    </li>
  </ol>
<endouttext />

<mathresponse answerdisplay="$example" cas="maxima" args="$function">
    <answer>
overlap:integrate((RESPONSE[1])*(LONCAPALIST[1]),x,-%pi,%pi)/%pi;
norm:integrate((RESPONSE[1])*(RESPONSE[1]),x,-%pi,%pi)/%pi;
is(overlap=0 and norm=1);
    </answer>
    <textline readonly="no" size="50" />
    <hintgroup showoncorrect="no">
        <mathhint name="ortho" args="$function" cas="maxima">
            <answer>
overlap: integrate((LONCAPALIST[1])*(RESPONSE[1]),x,-%pi,%pi)/%pi;
is(not overlap = 0);
            </answer>
        </mathhint>
        <mathhint name="norm" args="$function" cas="maxima">
            <answer>
norm: integrate((RESPONSE[1])*(RESPONSE[1]),x,-%pi,%pi)/%pi;
is(not norm = 1);
            </answer>
        </mathhint>
        <hintpart on="norm">
           <startouttext />
The function you have provided does not have a norm of one.
           <endouttext />
        </hintpart>
        <hintpart on="ortho">
            <startouttext />
The function you have provided is not orthogonal.
            <endouttext />
        </hintpart>
    </hintgroup>
</mathresponse>


<postanswerdate>
    <startouttext />
        <p>
Note that with respect to the above norm, <m>$\cos(nx)$</m> is perpendicular
to <m>$\sin(nx)$</m> and perpendicular to <m>$\cos(mx)$</m> for
<m>$n\ne m$</m>.
        </p>
    <endouttext />
</postanswerdate>
</problem>
\end{verbatim}




More information about the LON-CAPA-cvs mailing list