I would be very interested to get code examples. - Peter
On 02/03/2014 05:16 PM, Mills, Douglas G wrote: > We have done something similar to your first challenge below by setting > the weight of the problem equal to a variable and setting the variable in > the Perl scrip at the head of the document based on how many tries have > been taken on the problem using the relevant EXT functions. I can provide > code examples if you¹d like. > > Doug > > Douglas Mills > Director of Instructional Technologies > Department of Chemistry > University of Illinois > dmi...@illinois.edu > (217) 244-5739 > > > > > > > > On 2/2/14, 9:48 PM, "Joseph Mingrone" <j...@mathstat.dal.ca> wrote: > >> Hello, >> >> I've been asked to write an exam and I'm struggling with the request to >> assign students partial marks under certain conditions. >> >> The first condition is based on the number of tries the student takes to >> get the correct answer. For example, if the student gets the correct >> answer on the second try (after a hint has been displayed) we would like >> to give her half the weight of the question. Maybe the custom response >> problem is the way to go? Maybe we're trying to force a square block >> into a round hole? If you've done this, example code would be great. >> I've seen the post below, but the solution isn't clear to me. >> http://mail.lon-capa.org/pipermail/lon-capa-users/2012-August/004127.html >> >> The second condition is for an Option Response with a foil group. The >> professor would like to assign 0.5 for each correct option chosen and >> -0.5 for each incorrect option chosen. >> >> After reading the author manual, this is my best guess. >> >> <part id="assumptions"> >> <parameter name="maxtries" id="75" type="int_pos" default="1" >> description="Maximum Number of Tries" /> >> <parameter name="problemstatus" id="78" type="string_problemstatus" >> default="answer" description="Show Problem Status" /> >> <startouttext />(g) Indicate the correct statements<endouttext /> >> <customresponse> >> <optionresponse max="6" id="80" randomize="no" >> TeXlayout="horizontal"> >> <foilgroup checkboxvalue="True" options="('True','False')" noprompt="1" >> checkboxoptions="nochoice"> >> <foil location="bottom" value="True" name="foil-ev"> >> <parameter name="weight" id="94" type="float_pos" default="0.5" >> description="Weight" /> >> <startouttext />Statement 1<endouttext /> >> </foil> >> <foil location="bottom" value="False" name="foil-es"> >> <startouttext />Statement 2<endouttext /> >> </foil> >> <foil location="bottom" value="False" name="foil-n8"> >> <startouttext />Statement 3<endouttext /> >> </foil> >> <foil location="bottom" value="True" name="foil-nd"> >> <startouttext />Statement 3<endouttext /> >> </foil> >> </foilgroup> >> </optionresponse> >> <answer type="loncapa/perl"> >> ### code here to check the indices of $$submission and add .5 for >> each correct option chosen and subtract 0.5 for each incorrect option >> chosen... ### >> return(ASSIGNED_SCORE,0.3); >> </answer> >> </customresponse> >> </part> >> >> Thanks for any tips, >> >> Joseph >> >> _______________________________________________ >> LON-CAPA-users mailing list >> LON-CAPA-users@mail.lon-capa.org >> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users > > _______________________________________________ > LON-CAPA-users mailing list > LON-CAPA-users@mail.lon-capa.org > http://mail.lon-capa.org/mailman/listinfo/lon-capa-users > -- Dr. Peter Dencker wissenschaftl. Mitarbeiter UNIVERSITÄT ZU LÜBECK INSTITUT FÜR MATHEMATIK Ratzeburger Allee 160 23562 Lübeck Tel +49 451 500 4254 Fax +49 451 500 3373 denc...@math.uni-luebeck.de www.math.uni-luebeck.de _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users