Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2013-05-01

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

All times shown according to UTC.

Time Nick Message
00:30 mgage_ joined #webwork
00:30 mgage_ goehle: hi
00:31 mgage_ goehle_
00:31 goehle_ hey
00:31 goehle_ figured it out I think
00:32 mgage_ cool -- if it's not to late I'd like to suggest that we base this off release/2.7 -- I'm hoping to have that out in a few weeks and this would be an additional reason for people to upgrade.
00:32 mgage_ the security issue has been there for at least the last 5 years so it can't be that urgent
00:32 goehle_ yeah
00:32 goehle_ master was too hard to work with for me
00:32 mgage_ kk
00:32 mgage_ what I do is to just create a new repo
00:33 mgage_ -- I have one based on openwebwork which I use for combining new contributions and another one for my mgage repo where I do avant guard stuff
00:37 goehle_ one annoyance is that people have to update both pg and webwork
00:37 goehle_ but that should be fine
00:37 goehle_ (I had to add CGI to the pg modules in defaults.conf which is webwork so I could use CGI::escapeHTML in PGbasicmagros
00:38 mgage_ that's fine -- it should really be used in other places as well.  (although CGI might be a bit heavy weight for just making sure the HTML tags are well formatted and up to date.)
00:38 mgage_ that's done fairly consistently in webwork2 but pg is older code
00:39 goehle_ I could use a different module if you want
00:39 mgage_ only if you think there is something clearly better.  we're already committed to it for webwork2 so I don't think there is a big advantage in finding another one for pg
00:40 goehle_ there are others
00:40 goehle_ URI::escape comes to mind
00:40 goehle_ that might already be installed
00:40 mgage_ I'm not sure that does exactly the same thing -- I think it uses a different escape code -- and I believe it is already there.
00:40 goehle_ (it is)
00:41 goehle_ that was my only thought
00:44 goehle_ can you think of a place where I can find a problem that uses answer_box?
00:44 mgage_ try the differential equation problems -- those are often long
00:45 mgage_ you can also do   grep -R answer_box in, say the Library/Rochester -- I'm sure you will turn up one
00:46 goehle_ I think I got at least a preliminary fix
00:46 goehle_ but its touched half a dozen files
01:10 goehle_ eh disregard those pulls
01:10 mgage_ k -- I think you can close them yourself
01:10 goehle_ I did
01:11 goehle_ I just didn't want you to reopen them
01:11 goehle_ whatever I did broke gateway quizzes
01:11 mgage_ k
01:14 goehle_ I dont suppoes you have any insight as to why
01:14 goehle_ $answer_value = CGI::escapeHTML($answer_value);
01:15 goehle_ works for regular questoins but on quizzes I get
01:15 goehle_ Can't locate object method "new" via package "WeBWorK::CGI" (perhaps you forgot to load "WeBWorK::CGI"?) at /usr/share/perl/5.14/CGI.pm line 483
01:15 goehle_ that error
01:15 mgage_ that that use CGI::escapteHTML;  is at the top of the file
01:15 mgage_ or perhaps use CGI;
01:16 goehle_ if only.  This is in PGbasicmacros
01:16 goehle_ I put CGI in ${pg}{modules}
01:16 mgage_ then you need CGI in default.conf
01:16 goehle_ I did
01:16 goehle_ and it does work for regular problems
01:17 mgage_ why iis it callyg WeBWorK::CGI and not just CGI?
01:18 goehle_ hmm thats a good question
01:18 goehle_ I dont know
01:18 goehle_ its CGI::escapeHTML in the macro
01:21 mgage_ there is a webwork2/lib/WeBWorK/CGI
01:22 mgage_ I don't know that we did this consistently but I think this was put in because some of the CGI.pm versions had inconsistent responses -- particularly with pop up lists -- they treated the label 0 badly
01:29 goehle_ yeesh now I'm getting
01:29 goehle_ ##Can't locate object method "request" via package "Apache2::RequestUtil" (perhaps you forgot to load "Apache2::RequestUtil"?) at /usr/share/perl/5.14/CGI.pm line 367.
01:29 goehle_ that seems unlikely somehow
01:34 mgage_ looks like I converted most of the files to use WeBWorK::CGI somewhere around 2006. (although Sam added the WeBWorK::CGI file) -- I think we were having trouble with unstable versions of CGI at the time.
01:34 goehle_ right
01:34 goehle_ when I included
01:34 goehle_ WeBWorK::CGI in defaults.conf
01:34 goehle_ I got that Apache2::RequestUtil error
01:34 mgage_ and we needed control so that we didn't get error messages from people who had the wrong CGI version installed
01:35 goehle_ I still dont understand why
01:35 goehle_ CGI::escapeHTML
01:35 goehle_ is calling CGI::escapeHTML for Problem.pm
01:35 goehle_ but WeBWorK::CGI::escapeHTML for Quib
01:35 goehle_ GatewayQuiz.pm
01:36 goehle_ shouldn't those both just call PG?
01:38 goehle_ is it possible that "main" is somehow under webwork for the GatewayQuiz
01:38 goehle_ but at the top level for Problem
01:39 goehle_ (I dont even know if thats actually a possible thing)
01:39 mgage_ no -- they are both under Safe::Root in any case.
01:40 mgage_ I don't know  I tried grep -R "use CGI * and almost all files  including Problem and Gateway use  WeBWorK::CGI
01:40 goehle_ yeah this is wierd PG stuff though
01:40 goehle_ for example
01:41 goehle_ if I put WeBWorK::CGI in defaults.conf
01:41 goehle_ and call
01:41 goehle_ CGI::escapeHTML in PGbasicmacros
01:41 goehle_ it actually ends up calling WeBWorK::CGI::escapeHTML when I use Gateway quiz
01:42 goehle_ but a regular problem complains that it doesn't know what CGI::escapeHTML is
01:42 goehle_ i.e. when I call a subroutine when running a problem under a gateway
01:42 goehle_ it prepends WeBWorK onto the package
01:43 mgage_ I'm not sure why that is without experimenting -- however it might be tricky to include WeBWorK::CGI into PG without including CGI since WeBWorK::CGI calls CGI
01:43 mgage_ and safe doesn't like it when an included module calls outside it's know stack
01:44 goehle_ hmm
01:44 goehle_ well ok
01:44 mgage_ I suspect that might not be exactly what is happening but I don't know what is
01:44 goehle_ when CGI is called in omst of the files its called as
01:44 goehle_ WeBWorK::CGI
01:44 mgage_ right -- but there are no examples of using CGI anywhere inside PG and there might have been a reason that I've forgotten
01:45 mgage_ CGI is kind of fancily written with a lot of runtime evaluation -- just the kind of think Safe hates.
01:45 goehle_ so maybe I should use something else then
01:45 goehle_ I could do it ad hoc
01:46 goehle_ http://search.cpan.org/dist/HTML-Parser/lib/HTML/Entities.pm
01:46 goehle_ or I could use that
01:47 mgage_ HTML::Parser is already included -- that might be why
01:48 goehle_ yeah
01:48 goehle_ I think CGI is just incompatible
01:48 mgage_ it was used in an early version of the student input parser -- that at least means it has worked in the past.
01:48 goehle_ that worked like a charm
01:49 mgage_ sounds good -- I'm not sure why you got the error -- but now that I think of how CGI is written I can see why it might not work in PG
01:49 goehle_ yeah, too many autogenerated function things
01:49 mgage_ HTML::Entities seems like it should work as well and be lighter weight
01:49 mgage_ exactly
01:50 goehle_ ok, well I think I have a fix implemented
01:50 goehle_ but its been more splashy than I like
01:50 goehle_ the git diffs seem pretty minimal though
01:50 goehle_ I'll reissue the pull request and hopefully I didn't break anything :(
01:50 mgage_ kk -- thanks
01:58 goehle_ ok, off to bed.  thanks for letting me bug you all day
01:58 goehle_ left #webwork
01:58 mgage_ 'night ttyl
03:17 mgage_ joined #webwork
13:05 goehle joined #webwork
14:47 rbeezer joined #webwork
16:39 aubreyja joined #webwork
16:50 Paul_Pearson joined #webwork
17:57 Paul_Pearson joined #webwork
18:25 Paul_Pearson joined #webwork
18:43 Paul_Pearson joined #webwork
20:57 Paul_Pearson1 joined #webwork
21:09 Paul_Pearson joined #webwork
23:17 mgage_ joined #webwork
23:24 Paul_Pearson joined #webwork

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