Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2014-07-29

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

All times shown according to UTC.

Time Nick Message
14:55 theseb joined #webwork
14:56 shdw_work joined #webwork
15:55 aubreyja joined #webwork
15:55 aubreyja joined #webwork
15:58 theseb aubreyja: hello
15:58 theseb aubreyja: got my email?
16:05 aubreyja hi theseb - yes, just saw it. I think that this should be fairly easy to do, depending on where you want to put the link.
16:05 aubreyja Let me just check on something...
16:05 theseb aubreyja: how about adding a new link to the main menu on the left?
16:06 theseb aubreyja: actually.one more thing....another more pressing matter came up...i did your ww_install script on a plain Amazon EC2 instance and it has trouble loading some JS files that appear to cause one NOT to be able to add new problems to homeworks
16:13 aubreyja ok, I'm not sure it's an install script problem, but go ahead and add an issue report to the github repo and I'll take a look at it.  The more detail you can provide the better.
16:14 theseb aubreyja: ok
16:14 theseb aubreyja: you really think the custom link thing will be easy?
16:14 theseb is it just a matter of adding a link to some file somewhere?
16:14 aubreyja So, you get variables like $studentLogin, etc., for free in PG. That's why Mike pointed you to the PG macros
16:14 aubreyja So, for example, in a set info box (or problem) you could do something like
16:15 aubreyja Go to this url: http://this.com/here&student=$studentLogin
16:15 aubreyja probably safter to use the htmlLink macro though for hardcopy output
16:17 theseb aubreyja: and is the course var just $course?
16:17 theseb aubreyja: i did try printing the PG macro stuff and ran into trouble
16:18 aubreyja You can find out all of the environment variables as follows: Make a new blank problem. Add PGinfo.pl to the loadmacros, and then call listVariables() before the BEGIN_TEXT block.  Then look for environment variables. You'll get a whole lot more too.
16:22 theseb aubreyja: hey! nice!.... $courseName is there
16:22 theseb 1000 thank yous
16:22 aubreyja To add the link to the main menu, go to line 697ish of ContentGenerator.pm. I would have to play around with it a little to get the synatx right, but all of the info you need is there too, albeit likely in a different hash (since PG isn't loaded there, but $ce is)
16:23 aubreyja np
16:29 theseb these links are something users would need to see often....a problem set doesn't seem like the best place..is it easy to put somewhere more visible?
16:29 theseb i know you just pointed me to ContentGenerator.pm for the main menu...if there is an easier way to add it somewhere else I'd be happy to do that instead
16:31 aubreyja Yeah, the main menu (via ContentGenerator.pm) is probably your best bet.  There is the course_info.txt, but PG isn't loaded there.  You might be able to get the info into course_info.txt by picking it from the page via javascript.  But, I'd probably just put it into the main menu.
16:32 theseb aubreyja: hey that's a cool out of the box idea..using JS
16:34 theseb brilliant...i like it
16:37 theseb aubreyja: oh one last thing..i'm a little discouraged about that JS bug i mentioned about 30 min ago because Prof. Gage said he couldn't reproduce it....I could place a bug report still if you wish....i can reproduce the bug on a throwaway Webwork 2.9 install I made using your script if you want to see the bug in action
16:38 theseb i can give you login info if you wish
16:48 aubreyja sorry - back. Sure - I've got some things I have to take care of now, but I can probably look at it this afternoon.
16:48 theseb aubreyja: ok..i'm going to pm you the keys to the kingdom..sec
16:55 mgage joined #webwork
17:02 aubreyja theseb - I notice you have the develop branch of ww2. Could you switch it to master and restart the server. Not sure but that might have something to do with it.
17:03 theseb aubreyja: lol...ok....wait...i just mindlessly ran your script.....is the script set to pull from dev branch?
17:03 theseb aubreyja: i pulled it from your git repo here: wget https://raw.github.com/aubreyja/ww_install/ww3/install_webwork.sh
17:04 theseb then did bash install_webwork.sh like the docs said to do here on this blog..http://webworkgoehle.blogspot.com/2014/06/release-29-changes.html
17:05 aubreyja ah...I see.  Actually, we did some work on it at a code camp and had it pulling develop.  I don't think we still want that, but in any case it should be nearly the same as master.  I'll have to double check that.
17:06 theseb aubreyja: this script is gold...i predict no one will want to install webwork any other way when they get a taste of it in action
17:06 aubreyja thx
17:07 aubreyja Are you also noticing the library browser not updating thechapters and sections when you change the subject?
17:08 theseb aubreyja: sometimes i will try to view a new set in the standard library and it will spin and spin....when i logged out and logged back that seemed to fix
17:08 aubreyja Do you have a file webwork2/htdocs/library-tree.json?
17:10 theseb i changed the handler to webwork instead of webwork2..dunno if that is bad....regardless...
17:10 theseb neither http://54.86.103.23/webwork/htdocs/library-tree.js
17:10 theseb nor http://54.86.103.23/webwork2/htdocs/library-tree.js
17:10 theseb load
17:10 theseb http://54.86.103.23/webwork/htdocs/library-tree.js gives this error...
17:10 theseb Course 'htdocs' not found: No such file or directory at /opt/webwork/webwork2/lib/WeBWorK.pm line 309.
17:10 aubreyja can you check on the disc?
17:10 theseb sure...sec
17:11 aubreyja actually, it would be http://ipaddress/webwork2_files/library-tree.json. I can see that you have it.
17:12 theseb yes i see library-tree.js and WeBWork.pm on the disc
17:12 theseb aubreyja: how make your script pull the latest stable ver? maybe i should just try that
17:13 aubreyja you can just go into webwork2/ and do git fetch, and then
17:14 aubreyja actually, before (or after you do that) do git branch and lemme know what it says
17:14 theseb aubreyja: % git branch
17:14 theseb master
17:14 theseb * ww3
17:15 theseb i did git fetch in /opt/webwork/webwork2 dir and it seems nothing happened
17:15 theseb [webwork root /opt/webwork/webwork2] # git fetch
17:15 theseb [webwork root /opt/webwork/webwork2] # git fetch
17:15 theseb [webwork root /opt/webwork/webwork2] # git fetch
17:15 theseb is there some path to change in your script ?
17:15 aubreyja that's just to register any remote branches that the original pull might not have the metadata for.
17:16 theseb wouldn't it be better to build the latest rather than build the dev and then upgrade?
17:17 aubreyja in your site.conf, what is your server_root_url?
17:17 theseb $server_root_url = "http://localhost";
17:18 theseb i postponed sorting out domain name on this throwaway test machine til later..is that bad?
17:18 aubreyja ah, change that to your ip address, restart and then let's have a look.
17:18 mgage joined #webwork
17:19 theseb ok restarting
17:19 theseb done
17:19 theseb still can't add :(
17:20 theseb oh wait..messed up..sec
17:21 theseb in general though do you think having all domain name stuff trashed can mess up js?
17:22 theseb $server_root_url = "http://54.86.103.23";
17:22 aubreyja well, it could. What's happening is that there are js/ajax calls that are dieing
17:24 theseb with that IP address specified now i can't view problems?!
17:24 theseb Error messages
17:24 theseb Undefined subroutine &WeBWorK::PG::Translator::fileFromPath called at /opt/webwork/pg/lib/WeBWorK/PG/Translator.pm line 543.
17:24 aubreyja where are you looking?
17:24 theseb OPL
17:25 aubreyja via the library browser?
17:27 aubreyja ah, maybe this is the problem. Go to webwork2/conf
17:27 aubreyja do you have webwork.apache2-config or webwork.apache2.4-config?
17:28 theseb let me see ..sec
17:29 theseb webwork.apache2.4-config
17:29 theseb # ls webwork.apache*
17:29 theseb webwork.apache2.4-config       webwork.apache2-config.dist
17:29 theseb webwork.apache2.4-config.dist  webwork.apache-config.dist
17:29 theseb so i have 3 dist files but a 2.4-config being used it seems
17:30 aubreyja ok, and when you do apache2ctl -V what is the Server version?
17:31 theseb aubreyja: that gave a lot of info i pasted here: http://www.heypasteit.com/clip/1GWP
17:31 theseb Server version: Apache/2.4.7 (Ubuntu)
17:32 theseb AH00557: apache2: apr_sockaddr_info_get() failed for webwork
17:32 theseb AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message.
17:33 mgage the work around for the Translator error is to change line 543 so that the function called is WeBWorK::PG::IO::fileFromPath     — spent most of yesterday trying to track down the root cause.   no luck   http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3406
17:33 aubreyja don't worry about that, but I think I see the problem. The internal webservice calls are trying to hit http://ipaddress/webwork2/instructorXMLHandler
17:33 aubreyja but you probably need it to hit http://ipaddress/webwork/instructorXMLHandler
17:34 theseb aubreyja: yes i did specify /webwork in your install script..sounds like that is a no no
17:34 theseb to change the handler
17:34 aubreyja well, it shouldn't be. I think the problem is that webwork2 is hardcoded somewhere it shouldn't be.
17:34 aubreyja just a sec
17:35 theseb ah makes sense...hopefully that is useful info for you guys
17:36 mgage you said the call was from a javaScript   ??  it probably is hardwired there.
17:36 aubreyja ok, yes, go to lib/WeBWorK/ContentGenerator
17:36 aubreyja and look at instructorXMLHandler.pm
17:37 aubreyja line 124
17:37 aubreyja $FORM_ACTION_URL looks like a problem
17:37 theseb i see that
17:38 theseb well i must go ...i'll be back later
17:38 aubreyja instead of /webwork2/ we should have something like $webwork_url
17:38 theseb thanks again for all the help....i'll be back in a bit
17:38 aubreyja that sound right Mike?
17:39 aubreyja so we need my $webwork_url = $seed_ce->{webwork_url}; above too
17:39 mgage yes.  — when Christian looked at the Chrome webDeveloper output he was getting errors for instructorXMLHandler not found — having webwork2 hard coded would cause that problem.
17:40 mgage the fix is easy if we are in perl code.  — there may be some hardcoded instances in javaScript that take more work.
17:40 aubreyja sure, but should at least solve that particular 404
17:41 mgage I’m going to submit a pull request for the work around for the fileFromPath function — it doesn’t solve the deeper problem but it will reduce the number of people running into the problem when they upgrade
17:41 mgage yes — it needs corrects that particular 404.
17:41 aubreyja kk
17:42 mgage the fielFromPath problem is something genuinely weird about Exporter — either an actual bug, or a nuance that I’ve never understood all these years.
17:43 aubreyja btw, I wanted to follow up on the question from a while back about the AskSage function.
17:43 mgage kk
17:43 aubreyja I put it into IO.pm b/c I was just following the convention of other 'dangerous' io type functions.
17:44 aubreyja In particular, I probably thought it *had* to go there to be allowed to do what it's doing.  But maybe that's not the case, in which case it doesn't need to be there.
17:45 mgage kk — I think I won’t move it right now because enough is going on, but I might move it to PGcore — where it would also work and where it would have access to the course environment.  That means it would know where the “curl” function is stored which would save some complexity
17:46 mgage as it turns out the AskSage stuff is not, as far as I can tell, the cause of all the drama with Exporter and perl 5.18
17:46 aubreyja Ah, to know where the curl function is, you could use IPC::Cmd qw(can_run), then do $curl = can_run('curl') and it will return the full path if curl is on the system.
17:46 aubreyja I've been doing that a bunch in the install script.
17:47 mgage AskSage does use a command line command, but it doesn’t do any disk access which was the main “dangerous” activity we wanted quaranteed in IO.pm
17:47 aubreyja ah, ok.
17:48 aubreyja In fact, we could use that technique to find the paths programmatically that are now hard coded into defaults.config
17:48 mgage the IPC command is potentially useful — you took the words out of my mouth
17:48 mgage errr keyboard
17:48 aubreyja :) - it's been working like a charm for me.
17:49 mgage more often they were coded into sites.conf
17:49 aubreyja ah right - and it's standard perl - so it's no additional installation overhead.
17:51 mgage I got ubuntu 14.04 running on Vagrant,  more or less by running your install script my hand after bringing the machine up.  I’m ready to do some more of that when you have the modified script.  If I remember right I still had to cpan Mail::Sender,  XML::Parser::Easytree and File::Find::Rule
17:52 mgage also for some reason the version of cpan on the ubuntu kept trying to first ungzip files and then untar them  rather than use tar -zxf file….
17:52 aubreyja Yeah, sorry about the delay - my testing scheme screwed up yesterday  - still working on it, but I'll have the kinks worked out soon.
17:52 aubreyja Hmm...was that causing an error?
17:52 mgage it was giving error messages of running out of space (it was only a 1/2 Gb machine)
17:53 mgage not sure I actually believe the error message.  unpacking and making the things by hand always worked, but it was a bit of drag
17:53 aubreyja That's strange - I've been considering converting to cpanm, which is less of a hassle in many ways
17:54 aubreyja but doesn't exist on all platforms (that is, needs perl 5.10 or 5.12 or something like that, which isn't yet on all platforms)
17:54 mgage I’ve heard good things about it.  Maybe hold off a revision or two until this is stable. — I want to try this whole installation thing again before I actually report this as an error.
17:54 mgage I’m ready to abandon 5.8,   but not 5.10
17:55 aubreyja sure - that sounds reasonable
17:55 mgage current versionis 5.20 I think
17:55 aubreyja give me about an hour and I'll have the --no-interactive switch working correctly
17:56 mgage kk — I can even work without that — I just don’t want to start reporting missing cpan modules and so forth that you have already fixed.
17:57 aubreyja I'm not fixing any of those in this commit - so report away on those
18:17 mgage joined #webwork
18:34 mgage joined #webwork
18:50 mgage joined #webwork
19:45 mgage joined #webwork
19:49 aubreyja Hi mgage - I have a new options branch
19:49 aubreyja in ww_install
19:49 mgage ok
19:49 aubreyja so, wget --no-check-certificate https://...../options/install_webwork.sh (instead of /ww3/)
19:50 aubreyja it's only lightly tested at this point
19:50 aubreyja and I haven't passed the root mysql password to debconf yet
19:50 aubreyja but otherwise I think it works
19:51 aubreyja I'm going to head home now, but I'll be back on in about 45mins
19:51 aubreyja (it takes 20mins to get home, but I'm building in time to walk the dog and get settled in :)
19:52 mgage kk — ttyl

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