Re: [LON-CAPA-users] Tolerances with Hints
Carl, Thanks for looking into that. Stuart actually tacked me on to the bug report. The printing of the tolerance was not my main concern. The use of the variable was so that if anyone overrode the tolerance externally (which it turns out can’t be done for the hint), then it would display properly. I had a chunk of code in the script that I did not copy into the note which loaded the tolerance variable using one of the loncapa functions. Thanks, Mark > On Feb 18, 2018, at 1:39 PM, Carl Lira wrote: > > Hi Mark, > > It looks like you are wanting to display the tolerance in the hint? This can > be done if you set the tolerance as a variable in the script. In the test > environment this works OK. I have not tried to include it in a course. > > This problem provides hints if the answer is wrong but within 100% or 500%. > Note that if the answer is within 100%, then both hints display because > anything within 100% is also within 500%. > > msu/lira/loncapa examples/conditional hints.problem > > Code included here for quick reference: > > > > > #Enter the computations here > $a=&random(1,10,0.5); > $b=&random(1,10,0.5); > $c=$a+$b; > $Tolerance = "10%" > > > > What is $a + $b? > > > > > description="Numerical > Tolerance" /> > > > > > > > description="Numerical > Tolerance" /> > > > > description="Numerical > Tolerance" /> > > > >Your answer is within +- 100%. Required tolerance > $Tolerance. > > > >Your answer is within +- 500%. Required tolerance > $Tolerance. > > > >Your answer is off by more than +- 500%. Required > tolerance $Tolerance. > > > > > > > > > > -Original Message- > From: lon-capa-users-boun...@mail.lon-capa.org > [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Lucas, Mark > Sent: Friday, February 16, 2018 10:43 AM > To: lon-capa-users@mail.lon-capa.org > Subject: [LON-CAPA-users] Tolerances with Hints > > Hi, > > I am looking to include a hint in a problem that occurs if a response is > inside a wider > tolerance (5%) but not within the requested tolerance (1%). > > I created the following hint code and plugged this into a course to test it. > When I look at the parameters for the problem, the tolerance for id=“11” shows > 5% (the tolerance used in the numericalhint tags), not 1%. I found this out > when I purposely entered an answer that was about 3% off and found that I got > it right. > > I thought I had done something like this before, but may not have > tested it as rigorously as I thought (or I just may be deluding myself that > I’ve > done this before). > > Has anyone else tried this before? Is this a feature or a bug? > > Thanks! > Mark > > > > description="Numerical Tolerance" /> > description="Significant Figures" /> > > > id="12"> > description="Numerical Tolerance" /> > description="Significant Figures" /> > > > description="Numerical Tolerance" /> > description="Significant Figures" /> > > >Remember that this is the work done BY the electric > field, not the work done by you. > > >In this calculation you are adding a number of > different terms, some of which are > positive and some of which are negative. > There is some benefit to working this problem out algebraically and > finding terms that > might offset each other. Remember that your answer needs to be > within a tolerance of about > $Tolerance. > > > > > > > -- > Mark Lucasemail: > luc...@ohiou.edu > 252D Clippinger Lab phone: > (740)597-2984 > Department of Physics and Astronomy fax: (740)593-0433 > Ohio University > Athens, OH 45701 > > ___ > 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 -- Mark Lucas email: luc...@ohiou.edu 252D Clippinger Lab phone: (740)597-2984 Department of Physics and Astronomy fax: (740)593-0433 Ohio University Athens, OH 45701 ___ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Tolerances with Hints
I've done no testing on this but am wondering -- could the responseparams for the problem occur just before the closing or tag so that those are the values in force and would the other tolerance statements then still work as intended for their hints? Doug Douglas Mills Director of Instructional Technology Department of Chemistry University of Illinois On 2/18/18, 1:04 PM, "lon-capa-users-boun...@mail.lon-capa.org on behalf of Carl Lira" wrote: whoops. There is a bug. The problem works correctly in the authoring environment, but you are correct that in the production environment, the answer tolerance gets clobbered by the value from the hint and the problem is graded based on the hint tolerance instead of the answer tolerance. Changing the name of the hint tolerance breaks the hint in the authoring environment. This is a known bug #5834. The wording there is kind of confusing, but I see what is happening. I will add some extra comments to the bug for what I discovered today. I put the problem in a test course and then looked at the problem parameters via the spreadsheet view. There may be some easier way to see the parameters, but I can see that for my problem the tolerance is set to 500% which was the tolerance used for the final hint in my example. -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Lucas, Mark Sent: Friday, February 16, 2018 10:43 AM To: lon-capa-users@mail.lon-capa.org Subject: [LON-CAPA-users] Tolerances with Hints Hi, I am looking to include a hint in a problem that occurs if a response is inside a wider tolerance (5%) but not within the requested tolerance (1%). I created the following hint code and plugged this into a course to test it. When I look at the parameters for the problem, the tolerance for id=“11” shows 5% (the tolerance used in the numericalhint tags), not 1%. I found this out when I purposely entered an answer that was about 3% off and found that I got it right. I thought I had done something like this before, but may not have tested it as rigorously as I thought (or I just may be deluding myself that I’ve done this before). Has anyone else tried this before? Is this a feature or a bug? Thanks! Mark Remember that this is the work done BY the electric field, not the work done by you. In this calculation you are adding a number of different terms, some of which are positive and some of which are negative. There is some benefit to working this problem out algebraically and finding terms that might offset each other. Remember that your answer needs to be within a tolerance of about $Tolerance. -- Mark Lucas email: luc...@ohiou.edu 252D Clippinger Lab phone: (740)597-2984 Department of Physics and Astronomy fax: (740)593-0433 Ohio University Athens, OH 45701 ___ 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 ___ LON-CAPA-users mailing list LON-CAPA-users@mail.lon-capa.org http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Tolerances with Hints
Hi Mark, It looks like you are wanting to display the tolerance in the hint? This can be done if you set the tolerance as a variable in the script. In the test environment this works OK. I have not tried to include it in a course. This problem provides hints if the answer is wrong but within 100% or 500%. Note that if the answer is within 100%, then both hints display because anything within 100% is also within 500%. msu/lira/loncapa examples/conditional hints.problem Code included here for quick reference: #Enter the computations here $a=&random(1,10,0.5); $b=&random(1,10,0.5); $c=$a+$b; $Tolerance = "10%" What is $a + $b? Your answer is within +- 100%. Required tolerance $Tolerance. Your answer is within +- 500%. Required tolerance $Tolerance. Your answer is off by more than +- 500%. Required tolerance $Tolerance. -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Lucas, Mark Sent: Friday, February 16, 2018 10:43 AM To: lon-capa-users@mail.lon-capa.org Subject: [LON-CAPA-users] Tolerances with Hints Hi, I am looking to include a hint in a problem that occurs if a response is inside a wider tolerance (5%) but not within the requested tolerance (1%). I created the following hint code and plugged this into a course to test it. When I look at the parameters for the problem, the tolerance for id=“11” shows 5% (the tolerance used in the numericalhint tags), not 1%. I found this out when I purposely entered an answer that was about 3% off and found that I got it right. I thought I had done something like this before, but may not have tested it as rigorously as I thought (or I just may be deluding myself that I’ve done this before). Has anyone else tried this before? Is this a feature or a bug? Thanks! Mark Remember that this is the work done BY the electric field, not the work done by you. In this calculation you are adding a number of different terms, some of which are positive and some of which are negative. There is some benefit to working this problem out algebraically and finding terms that might offset each other. Remember that your answer needs to be within a tolerance of about $Tolerance. -- Mark Lucas email: luc...@ohiou.edu 252D Clippinger Lab phone: (740)597-2984 Department of Physics and Astronomy fax: (740)593-0433 Ohio University Athens, OH 45701 ___ 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
Re: [LON-CAPA-users] Tolerances with Hints
whoops. There is a bug. The problem works correctly in the authoring environment, but you are correct that in the production environment, the answer tolerance gets clobbered by the value from the hint and the problem is graded based on the hint tolerance instead of the answer tolerance. Changing the name of the hint tolerance breaks the hint in the authoring environment. This is a known bug #5834. The wording there is kind of confusing, but I see what is happening. I will add some extra comments to the bug for what I discovered today. I put the problem in a test course and then looked at the problem parameters via the spreadsheet view. There may be some easier way to see the parameters, but I can see that for my problem the tolerance is set to 500% which was the tolerance used for the final hint in my example. -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Lucas, Mark Sent: Friday, February 16, 2018 10:43 AM To: lon-capa-users@mail.lon-capa.org Subject: [LON-CAPA-users] Tolerances with Hints Hi, I am looking to include a hint in a problem that occurs if a response is inside a wider tolerance (5%) but not within the requested tolerance (1%). I created the following hint code and plugged this into a course to test it. When I look at the parameters for the problem, the tolerance for id=“11” shows 5% (the tolerance used in the numericalhint tags), not 1%. I found this out when I purposely entered an answer that was about 3% off and found that I got it right. I thought I had done something like this before, but may not have tested it as rigorously as I thought (or I just may be deluding myself that I’ve done this before). Has anyone else tried this before? Is this a feature or a bug? Thanks! Mark Remember that this is the work done BY the electric field, not the work done by you. In this calculation you are adding a number of different terms, some of which are positive and some of which are negative. There is some benefit to working this problem out algebraically and finding terms that might offset each other. Remember that your answer needs to be within a tolerance of about $Tolerance. -- Mark Lucas email: luc...@ohiou.edu 252D Clippinger Lab phone: (740)597-2984 Department of Physics and Astronomy fax: (740)593-0433 Ohio University Athens, OH 45701 ___ 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