File:  [LON-CAPA] / doc / homework / Attic / homework4.html
Revision 1.5: download - view: text, annotated - select for diffs
Sat May 19 01:04:55 2001 UTC (23 years, 1 month ago) by albertel
Branches: MAIN
CVS tags: version_0_4, stable_2002_spring, stable_2002_july, stable_2002_april, stable_2001_fall, STABLE, HEAD
*** empty log message ***

    1: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
    2: <html>
    3:   <head>
    4:     <title>LON-CAPA Homework System</title>
    5:   </head>
    6: 
    7:   <body>
    8:     <h1>LON-CAPA Homework System</h1>
    9:     
   10:     <h2>Tags</h2>
   11:     <ul>
   12:       <b> Outtext is gone now</b>
   13:       <li>
   14: 	Output Tags
   15: 	
   16: 	<p>
   17: 	  This set of tags control how and when data gets sent to the
   18: 	  student, it also provides hints to the data's markup and
   19: 	  when it should be autoconverted, and when it should be
   20: 	  ignored. All of these tags except <b>&lt;outtext&gt;</b> are
   21: 	  valid and parsed by &amp;parsed() inside a <b>&lt;script&gt;</b>.
   22: 	</p>
   23: 	<p>
   24: 	  Additionaly any perl style variables are replaced with the
   25: 	  values of the variable in the problem namespace.
   26: 	</p>
   27: 	<ul>
   28: 
   29: 	  <li>
   30: 	    <b>&lt;outtext&gt;</b> all data inside is assumed to be valid
   31: 	    html, the handler will attempt to autoconvert to the
   32: 	    output type. The only thing tags allowed inside are the
   33: 	    ones listed below.
   34: 	  </li>
   35: 	  <li>
   36: 	    <b>&lt;target&gt;</b> This tag specifies data that is not in
   37: 	    HTMl format inside an <b>&lt;outtext&gt;</b>. Takes a required
   38: 	    argument <i>type</i> and an optional argument
   39: 	    <i>dest</i>. <i>type</i> specifies a known valid
   40: 	    output target which is the format of the
   41: 	    data. <i>dest</i> specifies a list of possible output
   42: 	    targets that the data should be autoconverted for. The
   43: 	    <i>type</i> of the data is assumed to be a
   44: 	    <i>dest</i>. If the current target is not a
   45: 	    <i>dest</i> then the data is ignored.
   46: 	  </li>
   47: 	  
   48: 	  <li>
   49: 	    <b>&lt;tex&gt;</b> shorthand for &lt;target type=``tex''&gt;
   50: 	    <i>dest</i> is a valid argument.
   51: 	  </li>
   52: 	  
   53: 	  <li>
   54: 	    <b>&lt;ascii&gt;</b> shorthand for &lt;target type=``ascii''&gt;
   55: 	    <i>dest</i> is a valid argument.
   56: 	  </li>
   57: 	  
   58: 	  <li>
   59: 	    <b>&lt;web&gt;</b> shorthand for &lt;target type=``web''&gt;
   60: 	    <i>dest</i> is a valid argument.
   61: 	  </li>
   62: 	  
   63: 	  <li>
   64: 	    <b>&lt;mathml&gt;</b> shorthand for &lt;target
   65: 	    type=``mathml''&gt; <i>dest</i> is a valid argument,
   66: 	    mathml may be passed along unconverted in a web output
   67: 	    target.
   68: 	  </li>
   69: 	  
   70: 	</ul>
   71:       </li>
   72:     <br>
   73:     <li>
   74:       Form Elements:
   75:       
   76:       <p>
   77: 	This set of tags soley generate a representation of the proper
   78: 	form element on the output device. Need to look at what should
   79: 	  be provided when an exam is wanted.
   80:       </p>
   81:       <ul>
   82: 	<li> 
   83: 	  <b>&lt;radio&gt;</b> 
   84: 	  
   85: 	  <p>
   86: 	    web - provides a single button to check on and off, when
   87: 	    checked on all other radio buttons in the current
   88: 	    <b>&lt;answergroup&gt;</b> level will be set to off.
   89: 	  </p>
   90: 	  
   91: 	  <p>
   92: 	    tex - generates a circle before the data inside
   93: 	  </p>
   94: 	</li>
   95: 	<li>
   96: 	  <b>&lt;list&gt;</b>
   97: 	  <p>
   98: 	    web - provides a drop down box of all the possible options
   99: 	  </p>
  100: 	  <p>
  101: 	    tex - the list is displayed an students can select the
  102: 	    correct option
  103: 	  </p>
  104: 	</li>
  105: 	<li>
  106: 	  <b>&lt;textline&gt;</b>
  107: 	  <p>
  108: 	    web - a single line of reponse is provided to type into.
  109: 	  </p>
  110: 	  <p>
  111: 	    tex - a line is provided.
  112: 	  </p>
  113: 	</li>
  114: 	<li>
  115: 	  <b>&lt;textarea&gt;</b>
  116: 	  <p>
  117: 	    web - a textarea form is provided allowing multiples
  118: 	    lines of response
  119: 	  </p>
  120: 	  <p>
  121: 	    tex - a configureable number of lines is provided,
  122: 	    configured through the argument numlines, defaults to 10
  123: 	  </p>
  124: 	</li>
  125: 	<li>
  126: 	  <b>&lt;check&gt;</b>
  127: 	  <p>
  128: 	    web - either a checkbutton, or two radio buttons are provided
  129: 	  </p>
  130: 	  <p>
  131: 	    tex - a small box that can be checked is provided.
  132: 	  </p>
  133: 	</li>
  134: 	<li>
  135: 	  <b>&lt;button&gt;</b> -  Not sure this is useful
  136: 	</li>
  137:       </ul>
  138:     </li>
  139:     <li>
  140:       Randomiztion
  141:       <ul>
  142: 	<li>
  143: 	  <b>&lt;randomlist&gt;</b> this tag will cause the parser to
  144: 	  randomly select the order that it parses the next level of
  145: 	  tags, tags another leveldown will be done in order
  146: 	  though. Example:
  147: 	  <pre>
  148: <b>&lt;randomlist&gt;</b>
  149:         <b>&lt;tag1&gt;</b>
  150: 		<b>&lt;subtag1&gt;</b>
  151: 		<b>&lt;/subtag1&gt;</b>
  152: 		<b>&lt;subtag2&gt;</b>
  153: 		<b>&lt;/subtag2&gt;</b>
  154: 	<b>&lt;/tag1&gt;</b>
  155: 	<b>&lt;tag2&gt;</b>
  156: 		<b>&lt;subtag1&gt;</b>
  157: 		<b>&lt;/subtag1&gt;</b>
  158: 		<b>&lt;subtag2&gt;</b>
  159: 		<b>&lt;/subtag2&gt;</b>
  160: 	<b>&lt;/tag2&gt;</b>
  161: <b>&lt;/randomlist&gt;</b>
  162: </pre>
  163: 	  In this example, <b>&lt;tag1&gt;</b> or <b>&lt;tag2&gt;</b> will be
  164: 	  done first, but <b>&lt;subtag1&gt;</b> will always happen before
  165: 	  <b>&lt;subtag2&gt;</b>.
  166: 	</li>
  167: 	<li>
  168: 	  <b>&lt;foil&gt;</b>, <b>&lt;showfoil/&gt;</b>,
  169: 	  <b>&lt;showrandomfoil/&gt;</b> These tags combine to allow the
  170: 	  user greater control over the exact placement of a
  171: 	  randomized problem text. a <b>&lt;foil&gt;</b> tag defines a
  172: 	  section of the problem that will appear in places a
  173: 	  <b>&lt;showfoil/&gt;</b> or <b>&lt;showrandomfoil/&gt;</b> mark.
  174: 	  Internally, the parser will make a pass over an entire
  175: 	  answer group and count the number of <b>&lt;foil&gt;</b>,
  176: 	  <b>&lt;showfoil/&gt;</b>, and <b>&lt;showrandomfoil/&gt;</b> tags
  177: 	  that are used it will then make another pass and parse all
  178: 	  of the <b>&lt;foil&gt;</b> storing the results of these parses,
  179: 	  while parsing for each <b>&lt;show*&gt;</b> tag it hits it will
  180: 	  send to the output device a foil, the <b>&lt;show*&gt;</b> it
  181: 	  hit was a <b>&lt;showfoil&gt;</b> and this was the nth
  182: 	  <b>&lt;show*&gt;</b> it hit, it will display the nth foil. For
  183: 	  each <b>&lt;showrandomfoil&gt;</b> it hits it will randomly pick
  184: 	  from the remaining foils a foil to send to the output. If
  185: 	  there are more <b>&lt;show*&gt;</b> tags than foils, the extra
  186: 	  <b>&lt;show*&gt;</b> will have nothing sent out. If there are
  187: 	  more <b>&lt;foil&gt;</b> tags, the extras won't appear.  When
  188: 	  mixing <b>&lt;showfoil&gt;</b> and <b>&lt;showrandomfoil&gt;</b> the
  189: 	  result is undefined.
  190: 	</li>
  191:       </ul>
  192:     </li>
  193:     <li>
  194:       Answer Section
  195:       <ul>
  196: 	<li>
  197: 	  <b>&lt;*response&gt;</b> further documentation will be available
  198: 	  in the future. Roughly these will take a set of data from
  199: 	  the enclosed input structures, and one or more correct
  200: 	  answers and return a correct of incorrect result, it may
  201: 	  also suggest a consumption of a try, and may provide a
  202: 	  reason for the incorrectness.
  203: 
  204: 	  <br>Required possible arguments:
  205: 	  
  206:           <br><i>ID</i>, if this isn't set it will be set during
  207:           the publication step. It is used to assign parameters names
  208:           in a way that can be tracked if an instructor modifies
  209:           things by hand.
  210: 
  211: 	  <br><i>name</i> optional, if set, it will be used by the
  212: 	  resource assembly tool when one is modfiying parameters.
  213: 	</li>
  214: 	<li>
  215: 	  <b>&lt;responseparam&gt;</b> can appear inside a <b>&lt;*response&gt;</b>,
  216: 	  they provided config options for the <b>&lt;*response&gt;</b>
  217: 	  
  218: 	  <br><i>name</i> specifies the parameter name, what are
  219: 	  possible values depends on the <b>&lt;*response&gt;</b>
  220: 
  221: 	  <br><i>type</i> specifies the possible values for this
  222: 	  type, possible arguments are: "option1|option2|option3" or
  223: 	  "numerictype,lownum-highnum" numeric type can be either int
  224: 	  or float
  225: 
  226: 	  <br><i>default</i> specifies the default value for this
  227: 	  parameter if the instructor doesn't specifiy it
  228: 
  229: 	  <br><i>ID</i>, if this isn't set it will be set during
  230: 	  the publication step. It is used to assign parameters names
  231: 	  in a way that can be tracked if an instructor modifies
  232: 	  things by hand.
  233: 	</li>
  234:       </ul>
  235:     </li>
  236:     <li>
  237:       Problem Contruction
  238:       <ul>
  239: 	<li>
  240: 	  <b>&lt;problem&gt;</b> highest level tag, tells the parser that
  241: 	  this is a problem file
  242: 
  243: 	  <br><i>name</i> optional, if set, it will be used by the
  244: 	  resource assembly tool when one is modfiying parameters.
  245: 	</li>
  246: 	<li>
  247: 	  <b>part needs to get much of answergroups writeup</b>
  248: 	  <b>&lt;part&gt;</b> a problem can consist of multiple parts,
  249: 	  each of these parts can be included or not included through
  250: 	  the construction of a page using the RAT, 
  251: 
  252:           <br><i>ID</i>, if this isn't set it will be set during
  253:           the publication step. It is used to assign parameters names
  254:           in a way that can be tracked if an instructor modifies
  255:           things by hand.
  256: 
  257: 	  <br><i>name</i> optional, if set, it will be used by the
  258: 	  resource assembly tool when one is modfiying parameters.
  259: 	</li>
  260: 	<li>
  261: 	  <b>&lt;block&gt;</b> are section of the problem that can be
  262: 	  conditional, and provide visual grouping clues. The optional
  263: 	  arg <i>condition</i> is set to a perl snippet that
  264: 	  controls whether the parser will evaluate the
  265: 	  <b>&lt;block&gt;</b> or not. Helper function will be created for
  266: 	  making hints and other study aids easy to contruct.
  267: 	</li>
  268: 	<li>
  269: 	  <b>&lt;import&gt;</b> causes the parse to read an additional
  270: 	  file in and parse it as if the entire text of file had
  271: 	  existed at the location of the <b>&lt;import&gt;</b>
  272: 	</li>
  273: 	<li>
  274: 	  <b>&lt;script&gt;</b> the enclosed body of text is parsed
  275: 	  directly in a safe Perl enviroment. Variables set here are
  276: 	  available throught the rest of the problem code, but all
  277: 	  actions taken persit only for the scope of the
  278: 	  <b>&lt;problem&gt;</b>. Except values which are expressly saved
  279: 	  and restored
  280: 	</li>
  281: 	<li>
  282: 	  <b>&lt;while&gt;</b> implements a while loop, required argument
  283: 	  <i>condition</i> is a perl scriptlet that when evaluated
  284: 	  results in a true or false value, on true the entirty of the
  285: 	  text between the whiles is parsed. The condition is tested
  286: 	  again, etc. If false it goes to the next node in the parse.
  287: 	</li>
  288:       </ul>
  289:     </li>
  290:     <li>
  291:       Libraries
  292:       <ul>
  293: 	<li>
  294: 	  <b>&lt;parserlib&gt;</b> the enclosed name is a file that
  295: 	  contains definition for new tags.
  296: 	</li>
  297: 	<li>
  298: 	  <b>&lt;scriptlib&gt;</b> the enclosed name is a file that
  299: 	  contains extensions to the parser.
  300: 	</li>
  301:       </ul>
  302:     </li>
  303:   </ul>
  304: 
  305: 
  306:     <h2>CAPA compatability function Calls</h2> Please refer to the
  307:     CAPA manual for documentation on what these functions do.
  308:     <ul>
  309:       <li> random </li>
  310:       <li> random_normal </li>
  311:       <li> random_beta </li>
  312:       <li> random_gamma </li>
  313:       <li> random_poisson </li>
  314:       <li> random_exponential </li>
  315:       <li> random_chi </li>
  316:       <li> random_noncentral_chi </li>
  317:       <li> choose </li>
  318:       <li> var_in_tex </li>
  319:       <li> capa_id </li>
  320:       <li> class, section, set, problem, name, student_number </li>
  321:       <li> due_date, open_date, answer_date </li>
  322:       <li> to_string </li>
  323:       <li> sub_string </li>
  324:       <li> strlen </li>
  325:       <li> get_seed </li>
  326:       <li> set_seed </li>
  327:       <li> init_array </li>
  328:       <li> array_max, array_min </li>
  329:       <li> array_moments </li>
  330:       <li> to_int </li>
  331:       <li> format </li>
  332:       <li> pick </li>
  333:       <li> sin, cos, tan, asin, acos, atan, atan2 </li>
  334:       <li> sinh, cosh, tanh, asinh, acosh, atanh </li>
  335:       <li> j0, j1, jn, y0, y1, yn </li>
  336:       <li> log, log10 </li>
  337:       <li> exp, pow </li>
  338:       <li> erf, erfc </li>
  339:       <li> sqrt </li>
  340:       <li> min, max </li>
  341:       <li> abs, floor, ceil, sgn, mod, remainder </li>
  342:       <li> factorial </li>
  343:       <li> roundto </li>
  344:       <li> eval_formula </li>
  345:       <li> capa_id_plus </li>
  346:       <li> seat_number </li>
  347:       <li> duration </li>
  348:       <li> is_open, is_due, is_answer </li>
  349:       <li> managermode </li>
  350:     </ul>
  351: 
  352:     <hr>
  353:     <address><a href="mailto:albertel@marvin.lite.msu.edu">Guy Albertelli</a></address>
  354: <!-- Created: Mon Mar 27 16:14:28 EST 2000 -->
  355: <!-- hhmts start -->
  356: Last modified: Thu Dec 28 17:50:36 EST 2000
  357: <!-- hhmts end -->
  358:   </body>
  359: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>