Hi Doug, Stuart, Thanks! That was the missing piece I needed. I thought I found what I needed in &check_status(“partid”) on page 29 of the Author Manual, but it does not work well when using both lenient grading and retrypartial. (I did eventually figure out that I needed to add retrypartial.) In that case check_status returns 1 even if the answer is only partially correct. Because of that, I was not able to craft a conditional expression to do what I needed.
The data value “awarded”, however, is a floating point value between 0 and 1 indicating how much credit was awarded. It works even when using both lenient and retrypartial. Thank you both for your help. All I need to do now is add a few more comments and it will be done. Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> On Behalf Of Mills, Douglas G Sent: Tuesday, March 17, 2020 12:32 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Conditional Blocks Hi Gene, Check this out! https://s10.lite.msu.edu/res/msu/albertel/test/ext_examples.problem#0 Doug -sent from mobile- On Mar 17, 2020, at 9:41 AM, Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> wrote: Thanks Doug! The syntax you sent, combined with code I wrote for a different problem, allowed me to get something workable, although I still have two issues to sort out: 1. How do I get the score for a problem part? I assume it’s &stored_data(“partscore”,”partid”); where partscore is the name of a variable holding the score for partid, but I do not know the variable name. 2. When I turn on lenient grading, it does not allow multiple attempts, even if tries < maxtries. Is that normal? By the way, is there documentation somewhere with a list of parameters, like maxtries, and data variables, like tries? I think I could figure my way through this without bugging the listserv if I had such a document… Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org>> On Behalf Of Mills, Douglas G Sent: Monday, March 16, 2020 11:39 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org<mailto:lon-capa-users@mail.lon-capa.org>> Subject: Re: [LON-CAPA-users] Conditional Blocks Hi Gene, The code I pulled from a quiz I coded and may perhaps give you the right idea: <block condition="($current==2) || ($answer_available)"> In your case you will probably want to make the condition either than question 1 has been answered correctly or that all the tried have been used. I can track specifics down for that if needed but perhaps the example is enough to get you on the right track? Doug -sent from mobile- On Mar 16, 2020, at 6:28 PM, Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> wrote: Hi, I am working on a problem for an upcoming exam. In the past I have just done it via paper exam, which was fine until now. (I did plan to do it in LON-CAPA someday, but thanks to Corona, someday is now here.) The problem starts with an optionresponse. After the student answers it, I want to show a radiobuttonresponse problem, then show a figure and a matrix equation containing 15 parts. In the past I have used the “display-one-part-at-a-time” feature, but the catch is that the matrix equation has 15 parts in it, and I need to show the figure and all 15 parts of the matrix equation at the same time, right after the radio button problem. I suspect I can do it with a <block></block> tag, but am having trouble finding examples of conditional expressions and variables that I can use inside the <block> code. Does anyone know of a good resource for that info, or know the parameters and syntax I need to use? I have explored the authoring guide and LON-CAPA online help, done web searches, and looked through YouTube, all to no avail… Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ _______________________________________________ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org<mailto: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<mailto: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