Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1) use a numeric free response question (which is coded in TeX) as a template. You'll know because there will be just a question, with no choices provided in the upper TeX box question part (the "expl" is the explanation).



2) To convert a TeX open to TeX multiple choice three additions are needed:

in In the upper TeX box, we have to put in answer choices:

Code Block
languagexml
firstline1
titletex_answer_choices
linenumberstrue
\choice{}{1}{@t}

...


\choice{}{2}{@dist1}

...


\choice{}{3}{@dist2}

...


\choice{}{4}{@dist3}

...


\choice{}{5}{@dist4}

....Answer choices can go up to 10! everything except what's in bold needs to be there.In the lower  The brackets containing the answer choices can also be inserted with any math functions, text, or variables of your choice. 


Then in the code box, we have to define the variables and describe what those distractor answers answer variables should be 3a) define the variables in the code box  /* global double dist1 comments area:

Code Block
languagejs
firstline1
titlejs_variables
linenumberstrue
  /* global double dist1 u={units} */

...


  /* global double dist2 u={} */

...


  /* global double dist3 u={} */

...


  /* global double dist4 u={} */

This says Note that dist1-4 are defined as global doubles, and so will be recognized in accessible by both the lower code box and upper TeX box; hence global double. The specific units . Units may be placed specified as indicated above.


3b4) Now we direct what we want the distractors variables to be set to:       

Code Block
languagejs
firstline1
titledefine variables
linenumberstrue
dist1 = omega*pi/60.0/alpha;

...


dist2 = omega*2.0*pi/alpha;

...


dist3 = 2.0*pi/60.0/alpha;

...


dist4 = omega*2.0*pi/60.0;

use variables already defined.

5Note that omega, pi, and alpha are variables used to simplify each calculation. 


3) The answer itself also needs one tweak

  t = omega*2.0*pi/60.0/alpha;

       ans1 = 1;

ans1 =1 means the first answer choice in the upper code box is the correct one.

Pro tip: just make a precursor For NFR, the actual answer is identified as ans1 (ex: ans1=@a1). However, for multiple choice, we instead set ans1 as the number of the correct answer choice.

For example, let's say that choice 3 is the correct answer: 

Code Block
languagexml
firstline1
titletex_answer_choices
linenumberstrue
\choice{}{1}{answer choice 1}
\choice{}{2}{answer choice 2}
\choice{}{3}{answer choice 3}
\choice{}{4}{answer choice 4}
\choice{}{5}{answer choice 5}

Then in the code box, we set ans1=3:

Code Block
languagejs
firstline1
titlejs_ans1
linenumberstrue
ans1 = 3;


If you're getting 'tex validation errors' please check that ans1 is set to an integer.

Pro tip: When first starting a question, set ans = expression on how to calculate the answer. In the upper TeX box, in choice 1, put in ans, and in the bottom Code box, ans1=1.


65) check the upper TeX box explanation to ensure that the final answer displayed will be (in this case, t)

'@' means the variable is being summoned called from the code box to the TeX box–the latter which is what is displayed.


Generate parameters, and if there are no errors, proceed to publish!  Feel free to put your question in all relevant all category banks so others can use your well crafted question too.