WeBWorK Main Forum
https://webwork.maa.org/moodle/mod/forum/view.php?f=2
The wiki and forum systems have changed encryption methods and some passwords need to be reset. If you can't login: first set (or reset) your password on the wiki (you can use the "forgot password" link). Make sure to complete the process to set a "new" permanent password. Then use that permanent password for moodle as well as the wiki.
Questions and comments regarding day-to-day use of WeBWorK.Moodleen(c) 2021 WeBWorK: Online homework for math and sciencehttps://webwork.maa.org/moodle/theme/image.php/classic/core/1584125254/i/rsssitelogomoodle
https://webwork.maa.org/moodle
14035Problem with $refreshCachedImages
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5026&parent=15439
Wed, 24 Feb 2021 23:42:01 GMTby Joel Trussell. <p><span class="filter_mathjaxloader_equation"><p>I'm not discovering my error, so I'm asking for help. The problem generates a sinusoid with random frequency and asks students to identify the graph of the function. It works the first time, but fails to work when the student or prof uses get a new version of the problem. The frequency is changed in the question formulation, but the graphs are not changed. I've checked the macro files, set $refreshCachedImages = 1 in various places. <br /></p><p>Here's the code, Thanks<br /></p><p>DOCUMENT();<br /><br />loadMacros("PG.pl",<br /> "PGstandard.pl",<br /> "PGchoicemacros.pl",<br /> "PGgraphmacros.pl",<br /> "extraAnswerEvaluators.pl",<br /> "MathObjects.pl",<br /> "PGcourse.pl"<br />);<br /><br />TEXT(beginproblem());<br /><br />Context("Numeric");<br /><br />Context("Numeric")->functions->add(<br /> step => {<br /> class => 'Parser::Legacy::Numeric',<br /> perl => 'Parser::Legacy::Numeric::do_step'<br /> },<br />);<br /><br /><br /><br />$showPartialCorrectAnswers = 1;<br /><br />#$a = 2;<br />#$b = 3; <br />Context()->variables->add(t=>'Real');<br />Context()->variables->add(F=>'Real');<br />$func = Formula("sin(2 pi F t)"); <br /><br />@eq = ("<span class="nolink">\( y=-2f(-t) \)</span>",<br /> "<span class="nolink">\( y=2f(-t) \)</span>",<br /> "<span class="nolink">\( y=-2f(t) \)</span>",<br /> "<span class="nolink">\( y=-f \left( - \frac{1}{2} t \right) \)</span>",<br /> "<span class="nolink">\( y=-\frac{1}{2} f(-t) \)</span>",<br /> "<span class="nolink">\( y=f \left( \frac{1}{2} t \right) \)</span>" );<br /><br />@descript = ("is a reflection about both the <span class="nolink">\(t\)</span>-axis and <span class="nolink">\(y\)</span>-axis as well as a vertical stretch by a factor of 2.",<br />"is a horizontal reflection about the <span class="nolink">\(y\)</span>-axis as well as a vertical stretch by a factor of 2.",<br />"is a vertical reflection about the <span class="nolink">\(t\)</span>-axis as well as a vertical stretch by a factor of 2.",<br />"is a reflection about both the <span class="nolink">\(t\)</span>-axis and <span class="nolink">\(y\)</span>-axis as well as a horizontal stretch by a factor of 2.");<br /><br />$p1[0] = FEQ("step(t) - step(t-1) for t in <-1,10> using color:blue and weight:2");<br />$p2[0] = FEQ("step(t) - step(t-0.5) for t in <-1,10> using color:blue and weight:2");<br />$p3[0] = FEQ("step(t) - step(t-2) for t in <-1,10> using color:blue and weight:2");<br />$p4[0] = FEQ("step(t+1) - step(t) for t in <-1,10> using color:blue and weight:2");<br />$p1[1] = FEQ(qq! step(t) - step(t-0.5) + step(t) - step(t-2) for t in <-1,10> using color:blue and weight:2!);<br /><br /><br />##$graphf = init_graph(@opts);<br />## (plot_functions($graphf,"$f for x in <-$dom,$dom> using color:blue"))[0]->steps(250);<br />## $labelf = new Label(@gr_lab, 'y = f(x)', 'blue' , 'center', 'center');<br />## $graphf->lb($labelf);<br /><br />$gr = init_graph(-2,-2,10,4,'axes'=>[0,0],'ticks'=>[6,6] );<br />$gr->lb('reset');<br />for ($i = -2; $i <= 4; $i++) { if ($i != 0) {<br /> $gr->lb(new Label(-.1,$i,$i,'black','right','middle')) }};<br />for ($i = -1; $i <= 5; $i++) {<br /> $gr->lb(new Label(2*$i,-.2,2*$i,'black','center','top')) };<br />$gr->lb(new Label(-.2,4.5,"y",'black','right','top'));<br />$gr->lb(new Label(9.5,-.2,"t",'black','right','top'));<br />$gr->lb(new Label(3.5,4,"s(t)",'black','left','bottom'));<br />## parentheses in ($fn1) are necessary<br />($f1n) = plot_functions( $gr, $p1[1] );<br />$f1n->steps(200);<br /><br />$orig = image(insertGraph($gr),width => 400,height => 300,tex_size => 600);<br /><br />$F = random(1,5,1);<br /><br />$g[0] = "sin(2*pi*$F*t) for t in <-1,1> using color:blue and weight:2";<br />$g[1] = "sin(2*pi*(-$F*t)) for t in <-1,1> using color:blue and weight:2";<br />$g[2] = "sin(pi*$F*t) for t in <-1,1> using color:blue and weight:2";<br />$g[4] = "cos(2*pi*$F*t) for t in <-1,1> using color:blue and weight:2";<br />$g[3] = "-cos(2*pi*$F*t) for t in <-1,1> using color:blue and weight:2";<br />$g[5] = "sin(0.5*pi*$F*t) for t in <-1,1> using color:blue and weight:2";<br /><br />$graph[0] = init_graph(-1,-2,1,2,'axes'=>[0,0],'ticks'=>[8,8] );<br />$graph[1] = init_graph(-1,-2,1,2,'axes'=>[0,0],'ticks'=>[8,8] );<br />$graph[2] = init_graph(-1,-2,1,2,'axes'=>[0,0],'ticks'=>[8,8] );<br />$graph[3] = init_graph(-1,-2,1,2,'axes'=>[0,0],'ticks'=>[8,8] );<br />$graph[4] = init_graph(-1,-2,1,2,'axes'=>[0,0],'ticks'=>[8,8] );<br />$graph[5] = init_graph(-1,-2,1,2,'axes'=>[0,0],'ticks'=>[8,8] );<br /><br />for ($j = 0; $j <=5; $j++) {<br />$graph[$j]->lb('reset');<br />$graph[$j]->lb(new Label(-.07,-1,-1,'black','right','middle'));<br />$graph[$j]->lb(new Label(-.07,1,1,'black','right','middle'));<br />for ($i = -3; $i <= 3; $i++) { if ($i != 0) {<br /> $graph[$j]->lb(new Label(0.25*$i,-.2,0.25*$i,'black','center','top')) }};<br />$graph[$j]->lb(new Label(-.05,1.9,"y",'black','right','top'));<br />$graph[$j]->lb(new Label(0.95,0.1,"t",'black','right','bottom'));<br />plot_functions( $graph[$j], $g[$j]);<br />$fig[$j] = image(insertGraph($graph[$j]),width => 240,height => 180,tex_size => 200); };<br /><br /><br /># $pick = random(0,3,1);<br /><br /># if ( $pick != 0 ) { $temp_eq = $eqn[0];<br /># $temp_gr = $fig[0];<br /># $eq[0] = $eq[$pick];<br /># $fig[0] = $fig[$pick];<br /># $eq[$pick] = $temp_eq;<br /># $fig[$pick] = $temp_gr};<br /><br />$mc = new_multiple_choice();<br />$mc->qa('On a separate piece of paper, sketch an accurate graph of this function for <span class="nolink">\( F = $F \)</span> and <span class="nolink">\( t \in [-1, 1] \)</span>. Which (if any) of the graphs below matches the graph you drew?','$fig[0]');<br />$mc->extra('$fig[1] $BR $BITALIC(click on image to enlarge)$EITALIC',<br />'$fig[2] $BR $BITALIC(click on image to enlarge)$EITALIC',<br />'$fig[3] $BR $BITALIC(click on image to enlarge)$EITALIC',<br />'$fig[4] $BR $BITALIC(click on image to enlarge)$EITALIC',<br />'$fig[5] $BR $BITALIC(click on image to enlarge)$EITALIC');<br /><br />$mc->makeLast('None of the above');<br /><br />## force a refresh of the image after changes<br />$refreshCachedImages = 1;<br /><br />Context()->texStrings;<br />BEGIN_TEXT<br />This problem reflects Problem 1.21a in the text<br />$PAR<br />Consider the function <br />$BR<br />$BR<br /><span class="nolink">\( y = $func \)</span>.<br />$BR<br />$BR<br />\{ $mc->print_q() \} $BR<br />\{ $mc->print_a() \}<br /><br />END_TEXT<br />Context()->normalStrings;<br /><br />ANS(radio_cmp($mc->correct_ans));<br />## force a refresh of the image after changes<br />$refreshCachedImages = 1;<br /><br />Context()->texStrings;<br />SOLUTION(EV3(<<'END_SOLUTION'));<br />$PAR<br />$BBOLD SOLUTION $EBOLD<br />$PAR<br />Setting <span class="nolink">\( F = $F \)</span> gives the function <span class="nolink">\( y = \sin(2 \pi $F t) \)</span>. This has $F cycles in one unit of time. It starts at zero at t = 0, since it is a sine and is positive for the first values greater than zero. Therefore the correct graph is<br />$PAR<br />$BCENTER<br />$fig[0]<br />$ECENTER<br />$BR<br />which is answer \{ $mc->correct_ans \}.<br /><br />END_SOLUTION<br />Context()->normalStrings;<br /><br /><br />ENDDOCUMENT(); <br /></p><p><br /></p></span></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5026&parent=15439Re: Seeking mysql guidance to look at quiz version tables
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15438
Wed, 24 Feb 2021 22:21:10 GMTby Alex Jordan. <p><div>We discovered the quiz originally had 17 questions. Three students started a version, then the instructor cut #16 from the list. All other students took a 16-question quiz and things worked as expected for them. But with the first three students, there was the issue originally described.</div><div><br /></div><div>Short term, I added back the original #16 to the main quiz set details. Now we can visit the quiz version for all students in the class. For some, we see a 17-question 1uiz, for others 16. It's enough to get what the instructor needs, and no new people will be taking the quiz.</div><div><br /></div><div>But this goes along with some other recent observations, that there are some attributes of a parent quiz that are inappopriately being used while working with a quiz *version* for a student. In this case, trying to view these student's quizzes should have just let us see all 17 questions and responses, since that is how this quiz version existed for them in the database. But the fact that the parent quiz was down to only having 16 questions somehow caused the issue.<br /></div></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15438Re: Seeking mysql guidance to look at quiz version tables
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15437
Wed, 24 Feb 2021 03:02:45 GMTby Glenn Rice. <p><p>Yeah, I can do that.</p></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15437Re: Seeking mysql guidance to look at quiz version tables
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15436
Wed, 24 Feb 2021 02:28:11 GMTby Alex Jordan. <p><p>Thanks Glenn. We already have the meeting at 11:30 Pacific. Does it work for you to hang around after that?<br /></p></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15436Re: Seeking mysql guidance to look at quiz version tables
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15435
Wed, 24 Feb 2021 01:53:38 GMTby Glenn Rice. <p><p>I am sure that I could help you with this. Although it might be a bit tedious to do through the forums. Could you do a Zoom or Google Meet tomorrow at some point?<br /></p></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15435Seeking mysql guidance to look at quiz version tables
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15434
Wed, 24 Feb 2021 00:15:56 GMTby Alex Jordan. <p><p>I almost never do anything directly with the mysql database, as it should be. And I don't have other experience with mysql. Now I have a need to look into it, and I wondered if I could post here asking for some guidance.</p><p>An instructor created a GW quiz. Three students were the first to take it. Then the instructor also clicked to start a version. We think the instructor saw something he wanted to change, and changed something with the global quiz config. But he cannot recall. Then more students took the quiz.</p><p>Now we cannot access the quiz versions for the original three students. Their scores are visible in various places, but any attempt to load their quizzes gives the "one or more of the problems in this set have not been assigned to you" message. I know this can happen when quiz question numbering is not consecutive, but I don't see evidence of that being the case here. So I'm wondering what else could cause this. And I thought to actually look in the database and see how the tables are different for these three students compared to the others.</p><p>Is someone able to talk me through how I look at these without messing things up?<br /></p></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5025&parent=15434Re: Dropped connections during Gateway Quiz
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=4911&parent=15432
Mon, 22 Feb 2021 20:45:32 GMTby Alex Jordan. <p><p>Possibly, you experienced a version of this:</p><p>https://github.com/openwebwork/webwork2/issues/1208</p><p>The "good" news is that the transaction log for the course may still contain the student answers. You can access the transaction log in /opt/webwork/webwork2/logs/. It is helpful to apply grep or sed or something to throw out all lines except the ones wfor the student in question, for the quiz in question.</p><p>If there is any way to get hold of the browser console log from when this happens, that could be helpful. Or of course, if there is any reliable way to reproduce it.<br /></p></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=4911&parent=15432Re: MyISAM vs. InnoDB
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5001&parent=15428
Thu, 18 Feb 2021 17:43:09 GMTby Heath Loder. <p><div class="text_to_html">I am also interested in using InnoDB for course tables. I am willing to offer assistance as well, but my experience with Perl and Github are minimal. If nothing more, I'd like to at least make it known that there are other users that are interested in this. I didn't want to start a discussion at GitHub yet because I'm not sure I'm the best representative to start the discussion, especially after seeing the plethora of resources that you have recently combed through that can justify the reasonings better than I can.</div></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=5001&parent=15428Re: LTI authentication failed through Blackboard
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=4955&parent=15422
Mon, 15 Feb 2021 18:46:12 GMTby Bianca Sosnovski. <p><p>Nathan,</p><p>This is fantastic! Thank you for providing yet another modified file to debug the timestamp.</p><p>I contacted our university's Blackboard people. I hope we will hear from them soon. Collecting the info with your modified file certainly helps to figure out the issue.</p><p>Our Webwork is running NTP:</p><p></p><p><i>root@webwork:~# timedatectl</i></p>
<p><i> Local time: Mon 2021-02-15 13:38:58 EST </i></p>
<p><i> Universal time: Mon 2021-02-15 18:38:58 UTC </i></p>
<p><i> RTC time: Mon 2021-02-15 18:38:58 </i></p>
<p><i> Time zone: America/New_York (EST, -0500)</i></p>
<p><i> System clock synchronized: yes </i></p>
<p><i> NTP service: active </i></p>
<p><i> RTC in local TZ: no </i></p>I will keep you posted of what is going on.<p>Thank you gain.</p></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=4955&parent=15422Re: LTI authentication failed through Blackboard
https://webwork.maa.org/moodle/mod/forum/discuss.php?d=4955&parent=15421
Mon, 15 Feb 2021 10:34:12 GMTby Nathan Wallach. <p><p>The new patch should add a block like the following to the debug output after all the LTI data:</p><p>
</p><pre>============================
===== timestamp info =======
oauth_nonce = 1613384974
WW_server_time = 1613384974
diff(server-oauth) = 0 seconds (0 minutes)
============================ at /opt/webwork/webwork2/lib/WeBWorK/Authen/LTIAdvanced.pm line 145.</pre>
<p>If the different is more than 5 seconds, it will be reported even when <code>$debug_lti_parameters = 0</code> is set.</p></p>https://webwork.maa.org/moodle/mod/forum/discuss.php?d=4955&parent=15421