Re: [LON-CAPA-users] Setting weight by floating point
Hi HK, If I understand your question correctly, you want to set the weight for a homework/quiz problem or problem part. If that is correct, there are multiple ways to do that. I don't know if there is a way to set the default point value in a problem's code, but I normally do it from within the course where the problem is part of quiz/homework, inside a folder. The most frequent way I use personally is to go to Settings on the top level menu, then Content Settings. In that window, select the folder containing the problem(s). In part 2 you can select which parameters to set, including dates, time limit, weight, etc. I usually go with the defaults plus the Time-limit parameter. Click the Update Display button at bottom left. You will get a window showing those parameters and their current values. Click on the value of the weight parameter and set it to the value you want. I use decimal numbers all the time. Note that the value you specify in this window will apply equally to all problems/parts in the homework/quiz in that folder. For instance, if you have a quiz with four problems, each having two parts, and want a 100-point quiz, set the Weight to 12.5. Each part will be worth 12.5 points, making each problem worth 25 points, making the quiz worth a total of 100 points. Occasionally, I have a need to set problem parts to different values, rather than distributing the points equally across the parts. To do that, navigate to the problem from the high-level Contents tab, then select Content Settings on the Functions line. In the table that opens, you can set the point value applied to each problem. Or, if you check the Show all parts box and Update Display button, you can set the weight individually for each problem part. Hope that helps. Best regards, Gene L. Harding, PE Associate Professor of ECET From: LON-CAPA-users On Behalf Of H.K. Ng via LON-CAPA-users Sent: Friday, May 14, 2021 6:55 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] Setting weight by floating point Hi, How does one set the weight by floating point? I have a course that is set that way but I can't remember how that was done. My current course only has options for integers ... Thanks. Regards, -hk ___ 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] Presenting Lon-Capa on IPS conference next week
Hi Itay, What I normally say, and plan to say at a LON-CAPA workshop this April at the IL-IN ASEE conference, is that I have never seen or heard of an LMS that can even approach the problem-generating capabilities of LON-CAPA. That is absolutely true, but leaves the door open for someone to enlighten me. (No one has yet.) Before LON-CAPA I used Blackboard Vista. It was BB's transition to Learn, in which they dropped some of the most important aspects of what was a meager problem-generation capability, that led to my introduction to LON-CAPA. Purdue uses Brightspace (formerly D2L, I think) now, but I have not explored its problem-generating capacity. If you learn of a recent LMS comparison, please let me know. BR, Gene L. Harding, PE Associate Professor of ECET From: LON-CAPA-users On Behalf Of Itay via LON-CAPA-users Sent: Tuesday, February 16, 2021 12:00 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] Presenting Lon-Capa on IPS conference next week Hi Next week (Monday) I will do a short demonstration of Lon-Capa (LC) on the Israel Physical Society annual conference. I got 15 minutes in the Physics Education session. The backbone of the presentation would be showcasing 2-3 problems that demonstrate the strong problem-engine of Lon-Capa. I anticipate there might be questions from the audience asking to compare LC to other systems (I have some experience only with moodle). So I wonder if any of you could help me with these questions? 1. Do you know of any recent and published comparison of Lon-Capa (LC) with other LMS's? 2. In particular: LC vs. WebWork and/or Stack? 3. Can I reasonably claim that LC has (one of) the strongest problem-engine(s) in the market? 4. If you believe the answer for 3 is 'yes' : what would be the supporting evidence. Thank you in advance. You are welcome to reply in private if you prefer. Itay ___ 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] Student teams (groups)
Hi Susan, The only way I know to do it is one group at a time from the People tab at the top: People --> Groups, then fill out the info on that page, click Next, check any optional privileges desired, check the names of students for that group, Next, fill out the last page if applicable, and click Create Group. If there is an easier way to do it, I'm not aware of it. Best regards, Gene L. Harding, PE Associate Professor of ECET -Original Message- From: LON-CAPA-users On Behalf Of Susan Masten via LON-CAPA-users Sent: Saturday, January 30, 2021 2:12 PM To: lon-capa-users@mail.lon-capa.org Subject: [LON-CAPA-users] Student teams (groups) Greetings and I hope you're all having a relaxing weekend. I have an excel file where I've assigned students to teams (groups). Is there an easy way to assign them to the same teams on LON-CAPA? I'm not seeing anything in the new manual. Thanks Susan Masten Michigan State University -- Be well, keep hope, seek justice. Privileged to be working at home. -- Susan J. Masten, Ph.D., P.E. Professor Department of Civil and Environmental Engineering Engineering Building 3505 428 S. Shaw Ln., Room 3546 East Lansing, MI 48824 Phone: 517 355-2254 Fax: 517 355-0250 ___ 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] How to mark certain responses to be hand-graded?
Hi Itay, I have never done this, but have noticed this semester that, when I create dropboxes for assignments, there is a parameter "handgrade" that I do not see in my normal quiz questions. I just tried, and was not able to "force" the Hand Grade parameter to show up for one of my quiz questions, so I'm not sure if it is possible. If not, perhaps you could set a code in one of the other parameters. It would be a bit kludgy, but what if you set the score to 150 instead of somewhere in the 0-100 range to "flag" those problems? When you download the grades to a spreadsheet you could sort them by score. Any 150's would be at the top so you would know which ones to hand grade. This is not a great solution, and hopefully someone will have a better idea, but if not, since they are rare perhaps something like that could work... Best regards, Gene L. Harding, PE Associate Professor of ECET From: LON-CAPA-users On Behalf Of Itay via LON-CAPA-users Sent: Saturday, December 12, 2020 12:19 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] How to mark certain responses to be hand-graded? Hi I am setting up a graphical custom-response problem. In most cases, there would a solution to the question being asked, and the student sould respond with a numerical answer. However, in rare cases a solution does not exist. Avoiding these rare cases in advance or handling them programmatically would require a lot of effort. In contrast, handling them manually would be easy (because this is a graphical problem). So I thought to instruct the students, in case they think there is no solution to the problem, to respond with the string 'NA'. In the customresponse code I would intercept this string and mark the problem for that particular student to be hand-graded. Is it possible to do? If yes: how? Thank you in advance Itay ___ 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] LON-CAPA Error
Hi Stuart, Thank you for your reply. I tried the code you sent, and it works same as the old code: correctly when I am logged in as me, but "Unable to understand formula" when I log in as a student in the sandbox. I guess I am still confused about why it would interpret a formula correctly in one setting, but not in the other... BR, Gene L. Harding, PE Associate Professor of ECET -Original Message- From: LON-CAPA-users On Behalf Of Raeburn, Stuart Sent: Saturday, November 7, 2020 2:36 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] LON-CAPA Error Gene, In a formularesponse item, a student's submission will be checked for correctness using the maxima CAS, unless sample points were specified in the formularesponse tag (in which case CAPA is used to check for correctness via sampling; note: σ is not supported as a variable name in this older sample-based checking). The log() function is available in maxima for natural logs, but log10() is not available, by default. If students will be submitting answers that include log10() then one approach would be to call a preprocessor routine which would use a call to ('maxima') to convert the log10(σ) in the submitted expression to natural logs, i.e., convert log10(σ) to log(σ)/log(10), before comparison with the computer's answer. Note: in this case the "computer's answer" would need to be expressed using natural logs. Accordingly, the script block would contain: $radarRCS = "+10*log(σ)"; $radarRCS2 = "+10*log(σ)/log(10)"; sub convertlogten { ($answer)=@_; $expr = 'log10(x) := log(x) / log(10); '.$answer; $answer = ('maxima',$expr); return $answer; } and the formularesponse item would be: $radarRCS $radarRCS2 This change is necessary so that if a student submits an answer of: log10(σ^10) this will be graded as correct (i.e., for answer name: log10), as it is equivalent to 10*log10(σ), which would then be similar to the current behavior if a student submits an answer of: log(σ^10) (i.e., for answer name: log) which is graded as correct as it is equivalent to 10*log(σ) Note in the preview, displayed below the textbox used to enter an answer, when log10 is typed, the previewer actually displays the 10 as a subscript. Stuart Raeburn LON-CAPA Academic Consortium ____ From: LON-CAPA-users on behalf of Harding, Gene L Sent: Thursday, November 5, 2020 11:19 AM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] LON-CAPA Error Hi, I am getting an error I don't remember seeing before with a formula response problem that takes a Greek letter as part of the formula. The odd thing is that it works fine for me, whether in student or course coordinator mode, but not for the students. I have been able to recreate the error by logging in as a student to a Test course and doing the problem from there. The first time I submitted a response it took 20-30 seconds to process, and gave a timeout error. Subsequent submissions appear to process much faster, and gave an "Unable to understand formula" error. It is set up to take either of two formulas for the answer. Here are the perl script formula definitions: $radarRCS = "+10*log(σ)"; $radarRCS2 = "+10*log10(σ)"; This is the formula response code: $radarRCS $radarRCS2 This approach works fine for the two preceding problem parts, but they do not use the "addchars" modifier with a Greek letter. Has anyone seen this error before and have an idea of what causes it? Best regards, Gene L. Harding, PE Associate Professor of ECET ___ 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] LON-CAPA Error
Hi, I am getting an error I don't remember seeing before with a formula response problem that takes a Greek letter as part of the formula. The odd thing is that it works fine for me, whether in student or course coordinator mode, but not for the students. I have been able to recreate the error by logging in as a student to a Test course and doing the problem from there. The first time I submitted a response it took 20-30 seconds to process, and gave a timeout error. Subsequent submissions appear to process much faster, and gave an "Unable to understand formula" error. It is set up to take either of two formulas for the answer. Here are the perl script formula definitions: $radarRCS = "+10*log(σ)"; $radarRCS2 = "+10*log10(σ)"; This is the formula response code: $radarRCS $radarRCS2 This approach works fine for the two preceding problem parts, but they do not use the "addchars" modifier with a Greek letter. Has anyone seen this error before and have an idea of what causes it? Best regards, Gene L. Harding, PE Associate Professor of ECET ___ 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] Polar Format gnuplots
Hi everyone, My apologies. I should have been more specific about what I am trying to do. I want to generate some notional antenna radiation pattern plots showing main lobe, back lobe, and side lobes' sizes (both peak gain and beamwidths). These plots are normally done with radial values in dB from some negative value up to zero or some positive value. The angle values on these plots are typically marked in degrees around the perimeter. I have found some workarounds to get something approximating a polar radiation pattern plot. I used the tag to mark +90 degrees, to mark -90, and yaxis to mark 180, but that does not give great resolution. (The plot grid only shows radii every 30 degrees.) Likewise, I used the axis xformat and yformat parameters, in conjunction with the xtics and ytics tags, to mark radial magnitudes, but they only work for radial values from 0 to some positive number. If there is a way to do a logarithmic scale for the radial values, I cannot figure it out. After searching through the LON-CAPA Author manual and the gnuplot manual, I think this may be as close as I can get to the equivalent of a MATLAB (theta, rho) polar plot. It appears to be a limitation of gnuplot, not LON-CAPA. Does anyone know for sure? Maybe there is a way to do this in Geogebra, but I think I may have to compromise for now to get a problem constructed. My code is below in case anyone wants to see what the plot looks like. Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ POLAR ANTENNA RADIATION PATTERN PLOT $amplitude=&random(0.5,3.5,0.5); $omega=&random(1,2,0.5); $mainlobe_gain = &random(12,22,1); # Max antenna gain in dB $max_plot_radius = 5*&ceil($mainlobe_gain/5); $backlobe_gain = &random(5,8,1); # Antenna back lobe gain in dB $function1 = "$mainlobe_gain * abs(cos(2*t))"; $function2 = "$backlobe_gain * abs(cos(4*t))"; -90 180 +90 t<$pi/4 ? $function1 : t<7*$pi/8 ? 0 : t<9*$pi/8 ? $function2 : t<7*$pi/4 ? 0 : $function1 The plot at right depicts an antenna's radiation pattern with radial units in dB gain. What is the peak gain of the main antenna lobe? Amain lobe = From: Harding, Gene L Sent: Friday, May 1, 2020 7:39 PM To: Discussion list for LON-CAPA users Subject: RE: Polar Format gnuplots Hi Angela, Thank you for sending that. If you use angular/radial coordinates, do you know if there is a way to label the angles around the circular perimeter? I figured out how to turn off the Cartesian grid, but need to display angles from 0-360 or -180 to +180 around the circle instead of x-y coordinates. 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 mailto:lon-capa-users-boun...@mail.lon-capa.org>> On Behalf Of Athanas, Angela Sent: Friday, May 1, 2020 7:28 PM To: Discussion list for LON-CAPA users mailto:lon-capa-users@mail.lon-capa.org>> Subject: [LON-CAPA-users] {Disarmed} Re: Polar Format gnuplots I have a couple of polar area problems. Here's one: $a=&random(5,10,1); $a1=&random(1,3,1); $b=$a-1; for ($x = 0; $x<=2*3.141592654; $x+= 0.01) { push @X1, ($a+$b*sin($x))*cos($x); push @Y1, ($a+$b*sin($x))*sin($x); push @X2, ($a+$b*sin($x))*cos($x); push @Y2, 0; push @X3, 0; push @Y3, ($a+$b*sin($x))*sin($x); } $area=$a**2/2+$b**2/4; $area1="$area*$pi"; Determine the area of the right half of the cardioid formed by \[ r = $a + $b \sin{\theta} \, \] @X1 @Y1 @X2 @Y2 @X3 @Y3 Area of cardioid right half is From: LON-CAPA-users mailto:lon-capa-users-boun...@mail.lon-capa.org>> on behalf of Harding, Gene L mailto:glhar...@purdue.edu>> Sent: Friday, May 1, 2020 6:03 PM To: Discussion list for LON-CAPA users mailto:lon-capa-users@mail.lon-capa.org>> Subject: [LON-CAPA-users] Polar Format gnuplots Hi, Has anyone done polar-format gnuplots in LON-CAPA? Would you be willing to share an example? This is my first foray into polar gnuplots. I am having trouble getting the angle to display around the perimeter. It's rendering x- and y-axis values instead of angle and radius values. Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 MailScanner has detected a possible fraud attempt from "nam05.safelinks.protection.outlook.com" claiming to be https://polytechnic.purdue.edu/south-bend/<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpolytechnic.purdue.edu%2Fsouth-bend%2F=02%7C01%7Cathanas%40pitt.edu%7Cfad47791d6c841b74f7908d7ee1ba
Re: [LON-CAPA-users] Polar Format gnuplots
Hi Angela, Thank you for sending that. If you use angular/radial coordinates, do you know if there is a way to label the angles around the circular perimeter? I figured out how to turn off the Cartesian grid, but need to display angles from 0-360 or -180 to +180 around the circle instead of x-y coordinates. 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 On Behalf Of Athanas, Angela Sent: Friday, May 1, 2020 7:28 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] {Disarmed} Re: Polar Format gnuplots I have a couple of polar area problems. Here's one: $a=&random(5,10,1); $a1=&random(1,3,1); $b=$a-1; for ($x = 0; $x<=2*3.141592654; $x+= 0.01) { push @X1, ($a+$b*sin($x))*cos($x); push @Y1, ($a+$b*sin($x))*sin($x); push @X2, ($a+$b*sin($x))*cos($x); push @Y2, 0; push @X3, 0; push @Y3, ($a+$b*sin($x))*sin($x); } $area=$a**2/2+$b**2/4; $area1="$area*$pi"; Determine the area of the right half of the cardioid formed by \[ r = $a + $b \sin{\theta} \, \] @X1 @Y1 @X2 @Y2 @X3 @Y3 Area of cardioid right half is From: LON-CAPA-users mailto:lon-capa-users-boun...@mail.lon-capa.org>> on behalf of Harding, Gene L mailto:glhar...@purdue.edu>> Sent: Friday, May 1, 2020 6:03 PM To: Discussion list for LON-CAPA users mailto:lon-capa-users@mail.lon-capa.org>> Subject: [LON-CAPA-users] Polar Format gnuplots Hi, Has anyone done polar-format gnuplots in LON-CAPA? Would you be willing to share an example? This is my first foray into polar gnuplots. I am having trouble getting the angle to display around the perimeter. It's rendering x- and y-axis values instead of angle and radius values. Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 MailScanner has detected a possible fraud attempt from "nam05.safelinks.protection.outlook.com" claiming to be https://polytechnic.purdue.edu/south-bend/<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpolytechnic.purdue.edu%2Fsouth-bend%2F=02%7C01%7Cathanas%40pitt.edu%7Cfad47791d6c841b74f7908d7ee1bafef%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1%7C0%7C637239675012270173=BxFc6JckzEaHORzCXuu3bO3AgOEJyqxsirfeqygrBg0%3D=0> ___ 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] Polar Format gnuplots
Hi, Has anyone done polar-format gnuplots in LON-CAPA? Would you be willing to share an example? This is my first foray into polar gnuplots. I am having trouble getting the angle to display around the perimeter. It's rendering x- and y-axis values instead of angle and radius values. 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Greek Characters in Formula Response
Thank you Dave, Mark, Stefan, and Stuart. I got it working. The easiest way I found to get the Greek characters was to display them in the LON-CAPA problem text, e.g., , then copy them from the displayed problem, return to the editor, and paste where needed. Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Raeburn, Stuart Sent: Monday, April 20, 2020 9:12 AM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Greek Characters in Formula Response Gene, You are referring to this post to the lon-capa-users list: mail.lon-capa.org/pipermail/lon-capa-users/2014-December/004706.html which references this demo problem: /res/fhwf/droeschl/misc/addchars.problem , which is published Source open. With your Author role active, when you browse /res/fhwf/droeschl/misc/ , with the "Source Available" checkbox checked, you can click "Source Code" to import into your Authoring Space. If you do that, do you get a working problem? LON-CAPA includes a meta tag in the page header which includes charset=utf-8", which tells your web browser which encoding to use. In the menus on Firefox, the "Text Encoding" option, under View, (which allows you to switch encoding) is grayed out in the case where a web page includes information about the encoding. As regards editing a problem -- within the LON-CAPA XML editor you will enter a comma separated list of the characters in the addchars attribute, whereas within the LON-CAPA colorful editor, you will enter the same comma separated list in the "Click-On Texts (comma sep)" textbox. As to how to enter each Greek character, you need to enter the appropriate unicode (UTF-8) character. You could: (a) use the character map for your particular OS, e.g., see: sites.psu.edu/symbolcodes/windows/charmap/ or sites.psu.edu/symbolcodes/mac/charview/ or (b) visit: www.unicode.org/charts/U0370.pdf and copy and paste the character or (c) use a web site (there are many) which provides Unicode Character Search, and copy and paste the character you need). Stuart Raeburn LON-CAPA Academic Consortium ____ From: LON-CAPA-users on behalf of Harding, Gene L Sent: Friday, April 17, 2020 9:33 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] Greek Characters in Formula Response Hi, Does anyone know how to do Greek characters in a formularesponse? Someone shared a response from Stefan Droeschler several years ago, but I cannot get it to work: $answer="ù+á*t"; $\omega + \alpha t$ Is a cut and paste from MS Word OK for putting the Greek characters into the script and addchars statement? If not, how can I do that? Once that is done, how do you enter the Greek characters into the formularesponse textline field? Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/<https://urldefense.com/v3/__https://polytechnic.purdue.edu/south-bend/__;!!HXCxUKc!nvo635sbWhA7DBf_tztnMFVFsaCt03Ol2QdE_ZZeVlSqz8iCeE8bA70wl_HRNw$> ___ 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] Greek Characters in Formula Response
Hi, Does anyone know how to do Greek characters in a formularesponse? Someone shared a response from Stefan Droeschler several years ago, but I cannot get it to work: $answer="ω+α*t"; $\omega + \alpha t$ Is a cut and paste from MS Word OK for putting the Greek characters into the script and addchars statement? If not, how can I do that? Once that is done, how do you enter the Greek characters into the formularesponse textline field? 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] gnuplot problem
Hi everyone, For those who are interested, I finally figured out what the gnuplot issue was, and I am stunned. It did not like using 1/4 and 1/2 as coefficients for the sin() functions. When I replaced them with 0.25 and 0.5 the plots work fine. These would not work: $fnct_rms_halfwave="1/sqrt(pi) * sqrt(1/2*(pi-x*pi/180) + 1/4*sin(2*x*pi/180))"; $fnct_rms_fullwave="sqrt(2/pi) * sqrt(1/2*(pi-x*pi/180) + 1/4*sin(2*x*pi/180))"; These work fine: $fnct_rms_halfwave="1/sqrt(pi) * sqrt(0.5*(pi-x*pi/180) + 0.25*sin(2*x*pi/180))"; $fnct_rms_fullwave="sqrt(2/pi) * sqrt(0.5*(pi-x*pi/180) + 0.25*sin(2*x*pi/180))"; Just thought I'd share what I found in case anyone else runs across this problem. Although I don't know the "why", at least I know the "what" that caused it. If anyone knows the why, I'd love to know... BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of raeb...@msu.edu Sent: Wednesday, April 8, 2020 8:27 AM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] gnuplot problem Hello Gene, > > "/home/httpd/perl/tmp/glhardin_purdue_1586186312_6039374_plot.data", > line 13: expecting ':' > Line 13 refers to the line number in the *_plot.data file, which would have been in /home/httpd/perl/tmp on the LON-CAPA server from where ITaP retrieved the error log information. Of course by now, nightly clean-up scripts will have removed the *_plot.data files from /home/httpd/perl/tmp, so you need to regenerate the error, and have ITaP provide you with the *_plot.data file which corresponds with the (new) error logged in the web server error logs. Once you have the *_plot.data file then you could also experiment with that outside LON-CAPA, by using it with a version of gnuplot installed locally on your own computer. If you wanted to experiment within the Linux environment, but don't use Linux as your primary OS, you could set up a Linux VM using VirtualBox (or similar), if you have the memory available to allocate to a VM, and install gnuplot there. Stuart Raeburn LON-CAPA Academic Consortium ________ From: LON-CAPA-users on behalf of Harding, Gene L Sent: Tuesday, April 7, 2020 7:33 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] gnuplot problem Hi Stuart, Wouldn't taking the absolute value of the expression inside the sqrt function also work? I tried this, thinking it would remove the negative number problem, but it did not work: $fnct_rms_halfwave="1/sqrt(pi) * sqrt( abs(1/2*(pi-x*pi/180) + 1/4*sin(2*x*pi/180)) )"; I checked my gnuplot manual, and abs() appears to be the correct syntax for absolute value. Wouldn't that fix the negative number issue? These are the lines IT sent me from the error log: [Mon Apr 06 10:59:07 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586185147_62400672_plot.data", line 13: expecting ':', referer: https://urldefense.com/v3/__https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem__;!!HXCxUKc!gG78S6Qp2qDtQFc0NrfUKzJ4BmC7aOLMiBQ-9GfMLhgv8M9GqPiE0mgQfYzpVQ$ [Mon Apr 06 11:17:06 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586186225_6003521_plot.data", line 13: expecting ':', referer: https://urldefense.com/v3/__https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem__;!!HXCxUKc!gG78S6Qp2qDtQFc0NrfUKzJ4BmC7aOLMiBQ-9GfMLhgv8M9GqPiE0mgQfYzpVQ$ [Mon Apr 06 11:18:32 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586186312_6039374_plot.data", line 13: expecting ':', referer: https://urldefense.com/v3/__https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem__;!!HXCxUKc!gG78S6Qp2qDtQFc0NrfUKzJ4BmC7aOLMiBQ-9GfMLhgv8M9GqPiE0mgQfYzpVQ$ [Mon Apr 06 14:42:22 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586198542_65331252_plot.data", line 13: expecting ':', referer: https://urldefense.com/v3/__https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem__;!!HXCxUKc!gG78S6Qp2qDtQFc0NrfUKzJ4BmC7aOLMiBQ-9GfMLhgv8M9GqPiE0mgQfYzpVQ$ Do they make sense to you? Line 13 in the LON-CAPA code is part of a statement, so I don't think that's the line the errors are referring to. I looked through the code again, and do not know where it might be expecting to see a ":" character, al
Re: [LON-CAPA-users] gnuplot problem
Hi Stuart, Wouldn't taking the absolute value of the expression inside the sqrt function also work? I tried this, thinking it would remove the negative number problem, but it did not work: $fnct_rms_halfwave="1/sqrt(pi) * sqrt( abs(1/2*(pi-x*pi/180) + 1/4*sin(2*x*pi/180)) )"; I checked my gnuplot manual, and abs() appears to be the correct syntax for absolute value. Wouldn't that fix the negative number issue? These are the lines IT sent me from the error log: [Mon Apr 06 10:59:07 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586185147_62400672_plot.data", line 13: expecting ':', referer: https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem [Mon Apr 06 11:17:06 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586186225_6003521_plot.data", line 13: expecting ':', referer: https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem [Mon Apr 06 11:18:32 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586186312_6039374_plot.data", line 13: expecting ':', referer: https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem [Mon Apr 06 14:42:22 2020] [error] [client 128.210.56.177] "/home/httpd/perl/tmp/glhardin_purdue_1586198542_65331252_plot.data", line 13: expecting ':', referer: https://loncapa.purdue.edu/priv/purdue/ecet_purdue/Topics/Power_Electronics/Thyristors/Calc_FiringAngle_using_Graphs_GeogebraInteractive_Multipart.problem Do they make sense to you? Line 13 in the LON-CAPA code is part of a statement, so I don't think that's the line the errors are referring to. I looked through the code again, and do not know where it might be expecting to see a ":" character, although I have done many versions of this during troubleshooting, and I wonder if this error came from a version when I was using the ternary operator to limit the plot interval. Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of raeb...@msu.edu Sent: Tuesday, April 7, 2020 8:50 AM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] gnuplot problem Gene, > > Two of them work fine, and the other two, which both have sine > expressions inside a sqrt function, do not. > My guess would be that gnuplot is encountering an issue because floating point arithmetic results in evaluation of the square root of a negative number (very close to zero), which should really be 0. In that case an alternative would be to explicitly evaluate the components of the function within a perl script block in LON-CAPA, and test that they will not result in a negative number before applying LON-CAPA's sqrt() function to the result (rom which you would then add the value to an array (@Y) of y values for the plot). The array (@X) will contain the corresponding x values, which you would have generating within the loop you use to generate the y values (in the @Y) array. You would then replace use of the tag with @X @Y where @X and @Y are arrays containing x and y values for the points on the plot. See the: "Data Plot with Numerical Response" example in the problem templates. Stuart Raeburn LON-CAPA Academic Consortium ________ From: LON-CAPA-users on behalf of Harding, Gene L Sent: Monday, April 6, 2020 7:35 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] gnuplot problem Thanks Stuart. I do not have access to those directories (as far as I can tell), so have reached out to some IT folks to see if they can help me. I realized later that, apparently, "dynamically generated plot" is just the alt tag for the gnuplot. I am baffled about what is going on. I have four functions for this problem. Two of them work fine, and the other two, which both have sine expressions inside a sqrt function, do not. I have tried using the ternary operator to zero out values outside of the axis limits. In all of the playing/troubleshooting I have done, it appears to not like the sqrt(bla bla sin(stuff)). I am not sure what version of gnuplot we are using. I think I am just going to do the problem using Geogebra and forget about gnuplot, but it would be nice to know what's going on with the gnuplot. Hopefully, my IT guys can help... BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://urldefense.com/v3/__https://polytechnic.purdue.edu/south-bend/__;!!HXCxUKc!jTjoyEwsimPmL2daj4jh1wXvO-ThMXDm58g_FiI6994pTe0-lVc
Re: [LON-CAPA-users] gnuplot problem
Hi Grigory, As part of the troubleshooting I have been doing, I used the ternary operator to set the value to zero outside of the display values: x<0 ? 0 : x<180 ? $fnct_rms_fullwave : 0 This did not help... BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of SIMIN, GRIGORY Sent: Monday, April 6, 2020 3:19 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] gnuplot problem Stuart, For a GNU Function plot, is there a way to set the range of "x" or "t" arguments? Thanks Grigory --- Grigory Simin, PhD, Professor, Electrical Engineering Department University of South Carolina 301 Main Street, Room 3A80 Swearingen Engineering Center Columbia, SC 29208 -Original Message- From: LON-CAPA-users [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Raeburn, Stuart Sent: Monday, April 6, 2020 15:11 To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] gnuplot problem Hello Gene, If the text: "dynamically generated plot" is displayed instead of an image, when using gnuplot, then it means gnuplot was unable to process the data file generated by LON-CAPA for your plot. That data file will have been written to /home/httpd/perl/tmp/ on your server's filesystem with a file name that includes your username, and ends _plot.data. and there will also be an error message in the web server's error log file, e.g., /var/log/httpd/ssl_error_log, with your problem listed as the referer. (You'd need to ask your system administrator to look in the log files). I was able to successfully generate plots for both functions: $fnct_rms_halfwave="1/$pi * (1/2*($pi-x) + 1/4*sin(2*x))"; $fnct_rms_fullwave="(2/$pi) * (1/2*($pi-x) + 1/4*sin(2*x))"; in a problem in my Authoring Space (gnuplot version: 4.4.2). You might double check that there is not a typo in the problem XML, where you refer to the function, e.g., $fnct_rms_halfwave Otherwise, there could be an issue with other attributes defined for the plot, aside from the functions themselves (although in most cases, LON-CAPA replaces invalid values with valid ones, before creating the _plot.data file passed to gnuplot). Stuart Raeburn LON-CAPA Academic Consortium ________ From: LON-CAPA-users on behalf of Harding, Gene L Sent: Monday, April 6, 2020 11:22 AM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] gnuplot problem Hi everyone, I am having trouble generating a gnuplot using the following two functions in LON-CAPA: $fnct_rms_halfwave="1/$pi * (1/2*($pi-x) + 1/4*sin(2*x))"; $fnct_rms_fullwave="(2/$pi) * (1/2*($pi-x) + 1/4*sin(2*x))"; Instead of rendering a plot, LON-CAPA just displays a message that says "dynamically generated plot". It plots fine in Geogebra. Does anyone know what's going on with the gnuplot? 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 https://protect2.fireeye.com/v1/url?k=2f72ee47-73e0d4f6-2f72a086-ac1f6b0e67f2-150b4c994e69e1d4=1=7cb54854-e62e-40e0-ab34-929308cfdf1e=http%3A%2F%2Fmail.lon-capa.org%2Fmailman%2Flistinfo%2Flon-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
[LON-CAPA-users] gnuplot problem
Hi everyone, I am having trouble generating a gnuplot using the following two functions in LON-CAPA: $fnct_rms_halfwave="1/$pi * (1/2*($pi-x) + 1/4*sin(2*x))"; $fnct_rms_fullwave="(2/$pi) * (1/2*($pi-x) + 1/4*sin(2*x))"; Instead of rendering a plot, LON-CAPA just displays a message that says "dynamically generated plot". It plots fine in Geogebra. Does anyone know what's going on with the gnuplot? 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Math Display Problem
Ah, I see. That worked, so I added it to my ever-growing notes file. :) Thanks Mark! Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Lucas, Mark Sent: Sunday, March 29, 2020 10:50 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Math Display Problem The \ in $PwrIntegral need to be escaped. Try: $PwrIntegral = "p(x) = \\frac{1}{T} \\int_0^T v(x) i(x) dx”; \\ escapes the left slash and puts a single left slash in. \ is used to include special characters in a perl string: \n - newline, \r - carriage return. It thought \f and \i were special characters. \\ says make this a real \ Hope this helps! Mark > On Mar 29, 2020, at 10:25 PM, Harding, Gene L wrote: > > Hi, > > I am having trouble getting equations to render properly. I have done this > before, and have even tried directly copying code I have used before, but > cannot get it to display properly. > > This is one of the equation definitions: > $PwrIntegral = "p(x) = \frac{1}{T} \int_0^T v(x) i(x) dx"; > > This is the radiobuttonresponse code using it: > > > > > $ $PwrIntegral $ > > > > $ $RMSIntegral > $ > > > $ $AvgIntegral > $ > > > bla > > > This is foil Five, and it is currently set to > "false." > > > > > I can’t send a snip of the display to the listserv, but it looks something > like this: > p(x) = rac1Tint0Tv(x)i(x)dx > > It responds to the _subscript and ^superscript, but completely ignores the > \frac and \int commands. I know I must be doing something dumb, but don’t > know what, and don’t understand why a different expression I pulled from a > correctly working problem does not work in this one. > > If anyone can see what I’m doing wrong, please help. The exam is scheduled > for first thing Tuesday morning… > > 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 > https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail.lon-capa.org%2Fmailman%2Flistinfo%2Flon-capa-usersdata=02%7C01%7Clucasm%40ohio.edu%7C417966d64bd94a6d4fe908d7d451c17e%7Cf3308007477c4a70888934611817c55a%7C0%7C0%7C637211319917211585sdata=InAHZZPUryHES9bhFX8toubXNQ3XjwDE7GsejURH7Tw%3Dreserved=0 -- Mark Lucas email: luc...@ohio.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] Custom Response Question
Had another duh moment, figure it out, and finished the problem. Apologize for spamming the listserv. Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: Harding, Gene L Sent: Thursday, March 26, 2020 3:14 PM To: Discussion list for LON-CAPA users Subject: RE: [LON-CAPA-users] Custom Response Question That worked. But now, when the problem is processed as correct, it displays blanks instead of the correct values in the matrix. Is there a way to get it to display the correct values? I know how to also test the conditions for correct answer or maxtries exceeded, but how do I display the matrix element values instead of blanks...? Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Harding, Gene L Sent: Thursday, March 26, 2020 2:53 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Custom Response Question Ooooh. I just remembered that I must use eq, not == when evaluating strings. I'm redoing that portion right now, and it seems to be working. I am, however, open to ideas how to do it better, if anyone wants to offer them. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Harding, Gene L Sent: Thursday, March 26, 2020 2:41 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Custom Response Question Hi Mark, Sure. The problem requires students to "write" a matrix equation. I was going to include a snip of the displayed XML, but this email format will not allow me to paste a figure. This is the perl script: $total_score = 0; # These submission variables appear to be local to this perl script section only. ($ZR11,$ZX11,$ZR12,$ZX12,$ZR13,$ZX13,$I11,$E11mag,$E11ph, $ZR21,$ZX21,$ZR22,$ZX22,$ZR23,$ZX23,$I21,$E21mag,$E21ph, $ZR31,$ZX31,$ZR32,$ZX32,$ZR33,$ZX33,$I31,$E31mag,$E31ph) = @$submission; # In these if stmts, conditionals cannot distinguish between 0 and null, # and counts null or any string as correct for "I1", "I2", or "I3" if ($ZR11==$R1 && $ZX11==-$X_C1) {$total_score = 1/15;} if ($ZR12==-$R1 && $ZX12=="0") {$total_score = $total_score + 1/15;} if ($ZR13=="0" && $ZX13=="0") {$total_score = $total_score + 1/15;} if ($ZR21==-$R1 && $ZX21==0){$total_score = $total_score + 1/15;} if ($ZR22==$R1 && $ZX22==$X_L1-$X_C2) {$total_score = $total_score + 1/15;} if ($ZR23==0&& $ZX23==$X_C2){$total_score = $total_score + 1/15;} if ($ZR31==0&& $ZX31==0){$total_score = $total_score + 1/15;} if ($ZR32==0&& $ZX32==$X_C2){$total_score = $total_score + 1/15;} if ($ZR33==$R2 && $ZX33==-$X_C2-$X_C3) {$total_score = $total_score + 1/15;} if ($I11=="I1") {$total_score = $total_score + 1/15;} if ($I21=="I2") {$total_score = $total_score + 1/15;} if ($I31=="I3") {$total_score = $total_score + 1/15;} if ($E11mag==$E1mag && $E11ph==$E1ph) {$total_score = $total_score + 1/15;} if ($E21mag==$E2mag && $E21ph==$E2ph) {$total_score = $total_score + 1/15;} if ($E31mag==0 && $E31ph==0) {$total_score = $total_score + 1/15;} return ('ASSIGNED_SCORE',$total_score); The equation is a 3x3 impedance (Z) matrix multiplied by a 3-element current column vector to get a 3-element voltage column vector. The Z matrix elements are complex values in rectangular form, but the real and imaginary parts are processed separately as real integers. That part works fine. The problem is that nothing needs to be entered at all for the zero values; no entry is still evaluated as correct. As you can see above, I have tried processing them as both numeric (0) and text ("0") but neither approach works. The intent of the current column vector elements (the variables in this equation) is for students to enter the variables as text values: I1, I2, and I3. The voltage column vector elements are complex values in polar form, magnitude in V and phase in degrees. Both values are processed as real numbers. The XML displays appropriate units by each element of the Z matrix and V column vector, so no units processing is needed. The order of the variables in the submissio
Re: [LON-CAPA-users] Custom Response Question
That worked. But now, when the problem is processed as correct, it displays blanks instead of the correct values in the matrix. Is there a way to get it to display the correct values? I know how to also test the conditions for correct answer or maxtries exceeded, but how do I display the matrix element values instead of blanks...? Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Harding, Gene L Sent: Thursday, March 26, 2020 2:53 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Custom Response Question Ooooh. I just remembered that I must use eq, not == when evaluating strings. I'm redoing that portion right now, and it seems to be working. I am, however, open to ideas how to do it better, if anyone wants to offer them. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Harding, Gene L Sent: Thursday, March 26, 2020 2:41 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Custom Response Question Hi Mark, Sure. The problem requires students to "write" a matrix equation. I was going to include a snip of the displayed XML, but this email format will not allow me to paste a figure. This is the perl script: $total_score = 0; # These submission variables appear to be local to this perl script section only. ($ZR11,$ZX11,$ZR12,$ZX12,$ZR13,$ZX13,$I11,$E11mag,$E11ph, $ZR21,$ZX21,$ZR22,$ZX22,$ZR23,$ZX23,$I21,$E21mag,$E21ph, $ZR31,$ZX31,$ZR32,$ZX32,$ZR33,$ZX33,$I31,$E31mag,$E31ph) = @$submission; # In these if stmts, conditionals cannot distinguish between 0 and null, # and counts null or any string as correct for "I1", "I2", or "I3" if ($ZR11==$R1 && $ZX11==-$X_C1) {$total_score = 1/15;} if ($ZR12==-$R1 && $ZX12=="0") {$total_score = $total_score + 1/15;} if ($ZR13=="0" && $ZX13=="0") {$total_score = $total_score + 1/15;} if ($ZR21==-$R1 && $ZX21==0){$total_score = $total_score + 1/15;} if ($ZR22==$R1 && $ZX22==$X_L1-$X_C2) {$total_score = $total_score + 1/15;} if ($ZR23==0&& $ZX23==$X_C2){$total_score = $total_score + 1/15;} if ($ZR31==0&& $ZX31==0){$total_score = $total_score + 1/15;} if ($ZR32==0&& $ZX32==$X_C2){$total_score = $total_score + 1/15;} if ($ZR33==$R2 && $ZX33==-$X_C2-$X_C3) {$total_score = $total_score + 1/15;} if ($I11=="I1") {$total_score = $total_score + 1/15;} if ($I21=="I2") {$total_score = $total_score + 1/15;} if ($I31=="I3") {$total_score = $total_score + 1/15;} if ($E11mag==$E1mag && $E11ph==$E1ph) {$total_score = $total_score + 1/15;} if ($E21mag==$E2mag && $E21ph==$E2ph) {$total_score = $total_score + 1/15;} if ($E31mag==0 && $E31ph==0) {$total_score = $total_score + 1/15;} return ('ASSIGNED_SCORE',$total_score); The equation is a 3x3 impedance (Z) matrix multiplied by a 3-element current column vector to get a 3-element voltage column vector. The Z matrix elements are complex values in rectangular form, but the real and imaginary parts are processed separately as real integers. That part works fine. The problem is that nothing needs to be entered at all for the zero values; no entry is still evaluated as correct. As you can see above, I have tried processing them as both numeric (0) and text ("0") but neither approach works. The intent of the current column vector elements (the variables in this equation) is for students to enter the variables as text values: I1, I2, and I3. The voltage column vector elements are complex values in polar form, magnitude in V and phase in degrees. Both values are processed as real numbers. The XML displays appropriate units by each element of the Z matrix and V column vector, so no units processing is needed. The order of the variables in the submission input/assignment statement is dictated by the XML display of the matrix. The other variables, like $R1, $X_C2, $E2ph, etc., are given variables from the perl script at the beginning of the problem. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Lucas, Mark Sent: Thursday, March 26,
Re: [LON-CAPA-users] Custom Response Question
Ooooh. I just remembered that I must use eq, not == when evaluating strings. I'm redoing that portion right now, and it seems to be working. I am, however, open to ideas how to do it better, if anyone wants to offer them. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Harding, Gene L Sent: Thursday, March 26, 2020 2:41 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Custom Response Question Hi Mark, Sure. The problem requires students to "write" a matrix equation. I was going to include a snip of the displayed XML, but this email format will not allow me to paste a figure. This is the perl script: $total_score = 0; # These submission variables appear to be local to this perl script section only. ($ZR11,$ZX11,$ZR12,$ZX12,$ZR13,$ZX13,$I11,$E11mag,$E11ph, $ZR21,$ZX21,$ZR22,$ZX22,$ZR23,$ZX23,$I21,$E21mag,$E21ph, $ZR31,$ZX31,$ZR32,$ZX32,$ZR33,$ZX33,$I31,$E31mag,$E31ph) = @$submission; # In these if stmts, conditionals cannot distinguish between 0 and null, # and counts null or any string as correct for "I1", "I2", or "I3" if ($ZR11==$R1 && $ZX11==-$X_C1) {$total_score = 1/15;} if ($ZR12==-$R1 && $ZX12=="0") {$total_score = $total_score + 1/15;} if ($ZR13=="0" && $ZX13=="0") {$total_score = $total_score + 1/15;} if ($ZR21==-$R1 && $ZX21==0){$total_score = $total_score + 1/15;} if ($ZR22==$R1 && $ZX22==$X_L1-$X_C2) {$total_score = $total_score + 1/15;} if ($ZR23==0&& $ZX23==$X_C2){$total_score = $total_score + 1/15;} if ($ZR31==0&& $ZX31==0){$total_score = $total_score + 1/15;} if ($ZR32==0&& $ZX32==$X_C2){$total_score = $total_score + 1/15;} if ($ZR33==$R2 && $ZX33==-$X_C2-$X_C3) {$total_score = $total_score + 1/15;} if ($I11=="I1") {$total_score = $total_score + 1/15;} if ($I21=="I2") {$total_score = $total_score + 1/15;} if ($I31=="I3") {$total_score = $total_score + 1/15;} if ($E11mag==$E1mag && $E11ph==$E1ph) {$total_score = $total_score + 1/15;} if ($E21mag==$E2mag && $E21ph==$E2ph) {$total_score = $total_score + 1/15;} if ($E31mag==0 && $E31ph==0) {$total_score = $total_score + 1/15;} return ('ASSIGNED_SCORE',$total_score); The equation is a 3x3 impedance (Z) matrix multiplied by a 3-element current column vector to get a 3-element voltage column vector. The Z matrix elements are complex values in rectangular form, but the real and imaginary parts are processed separately as real integers. That part works fine. The problem is that nothing needs to be entered at all for the zero values; no entry is still evaluated as correct. As you can see above, I have tried processing them as both numeric (0) and text ("0") but neither approach works. The intent of the current column vector elements (the variables in this equation) is for students to enter the variables as text values: I1, I2, and I3. The voltage column vector elements are complex values in polar form, magnitude in V and phase in degrees. Both values are processed as real numbers. The XML displays appropriate units by each element of the Z matrix and V column vector, so no units processing is needed. The order of the variables in the submission input/assignment statement is dictated by the XML display of the matrix. The other variables, like $R1, $X_C2, $E2ph, etc., are given variables from the perl script at the beginning of the problem. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Lucas, Mark Sent: Thursday, March 26, 2020 2:18 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Custom Response Question Gene, Could you post sample variables and perhaps an example of the perl you are trying to use? What does the array look like? What are some typical variables? (or at least analogs if you don’t want to give away content). Mark > On Mar 26, 2020, at 2:14 PM, Harding, Gene L wrote: > > Hi, > > I am trying to do something with a customresponse part that I cannot do > really cleanly with normal response types, but am having some trouble > evaluating the inputs. The inputs include numeric and text values as part of > a single ar
Re: [LON-CAPA-users] Custom Response Question
Hi Mark, Sure. The problem requires students to "write" a matrix equation. I was going to include a snip of the displayed XML, but this email format will not allow me to paste a figure. This is the perl script: $total_score = 0; # These submission variables appear to be local to this perl script section only. ($ZR11,$ZX11,$ZR12,$ZX12,$ZR13,$ZX13,$I11,$E11mag,$E11ph, $ZR21,$ZX21,$ZR22,$ZX22,$ZR23,$ZX23,$I21,$E21mag,$E21ph, $ZR31,$ZX31,$ZR32,$ZX32,$ZR33,$ZX33,$I31,$E31mag,$E31ph) = @$submission; # In these if stmts, conditionals cannot distinguish between 0 and null, # and counts null or any string as correct for "I1", "I2", or "I3" if ($ZR11==$R1 && $ZX11==-$X_C1) {$total_score = 1/15;} if ($ZR12==-$R1 && $ZX12=="0") {$total_score = $total_score + 1/15;} if ($ZR13=="0" && $ZX13=="0") {$total_score = $total_score + 1/15;} if ($ZR21==-$R1 && $ZX21==0){$total_score = $total_score + 1/15;} if ($ZR22==$R1 && $ZX22==$X_L1-$X_C2) {$total_score = $total_score + 1/15;} if ($ZR23==0&& $ZX23==$X_C2){$total_score = $total_score + 1/15;} if ($ZR31==0&& $ZX31==0){$total_score = $total_score + 1/15;} if ($ZR32==0&& $ZX32==$X_C2){$total_score = $total_score + 1/15;} if ($ZR33==$R2 && $ZX33==-$X_C2-$X_C3) {$total_score = $total_score + 1/15;} if ($I11=="I1") {$total_score = $total_score + 1/15;} if ($I21=="I2") {$total_score = $total_score + 1/15;} if ($I31=="I3") {$total_score = $total_score + 1/15;} if ($E11mag==$E1mag && $E11ph==$E1ph) {$total_score = $total_score + 1/15;} if ($E21mag==$E2mag && $E21ph==$E2ph) {$total_score = $total_score + 1/15;} if ($E31mag==0 && $E31ph==0) {$total_score = $total_score + 1/15;} return ('ASSIGNED_SCORE',$total_score); The equation is a 3x3 impedance (Z) matrix multiplied by a 3-element current column vector to get a 3-element voltage column vector. The Z matrix elements are complex values in rectangular form, but the real and imaginary parts are processed separately as real integers. That part works fine. The problem is that nothing needs to be entered at all for the zero values; no entry is still evaluated as correct. As you can see above, I have tried processing them as both numeric (0) and text ("0") but neither approach works. The intent of the current column vector elements (the variables in this equation) is for students to enter the variables as text values: I1, I2, and I3. The voltage column vector elements are complex values in polar form, magnitude in V and phase in degrees. Both values are processed as real numbers. The XML displays appropriate units by each element of the Z matrix and V column vector, so no units processing is needed. The order of the variables in the submission input/assignment statement is dictated by the XML display of the matrix. The other variables, like $R1, $X_C2, $E2ph, etc., are given variables from the perl script at the beginning of the problem. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Lucas, Mark Sent: Thursday, March 26, 2020 2:18 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Custom Response Question Gene, Could you post sample variables and perhaps an example of the perl you are trying to use? What does the array look like? What are some typical variables? (or at least analogs if you don’t want to give away content). Mark > On Mar 26, 2020, at 2:14 PM, Harding, Gene L wrote: > > Hi, > > I am trying to do something with a customresponse part that I cannot do > really cleanly with normal response types, but am having some trouble > evaluating the inputs. The inputs include numeric and text values as part of > a single array input. I am having to problems: > 1. I have not been able to figure out a way, in the “if” statements, to > distinguish between a zero (0) answer and a null (“”) answer. > 2. The string components evaluate to true for any text value. Only > numeric entries evaluate as false. > > My questions: > 1. Is there a way to distinguish between a 0 and a null (i.e., no) > response? > 2. Is it possible to input both numeric and string values in separate > textline inputs within one customresponse section? >
[LON-CAPA-users] Custom Response Question
Hi, I am trying to do something with a customresponse part that I cannot do really cleanly with normal response types, but am having some trouble evaluating the inputs. The inputs include numeric and text values as part of a single array input. I am having to problems: 1. I have not been able to figure out a way, in the "if" statements, to distinguish between a zero (0) answer and a null ("") answer. 2. The string components evaluate to true for any text value. Only numeric entries evaluate as false. My questions: 1. Is there a way to distinguish between a 0 and a null (i.e., no) response? 2. Is it possible to input both numeric and string values in separate textline inputs within one customresponse section? 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Piecewise Linear Functions
Thanks Justin! (Sorry for the slow reply; stuck in the lab for a few hours this afternoon/evening.) Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ From: LON-CAPA-users On Behalf Of Justin Gray Sent: Saturday, March 21, 2020 3:34 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Piecewise Linear Functions Hi Gene, To answer your first question, here is a sample piecewise-defined function in Gnuplots: x < 0 ? -x : x**2 Best, Justin -- Justin Gray Senior Lecturer | Department of Mathematics Simon Fraser University | SCK 10531 University Dr., Burnaby, B.C. V5A 1S6 Canada T: 778.782.4237 Simon Fraser University is located on the Unceded Coast Salish Territories of the xʷməθkʷəy̓əm (Musqueam), Səl̓ílwətaʔ/Selilwitulh (Tsleil-Waututh), Kwikwitlem, and Skwxwú7mesh Úxwumixw (Squamish) Peoples On Sat, Mar 21, 2020 at 11:36 AM Harding, Gene L mailto:glhar...@purdue.edu>> wrote: Hi, Does anyone know how to define a piecewise linear function in LON-CAPA, and plot it with gnuplot? And, a related question: How do you put plots next to each other? I need to display a plot of voltage on one graph, with a plot of phase-angle-fired half-sine current right below it on a separate graph, but using the same horizontal axis values and scale. The multiplot command in gnuplot allows multiple plots next to each other, similar to MATLAB, and the ternary operator allows definition of piecewise linear functions, but I don’t know how to implement either of them from within LON-CAPA. 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
[LON-CAPA-users] Piecewise Linear Functions
Hi, Does anyone know how to define a piecewise linear function in LON-CAPA, and plot it with gnuplot? And, a related question: How do you put plots next to each other? I need to display a plot of voltage on one graph, with a plot of phase-angle-fired half-sine current right below it on a separate graph, but using the same horizontal axis values and scale. The multiplot command in gnuplot allows multiple plots next to each other, similar to MATLAB, and the ternary operator allows definition of piecewise linear functions, but I don't know how to implement either of them from within LON-CAPA. 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Conditional Blocks
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 _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 On Behalf Of Mills, Douglas G Sent: Monday, March 16, 2020 11:39 PM To: Discussion list for LON-CAPA users 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: 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 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 tag, but am having trouble finding examples of conditional expressions and variables that I can use inside the 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
[LON-CAPA-users] Conditional Blocks
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 tag, but am having trouble finding examples of conditional expressions and variables that I can use inside the 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Quick Question
Hi Mark, In the customresponse section, the array created matches the size of the submission. It's the Perl script I was wondering about. The number of variables defined in the Perl script to capture the submission will ultimately be 76, but the actual number of submission elements will vary from 20 to 76, depending on the randomization. The predefined variables to capture the submission elements will usually "outnumber" the actual submission elements. In my experience so far, those extra variables do not get used/initialized. When I try to display them in the problem statement (for debugging purposes) they do not have values, just show up as literals, e.g., "$A2plus_tailx" instead of some numeric value. Does that make sense? BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Lucas, Mark Sent: Wednesday, March 4, 2020 8:57 AM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Quick Question My gut says that is not a problem. Since you are grading it in the customresponse, you just ignore those parts of the array if they do contain useful information. They will be saved as part of the “submission” record for the student, but that shouldn’t be a problem. Mark > On Mar 4, 2020, at 8:44 AM, Harding, Gene L wrote: > > Hi, > > I have a question about accessing submissions using the () > function. > > I am working on a problem interfacing with Geogebra that will have a variable > number of submission inputs, depending on the randomization of the problem. > The code in the customresponse section is relatively short and > straightforward, so I just used an array to load the values. Someone at last > year’s conference suggested this approach, and it works well, creating an > array of the appropriate size for the submission: > > > The code in the primary block of Perl script, however, is more complicated, > so I have been using discrete variables with names that make it easier to > read, follow, and troubleshoot the code: > > I have found that I can include the unused variables, which in the above case > are all of the variables beginning with $A2, and LON-CAPA just ignores those > variables with no apparent ill effects. Is that a reasonable and “safe” way > to write the code, or I am asking for trouble using this approach? > > 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 > https://nam03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail. > lon-capa.org%2Fmailman%2Flistinfo%2Flon-capa-usersdata=02%7C01%7C > lucasm%40ohio.edu%7C269ca88417f8491a9cf108d7c042612a%7Cf3308007477c4a7 > 0888934611817c55a%7C0%7C0%7C637189263646163217sdata=FbYNztkeBq0Q0 > Cfz%2BU4pX7xL74HzWKpwcuuLKuQO4jg%3Dreserved=0 -- Mark Lucas email: luc...@ohio.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] Quick Question
Hi, I have a question about accessing submissions using the () function. I am working on a problem interfacing with Geogebra that will have a variable number of submission inputs, depending on the randomization of the problem. The code in the customresponse section is relatively short and straightforward, so I just used an array to load the values. Someone at last year's conference suggested this approach, and it works well, creating an array of the appropriate size for the submission: [cid:image002.jpg@01D5F201.23A73F30] The code in the primary block of Perl script, however, is more complicated, so I have been using discrete variables with names that make it easier to read, follow, and troubleshoot the code: [cid:image006.jpg@01D5F201.23A73F30] I have found that I can include the unused variables, which in the above case are all of the variables beginning with $A2, and LON-CAPA just ignores those variables with no apparent ill effects. Is that a reasonable and "safe" way to write the code, or I am asking for trouble using this approach? 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
[LON-CAPA-users] Error with
Hi, As long as I have been coding multi-part problems I have run into this issue, but it seems random. I am using to display the ID of the current part: If using impedance combination, what is the appropriate way to begin analyzing this circuit? In some problems it works fine, displaying what in this case should be an "a". In some problems, however, I get an output of an odd character followed by "tpart": [cid:image001.jpg@01D5ECB2.18834E90] Does anyone know what causes this? 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Hyperbolic Trig Function Problem
Thanks Justin, that was a good idea. I tried it, but got the same results; also double-checked MATLAB’s result with Google. I was typing a longer response when I saw Stuart’s solution, but still want to say thank you. I had not thought of trying Maxima. Stuart, thank you. You never cease to amaze me. I will make a note of that function call syntax for future reference. 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 On Behalf Of Justin Gray Sent: Wednesday, January 29, 2020 7:39 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Hyperbolic Trig Function Problem Have you considered tried calling on tanh(x) in Maxima using ('maxima', ) instead of using (x)? Justin -- Justin Gray Senior Lecturer | Department of Mathematics Simon Fraser University | SCK 10531 University Dr., Burnaby, B.C. V5A 1S6 T: 778.782.4237 Simon Fraser University is located on the Unceded Coast Salish Territories of the xʷməθkʷəy̓əm (Musqueam), Səl̓ílwətaʔ/Selilwitulh (Tsleil-Waututh), Kwikwitlem, and Skwxwú7mesh Úxwumixw (Squamish) Peoples On Wed, Jan 29, 2020 at 3:43 PM Harding, Gene L mailto:glhar...@purdue.edu>> wrote: Hi, Does anyone have experience using the hyperbolic trig functions in LON-CAPA? I have recently been coding some new problems that use the () function. I was comparing the results to those I got using MATLAB, and after some troubleshooting it appears that the difference is the tanh. Specifically, the ($x) function in LON-CAPA always returns an imaginary value of zero. Here is the code: $tanh = ($gamma*$len); $tanh_real = Re($tanh); $tanh_imag= Im($tanh); where $gamma is a complex number and $len is a scalar. MATLAB computes a complex number for tanh in the examples I have tried. Am I doing something wrong? Does LC not compute tanh correctly? Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 ___ 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] Hyperbolic Trig Function Problem
Hi, Does anyone have experience using the hyperbolic trig functions in LON-CAPA? I have recently been coding some new problems that use the () function. I was comparing the results to those I got using MATLAB, and after some troubleshooting it appears that the difference is the tanh. Specifically, the ($x) function in LON-CAPA always returns an imaginary value of zero. Here is the code: $tanh = ($gamma*$len); $tanh_real = Re($tanh); $tanh_imag= Im($tanh); where $gamma is a complex number and $len is a scalar. MATLAB computes a complex number for tanh in the examples I have tried. Am I doing something wrong? Does LC not compute tanh correctly? Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 ___ 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] FW: Rounding Issue
Hi everyone, I have a quiz problem in LC that seems to be doing some odd things with the rounding. I have successfully recreated the problem reported by one of my students, but cannot figure out why it happens. The answer to the problem (part c) is 2.65 on the dot. The problem requests an answer with one place after the decimal, and the tolerance is +/- 0.05. In this case, since the value computes to exactly 2.65, LC should take anything from 2.6 to 2.7. In fact, in author view LC indicates it will take anything from 2.6 to 2.7: [cid:image002.jpg@01D570BD.B3DBBD30] The trouble is that 2.6 works, 2.65 works, but 2.7 does not. This is the Perl script calculation (Rf=33, Ri=20): $Av = 1+$Rf/$Ri; # Gain This is the response code: Any idea what the problem is? I am baffled. 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] Video Viewing Problem
Hi Stuart, It is an mp4 file in https://loncapa.purdue.edu/res/purdue/ecet_purdue/Topics/Videos/. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Raeburn, Stuart Sent: Wednesday, August 28, 2019 5:23 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Video Viewing Problem Gene, > > ... in Student mode I get the following error: No video with supported format > and MIME type found. > What is the file extension of the video? Or is this a Camtasia video, or similar, which is typically launched within a .html file and requires ancillary files to function correctly? If so, a solution may be to include allow tags for each of the ancillary files in the appropriate html files which are containers for the video, e.g., etc. Can you provide the URL for this video in Resource Space, i.e., /res/purdue/ ... Stuart Raeburn LON-CAPA Academic Consortium From: LON-CAPA-users on behalf of Harding, Gene L Sent: Wednesday, August 28, 2019 3:05 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] Video Viewing Problem Hi everyone, My students are not able to view a video I have posted on my LON-CAPA sections. This video is posted in my author space, and published. If I try to play it in Course Coordinator mode it works fine, but in Student mode I get the following error: No video with supported format and MIME type found. [cid:image001.png@01D55DB2.18C9AE10] Our LON-CAPA specialist has taken another job, so he is not available, and I'm sure the IT folks in general are buried right now. I have received no feedback from IT that they are even looking at the problem, and am hoping this is something easy that I can fix, but I am puzzled. Anyone recognize the symptom and underlying cause? Thanks, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/<https://urldefense.proofpoint.com/v2/url?u=https-3A__polytechnic.purdue.edu_south-2Dbend_=DwMFAg=nE__W8dFE-shTxStwXtp0A=VsGo3jOm8tGLd6f-KlhT-g=FNwS52pjeR-kmMxGMRhGcLqV6wykWZVLcTvFe8WCAkU=WcWnoIkqMC_Ru5mwoGGEvNkpqawQ6X0Fn6k9lHKk3Wc=> ___ 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] Video Viewing Problem
Hi Gerd, Thanks for the suggestion. I tried doing that, and waited several minutes for it to take effect, but no luck. I still get the same error in Student mode. BR, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 https://polytechnic.purdue.edu/south-bend/ -Original Message- From: LON-CAPA-users On Behalf Of Kortemeyer, Gerd Sent: Wednesday, August 28, 2019 3:59 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Video Viewing Problem Hi, I would recommend to try to publish the video file “Public”, i.e., without access control. - Gerd. > On Aug 28, 2019, at 21:13, Prof. Susan Masten wrote: > > Hi all, > > I have had the same problem for quite some time now and have not been able to > figure out how to fix it. > > Susan > > On 8/28/2019 3:05 PM, Harding, Gene L wrote: >> Hi everyone, >> >> My students are not able to view a video I have posted on my LON-CAPA >> sections. This video is posted in my author space, and published. If I try >> to play it in Course Coordinator mode it works fine, but in Student mode I >> get the following error: No video with supported format and MIME type found. >> >> >> Our LON-CAPA specialist has taken another job, so he is not available, and >> I’m sure the IT folks in general are buried right now. I have received no >> feedback from IT that they are even looking at the problem, and am hoping >> this is something easy that I can fix, but I am puzzled. Anyone recognize >> the symptom and underlying cause? >> >> Thanks, >> >> 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 >> http://mail.lon-capa.org/mailman/listinfo/lon-capa-users > ___ > LON-CAPA-users mailing list > LON-CAPA-users@mail.lon-capa.org > https://urldefense.proofpoint.com/v2/url?u=http-3A__mail.lon-2Dcapa.org_mailman_listinfo_lon-2Dcapa-2Dusers=DwICAg=nE__W8dFE-shTxStwXtp0A=eJriEjbucRYp5T72QIzOAQ=ISYnhFDzmnZZ-rHX_ZSOfS-n2ZDCKHGkpD-xrVWCvP8=I9k8hJ10OC4a-sO8lJIB-apL5trATS2cAHje0R98VbM= > ___ 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] Video Viewing Problem
Hi everyone, My students are not able to view a video I have posted on my LON-CAPA sections. This video is posted in my author space, and published. If I try to play it in Course Coordinator mode it works fine, but in Student mode I get the following error: No video with supported format and MIME type found. [cid:image001.png@01D55DB2.18C9AE10] Our LON-CAPA specialist has taken another job, so he is not available, and I'm sure the IT folks in general are buried right now. I have received no feedback from IT that they are even looking at the problem, and am hoping this is something easy that I can fix, but I am puzzled. Anyone recognize the symptom and underlying cause? Thanks, 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 http://mail.lon-capa.org/mailman/listinfo/lon-capa-users
Re: [LON-CAPA-users] functionplotresponse problems
Hi HK, I gave up on using the standard functionplotresponse for what I was doing. The attached code works with Geogebra and gnuplot, and uses custom response to evaluate the submissions. The application is a mixer in a superheterodyne receiver. It’s pretty complex, about 700 lines counting comments, but a good bit of that complexity is the computation of values for the harmonics and cross products, then ordering them correctly in their respective arrays. This may be more than what you want to dig into, but thought I would share it just in case. Best regards, Gene L. Harding, PE Associate Professor of ECET Purdue University 574-520-4190 From: LON-CAPA-users On Behalf Of H. K. Ng Sent: Saturday, June 1, 2019 12:10 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] functionplotresponse problems Good morning, I am looking for examples of functionplotresponse problems (one where a student can resize/drag a vector,..) Let me know if you don't mind sharing the source codes. Thanks. Regards, -hk $num_harms = 3; # Number of harmonics for signals a and b $xprod_mn = 2; # Cross product m & n values --> m**2 cross products ### Calculate harmonics # #$fa[1] = 4; $A[1] = 11; # Fundamental freq in MHz and magn in V of signal a; fixed values used in development $fa[1]= random(3,5,1); $A[1] = 11; # Fundamental freq in MHz and magn in V of signal a for ($i=2; $i<=$num_harms; $i++) { $fa[$i] = $i*$fa[1]; $A[$i] = &max(11-2*($i-1),1); } # Signal a harmonics #$fb[1] = 8; $B[1] = 11; # Fundamental freq in MHz and magn in V of signal b; fixed values used in development $fb[1]= &random(6,10,2); $B[1] = 11;# Fundamental freq in MHz and magn in V of signal b for ($i=2; $i<=$num_harms; $i++) { $fb[$i] = $i*$fb[1]; $B[$i] = &max(11-2*($i-1),1); } # Signal b harmonics # Calculate cross products ### $cp_count = 0; # Element to track # x-prod's array size for ($i=1; $i<=$xprod_mn; $i++)# Cycle through first column {for ($j=1; $j<=$xprod_mn; $j++) # Cycle through second column: 1 per sum freq, 1 per diff freq {$cp_count++; $cp[$cp_count] = $fa[$i]+$fb[$j]; # Add frequency sum element (lower case) to frequency array $CP[$cp_count] = &max(13-2*($i+$j),1); # Add magnitude element (upper case) to magnitude array if (&abs($fa[$i]-$fb[$j]) != 0)# If frequency diff element <> 0, add this element to array {$cp_count++; $cp[$cp_count] = &abs($fa[$i]-$fb[$j]); # Add frequency diff element (lower case) to frequency array $CP[$cp_count] = &max(13-2*($i+$j),1); # Add magnitude element (upper case) to frequency array } } } # ### Set up harmonic plot arrays # for ($i=1; $i<=$num_harms; $i++) {$f[$i-1] = $fa[$i]; $mag[$i-1] = $A[$i];} # Put signal a harmonics in lower part of frequency array for ($i=1; $i<=$num_harms; $i++) {$f[$i+$num_harms-1] = $fb[$i]; $mag[$i+$num_harms-1] = $B[$i];} # Put signal b harmonics in upper part of frequency array for ($i=$num_harms*2-2; $i>=0; $i--) # Bubble sort frequency (f) and magnitude (mag) arrays { for ($j=0; $j<=$i; $j++) # Inner loop, swaps elements one at a time if out of order { if ( $f[$j] > $f[$j+1] ) # If elements out of order, swap elements { $temp=$f[$j]; $f[$j] =$f[$j+1]; $f[$j+1]=$temp;# Swap frequencies $temp=$mag[$j]; $mag[$j]=$mag[$j+1]; $mag[$j+1]=$temp; # Swap magnitudes } } } do { # Order vectors at same freq from largest to smallest $swap = 0; # Initialize to false for ($i=0; $i<=$num_harms*2-2; $i++) { if (($f[$i]==$f[$i+1]) && ($mag[$i] < $mag[$i+1])) # If same frequency and second vector is larger --> swap { $temp=$f[$i]; $f[$i] =$f[$i+1]; $f[$i+1]=$temp;# Swap frequencies $temp=$mag[$i]; $mag[$i]=$mag[$i+1]; $mag[$i+1]=$temp; # Swap magnitudes
Re: [LON-CAPA-users] Custom Response Partial Credit
Hi Jacob, Thank you. I have managed to get it to respond correctly (red incorrect of total_score==0, tan partial credit if 0<total_score<1, and green correct if total_score==1). I have run quite a few tests and it seems to work fine with only this statement: return ('ASSIGNED_SCORE',$total_score); I am still having one problem. There is a conditional block that shows a gnuplot of the correct answer if it is wrong and maxtries has been met. Before I converted to the customresponse the block worked fine, but now the _status function returns 1 no matter what, whether wrong, correct, or partially correct. Does that function not work with customresponse? If not, is there a LON-CAPA parameter for number of tries used? If so, I could compare that parameter to maxtries and do the same thing. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> On Behalf Of Jacob Bond Sent: Friday, May 18, 2018 7:45 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Custom Response Partial Credit Hi Gene, You're right that the last return statement shouldn't be there. Also, there is a subtlety about returning 'INCORRECT' in a partial credit problem. If a student submits an answer that gets 1/2 credit, then changes it to an answer that gets 0 credit, returning 'INCORRECT' will leave the student with 1/2 credit. Perhaps this is what you want, but if not, if ($total_score == 1) {return 'EXACT_ANS';} else {return ('ASSIGNED_SCORE', $total_score);} will suffice (if you know $total_score is between 0 and 1, inclusive). (Also, it's possible that you can forget about the if statement entirely, in case LON-CAPA knows that ('ASSIGNED_SCORE', 1) is the same as 'EXACT_ANS', but I've never bothered testing this.) As for the real issue, it's tough to say what might be going wrong without seeing the rest of the code, but you might try computing $total_score locally in the answer block and see if that fixes anything. If you want to check what credit the student has received, this will set $partial_credit to what credit the student has received, or 0 if the student hasn't attempted the problem yet (ID should be replaced by the part ID of the problem part): $partial_credit = _data('awarded', ID) ? _data('awarded', ID) : 0.0; Best, Jacob From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org>> on behalf of Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> Sent: Friday, May 18, 2018 5:54:22 PM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] Custom Response Partial Credit Hi, I rewrote the problem I have been working on so that it is now a custom response, but am having trouble getting it to properly grade the problem submission. This is the code for grading inside the answer block: if ($total_score == 1) { return 'EXACT_ANS'; } elsif ($total_score > 0) { return ('ASSIGNED_SCORE',$total_score); } else { return 'INCORRECT'; } return ('ASSIGNED_SCORE',$total_score); I have tried it with and without the second return statement, but either way the Correct/Partially Correct/Incorrect grading seems almost random. $total_score is computed in a perl script higher up in the program, and I am outputting it to verify that it is being computed correctly. I also have a retrypartial parameter at the top of the program because I want the students to be able to take three tries at it on the practice version: Can anyone see what I am doing wrong? Thanks for any help/advice you can provide. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] Custom Response Partial Credit
Hi, I rewrote the problem I have been working on so that it is now a custom response, but am having trouble getting it to properly grade the problem submission. This is the code for grading inside the answer block: if ($total_score == 1) { return 'EXACT_ANS'; } elsif ($total_score > 0) { return ('ASSIGNED_SCORE',$total_score); } else { return 'INCORRECT'; } return ('ASSIGNED_SCORE',$total_score); I have tried it with and without the second return statement, but either way the Correct/Partially Correct/Incorrect grading seems almost random. $total_score is computed in a perl script higher up in the program, and I am outputting it to verify that it is being computed correctly. I also have a retrypartial parameter at the top of the program because I want the students to be able to take three tries at it on the practice version: Can anyone see what I am doing wrong? Thanks for any help/advice you can provide. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] Plot Response Question
Hi, I am trying to code a plot response problem in which the student task is to plot six vectors on a frequency spectrum display. I would like to give 1/6 credit for each vector that is plotted correctly. I am new to using Geogebra in this fashion. I first tried using the LON-CAPA plot response approach, but was not successful in getting the partial credit assignment to work. I then moved to the embedded applet approach described in the 2014 online video. I tried to create six problem parts, each graded separately, but Geogebra seems to limit me to one problem part per plot. Then I tried making everything one problem part with multiple numeric responses, but LON-CAPA seems to want an all-or-nothing answer; no partial credit. I tried computing the total score and "return"ing it in ASSIGNED_SCORE like a custom response problem, but could not get that to work. Then I tried adding a custom response to the end of the problem part to return ASSIGNED_SCORE, but now the response is always "Some items were not submitted" instead of "Correct" or "...partially correct." I was trying to avoid using a custom response because the author guide says "this response type is generally discouraged," but have not been able to figure out a way so far. Do I need to just do a custom response, or is there a way to code this without that approach? Is there a way to have multiple problem parts on a single Geogebra plot? I think I am really close to getting this problem to work, but cannot quite get all of the pieces to work together nicely. Thank you for any help/advice you can provide. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] Conditional Block Issue
Oh, wow, that's all it was. Thank you Stuart and Yuk for spotting it. Sorry to email the listserv with such a dumb mistake! Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 -Original Message- From: LON-CAPA-users <lon-capa-users-boun...@mail.lon-capa.org> On Behalf Of Stuart Raeburn Sent: Friday, May 11, 2018 8:11 PM To: lon-capa-users@mail.lon-capa.org Subject: Re: [LON-CAPA-users] Conditional Block Issue Hello Gene, Without looking in detail at your code, one thing jumped out at me when glancing at your code. In the text included in your e-mail to the users list you have: I don't know whether that's just a typo in your e-mail, but in your LON-CAPA code you'd want: Stuart Raeburn LON-CAPA Academic Consortium Quoting "Harding, Gene L" <glhar...@purdue.edu>: > Hi, > > I am trying to display something (a gnuplot) only if the student has > exceeded the maxtries for a problem and not gotten it correct. I used > the following code in the perl script to check the problem status and > set a flag ($status_a) to zero only if maxtries is exceeded: > # Check status: 'undef'=not attempted; 0=wrong but tries left; > 1=correct; 2=maxtries exceeded; 3=after answer date $status_a = > _status('a'); if ($status_a ne 2) {$status_a=0;} # If maxtries > not reached, set to > 0 so conditional block does not execute > > Then I put the gnuplot code inside a conditional block: > > font="9" height="500" border="on" samples="100" > bgcolor="xff" fgcolor="x00" alttag="Spectrum Plot" > transparent="off" major_ticscale="2" plottype="Cartesian"> > end="$xtic_stop" increment="$xtic_incr" start="0" /> > increment="2" start="0" /> > xmax="$x_max" /> > Frequency (MHz) > Amplitude (V) > arrowstyle="filled" color="x00" pointtype="4" > linewidth="1" arrowhead="head" arrowlength="$arwhd" pointsize="1"> > > @f > @tails > @zeros > @mag > > > > > I thought conditional blocks were skipped if the condition was zero, > and executed for nonzero values, but the block is executing even when > $status_a is zero. Can anyone see what I am doing wrong? Is there a > better/easier way to do this? > > Thanks for any help/advice you can provide. > > Best regards, > > Gene L. Harding, PE > Associate Professor of ECET > 574-520-4190 > > ___ 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] Conditional Block Issue
Hi, I am trying to display something (a gnuplot) only if the student has exceeded the maxtries for a problem and not gotten it correct. I used the following code in the perl script to check the problem status and set a flag ($status_a) to zero only if maxtries is exceeded: # Check status: 'undef'=not attempted; 0=wrong but tries left; 1=correct; 2=maxtries exceeded; 3=after answer date $status_a = _status('a'); if ($status_a ne 2) {$status_a=0;} # If maxtries not reached, set to 0 so conditional block does not execute Then I put the gnuplot code inside a conditional block: Frequency (MHz) Amplitude (V) @f @tails @zeros @mag I thought conditional blocks were skipped if the condition was zero, and executed for nonzero values, but the block is executing even when $status_a is zero. Can anyone see what I am doing wrong? Is there a better/easier way to do this? Thanks for any help/advice you can provide. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] LON-CAPA Conference and Workshop Registration Open
Hi Gerd, It would probably be helpful to add Purdue Memorial Union hotel contact info to the Accommodations page: (800) 320-6291 https://union.purdue.edu/hotel/ There is contact info for the other hotels, but not the Union. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 -Original Message- From: LON-CAPA-usersOn Behalf Of Kortemeyer, Gerd Sent: Wednesday, May 2, 2018 10:29 AM To: Discussion list for LON-CAPA users Subject: [LON-CAPA-users] LON-CAPA Conference and Workshop Registration Open Hi, Registration for the 2018 LON-CAPA Conference and Workshop is now available, http://support.loncapa.org/events/conf2018/ We would like to thank Purdue University for their generous support. - Gerd. ___ 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] Hat Symbol
Even better—thanks! Gene L. Harding, PE Associate Professor of ECET 574-520-4190 From: LON-CAPA-users [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Todd Ruskell Sent: Tuesday, March 6, 2018 5:52 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Hat Symbol I usually use \vec rather than \overline for "normal" vectors. On Tue, Mar 6, 2018 at 3:03 PM, Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> wrote: Hi Todd, Yes, that works great. I noticed that \overline also works for “normal” vectors. Thanks! Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190<tel:(574)%20520-4190> From: LON-CAPA-users [mailto:lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org>] On Behalf Of Todd Ruskell Sent: Tuesday, March 6, 2018 4:40 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] Hat Symbol Hi Gene, You better sit down for it: $\hat k$ For i-hat and j-hat, I prefer to use $\hat\imath$ and $\hat\jmath$ which removes the dots. Hope that helps, Todd On Tue, Mar 6, 2018 at 2:33 PM, Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> wrote: Hi, Does anyone know how to render the “hat” over a letter in LON-CAPA/XML to designate a unit vector? Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190<tel:(574)%20520-4190> ___ 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
Re: [LON-CAPA-users] Hat Symbol
Hi Todd, Yes, that works great. I noticed that \overline also works for “normal” vectors. Thanks! Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 From: LON-CAPA-users [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Todd Ruskell Sent: Tuesday, March 6, 2018 4:40 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Hat Symbol Hi Gene, You better sit down for it: $\hat k$ For i-hat and j-hat, I prefer to use $\hat\imath$ and $\hat\jmath$ which removes the dots. Hope that helps, Todd On Tue, Mar 6, 2018 at 2:33 PM, Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> wrote: Hi, Does anyone know how to render the “hat” over a letter in LON-CAPA/XML to designate a unit vector? Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190<tel:(574)%20520-4190> ___ 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
[LON-CAPA-users] {Disarmed} RE: {Disarmed} Re: {Disarmed} RE: Matrix Operations
DdfOZag=xsNJH7BRV_oHPnc9R-Alu7kBOiq31bgHu5mdx82zpYk=cZ0DC2thsyaawbW-icbHvABJUkZREthPLmF_-JF0ZzM=KgidnsKWCwkMXbk-KRSFP-SdawqedYPbXqeoqnxNC70=> MailScanner has detected definite fraud in the website at "urldefense.proofpoint.com". Do not trust this website: MailScanner has detected definite fraud in the website at "urldefense.proofpoint.com". Do not trust this website: http://chethermo.net<https://urldefense.proofpoint.com/v2/url?u=http-3A__chethermo.net_=DwMFAg=OCIEmEwdEq_aNlsP4fF3gFqSN-E3mlr2t9JcDdfOZag=xsNJH7BRV_oHPnc9R-Alu7kBOiq31bgHu5mdx82zpYk=cZ0DC2thsyaawbW-icbHvABJUkZREthPLmF_-JF0ZzM=x_KHS9fqXQB-CLliVp9AUzDgDobPkHAATbQeAdqpNOQ=> From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Harding, Gene L Sent: Saturday, February 10, 2018 9:56 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org<mailto:lon-capa-users@mail.lon-capa.org>> Subject: [LON-CAPA-users] Matrix Operations Hi, Does LON-CAPA have any provision for doing matrix operations (e.g., multiplication, inverse calculation or equivalent of the MATLAB "\" operator)? Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] Geogebra Vector Plot Problem
Hi, Does anyone who knows how to use Geogebra within LON-CAPA know how to do this? I am trying to make a functionplotresponse question that requires students to draw a vector pointing straight up from and attached to the x-axis, but without drawing an explicit attachment point on the axis. If I use this approach it works, but the vector tail attaching point is plotted and visible: ... on the graph: Here is the result: [cid:image005.jpg@01D397A0.2AA69C80] If I change "F1a_tail" in the above code to "(6,0)" it does not work: [cid:image006.jpg@01D397A0.2AA69C80] Is there a way I can specify a tail attachment point without showing it on the graph? Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] Registration now open for 2017 Conference and Workshop!
Oops, sorry everyone. I meant to send this directly to Gerd, not the listserv. Please disregard! Best regards, Gene L. Harding Associate Professor of ECET 574-520-4190 -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Harding, Gene L Sent: Friday, March 17, 2017 2:47 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Registration now open for 2017 Conference and Workshop! Hi Gerd, I am having the same problem with the payment page that I had last year. After I confirm my credit card info I get the following message: "For security reasons, we cannot accept your credit card." I spent a lot of time fighting with this last year and never got it to take my Purdue credit card... Gene L. Harding Associate Professor of ECET 574-520-4190 -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Gerd Kortemeyer Sent: Saturday, March 11, 2017 1:26 AM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org>; list about administration and system updating <lon-capa-ad...@mail.lon-capa.org>; lon-capa-annou...@mail.lon-capa.org Subject: [LON-CAPA-users] Registration now open for 2017 Conference and Workshop! Hi, The Registration for the 2017 LON-CAPA Conference and Workshop is now open at http://support.loncapa.org/events/conf2017/ We will take this conference as an opportunity to celebrate 25 years of history, http://www.lon-capa.org/anniversary.html (and we’ll update that page)! Hope to see you there! - Gerd. ___ 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] Registration now open for 2017 Conference and Workshop!
Hi Gerd, I am having the same problem with the payment page that I had last year. After I confirm my credit card info I get the following message: "For security reasons, we cannot accept your credit card." I spent a lot of time fighting with this last year and never got it to take my Purdue credit card... Gene L. Harding Associate Professor of ECET 574-520-4190 -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Gerd Kortemeyer Sent: Saturday, March 11, 2017 1:26 AM To: Discussion list for LON-CAPA users; list about administration and system updating ; lon-capa-annou...@mail.lon-capa.org Subject: [LON-CAPA-users] Registration now open for 2017 Conference and Workshop! Hi, The Registration for the 2017 LON-CAPA Conference and Workshop is now open at http://support.loncapa.org/events/conf2017/ We will take this conference as an opportunity to celebrate 25 years of history, http://www.lon-capa.org/anniversary.html (and we’ll update that page)! Hope to see you there! - Gerd. ___ 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] Function Plot Response Partial Credit Grading
Hi Jacob, Thank you for your replies. I think I'd better go with a paper homework for now, and come back to this in the summer. Thanks again for taking time to respond. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Jacob Bond Sent: Wednesday, January 25, 2017 9:40 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Function Plot Response Partial Credit Grading Hi Gene, That might not work so well then. customresponse is used when you embed a custom GeoGebra applet in the problem and talk back forth with the applet using JavaScript. I'm not sure if there is a way to do partial credit without a customresponse. Jacob From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> <lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org>> on behalf of Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> Sent: Wednesday, January 25, 2017 4:18:10 PM To: Discussion list for LON-CAPA users Subject: Re: [LON-CAPA-users] Function Plot Response Partial Credit Grading Hi Jacob, I was using a functionplotresponse because that is the only way I know to call Geogebra. (Pardon my ignorance; I'm very new to this.) Is there a way to mix a functionplotresponse with a customresponse, or is there a way to implement the Geogebra functions without using a customplotresponse? Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Jacob Bond Sent: Wednesday, January 25, 2017 11:50 AM 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] Function Plot Response Partial Credit Grading Hi Gene, Yes, there is a way to do partial credit. If you are already using a customresponse to grade the GeoGebra problems, then it won't be too difficult. To assign partial credit, you need some kind of counter in your answer algorithm to determine how many the student got correct, then just do return ('ASSIGNED_SCORE', $correct/$total); There is an example problem for partial credit, in the templates it is under Free Form Problems and is called Custom Response with Partial Credit. If you want students to be given multiple attempts, you need insert a "Parameters for a part" with this information: Finally, if you do give them multiple attempts, you shouldn't do `return 'INCORRECT';` as in the example problem, because this will not overwrite their score with a 0. So if they got one right, then moved it, and you did `return 'INCORRECT';`, they would still have a score of 0.16667. Instead, the algorithm needs to assign a score of 0, which would be taken care of by the above since `$correct` would be 0. Jacob From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> <lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org>> on behalf of Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> Sent: Wednesday, January 25, 2017 9:56:25 AM To: 'lon-capa-users@mail.lon-capa.org' Subject: [LON-CAPA-users] Function Plot Response Partial Credit Grading Hi, Sorry for another post, but the problems I have been constructing in recent weeks use areas that are new to me, such as gnuplot and Geogebra. I keep getting close, but not quite finishing some of the new problems. Right now I am building a quiz question that requires students to place six vectors on a single set of axes. I have figured out how to place the initial vectors for them to move into place, then separately evaluate the correctness of each vector. Is there a way to assign 1/6 of the grade for each vector, so if a student places some of them correctly but some incorrectly, they get partial credit on the problem instead of all/none? I thought I might be able to do this with some pre- or post-processing of the answer(s), but the standard LON-CAPA examples I have found have no comments in the code, and I have not been able to figure them out (if that is even the right approach...). Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend ___ 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] Function Plot Response Partial Credit Grading
Sorry, I meant functionplotresponse, not customplotresponse. Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Harding, Gene L Sent: Wednesday, January 25, 2017 4:18 PM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Function Plot Response Partial Credit Grading Hi Jacob, I was using a functionplotresponse because that is the only way I know to call Geogebra. (Pardon my ignorance; I'm very new to this.) Is there a way to mix a functionplotresponse with a customresponse, or is there a way to implement the Geogebra functions without using a customplotresponse? Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Jacob Bond Sent: Wednesday, January 25, 2017 11:50 AM 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] Function Plot Response Partial Credit Grading Hi Gene, Yes, there is a way to do partial credit. If you are already using a customresponse to grade the GeoGebra problems, then it won't be too difficult. To assign partial credit, you need some kind of counter in your answer algorithm to determine how many the student got correct, then just do return ('ASSIGNED_SCORE', $correct/$total); There is an example problem for partial credit, in the templates it is under Free Form Problems and is called Custom Response with Partial Credit. If you want students to be given multiple attempts, you need insert a "Parameters for a part" with this information: Finally, if you do give them multiple attempts, you shouldn't do `return 'INCORRECT';` as in the example problem, because this will not overwrite their score with a 0. So if they got one right, then moved it, and you did `return 'INCORRECT';`, they would still have a score of 0.16667. Instead, the algorithm needs to assign a score of 0, which would be taken care of by the above since `$correct` would be 0. Jacob From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> <lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org>> on behalf of Harding, Gene L <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> Sent: Wednesday, January 25, 2017 9:56:25 AM To: 'lon-capa-users@mail.lon-capa.org' Subject: [LON-CAPA-users] Function Plot Response Partial Credit Grading Hi, Sorry for another post, but the problems I have been constructing in recent weeks use areas that are new to me, such as gnuplot and Geogebra. I keep getting close, but not quite finishing some of the new problems. Right now I am building a quiz question that requires students to place six vectors on a single set of axes. I have figured out how to place the initial vectors for them to move into place, then separately evaluate the correctness of each vector. Is there a way to assign 1/6 of the grade for each vector, so if a student places some of them correctly but some incorrectly, they get partial credit on the problem instead of all/none? I thought I might be able to do this with some pre- or post-processing of the answer(s), but the standard LON-CAPA examples I have found have no comments in the code, and I have not been able to figure them out (if that is even the right approach...). Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend ___ 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] Function Plot Response Partial Credit Grading
Hi, Sorry for another post, but the problems I have been constructing in recent weeks use areas that are new to me, such as gnuplot and Geogebra. I keep getting close, but not quite finishing some of the new problems. Right now I am building a quiz question that requires students to place six vectors on a single set of axes. I have figured out how to place the initial vectors for them to move into place, then separately evaluate the correctness of each vector. Is there a way to assign 1/6 of the grade for each vector, so if a student places some of them correctly but some incorrectly, they get partial credit on the problem instead of all/none? I thought I might be able to do this with some pre- or post-processing of the answer(s), but the standard LON-CAPA examples I have found have no comments in the code, and I have not been able to figure them out (if that is even the right approach...). Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend ___ 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] Unordered Response Question Error
Hi Carl, Thank you for sending that. As it turns out, in this particular problem the answers are integers and a tolerance of zero works, but I will definitely keep that in mind in the future. BR, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Carl Lira Sent: Tuesday, January 24, 2017 8:16 PM To: 'Discussion list for LON-CAPA users' <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Unordered Response Question Error I don't see the script, but you need to have a tolerance. When the value is not specified, it defaults to an absolute tolerance of zero. If a floating point calculation is done, it will never be exactly an integer. From the author manual: A tolerance parameter determines how closely the system will require the student's answer to be in order to count it correct. The tolerance will default to zero if it is not defined. The tolerance parameter should always be defined for a numerical problem unless you are certain only integer answers are generated from your script and you want students to reply with exactly that integer. If the computer answer is a floating point number, the tolerance should not be zero. Computers can only approximate computations involving real numbers. For instance, a computer's [decimal] answer to the simple problem 1 3 is "0.1". It should be an infinite series of 3's, and there certainly shouldn't be a "1" in the an- swer, but no computer can represent an infinitely long, infinitely detailed real number. Therefore, for any problem where the answer is not an integer, you need to allow a tolerance factor, or the students will find it nearly impossible to exactly match the computer's idea of the answer. You may find the default tolerance too large for some problems, so adjust as appropriate. Hm, I think that last line should say "if you use the colorful editor tolerance template, the default tolerance may be too large...". I think the template defaults to 5%. the format affects the display, not the calculations. From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Harding, Gene L Sent: Tuesday, January 24, 2017 8:23 AM 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] Unordered Response Question Error Hi Carl, The ! was commenting out the parameter, something I tried among several permutations of syntax hoping to get something to work. The error message is the same whether it is there or commented out. I originally also had a sig figs param in it, but deleted it. I think that eliminated one error. I have tried putting the unit= and format= in the answer and value fields, but no luck there, either. Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Carl Lira Sent: Monday, January 23, 2017 11:22 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] Unordered Response Question Error not sure of the impact of the ! in the responseparam field. I believe you should have some tolerance if you have a calculated real number, e.g. From: lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Harding, Gene L Sent: Monday, January 23, 2017 10:00 PM To: 'lon-capa-users@mail.lon-capa.org' <lon-capa-users@mail.lon-capa.org<mailto:lon-capa-users@mail.lon-capa.org>> Subject: [LON-CAPA-users] Unordered Response Question Error Hi, I am trying to embed some unordered numericalresponse parameters inside an xml table. I modeled my xml after the example in LON-CAPA, but am having two problems with it. The first problem is an error referring to tolerance range, and the second is incompatible units. This is a screenshot: [cid:image001.jpg@01D276E4.733722E0] This is the code I am using: A $Pa dBm, $fa-MHz RF input signal and a $Pb dBm, $fb-MHz LO signal are applied to a nonlinear mixer with $Zin- impedance. Complete the table of IF cross products for m,n equal 1,2. mn|mfa nfb| Cross Products 1 1 $fa $fb $f11_1 MHz $f11_2 MHz 1 2 2 1 2 2 Any ideas why I am getting these two errors? Thanks for any advice you can provide. Best regards,
Re: [LON-CAPA-users] Unordered Response Question Error
Hi Damien, Thank you for the info, and for entering the bug. I will restructure the problem to work around the units issue for now. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Damien Guillaume Sent: Tuesday, January 24, 2017 10:31 AM To: Discussion list for LON-CAPA usersSubject: Re: [LON-CAPA-users] Unordered Response Question Error > Any ideas why I am getting these two errors? I think that units are simply not supported by LON-CAPA when you use an answergroup and 2 textline elements. I created a bug report about it: http://bugs.lon-capa.org/show_bug.cgi?id=6844 Damien ___ 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] Unordered Response Question Error
Hi, I am trying to embed some unordered numericalresponse parameters inside an xml table. I modeled my xml after the example in LON-CAPA, but am having two problems with it. The first problem is an error referring to tolerance range, and the second is incompatible units. This is a screenshot: [cid:image001.jpg@01D275C3.FE604440] This is the code I am using: A $Pa dBm, $fa-MHz RF input signal and a $Pb dBm, $fb-MHz LO signal are applied to a nonlinear mixer with $Zin- impedance. Complete the table of IF cross products for m,n equal 1,2. mn|mfa nfb| Cross Products 1 1 $fa $fb $f11_1 MHz $f11_2 MHz 1 2 2 1 2 2 Any ideas why I am getting these two errors? Thanks for any advice you can provide. Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend ___ 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] Algebra Expression Rendering in LON-CAPA
Thanks Damien--that worked nicely! And thanks to everyone who responded with help. I should have posed these questions to the list earlier...would have saved me a lot of time! Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Damien Guillaume Sent: Tuesday, January 17, 2017 3:57 PM To: Discussion list for LON-CAPA usersSubject: Re: [LON-CAPA-users] Algebra Expression Rendering in LON-CAPA > Thanks Damien! That is very helpful. Is there an easy way to display > the large numbers with commas (e.g., 32000 -> 32,000)? I tried a > couple of different format commands using ",0f", but neither worked. > Also, is there a good reference out there to help novices like me with > the syntax for these commands? I'm having a hard time keeping the xml, > perl, tex, etc. straight. (And have wasted a LOT of time trying to > figure it out.) You are not the only one. Currently your best help for LON-CAPA specific syntax is the author manual at /adm/help/author.manual.pdf . For XML, Perl and TeX, you will have to look at other documentations on the web. I found that (which is mentionned in the author manual) works for me to get commas, for instance: $$ \frac{$numer}{$denom} \left[ \pi + \sum_{n=1}^{\infty} \frac{$sum_numer}{$sum_denom_n_coeff n - $sum_denom_const} \cdot \sin(($w,',0f') nt) \right] $$ It also works when you call it within a Perl script, for instance: ... $pretty_w = &prettyprint($w,', 0f'); $function= "\\frac{$numer}{$denom} \\left[ \\pi + \\sum_{n=1}^{\\infty} \\frac{$sum_numer}{$sum_denom_n_coeff n - $sum_denom_const} \\cdot \\sin($pretty_w nt) \\right]"; $$ $function $$ Damien PS: I meant 'eval="on"' instead of 'eval="true"' in my previous email. ___ 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] Algebra Expression Rendering in LON-CAPA
Hi Gerd, et al, Sorry, but it is still not working. Now nothing is rendered at all, and I get this error: [cid:image001.png@01D26DBF.D0AE4A30] This is the function definition: $function = "$numer/$denom [pi + \\sum_{n=1}^{\infty}($sum_numer/($sum_denom_n_coeff n - $sum_denom_const))*sin($w nt)]"; This is the call from the xml to render it: $function I think the call is using Maxima, but I am so new to this that I am not positive. I noticed something interesting when I compared the int and sum functionality. When I use “int” in the $function definition it needs no backslash at all, but does render the integral sign and arguments. “sum” on the other hand does not work either by itself, with one backslash, or with two backslashes. That makes me wonder if “sum” is the wrong keyword in that context. I don’t know… Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Gerd Kortemeyer Sent: Friday, January 13, 2017 11:16 AM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Algebra Expression Rendering in LON-CAPA Hi, Ah, okay, it’s inside Perl double quotes! Sorry, I did not catch that. In Perl, “\” is the escape character, so you’ll need “\\” - an escaped backslash. Apologies, I didn’t make the connection the first time around. - Gerd. > On Jan 13, 2017, at 11:05 AM, Harding, Gene L > <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> wrote: > > Hi, > > I think the formatting may be different inside a function assignment. This is > what I get when I use the following syntax: > $function = "$numer/$denom [pi + > \sum_{n=1}^{\infty}($sum_numer/($sum_denom_n_coeff n - > $sum_denom_const))*sin($w nt)]"; Did I mess up the syntax? > > > Gene L. Harding, PE > Associate Professor of ECET > 574-520-4190 > Purdue University-South Bend > > -Original Message- > From: > lon-capa-users-boun...@mail.lon-capa.org<mailto:lon-capa-users-boun...@mail.lon-capa.org> > [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Gerd > Kortemeyer > Sent: Friday, January 13, 2017 10:39 AM > 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] Algebra Expression Rendering in LON-CAPA > > Hi, > > It’s \sum > > as in > > \sum_{n=1}^{\infty} > > - Gerd. > > > On Jan 13, 2017, at 10:29 AM, Harding, Gene L > > <glhar...@purdue.edu<mailto:glhar...@purdue.edu>> wrote: > > > > Hi, > > > > I am having trouble rendering an algebraic expression with a summation sign > > (capital Sigma). I want an expression that looks like this, using variables > > for the numeric portions of the expression: > > > > I am able to render the integration sign using this code: > > $function = "$numer/$denom [pi + int($sum_numer/($sum_denom_n_coeff > > n > > - $sum_denom_const),1,3)*sin($w nt)]"; …providing an expression that looks > > like this: > > > > > > But when I try to render the summation sign using this code: > > $function = "$numer/$denom [pi + sum($sum_numer/($sum_denom_n_coeff > > n > > - $sum_denom_const),n,1,3)*sin($w nt)]"; …I get the following: > > > > > > I have spent a couple of hours looking through the Maxima Manual and other > > references, as well as some examples I have found online, but have not been > > able to figure out the syntax for rendering the summation sign. Can anyone > > offer advice on how to do this? > > > > Also, although not so important, if someone can tell me how to replace the > > outer parentheses with square brackets, and/or how to display the numeric > > part of the sine argument with commas (e.g., 90,000 vs 9), I would > > really appreciate it. > > > > Thanks, > > > > Gene L. Harding, PE > > Associate Professor of ECET > > 574-520-4190 > > Purdue University-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 > > -- > Gerd Kortemeyer, Ph.D. > Associate Professor of Physics > Director, LON-CAPA Project > Michigan State University > http://www.msu.edu/user/kortemey/ > > > > &g
[LON-CAPA-users] Algebra Expression Rendering in LON-CAPA
Hi, I am having trouble rendering an algebraic expression with a summation sign (capital Sigma). I want an expression that looks like this, using variables for the numeric portions of the expression: [cid:image003.jpg@01D26D87.FB7A6240] I am able to render the integration sign using this code: $function = "$numer/$denom [pi + int($sum_numer/($sum_denom_n_coeff n - $sum_denom_const),1,3)*sin($w nt)]"; ...providing an expression that looks like this: [cid:image004.png@01D26D87.FB7A6240] But when I try to render the summation sign using this code: $function = "$numer/$denom [pi + sum($sum_numer/($sum_denom_n_coeff n - $sum_denom_const),n,1,3)*sin($w nt)]"; ...I get the following: [cid:image005.png@01D26D87.FB7A6240] I have spent a couple of hours looking through the Maxima Manual and other references, as well as some examples I have found online, but have not been able to figure out the syntax for rendering the summation sign. Can anyone offer advice on how to do this? Also, although not so important, if someone can tell me how to replace the outer parentheses with square brackets, and/or how to display the numeric part of the sine argument with commas (e.g., 90,000 vs 9), I would really appreciate it. Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend ___ 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] usage
Hi, In some of my multi-part problems I have had to hard-code the problem part in the text because when I use the function it displays this: [cid:image001.png@01D26CFD.A4CEFD00] Has anyone seen this before? ...know why it happens? In some problems it happens and in others it works correctly, displaying the appropriate part label specified in the part ID, e.g., results in the letter "a" being displayed. Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend ___ 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] Quiz Timer Reset
Oh, wow, that's really easy. Thanks Mark! Best regards, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 Purdue University-South Bend -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, August 26, 2016 10:54 AM To: Discussion list for LON-CAPA users <lon-capa-users@mail.lon-capa.org> Subject: Re: [LON-CAPA-users] Quiz Timer Reset Gene, Yes - Main Menu -> Modify Parameter Settings ->Reset Student Access TImes This leads to a list of questions. Right off the bat select: * Reset times on one or more folders/maps, resources or the course for a single student. This will delete the time stamp that says when the student first accessed the folder. Any work they did is still good, but it will treat the student, time wise, as if they have not accessed the folder before. I hope this helps, Mark > On Aug 26, 2016, at 10:39 AM, Harding, Gene L <glhar...@purdue.edu> wrote: > > Hi, > > Is there a way to reset the timer parameter for a single student in an online > quiz in LON-CAPA? I recently had a student, who was new to LON-CAPA, > misunderstand how the quizzes work. He thought a three-question quiz was > three independent quizzes, so he did the first question, then returned later > to do the other two and found he was locked out. I could not figure out how > to reset the timer parameter for him, and ultimately ended up deleting the > timer parameter for the entire class. (Resetting those two questions in the > grading area did not work.) Is there a way to reset the timer for one > student? > > Thanks, > > Gene L. Harding, PE > Associate Professor of ECET > 574-520-4190 > Purdue University-South Bend > > ___ > 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 ___ 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] Imaginary Numbers
Hi, Can LON-CAPA handle imaginary and complex numbers? I am having trouble finding any info about it in the help. Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] Graphic Display Question
Hi, This is probably a very basic question, but is there an easy way to display a graphic beside its associated text instead of "in line" with it? In the figure shown below, I would like to display the amplifier symbol to the right of the text rather than above or below it. Is there an easy way to do that? [cid:image003.jpg@01D1631E.DC7B93B0] This is the code I am using for that portion of the problem: The following parameters apply to the amplifier system shown below: Si = $Sin pW Ni = $Nin fW Ap = $A_dB dB Nd = $Nd_dBm dBm Thanks, Gene L. Harding, PE Associate Professor of ECET 574-520-4190 ___ 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] New Content/Problem Editor - Input needed NOW
I agree with both of Carl's suggestions. He articulated the problems with the help much better than I did; I wholeheartedly agree with him. There are some key places where context-sensitive help would be a great addition (e.g., Parameters for a response blocks Type parameter). Code snippets would also be nice. I have started saving some of my own (useful for EE, but probably no one else) in a text file so I can reuse them later. Best regards, Gene Gene L. Harding, P.E. Associate Professor of ECET Purdue University glhar...@purdue.edumailto:glhar...@purdue.edu 574-520-4190 From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Carl Lira Sent: Tuesday, October 21, 2014 8:17 PM To: lon-capa-users@mail.lon-capa.org Subject: Re: [LON-CAPA-users] New Content/Problem Editor - Input needed NOW As a relatively new user, I found the colorful editor essential in learning to write proper problems. The colors are gaudy, but that really helps your eye in tracking since some nested boxes can become span several screens. My main issue as a beginner with the colorful editor was the lack of contextual help, and understanding which fields are optional and which are required. The tolerance and sig figures boxes are optional for numerical integer answers but that is not clear when the template loads with a 5% tolerance. There is no contextual help for the green Numerical Response box. I'm glad improved contextual help is coming. The flow of help is a concern. To get help on the problem without contextual help, you must click 'help' in the menu bar which immediately hides your work, then you browse through the manual to find the section, go a couple layers into help, where you realize that if you must click the browser back button to navigate back to the previous help menus, and if you click 'go back' in the menu bar, you go back to your problem and lose your place in help. Agh! So my main recommendations are to make sure that clicking 'help' does not hide your work in progress, and that contextual help is available to guide the users on what parts are required and what parts are optional, and that users can view their work and help at the same time without losing view of one. Not really an editor detail, but in terms of the problem template menu, it would be good if there was a link to xml code in addition to the problem browser preview. As users get more experienced, copying an existing problem by xml is faster than creating one in the colorful editor. It is awkward to create a new problem just so that you can copy a snippet of xml from a template. I caution that most response from this listserv will be advanced users who are comfortable coding xml, not the beginning users. The experienced users on this listserv will be biased to xml, but the new users need to have a colorful editor. If you want to get a larger set of users, a better interactive editor is necessary. ___ 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] New Content/Problem Editor - Input needed NOW
This is not really an editing issue, but…another thing I would like to see is some indication of problem types in the folder lists: numerical, multiple choice, matching, etc. That is one of the few features I miss from Blackboard, where I could scan through my problem library and easily tell what type of problem a question was without opening the problem itself…something analogous to file extensions in DOS/Windows, where .doc and .docx indicate Word documents, .ppt and .pptx indicate PowerPoint documents, etc. Gene L. Harding, P.E. Associate Professor of ECET Purdue University glhar...@purdue.edumailto:glhar...@purdue.edu 574-520-4190 ___ 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] 2014 conference registration now available
Hi Gerd, Unfortunately, RadarCon 2014 conflicts this year, and I am presenting a paper, so will not be able to make the LC conference this year. I hope you all have a good conference, and I would be interested in catching up on the conference highlights if you publish any. Best regards, Gene /// Gene L. Harding, P.E. Associate Professor of ECET Purdue University 574-520-4190 -Original Message- From: lon-capa-users-boun...@mail.lon-capa.org [mailto:lon-capa-users-boun...@mail.lon-capa.org] On Behalf Of Gerd Kortemeyer Sent: Wednesday, March 26, 2014 5:11 PM To: Discussion list for LON-CAPA users; lon-capa-annou...@mail.lon-capa.org Subject: [LON-CAPA-users] 2014 conference registration now available Hi, The subject line says it all: registration is now available for our 2014 LON-CAPA Conference and Workshop, https://support.loncapa.org/events/conf2014/ Use the Registration link in the box on the right. We hope to welcome you in East Lansing! - Gerd. ___ 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