Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2013-08-30

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

All times shown according to UTC.

Time Nick Message
00:02 rbeezer joined #webwork
03:52 rbeezer joined #webwork
03:58 mgage joined #webwork
03:59 mgage rbeezer:  hi  -- just sent you a link for your course -- sorry I forgot about that
03:59 mgage thanks for the pestering.  (everyone else is doing it :-) )
04:00 rbeezer no problem, got it, sorry to be pestering you, but glad I have company, I think
04:00 rbeezer hopefully I can stay out of the way  ;-)
04:01 mgage kk  -- if you have time check it out and see if there is anything that needs doing right away -- I'll stay up a while longer.
04:01 mgage things are mostly just busy this week and weekend because I'm trying to make sure things are set for my father up here in Canton before I go back and start the semester -- we start Tuesday also.
04:02 rbeezer just changed password, all's good that far
04:02 rbeezer serious stuff will have to wait for the AM  ;-)
04:03 rbeezer seems lots of folks are already in the saddle (my younger son for one), dropped him at his new fraternity last weekend
04:03 mgage kk -- I'll be around tomorrow -- won't be around Sunday but by Monday night I'll be back focused on academia (and rather busy -- as usual I'm behind).
04:03 rbeezer ok, thanks, greatly appreciated (as usual)
04:04 mgage yes -- I have a few people covering some freshmen advising stuff so I can be up here.  I'll make it up during the semester somehow.
04:04 mgage have a good weekend -- we can catch up toward the end of next week when things calm down a bit.
04:05 rbeezer sounds good - enjoy your weekend as well, see ya
04:05 mgage your default sage cell server is    https://sagecell.sagemath.org/service
04:06 mgage for askSage()
04:07 rbeezer perfect (and I can use a URL argument if needed, I have that syntax)
04:07 mgage yep
05:13 mgage joined #webwork
13:10 goehle joined #webwork
15:19 aubreyja joined #webwork
15:19 aubreyja joined #webwork
15:20 aubreyja_ joined #webwork
15:20 aubreyja_ joined #webwork
15:32 mgage joined #webwork
15:52 mgage joined #webwork
16:03 mgage_ joined #webwork
16:44 mgage joined #webwork
16:46 mgage aubreyja: hi
16:53 goehle hey mgage
17:02 mgage goehle: hi
17:02 goehle did you read my email about the mathview stuff
17:04 mgage yes -- that looked like reasonable questions -- let's see what Jean-Philippe says.  I'm still not sure about the use case, but it might have been something that the people he is working for just want even if they are not using it right.
17:04 goehle yeah, its tough
17:04 goehle I mean, its not going to be particularly good ant previewing this sort of thing
17:05 goehle and it only provides like 20 tex commands
17:05 goehle and most of them are just function names with /'s in front
17:05 mgage I don't think it will harm anything to put it in, but I suggest postponing any action other than discussion until the start of the semester crunch dies down.  We're going to have enough to do with urgent bug fixes.
17:08 mgage there are a few recent bugs that should be hot fixes I think.  One of them is that the instructor hardcopy always has solutions #2707  and the reduced credit bug #2711
17:08 mgage I think you can close bugs 2692 and 2702?
17:08 goehle Ah, I don't have permissions to close bugs
17:09 mgage hang on -- didn't know that
17:11 mgage ok -- I think you are an administrator now
17:12 mgage brb
17:14 mgage back
17:16 goehle with a student atm
17:24 goehle back
17:27 mgage I think you fixed #2686 as well
17:27 mgage #2703 is the error in currency -- are you still working on that one?
17:29 goehle I was going to work aon that this afternoon
17:30 mgage and I think #2675 is fixed as well
17:30 goehle however, my fix is most likely going to jsut be to comment out the character escaping in that macro
17:31 mgage hmm -- wasn't there a filter at line 340 that caused the basic problem?
17:32 mgage actually for a hot fix -- perhaps your suggestion is best -- a deeper solution can be added to develop
17:35 mgage the deeper solution would be to comment out line 341   and then Davide could remove the hack from his Currency code.
17:37 mgage Davide thinks that the fact that we are using MathObjects, plus your url encoding of entries should be adequate to protect against malicious use, but it might be better to put it in develop and see if he is right rather than experiment with this in a hotfix.
17:48 goehle ok back
17:49 mgage that's line 341 in PGbasicmacros.pl
17:50 goehle I guess I'm confused
17:51 goehle line 340 would remove any $'s
17:52 mgage I think what happened is this.   Long ago we removed $ signs so that students couldn't enter variables into answers (Davide thinks this wasn't effective, but I'm not so sure)
17:52 mgage This made it impossible to enter currencies so Davide entered a kludge that encoded $ early in the answer process (not sure where off the top of my head)
17:52 goehle ah I see
17:52 goehle and since I re-encode
17:53 mgage then you added the general url encoding mechanism -- (which now encodes Davide's encoding of the $ )
17:53 goehle that is getting double encoded somehow
17:53 goehle removing the 340 line wouldn't help then
17:53 mgage yep -- and Davide only decoded once
17:53 goehle or rather by it self wouldnt help
17:53 mgage that alone wouldn't help, but if we remove that then Davide's kludge isn't needed
17:53 goehle I would need ot comment out 340
17:53 goehle right
17:53 goehle I can do that
17:54 mgage I put Davide's comments in the bug report -- and I'd suggest consulting with him if you would like to do the deep bug fix.
17:54 goehle that would be a good idea
17:54 goehle I'll got with the less invasive one for now
17:55 mgage that's fine too -- and probably better for the hotfix
17:55 goehle ok, so this bug, the reduced credit bug, and the instructor answers bug (which I haven't looked at yet) should be hotfixed?
17:56 mgage yes -- I think so -- the reduced credit bug can be worked around so the instructor answers bug comes first
17:56 goehle the reduced credit fix is *super* simple
17:57 mgage My suspicion in both cases is that the fix is easy -- something isn't being checked in hardcopy and the initialization for reduced credit is hardwired into the HTML instead of reading from the configuration switch
17:57 goehle shouldn't be too bad then
17:57 goehle if I submit a pull request to master for those 3
17:57 goehle will you take a look at it?
17:57 mgage yes
17:58 goehle is the ^ bug somethign that you want to hotfix?
17:59 mgage probably -- did you just submit that to develop?
17:59 mgage brb
17:59 goehle probabyl
17:59 goehle I dont submit to master unless asked O.o
18:00 mgage kk then -- go ahead and submit that as well -- that and the Save As:  bug were straightforward -- there is a deeper fix that I'll put into develop at some point.
18:01 goehle I dont think I did the save as bug
18:01 goehle what was the fix for that?
18:02 mgage I did that one.  brb
18:05 mgage pull request #143  -- I just took out the colon from the name of the button -- that's a hack but good enough for a hot fix.
18:05 mgage commit 076f63c427c57c74675397f95e7a6be0a346
18:05 mgage actually it looks like ^ bug had already been fixed also
18:05 goehle yeah
18:06 goehle the ^ wasn't broken in master as far as I can tell
18:06 goehle and the Save As is ok there too?
18:07 goehle looks like
18:11 mgage maybe so -- could be both these bugs were fixed in master (or were never there)
18:18 mgage we have a long term fix we should do which is to isolate the label on buttons from the code that is read to determine the action -- this will help the localization effort enormously -- they have been working around it   -- we can use the <button> html tag to handle this -- there are reports that doesn't work well in IE but I don't know which versions -- in any case that is for later.
18:24 mgage cool -- looks like we have fewer bugs already :-)
18:55 mgage joined #webwork
19:01 mgage aubreyja: hi
19:46 goehle joined #webwork
19:50 rbeezer mgage: getting back errors for AskSage, both for my new course, and Aubrey's test course from summer (code that worked in Vancouver),
19:51 rbeezer Error is identical, it seems:  "malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "(end of string)") at [PG]/lib/WeBWorK/PG/IO.pm line 231"
19:51 rbeezer I've asked Jason if  /service should be active on the sagecell, to see if the problem is there
19:52 rbeezer Any debugging suggestions?
19:59 mgage rbeezer:  I just updated the IO.pm file to include some of the debugging tools for askSage added in develop branch
20:00 rbeezer OK, I'll run it again, sec
20:00 mgage Try putting    debug => 1 in the options (as well as specifying the url exactly)  and see if you get more information -- you should get a warning type message that says exactly what command was sent to sage.
20:02 rbeezer sage callcurl -k -f -sS -L --data-urlencode "code=set_random_seed(12345)
20:02 rbeezer print 2+3" https://sagecell.sagemath.org/service at [PG]/lib/WeBWorK/PG/IO.pm line 230
20:02 rbeezer looks OK to my eye, do you see anything?
20:03 mgage my first guess is that you are getting back an empty string
20:04 rbeezer yep, my suspicion, too - that's whay I emailed Jason Grout
20:05 rbeezer I used to know how to talk to /service, but have forgotten
20:05 rbeezer might be able to find the experiment *somewhere*  ;-)
20:06 rbeezer found it  ;-)
20:06 mgage I've added a bit more debugging information -- try it again.
20:06 rbeezer k
20:07 mgage that's about all I can do on my end -- the code is really pretty simple -- the rest of the processing is taking place on the sage server.
20:08 rbeezer I'm getting *less* debugging info back now
20:11 mgage hmm -- it might be barfing when it tries to decode the json output -- try again.
20:12 rbeezer Sh*t, Jason put up a "terms of service" dialog!  (Which you see interactively normally):
20:12 rbeezer When evaluating code, you must acknowledge your acceptance of the terms of service at /static/tos.html by passing the parameter or cookie accepted_tos=true
20:13 mgage if you can send something using curl that works and shows where to put the accepted_tos parameter I can doctor the code here.
20:13 rbeezer That's got to be it: my little demo for talking to /service came back with that message about cookies, etc
20:14 mgage is it something like accepted_tos =true code=set_random_seed,  etc ?
20:16 rbeezer OK, I'll have to talk to Jason.  Thanks for helping - may be several hours until I can get back to this, or I'll try hacking now
20:22 rbeezer I tried putting  accepted_tos in the URL (with ? as separator, and I tried adding it to the Sage code.  I'm just going to pester Jason G.
20:23 rbeezer Debugging code is better - I see Sage returning at line 234, perhaps it is sending that message, which of course, is not JSON
20:23 mgage k  -- let me know -- may have to send me an email I might not be on irc
20:24 rbeezer k
20:24 rbeezer thanks for the help
20:26 rbeezer https://groups.google.com/forum/#!topic/sage-notebook/cD8GVZV5pWI
20:26 rbeezer seems to have info, reading...
20:41 rbeezer mgage:  can you make the key string look like:
20:41 rbeezer sage callcurl -k -f -sS -L --data-urlencode "code=set_random_seed(12345)
20:41 rbeezer print 2+3&accepted_tos=true" https://sagecell.sagemath.org/service
20:41 rbeezer sneak  &accepted_tos=true  at the end
20:42 rbeezer maybe I can test it,...
20:43 mgage ok -- I snuck it in at the beginning -- see if that also works.
20:44 rbeezer I see the tos falg, but all the real Sage code is gone
20:45 rbeezer It did not work for me when I added it tot he code in the pg file
20:45 rbeezer oops, I didn't see a line, code is there!
20:46 rbeezer but still errors
20:46 rbeezer it needs to go after the --data-urlencode
20:47 rbeezer as part of the string with the set_random_seed, and at the end
20:48 rbeezer with & as a separator
20:49 rbeezer this is Jason's example.  quotes are flip-flopped from how AskSage constructs
20:49 rbeezer wget --post-data='code=print "hello world"&accepted_tos=true' http://sagecell.sagemath.org/service
20:53 rbeezer working now!
20:53 rbeezer thanks, Mike, I'll communicate with Aubrey
20:53 mgage ok -- my version is what Jason G sent out -- not the version you sent but that is probably more robust.
20:55 rbeezer I like Jason's.  Ampersand is an evil reserved character.
20:59 goehle hey mgage
20:59 mgage hi
20:59 goehle moving through the list of hotfixes (with a timeout to deal with admin stuff.)
21:00 goehle which file did you modify to fix the solutions always being shown bug
21:00 rbeezer lunch break
21:00 goehle I can use blame to figure out the details
21:01 mgage I didn't fix that -- as far as I know :-)
21:01 mgage in either master or develop
21:01 goehle oh :)
21:01 goehle ok I'll take a look then
21:01 goehle should be easy in theory
21:01 mgage ty
21:05 goehle what do we want to do about the tigz_hardcopy bug
21:06 goehle if you select tigz pdf you get
21:06 goehle Can't locate object method "generate_hardcopy_tigz"
21:08 mgage just comment it out -- that was put in when Paul was going to implement the ability to get hardcopy with tikz -- something I'd still like to see but will take time -- we can put tikz in so that it prints to HTML pretty easily but last time we tried printing hardcopy involved a lot of work because pdftex couldn't handle it (or else dvipng couldn't handle it -- or both ) so we would have had to get dvips working, ghostscript and a lot of ot
21:08 mgage things.
21:11 goehle side question
21:11 goehle I think the issue is that the solutions thing is defined via
21:11 goehle showSolutions   => $showSolutions      ? 1 : 0,
21:12 goehle wait hmm
21:12 goehle hm
21:12 goehle sorry
21:15 goehle looks like the issue is a little deeper than a missing flag
21:16 goehle the problem is that PG now shows instructors hints and solutions in a little collapsible box all the time
21:16 goehle and in tex mode this just means they are always shown
21:16 mgage well not all the time -- it depends on the useKnowlsForSolutions switch
21:17 goehle ah
21:17 goehle is that Knowls
21:17 goehle ?
21:17 goehle so maybe I can turn that off
21:17 mgage yes -- that is probably where the problem comes from
21:17 goehle thanks, I didn't know about that
21:18 goehle any issues with hardcoding that as off for generate pdfs?
21:18 mgage but I'm not sure that is the solution we want -- where is showSolutions set on permanently?
21:18 mgage no probably not -- but it's not clean
21:19 goehle what is Knowls anyway
21:20 mgage it's the expanding accordion box that shows hints and solutions (AIM came up with this name for it )
21:20 goehle ok
21:20 mgage stands for a little snippet of knowledge
21:20 goehle ah
21:20 goehle well it looks like it is on in PG
21:21 goehle because even for regular problem viewing you always have the hints and solutions
21:21 goehle (in fact as far as I can tell there isn't even a show hints/solutions check box anymore)
21:21 goehle (maybe the idea is that it was keeping people from using them)
21:21 mgage not if you are a student -- it is forced on for instructors (so they can check their work)
21:21 goehle ah well thats where the issue is then
21:21 mgage and there is no need for a checkbox anymore -- however it is fouling up hardcopy
21:22 goehle si that something that's done in PG then?
21:25 mgage yes -- look at solution  and SOLUTION in PGbasicmacros  and try to figure out where $displaySolution is set -- it looks to me like if that is false then no solutions should be shown when you aren not in HTML mode
21:29 goehle ah ok
21:29 goehle so there is an always show solution permission level
21:29 goehle so is it working as intended?
21:30 goehle could just have that professor change his course options
21:33 mgage this is what was intended (also found in defaults.config) -- check the logic over https://github.com/openwebwork/pg/commit/c08948d1736ffcd0dcf4498588260efd27e41675
21:34 goehle yeah
21:34 goehle I saw
21:34 goehle so the question is
21:34 goehle do we want to change the behavior
21:34 goehle so the always show options don't apply to hardcopies
21:34 mgage I think some of those "remaining errors" have been fixed by the way
21:34 goehle it would be consistant with why they exist in the first place
21:38 mgage displaySolutionsQ in the environment is being set to 1 I think.  The question is where is this happening?
21:39 goehle as far as I can see displaySolutions is respecting the "always_show_solution" permission
21:39 goehle so if I set that to nobody
21:39 goehle then solutions are not shown in the pdf
21:41 goehle https://github.com/openwebwork/pg/blob/master/macros/PGbasicmacros.pl#L1081
21:42 goehle so if we were to change that to have an && $displayMode =~ /HTML/
21:42 goehle then that fixes it
21:42 goehle "fixes"
21:43 goehle or maybe
21:43 goehle $displayMode neq 'TeX'
21:44 mgage yes -- I think you've got it.  the rational for forcing instructors to see the solutions and hints is that that way they don't leave typos in them.
21:45 mgage that doesn't apply to hardcopy I guess.
21:46 mgage there were also worries that it would cause trouble if you showed a student something from your screen -- but if you are using knowls you only see the link for opening the knowl and if you are not you see a checkbox for displaying solutions the next time you visit the page.
21:46 mgage add the check for HTML mode -- or for non TeX mode.
21:48 mgage seem ok to you?
21:55 goehle umm, still tracking down some edge cases
21:55 goehle for example
21:55 goehle now the hints wont show for a professor
21:55 goehle unless they have teh appropriate number of attempts
21:56 goehle I'm also trying to track down the excessive Hint:
21:56 goehle Solution: Labelling
21:56 goehle but unfortuantelly I've got to go
21:56 goehle I push backports for two of the bugs
21:57 goehle and will do the other two as soon as I can
21:57 mgage me too -- I'm checking your back ports now and then I have to quit.
21:57 mgage thanks
22:14 rbeezer mgage: please look at email when you can, there is a warn outdide the if-debug section

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