Annotation of doc/homework/homework5.html, revision 1.1
1.1 ! albertel 1: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//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: <li>
! 13: Response tags
! 14: <p>
! 15: Arguments for all response tags
! 16: </p>
! 17: <ul>
! 18: <li>
! 19: <i>ID</i>, if this isn't set it will be set during
! 20: the publication step. It is used to assign parameters names
! 21: in a way that can be tracked if an instructor modifies
! 22: things by hand.
! 23: </li>
! 24: <li>
! 25: <i>name</i> optional, if set, it will be used by the
! 26: resource assembly tool when one is modifying parameters.
! 27: </li>
! 28: </ul>
! 29: <p>
! 30: Implemented response tags
! 31: </p>
! 32: <ul>
! 33: <li>
! 34: <b><numericalresponse></b> implements a numerical
! 35: answer, it needs an internal <b><textline></b> for
! 36: the response to go in. It checks all styles of numerical
! 37: supported in CAPA. Possible args are:
! 38: <ul>
! 39: <li><i>answer</i> required, specifies the correct answer, must be a perl list</li>
! 40: <li><i>type</i> optional, CAPA style str args, cs/ci/mc</li>
! 41: <li><i>units</i> optional, specifies unit of correct answer, CAPA style</li>
! 42: </ul>
! 43: </li>
! 44: <li>
! 45: <b><essayresponse></b> implements a ungraded large
! 46: text response, it need an internal <b><textarea></b>
! 47: for the response to go in.
! 48: </li>
! 49: <li>
! 50: <b><imageresponse></b> implements a image click
! 51: style image submission, uses the foil structure tags <a
! 52: href="#foil">below</a>. Additional tags that should appear
! 53: in a <foil> are:
! 54: <ul>
! 55: <li><b><image></b> required, the contained text
! 56: specifies a published graphical resource that is the
! 57: image used, should only appear once per foil</li>
! 58: <li><b><rectangle></b> required, the contained text
! 59: specifies a rectangular area that is correct, should
! 60: look like (1,2)-(3,4), at least 1 required</li>
! 61: <li><b><text></b> required, the contained text is
! 62: printed on top of the image.</li>
! 63: </ul>
! 64: </li>
! 65: <li>
! 66: <b><optionresponse></b> implements a "select from
! 67: these choices" style question, the choices are specified
! 68: by the instructor, it uses the foil structure tags <a
! 69: href="#foil">below</a> with this additional args:
! 70: <ul>
! 71: <li>
! 72: <b><foilgroup></b> is required to have
! 73: <i>options</i> which should be a perl list of possible
! 74: options for the student.
! 75: </li>
! 76: </ul>
! 77: </li>
! 78: <li>
! 79: <b><radiobuttonresponse></b> implements a true / false
! 80: style question with 1 correct answer.it uses the foil
! 81: structure tags <a href="#foil">below</a> but the
! 82: <i>value</i> of a <foil>can only be "true" or
! 83: "false" or "unused"
! 84: </li>
! 85: </ul>
! 86: <li>
! 87: <a name="foil">Foil Structure Tags</a>
! 88: <p>
! 89: All tags that implement a foil structure have an optional
! 90: arg of <i>max</i> that controls the maximum number of total
! 91: foils to show.
! 92: </p>
! 93: <ul>
! 94: <li>
! 95: <b><foilgroup></b> required, must be the tag that
! 96: surrounds all foil definitions
! 97: </li>
! 98: <li>
! 99: <b><foil></b> required, all data inside is a possible foil
! 100: </li>
! 101: <li>
! 102: <b><conceptgroup></b> optional, surrounds a
! 103: collection of <foil>, when a problem is displayed
! 104: only one of the contained <foil>is selected for
! 105: display. It receives one required argument
! 106: <i>concept</i>.
! 107: </li>
! 108: </ul>
! 109: </li>
! 110: <li>
! 111: Hint structure
! 112: <p>
! 113: All of these tags must appear inside a <b><*response></b> tag.
! 114: </p>
! 115: <ul>
! 116: <li>
! 117: <b><hintgroup></b> Tag that surrounds all of a hint.
! 118: </li>
! 119: <li>
! 120: <b><hintpart></b> required, Tag to implement
! 121: conditional hints. It has a required argument
! 122: <i>on</i>. When a <*hint> tag named the same as the
! 123: value the </i>on</i> attribute evaluates to be correct the
! 124: <hintpart> will show. If no other <hintpart>
! 125: are to show then all hintparts with a <i>on</i> of
! 126: "default" will show
! 127: </li>
! 128: <li>
! 129: <b><numericalhint></b> has all the arguments that
! 130: <numericalresponse>, does and the required attribute
! 131: <i>name</i> which should be set to the value of which
! 132: <hintpart> will be shown.
! 133: </li>
! 134: </ul>
! 135: </li>
! 136: <li>
! 137: Input Tags
! 138: <p>
! 139: This group of tags implement a mechanism for getting data
! 140: for students, they will usually be used by a
! 141: <*response>.
! 142: </p>
! 143: <ul>
! 144: <li>
! 145: <b><textarea></b> creates a Large text input box, If
! 146: data appears between the start and end tags, the data will
! 147: appear i the textarea if the student has not yet made a
! 148: submission. Additionally it takes two arguments <i>rows</i>
! 149: and <i>cols</i> which control the height and width of the
! 150: area respectively. It defaults to 10 and 80.
! 151: </li>
! 152: <li>
! 153: <b><textline></b> creates a single line of input
! 154: element, it accepts 1 argument <i>size</i> which controls
! 155: the width on the textline, it defaults to 20.
! 156: </li>
! 157: </ul>
! 158: </li>
! 159: <li>
! 160: Output Tags
! 161: <p>
! 162: This group of tags generate useful pieces of output.
! 163: </p>
! 164: <ul>
! 165: <li>
! 166: <b><displayduedate></b> this will insert the current
! 167: duedate if one is set into the document. It is generated
! 168: to be inside a table of 1x1 elements
! 169: </li>
! 170: <li>
! 171: <b><displaytitle></b> this will insert the title of
! 172: the problem from the metadata of the problem
! 173: </li>
! 174: <li>
! 175: <b><window></b> the text in between is put in a
! 176: popup javascript window
! 177: </li>
! 178: </ul>
! 179: </li>
! 180: <li>
! 181: Scripting
! 182: <p>
! 183: These tags allow the document to behave programatically
! 184: </p>
! 185: <ul>
! 186: <li>
! 187: <b><display></b> the intervening perl script is
! 188: evaluated in the safe space and the return value of the
! 189: script replaces the entire tag
! 190: </li>
! 191: <li>
! 192: <b><import></b> causes the parse to read in the file
! 193: named in the body of the tag and parse it as if the entire
! 194: text of the file had existed at location of the tag
! 195: </li>
! 196: <li>
! 197: <b><parserlib></b> the enclosed filename contains
! 198: definitions for new tags
! 199: </li>
! 200: <li>
! 201: <b><script></b> if the argument <i>type</i> is set
! 202: to "loncapa/perl" the enclosed data is a perl script which
! 203: is evaluated inside the perl Safe space. The return value
! 204: of the script is ignored.
! 205: </li>
! 206: <li>
! 207: <b><scriptlib></b> the enclosed filename contains
! 208: perl code to run in the safe space
! 209: </li>
! 210: <li>
! 211: <b><block></b> has a required argument
! 212: <i>condition</i> that is evaluated, it the condition is
! 213: true everything inside the tag is evaluated, if it is false
! 214: everything inside the block tag is skipped
! 215: </li>
! 216: <li>
! 217: <b><notsolved></b> everything inside the tag is
! 218: skipped if the problem is "solved"
! 219: </li>
! 220: <li>
! 221: <b><postanswerdate></b> everything inside the tag is
! 222: skipped if the problem is before the answer date
! 223: </li>
! 224: <li>
! 225: <b><preduedate></b> everything inside the tag is
! 226: skipped if the problem is after the due date
! 227: </li>
! 228: <li>
! 229: <b><randomlist></b> the enclosed tags are parsed in
! 230: a stable random order
! 231: </li>
! 232: <li>
! 233: <b><solved></b> everything inside the tag is
! 234: skipped if the problem is "not solved"
! 235: </li>
! 236: <li>
! 237: <b><while></b> implements a while loop, required
! 238: argument <i>condition</i> is a perl scriptlet that when
! 239: evaluated results in a true or false value, on true the
! 240: entirety of the text between the whiles is parsed. The
! 241: condition is tested again, etc. If false it goes to the
! 242: next node in the parse.
! 243: </li>
! 244: </ul>
! 245: </li>
! 246: <li>
! 247: Structure Tags
! 248: <p>
! 249: These tags give the problem a structure and take care of the
! 250: recording of data and giving the student messages.
! 251: </p>
! 252: <ul>
! 253: <li>
! 254: <b><problem></b> must be the first tag in the file,
! 255: this tag sets up the header of the webpage and generates
! 256: the submit buttons, it also handles due dates properly
! 257: </li>
! 258: <li>
! 259: <b><part></b> must be below <problem> if it is
! 260: going to be used. It does many of the same tasks as
! 261: <problem> but allows multiple separate problems to
! 262: exist in a single file.
! 263: </li>
! 264: <li>
! 265: <b><startouttext></b><b><endouttext></b> these
! 266: tags are somewhat special, they must have no internal text
! 267: and occur in pairs. Their use is to mark up the problem so
! 268: the web editor knows what sections should be edited in a
! 269: plain text block on the web.
! 270: </li>
! 271: </ul>
! 272: </li>
! 273: </ul>
! 274: <h2><script> Functions</h2>
! 275: <p>
! 276: A list of functions that have been written that are available in
! 277: the Safe space scripting environment inside a problem. The eventual
! 278: goal is to provide all of the functions available in CAPA
! 279: </p>
! 280: <ul>
! 281: <li>random</li>
! 282: <li>tan</li>
! 283: <li>atan</li>
! 284: <li>acos</li>
! 285: <li>asin</li>
! 286: <li>log10</li>
! 287: <li>pow</li>
! 288: <li>ceil</li>
! 289: <li>floor</li>
! 290: <li>format</li>
! 291: <li>map</li>
! 292: <li>choose</li>
! 293: <li>caparesponse_check</li>
! 294: <li>caparesponse_check_list</li>
! 295: </ul>
! 296: <h2><script> Variables</h2>
! 297: <ul>
! 298: <li>
! 299: $external::target - set to the current target the xml parser
! 300: is parsing for
! 301: </li>
! 302: <li>
! 303: $external::part - set to the <i>id</i> of the current problem
! 304: <part>; zero if there are now <part>
! 305: </li>
! 306: <li>
! 307: $external::gradestatus - set to the value of the current
! 308: resource.partid.solved value
! 309: </li>
! 310: <li>
! 311: $external::datestatus - set to the current status of the clock
! 312: either CLOSED, CAN_ANSWER, CANNOT_ANSWER, or SHOW_ANSWER
! 313: </li>
! 314: <li>
! 315: $external::randomseed - set to the number that was used to
! 316: seed the random number generator
! 317: </li>
! 318: <li>$pi - set to PI </li>
! 319: </ul>
! 320:
! 321: <hr>
! 322: <address><a href="mailto:albertel@marvin.lite.msu.edu">Guy Albertelli</a></address>
! 323: <!-- Created: Thu May 17 15:05:35 EDT 2001 -->
! 324: <!-- hhmts start -->
! 325: Last modified: Fri May 18 18:12:27 EDT 2001
! 326: <!-- hhmts end -->
! 327: </body>
! 328: </html>
! 329: <ul>
! 330: <li>
! 331: <b><></b>
! 332: </li>
! 333: </ul>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>