<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Lucida Console";
        panose-1:2 11 6 9 4 5 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.cm-tag
        {mso-style-name:cm-tag;}
span.cm-attribute
        {mso-style-name:cm-attribute;}
span.cm-string
        {mso-style-name:cm-string;}
span.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:76485989;
        mso-list-type:hybrid;
        mso-list-template-ids:-104180024 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">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:<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">1.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#1F497D">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.<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-.25in;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="color:#1F497D"><span style="mso-list:Ignore">2.<span style="font:7.0pt "Times New Roman"">      
</span></span></span><![endif]><span style="color:#1F497D">When I turn on lenient grading, it does not allow multiple attempts, even if tries < maxtries. Is that normal?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">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…
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Best regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="color:#1F497D">Gene L. Harding, PE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Associate Professor of ECET<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Purdue University<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">574-520-4190<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><a href="https://polytechnic.purdue.edu/south-bend/"><span style="color:#0563C1">https://polytechnic.purdue.edu/south-bend/</span></a><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> LON-CAPA-users <lon-capa-users-bounces@mail.lon-capa.org>
<b>On Behalf Of </b>Mills, Douglas G<br>
<b>Sent:</b> Monday, March 16, 2020 11:39 PM<br>
<b>To:</b> Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org><br>
<b>Subject:</b> Re: [LON-CAPA-users] Conditional Blocks<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi Gene, <span style="font-size:12.0pt"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">The code I pulled from a quiz I coded and may perhaps give you the right idea:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="cm-tag"><span style="font-size:9.5pt;font-family:"Lucida Console";color:#117700"><block</span></span><span style="font-size:9.5pt;font-family:"Lucida Console";background:white">
</span><span class="cm-attribute"><span style="font-size:9.5pt;font-family:"Lucida Console";color:#0000CC">condition</span></span><span style="font-size:9.5pt;font-family:"Lucida Console";background:white">=</span><span class="cm-string"><span style="font-size:9.5pt;font-family:"Lucida Console";color:#AA1111">"($current==2)
 || ($answer_available)"</span></span><span class="cm-tag"><span style="font-size:9.5pt;font-family:"Lucida Console";color:#117700">></span></span><br>
<br>
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?<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">Doug <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-sent from mobile-<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt">On Mar 16, 2020, at 6:28 PM, Harding, Gene L <<a href="mailto:glhardin@purdue.edu">glhardin@purdue.edu</a>> wrote:<o:p></o:p></p>
</blockquote>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"> <span style="font-size:12.0pt;font-family:"Times New Roman",serif">
<o:p></o:p></span></p>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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.)<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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.
<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">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…<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Best regards,<o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal">Gene L. Harding, PE<o:p></o:p></p>
<p class="MsoNormal">Associate Professor of ECET<o:p></o:p></p>
<p class="MsoNormal">Purdue University<o:p></o:p></p>
<p class="MsoNormal">574-520-4190<o:p></o:p></p>
<p class="MsoNormal"><a href="https://polytechnic.purdue.edu/south-bend/">https://polytechnic.purdue.edu/south-bend/</a><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">_______________________________________________<br>
LON-CAPA-users mailing list<br>
<a href="mailto:LON-CAPA-users@mail.lon-capa.org">LON-CAPA-users@mail.lon-capa.org</a><br>
<a href="http://mail.lon-capa.org/mailman/listinfo/lon-capa-users">http://mail.lon-capa.org/mailman/listinfo/lon-capa-users</a><o:p></o:p></span></p>
</div>
</blockquote>
</div>
</div>
</body>
</html>