Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2013-09-27

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:03 Paul_Pearson joined #webwork
00:04 Paul_Pearson mgage Did the issue with Scrubber.pm removing the characters < and > ever get resolved?
00:05 Paul_Pearson It is showing up for me right now as I am grading an essay question about vector spaces that uses vector notation such as <x,y,z>.
00:06 Paul_Pearson Sorry, let me make myself more clear.  The characters < and > are not handled properly while grading an essay question.  I think it may have something to do with Scrubber.pm
02:04 mgage_ joined #webwork
02:17 rbeezer joined #webwork
02:27 rbeezer_ joined #webwork
03:23 mgage_ joined #webwork
11:40 mgage_ joined #webwork
13:17 goehle joined #webwork
14:35 goehle hey mgage
15:03 mgage hi
15:04 mgage goehle:hi
15:27 mgage goehle: hi
15:51 aubreyja joined #webwork
15:51 aubreyja joined #webwork
15:53 aubreyja joined #webwork
15:53 aubreyja joined #webwork
16:14 goehle hey mgage
16:14 goehle back from class
16:43 mgage goehle:  I'm off to a lecture again in a few minutes -- I'll be back about 2:30
16:43 goehle i got o class then
16:43 goehle but I'll be back at 3:20 :P
16:44 mgage ok talk to you then
17:32 aubreyja goehle - can you check something for me?
17:33 goehle sure
17:33 aubreyja do you have easy access to the devel version of OPL-update? I'm running it and getting a lof of "Invalid subject ..." warnings
17:35 aubreyja the master version works ok, but I'm adding a configurable ENGINE='' parameter to the db create statements and in testing it I see my OPL-update is giving me these warnings.
17:36 aubreyja (but course creation with these changes work fine)
17:36 aubreyja so,  I checked out an unmodified devel OPL-update and I'm getting the same bad behavior
17:39 goehle is that just the opl update thats on develop ?
17:39 aubreyja yeah
17:40 goehle I'm getting invalid subject as well
17:40 aubreyja good - so it must have been broken before I modified it - that's what I thought
17:41 goehle ok
17:41 goehle :)
17:41 aubreyja thanks
17:41 goehle np
17:50 rbeezer joined #webwork
17:53 aubreyja goehle - your probably in the best position (or one of the best positions) to double check what I just issued a pull request for...
17:53 goehle I just saw
17:53 goehle I'll let it cool for a few hours first
17:53 aubreyja sure thing
17:53 goehle I always end up forgetting soemthing in my pull requests
17:54 goehle this way if you are like me you'll have time to fix it before it gets merged
17:54 aubreyja this is a possiblity I have contemplated...
17:56 goehle https://github.com/openwebwork/webwork2/pull/162/files#L0R80
17:56 goehle where do those come from?
17:57 goehle I dont' see them anywhere else in your changes and just wanted to make sure they are defined somewhere
17:59 goehle nm. found it
17:59 goehle those are already in defaults.conf
17:59 aubreyja sorry - stepped away - we cool?
17:59 goehle think so
18:00 goehle what do I need to do to test this
18:00 goehle just pull and restart apache
18:00 goehle or should I run opl update
18:00 aubreyja yes pull, restart apache, and test by creating a new course, checking the storage engine, running opl-update, checking the storage engine
18:01 aubreyja Note - OPL-update will create the tables but the opl won't work (well) b/c of the "invalid..." error
18:02 aubreyja I think that was jj's modification so I'll probably just write to webwork-devel about it
18:02 aubreyja (you can see my course tables check in the second comment I made)
18:03 goehle check the storage engin?
18:03 aubreyja yeah - the mysql show create table TBL_NAME statement will show that the table really is MyISAM even if the default engine is InnoDB (or something else)
18:05 aubreyja I've gotta run now - I'll check in later
18:09 goehle seems like it works
18:09 goehle I'll pull when I get back from class.
18:12 goehle my do we use MyISAM and not InnoDB?
18:12 goehle why rather
18:13 goehle actually I'll ask that on the pull request
19:26 goehle hey mgage
19:29 mgage goehle: hi
19:29 goehle so pauls problem with <x,y,z> is kind of tricky
19:29 mgage ok
19:29 goehle its because the <x,y,z> is being interpreted as html
19:30 mgage ok -- so it''s not part of the HTML::Scrubber issue then
19:30 goehle however, I can't encode the answer string after pg formatting because that encodes the html used to render the math
19:30 goehle (nope)
19:30 goehle If I encode before I run pg then MathJax is ok but image rendering fails
19:30 goehle because image rendering isn't set up to deal with escaped html characters
19:30 goehle I think the right answer is that if you want to type <x,y,z> then put it in math mode
19:31 goehle but I dont know if that is practial
19:32 mgage ok.  I think that sounds ok to me -- at least for now -- it's a little hard to explain to students -- but then writing math into the essay questions will be a bit unfamiliar in any case so one more thing won't hurt much.
19:33 mgage it would be nice is there was some kind of feedback -- a warning -- if you put in something that would cause trouble.
19:33 goehle yeah.  I mean they can see that there isa problem because the <x,y,z> dissapears from the answer preview as well
19:33 goehle but any way I can think of to look for that kind of thing is pretty ad hoc/fragile
19:34 mgage we could put a decode html entities in the code that feeds things to dvipng  -- would that help? it's fragile also
19:35 goehle thats one option I was thinking of.  then both images and MathJax could deal with encoded text
19:35 goehle but I don't know if messing with dvipng is optimal
19:35 mgage right --
19:35 goehle and its still tricky
19:35 mgage we wouldn't actually mess with dvipng --
19:35 goehle because it needs to decode the stuff that is being evaluated in formulas
19:35 goehle but not the stuff outside of formulas
19:36 mgage yes -- but that is not hard -- hang on a sec
19:36 goehle I suppose I could just try and do that using some regexp
19:36 mgage no need -- that is already done
19:38 mgage you need to doctor the subroutine general_math_ev3 in PGbasicmacros.pl
19:39 goehle can I override that in PGessaymacros
19:39 goehle so I dont break anyone elses stuff
19:39 goehle for example
19:39 mgage I believe you can insert an HTML::entities function at about line 1729   to remove entities from $in before it gets passed to the image generator
19:39 goehle I dont want to encode < and >
19:39 goehle in vector answers
19:39 goehle because those wont have equation brackets
19:40 mgage the only thing that reaches genera_math_ev3 is the contents of a formula between \(   \) or \[   \]  (I believe -- this is old stuff so I might have some details wrong)
19:41 mgage it would be a quick thing to try --- it might take much longer to test it to see if there are unintended consequences.
19:43 goehle so you would encode before I run ev3
19:43 goehle then decode in general_math_ev3
19:44 mgage yes .   so what does this do is someone uses < in a non-mathematics context?
19:45 mgage does the entity print correctly even if it is encoded?
19:45 goehle in mathJax yes
19:45 goehle in images no
19:45 goehle actually thats not going to work
19:45 goehle because in images it doesnt even recognize \( and \)
19:45 goehle if they are encoded
19:46 mgage not sure why it works in MathJax then
19:46 goehle I think its the js
19:47 goehle when the js pulls the content of a dom
19:47 goehle I think it translates the escaped characters
19:47 goehle (depending on what you are using to pull the content)
19:48 mgage but general_math_ev3 does (or did) set up the classes around formulas for MathJax to use -- and it grabs its data using regex on \( \)
19:50 mgage ev_substring is where this occurs.
19:51 goehle hmm
19:51 goehle maybe its then running mathjax very generally
19:51 goehle (like on the whole page, or the whole td
19:51 goehle )
19:52 goehle and when it does that mathjax captures the enclosed math like it usually does
19:52 mgage it's possible that is what is happening now -- it's not what happened originally
19:53 goehle I think thats whats happening
19:53 goehle when I look at the source I see
19:53 goehle <span class="MathJax_Preview">[math]</span><script type="math/tex; mode=display">\hbox{symmetric ... reflexive}</script></td><td><span class="ResultsWithoutError">correct</span></td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td onmouseover="Tip('',SHADOW, true,
19:54 goehle DELAY, 1000, FADEIN, 300, FADEOUT, 300, STICKY, 1, OFFSETX, -20, CLOSEBTN, true, CLICKCLOSE, false,
19:54 goehle BGCOLOR, '#F4FF91', TITLE, 'Entered:',TITLEBGCOLOR, '#F4FF91', TITLEFONTCOLOR, '#000000')">&lt;a,b,c&gt; and &#96; &lt; x,y,z &gt; &#96; and &#92;(&lt;2,5,6&gt;&#92;)</td>
19:54 goehle which is a huge mess
19:54 goehle but the key is that the symmetric ... reflextive portion hsa a mathjax preivew tag
19:54 goehle but the actually math part
19:54 goehle doesnt have a mathjax preview tag
19:54 goehle which I think means it wasn't caught by ev3
19:54 goehle you can also see all of the encoding
19:56 goehle yeah, when I remove the encoding
19:56 goehle <span class="MathJax_Preview">[math]</span><script type="math/tex; mode=display">\hbox{symmetric ... reflexive}</script></td><td><span class="ResultsWithoutError">correct</span></td><td>&nbsp;</td></tr> <tr><td>&nbsp;</td><td onmouseover="Tip('',SHADOW, true,
19:56 goehle DELAY, 1000, FADEIN, 300, FADEOUT, 300, STICKY, 1, OFFSETX, -20, CLOSEBTN, true, CLICKCLOSE, false,
19:56 goehle BGCOLOR, '#F4FF91', TITLE, 'Entered:',TITLEBGCOLOR, '#F4FF91', TITLEFONTCOLOR, '#000000')"><a,b,c> and <span class="MathJax_Preview">[math]</span><script type="math/tex"><x,y,z></script> and <span class="MathJax_Preview">[math]</span><script type="math/tex"><2,5,6></script></td><td>Ungraded</td>
19:56 goehle you can see a lot more stuff has the mathjax preview tag
19:56 goehle so all of that encoded junk must be being captured by some global run of mathjax from something
19:56 goehle (maybe mathview)
19:57 goehle (not mathview, soemthing else)
19:58 mgage -- interesting -- there has always been some tension between running latex on the entire TEXT segment or just on the formula parts -- I've tended to favor the former -- particularly when computers were slower.   -- perhaps one could revisit the question.
19:58 goehle seems like a lot of work for a corner case
19:58 goehle a related question
19:58 mgage yes
19:58 goehle is do we want to allow html in the essay questions
19:59 goehle so people could format their essays for example
19:59 goehle if we do then <x,y,z> is irreconcilably a problem
19:59 goehle we could do something like MarkDown
19:59 goehle so people could format their essays
19:59 mgage one could add the HTML::entities codes for \( and \) fairly easy and use ev_subscript on those
19:59 goehle with no HTML
20:00 goehle what handles backtics?
20:01 mgage this comes up in wiki's and things like that all the time.  I'm particle to MarkDown for much the same reasons David gives.  markdown in general is not one spec and there are better and worse versions of markdown.  either the official one or perhaps the one used by github would be good.
20:01 goehle well
20:01 goehle I wont implement it
20:01 goehle but if people start asking for formatting in essay questions then I'll put in markdown
20:03 mgage kk --s tudent
20:18 mgage EV3P_parser handles back ticks -- it might be smarter -- Davide wrote it -- I wrote the others at the very beginning.
20:20 aubreyja mgage, goehle - I made a commit that gets my db thing working right - how do I update the pull request?
20:20 aubreyja Just do a new pull request from same branch?
20:21 mgage it updates automatically -- I don't think you even need to do a new pull request -- just look on github.com/openwebwork and your new commit to your github will be part of the pull request
20:22 aubreyja right - I see it now
20:36 goehle left #webwork
21:54 _ilbot joined #webwork
21:54 Topic for #webwork is now WeBWorK (http://webwork.maa.org) is an open-source online homework system for math and sciences courses. WeBWorK is supported by the MAA and the NSF. | Release notes: http://goo.gl/Ry5HN | Channel logged at http://goo.gl/jELTn
22:10 _ilbot joined #webwork
22:10 Topic for #webwork is now WeBWorK (http://webwork.maa.org) is an open-source online homework system for math and sciences courses. WeBWorK is supported by the MAA and the NSF. | Release notes: http://goo.gl/Ry5HN | Channel logged at http://goo.gl/jELTn

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary