[LON-CAPA-users] Hints for first LON-CAPA question
Gerd Kortemeyer
korte at lite.msu.edu
Thu Jun 13 15:45:21 EDT 2013
Hi,
On Jun 13, 2013, at 3:04 PM, Joseph Mingrone <jrm at mathstat.dal.ca> wrote:
>
>
> 1. How can a student submit each part of the question separately?
You'll have to wrap the responses into <part></part> to make the problem multipart. E.g.,
<part>
<startouttext />
<p>
Super Sneaker Company …
<endouttext />
<radiobuttonresponse direction="vertical" max="3" id="12" randomize="yes">
<foilgroup>
<foil location="random" value='true' name="foil1">
<startouttext />Right shoe wear is generally different than left shoe wear.<endouttext />
</foil>
…
</foilgroup>
</radiobuttonresponse>
</part>
<part>
<parameter name="maxtries" type="int_pos" description="Maximum Number of Tries" default="1" />
<startouttext />
<p>
After 3 months, the amount of wear …
</part>
>
> 2. In the table, I'm building the header with $row1 .= "<td>$i+1</td>",
> but the $i+1 isn't evaluated and 0+1, 1+1, etc. is shown. How can I get
> the intended output?
This is a Perl thing. I cannot test this right now, but try
for ($i=1; $i<=$n; $i++)
{
$row1 .= "<td>$i+1</td>";
$row2 .= "<td>&roundto($a[$i-1],2)</td>";
$row3 .= "<td>&roundto($b[$i-1],2)</td>";
}
>
> 3. How can \bar{x} be displayed?
Likely not using the tth-renderer, only with MimeTeX or jsMath. Please try using the other renderers from the menu in Author Space problem display. I don't like it very much at all, but you might have to do
<m display="mimetex">$\bar{x}_a - \bar{x}_b = 0$</m>
>
> 4. In the last radiobuttonresponse question, only one foil is showing up
> even though I've specified max=3. How can I make all three show up?
That's because the other two foils are still set to "unused" - you should set them to "false"
>
> 5. This is my first attempt at a question and I have no sample code
> other than what's in the manual. If you have any other suggestions
> about style or best practices, please pass them along.
Looks fine. Please make sure to test that it prints.
- Gerd.
More information about the LON-CAPA-users
mailing list