[LON-CAPA-users] Using PartId

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Thu, 1 Jun 2006 12:35:06 -0400 (EDT)


Hi Robert,

I don't suppose I could get you to mail this list in plain-text mode
instead of html?

> Is there a better/correct way of assigning part ids so the system
> can correctly keep score?

Part and response IDs for a .problem _must_ be staticly defined. They
cannot be variable.

They also must be unique in any one file.

The system expects the number of parts and the ids of these parts in a
.problem to be static.

It can handle the number of and the id of responses to varying, but
I'm not sure if STAT will analyze these response well.

Assuming that 
2006JanLib/question_001.library

is something like:

<library>
 <radiobuttonresponse randomize="yes">
  <foilgroup>
   <foil location="random" value="true" name="foil1">
     <startouttext />This statement is true.<endouttext />
   </foil>
   <foil location="random" value="false" name="foil3">
     <startouttext />This statment is false. (Ignore the paradox.)<endouttext />
   </foil>
  </foilgroup>
 </radioburronresponse>
</library>

Then your master .problem should work with statis parts (rather than
dynamic part ids.
(with the caveat that STAT will likely not be at all useful with these
items, but CHRT will show correct scores.)

BTW, I rewrote master.problem for better clarity:

<problem>
 <script type="loncapa/perl">
  @DirectoryArr = ("2006JanLib/question_001.library",
                   "2006JanLib/question_002.library",
                   "2003JunLib/question_001.library",
                   "2003JunLib/question_002.library");
 
  $probCount = $#DirectoryArr;

  $seed = &random(1,1000000,1);
  @DirectoryArr = &random_permutation($seed,@DirectoryArr); 
 </script>
 
 
 <part id="1">
   <import id="11">$DirectoryArr[1]</import>
 </part>
 
 <part id="2">
   <import id="12">$DirectoryArr[2]</import>
 </part>
 
 <part id="3">
   <import id="13">$DirectoryArr[3]</import>
 </part>
</problem>

-- 
guy@albertelli.com   0-7-1-8-27,137