This information needs to be verified by Dr. Hunt. additions as follows
- More to come
Additions by RD:
- More to come
The format below is the basis for parsing the question file and populating the analyzerBase. The file is broken up into 'sections' which are delimited by the '@' symbol. The order of the sections appears to be consistent between files, however the application doesn't care what the order is used. The elements are:
- @correct
- @stereo
- @mw
- @mf
- @c
- @h
- @typec
- @typeh
- @charge
- @rings
- @fg
- @difficulty
- @hint
- @common (this one is formatted differently than the rest :( )
- @link
- @ (by itself).
Section breakdown: note: Per the tutor.java file the first space character on any given @ line is used to delimit tag from value. Unfortunately, the @common is different. see below.
Within each section lines starting with $ contain a string to use as a hint for an incorrect answer. This is mostly used in the @search sections, but also appears in some other sections. Space is not used to delimit $ tags from their values.
@correct: always 2 Lines
Line 1: @Correct the-correct-answer-string[|another-acceptable-correct-answer]*
Line 2: message string to show for getting the correct answer
@mw: always 3 Lines
Line 1: @mw the_molecular_weight
Line 2: String for correct answer
Line 3: $String for incorrect answer
@mf: always 3 Lines
Line 1: @mf the_molecular_formula
Line 2: String for correct answer
Line 3: $String for incorrect answer
The symbols 'Cl' and 'Br' are substituted with 'Y' and 'Z' in the question files because the Java version of the application didn't lex correctly. The javascript version of the applications does not have this limitation. Future question files can use either form, or both as the javascript version replaces Y and Z with Cl and Br. when this section is parsed.
@c: always 3 Lines
Line 1: @c the_number_of_carbons
Line 2: String for correct answer
Line 3: $String for incorrect answer
@h: always 3 Lines
Line 1: @h the_number_of_hydrogens
Line 2: String for correct answer
Line 3: $String for incorrect answer
@typec: always 3 Lines
Line 1: @typec the_number_of_types_of_carbons
Line 2: String for correct answer
Line 3: $String for incorrect answer
@typeh: always 3 Lines
Line 1: @typeh the_number_of_types_of_hydrogens
Line 2: String for correct answer
Line 3: $String for incorrect answer
@charge: always 2 Lines
Line 1: @charge the_charge
Line 2: $String for incorrect answer
@rings: always 2 Lines
Line 1: @rings the_number_of_rings
Line 2: $String for incorrect answer
@fg: always 3 Lines
Line 1: @fg comma separated list of functional groups. always ends in ','
Line 2: String for correct answer
Line 3: $String for incorrect answer
@difficulty: always 2 lines
Line 1: @difficulty difficulty
Line 2: difficulty-value (one of e,m,d,x)
@hintN: always 2 lines (N is an integer) (multiple sections of this format are allowed)
Line 1: @hintN hint
Line 2: The hint string
@hint: always 2 lines (only one section of this format are allowed)
Line 1: @hint hint
Line 2: the number of hints for the question (ie hint1 to hintN would have N as the number here)
The javascript version of the application does not rely on N in either of the kinds of hint sections. It simply reads all the hints and then feeds them out in a loop. It doesn't matter how many of them there are. The java version relies on this information.
@common: always 2 lines (optional section(s))
Line 1: @common-wrong-string common
Line 2: the-string-to-show-if-'common-wrong-string'-is-found
@link: always 2 lines
Line1: @link help
Line2: the-string-representing-the-URL-to-a-help-page