Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2014-10-03

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

All times shown according to UTC.

Time Nick Message
00:30 rbeezer joined #webwork
12:59 goehle joined #webwork
14:15 shdw_work joined #webwork
14:45 rbeezer joined #webwork
15:53 aubreyja joined #webwork
15:53 aubreyja joined #webwork
18:16 theseb joined #webwork
18:16 theseb help! when i set up a quiz it keeps asking for proctor username and password!?
18:17 theseb i created a user account called proctor but people are saying that didn't solve the problem
18:17 theseb must you create the proctor account in a special way?
18:20 goehle theseb:  Is your quiz a "proctored gateway" in the homework type (when you look at the set detail page)?
18:20 goehle If it is, it should just be gateway
18:20 theseb either way i get the same issue....a post on forum said some people have this ghost problem
18:21 theseb (everything is proctored even when it isn't)
18:25 theseb goehle: the poster said it may be a bug in perl itself..i don't know
18:25 theseb but it is annoying
18:25 goehle do you have a link to the forum post?
18:26 theseb yes
18:26 theseb sec
18:26 theseb goehle: http://webwork.maa.org/moodle/mod/forum/discuss.php?d=3491
18:26 theseb goehle: please help..i'm desperate
18:27 goehle if it is a perl bug then I'm not going to be able to do anything except fix it up stream
18:28 theseb goehle: well *i* don't know how he knows its a perl bug
18:28 theseb he may be guessing..either way it is bad
18:29 theseb the problem is reproducible on my server
18:29 theseb if that helps
18:30 goehle how do you reproduce it?
18:30 theseb EVERY exam not matter what the settings asking for proctor stuff
18:30 theseb asks*
18:30 theseb so i just set up any exam and i see the problem
18:31 goehle that certainly isn't happening on all default intallations
18:31 goehle so there must be something that happened earlier
18:31 goehle with some sort of config
18:31 theseb goehle: i installed webwork on a virgin amazon ubuntu instance with that install script that is floating around from one of your devs
18:31 theseb Jason i think is his name
18:31 theseb Aubrey
18:32 theseb so i don't think i did any funny business...my server is pretty darn standard
18:32 goehle I believe, you, but I just made and tested a gateway exam and it worked
18:32 goehle so there is some other element
18:32 theseb goehle: hmmm
18:32 theseb goehle: so Alasdair and myself both did something that triggered this problem
18:33 theseb it would be nice to know what that was
18:34 theseb goehle: do you know of any settings i can try to toggle to see if problem goes away?
18:37 goehle what are your retake/scoring settings for the test?
18:38 theseb goehle: let me make a screenshot and give you link
18:38 theseb sec
18:40 theseb goehle: https://philfour.com/static/pic.png
18:46 goehle when you click on one of the gateways you should see 'proctored_quiz_mode' in the address
18:46 goehle try replacing that with 'quiz_mode' and tell me what happens
18:47 theseb Are you referring to the "Assignement type" drop down?
18:47 theseb that has 3 choices only
18:47 goehle no
18:47 goehle go to the problem sets page
18:47 goehle and click on one of your gateway tests
18:47 goehle so that you are taken to the proctor/login page
18:48 theseb ok
18:48 theseb there
18:48 theseb it is asking for proctor username and password
18:48 theseb there is no place to select a different "gateway" unless i'm mis
18:48 theseb understanding
18:48 goehle in the browser address replace proctored_quiz_mode
18:48 theseb something
18:48 goehle with quiz_mode
18:48 theseb ah!
18:48 theseb that worked!
18:49 theseb what the @#@#?
18:49 theseb goehle: you made progress!]
18:49 theseb goehle: so that means SOMEWHERE in Webwork it redirects to the wrong url?
18:50 theseb goehle: i just thought of an ugly hack....i can make apache automagically to the redirect you just suggested
18:50 goehle :(
18:51 theseb s/to/do
18:51 goehle It might work in the short term, but it would break proctored quizzes
18:51 theseb goehle: yea...at least it is better than asking little Johnny to hand hack a url :)
18:52 theseb goehle: i never do proctored quizzes
18:52 goehle yeah, give me a second
19:43 goehle still there theseb?
19:46 theseb yes
19:46 theseb got something better than my apache hack idea?
19:46 theseb :)
19:47 goehle do a
19:47 goehle git pull https://github.com/goehle/webwork2.git gatewaybug
19:47 goehle and see if that fixes your problem
19:47 theseb k sec
19:47 goehle also could you test something for me
19:48 goehle go to the problem set detail page for one of your gateway sets
19:48 theseb what directory should i be in ?
19:48 theseb i'm listening
19:48 theseb i don't see .git in /opt/webwork
19:48 goehle click edit for a problem
19:48 goehle and then view
19:48 goehle you should be /opt/webwork/webwork2
19:48 goehle or any subdirectory of that
19:48 theseb ah
19:49 theseb goehle: to be safe...can i copy /opt/webwork/webwork2 and then restore it if I want to revert the git pull?
19:49 goehle hmm
19:49 goehle good point
19:49 goehle its not a copy
19:49 goehle what branch are you on now
19:49 goehle wait
19:49 goehle just do
19:49 goehle git checkout origin/master
19:49 goehle then do the pull command
19:49 goehle then you can checkout whatever branch you were on before
19:49 goehle and it will revert the changes
19:50 theseb ok i'm trying to edit a
19:50 theseb problem from one of the tests
19:50 theseb what should i be looking at?
19:51 goehle does it ask for your proctor password when you try to view the problem?
19:51 theseb no
19:51 theseb ok wait
19:51 theseb i clicked on View and Take Action and got this error...
19:52 theseb Proctor authorization requested for a nonexistent set?
19:52 theseb The information below can help locate the source of the problem.
19:52 theseb in WeBWorK::ContentGenerator::LoginProctor::body called at line 155 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
19:52 theseb in WeBWorK::Template::template called at line 530 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
19:52 theseb in WeBWorK::ContentGenerator::content called at line 202 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
19:52 theseb in WeBWorK::ContentGenerator::go called at line 370 of /opt/webwork/webwork2/lib/WeBWorK.pm
19:53 theseb i can view it but i only get that error if i press
19:53 theseb the
19:53 theseb Take Action
19:53 theseb button
19:53 theseb while
19:53 theseb on the View tab
19:54 goehle yeah
19:54 goehle I was a little worried about that
19:55 theseb is that bad?
19:55 goehle does that pull fix your original issue?
19:55 theseb goehle: just to check one thing before the pull since i have unchecked local changes....
19:56 theseb goehle: before the pull if I do cp -R /opt/webwork/webwork2 /opt/webwork/webwork2.backup
19:56 theseb later I can nuke the new webwork2 and just do mv webwork2.backup webwork2 to go back right/
19:56 theseb ?
19:56 goehle dont worry about that
19:56 goehle you can do
19:56 goehle git stash
19:56 goehle if you have uncommited local changes
19:56 goehle then checkout origin/master
19:56 goehle pull the pull request
19:56 goehle test
19:56 goehle then checkout your original branch
19:57 goehle and do
19:57 goehle git stash pop
19:57 goehle and it will reimplement all of your uncommited changes
19:57 theseb ok...secf
19:57 theseb sec i mean
20:00 theseb it is saying i need to stash changes to ContentGenerator.pm
20:00 theseb first
20:00 theseb ok stashed
20:00 theseb did pull
20:00 theseb rebooting now
20:01 theseb now apache won't start
20:02 goehle one sec, I have a student
20:13 goehle what is the apache error?
20:13 theseb sec
20:16 theseb http://pastebin.com/HT8Y6iNB
20:16 theseb goehle: there it is
20:16 goehle ah, your pg is behind a little bit
20:16 goehle go to /opt/webwork/pg
20:16 goehle git checkout origin/master
20:16 goehle maybe even
20:16 goehle do
20:16 goehle git fetch origin
20:17 goehle then
20:17 goehle git checkout origin/master
20:17 goehle just to make sure you have the latest one
20:18 theseb it starts now
20:18 theseb now to check the exams
20:18 theseb ...the moment of truth....
20:20 theseb it seems to work now
20:20 goehle good
20:21 theseb goehle: by the way...i did the fetch origin and checkout origin/master commands
20:21 theseb in both the pg and webwork2 dirs
20:21 theseb is that ok?
20:21 goehle yeah
20:21 theseb goehle: how many files did you change?
20:21 goehle you can do git checkout master (if master was the branch you were using)
20:21 goehle in both directories to get rid of the fix
20:22 goehle you should probably do a git pull master in both directories though
20:22 goehle to get the latest hotfixes
20:22 theseb goehle: ok...i was using master before so i'll to git pull master now
20:22 goehle of course
20:22 goehle once you go back you will need to pull my changes in again as well
20:22 goehle if you want them
20:23 theseb fatal: 'master' does not appear to be a git repository
20:23 goehle git pull origin master
20:23 goehle rather
20:25 theseb it said Already up-to-date
20:25 theseb that's all
20:25 goehle for both directories?  then you are good
20:25 theseb so i assume your changes
20:25 theseb will get folded into main branch
20:25 goehle eventually
20:25 theseb so that in 1 year when we make a new server
20:26 theseb it will be there ?
20:26 goehle yeah, they will be there by then
20:26 theseb goehle: what was the problem? was it simple?
20:26 theseb to explain i mean?
20:27 goehle not really.  In order to increase security new versions of perl randomize the order in which they load modules into memory.  That means that instead of always being loaded alphabetically, modules are now loaded randomly.  This has caused a bunch of bugs in WeBWorK to suddenly become visible.  For example, when the system looks for a gateway link, it can find either the proctor link or the non proctor link, but before it always found the proctor link and thi
20:27 goehle ngs were set up to work that way.
20:28 goehle Now that the modules are randomized it finds either
20:28 goehle and not in the right way.  I had to fix it so that it would always find the right module, no matter which was loaded first
20:30 theseb ah nice.....thanks for the help..so your commands
20:30 theseb basically updated my source to the latest and applied your code
20:30 goehle right
20:30 theseb i guess there is no reason to
20:30 theseb do git checkout master to revert back then?
20:31 goehle not unless you were working on something else and have stashed changes that you care about
20:31 theseb how can i merge my stashed changes with your changes?
20:32 goehle do
20:32 goehle git checkout master
20:32 goehle git stash pop
20:33 goehle git pull https://github.com/goehle/webwork2.git gatewaybug
20:33 goehle and if you are lucky there wont be any conflicts
20:34 theseb git checkout master will revert all back?
20:34 theseb what will stash pop do?
20:34 goehle stash pop will apply any uncommited changes you had made to master
20:41 theseb i have a merge conflict with ContentGenerator.pm
20:41 theseb how can i undo the stash pop?
20:41 goehle git reset --hard
20:42 theseb goehle: so now i have YOUR changes and i just need to add my own local changes back by hand?
20:42 theseb i can live with that
20:43 goehle if you do git stash pop
20:43 goehle and there are conflicts
20:43 goehle you can go to the file where the conflicts are listed
20:44 goehle and look for
20:44 goehle <<<<<<<<<<<<<<<<<<<<
20:44 goehle code
20:44 goehle ===================
20:44 goehle conflicting code
20:44 goehle >>>>>>>>>>>>>>>>>>>
20:44 goehle and resolve the conflcits that way
20:44 goehle it may be faster than redoing everything
20:48 theseb just curious...instead of git reset --hard couldn't i also have done git checkout master....it seems git checkout master makes local code be EXACTLY like the  master branch with no deviations?
20:48 goehle almost
20:48 goehle master is your local branch
20:48 goehle so once you did git stash pop
20:48 goehle master had changed
20:48 goehle you coudln't do git checkout master, because you were already on it
20:48 goehle git reset --hard
20:48 goehle resets master to its last commit
20:49 goehle if you always want a perfectly clean copy of master then do git checkout origin/master
20:49 goehle you cant save changes on that branch though
20:50 theseb goehle: ah so there's never anything to worry about with trying your patches because git checkout origin/master is like the great undo command
20:51 goehle sort of.  git checkout origin/master checks out a temporary fresh copy  of master, so you can do whatever you want to it
20:51 goehle but it wont undo changes you made to your local master branch
20:51 goehle that is what git reset --hard does
20:52 theseb ok i did git stash pop again
20:52 theseb so you're saying i can go into ContentGenerator.pm to fix the conflict and then what?..do git stash pop a second time?
20:52 goehle did that work?
20:52 goehle well git stash is a stack
20:52 goehle so popping again may not do anything
20:53 theseb does this mean anything for ContentGenerator.pm conflict?..
20:53 theseb <<<<<<< Updated upstream
20:53 theseb $result .= CGI::end_form() . "\n";
20:53 theseb
20:53 theseb =======
20:53 theseb $result .= CGI::endform() . "\n";
20:54 theseb
20:54 theseb >>>>>>> Stashed changes
20:54 goehle yeah, thats a conflict
20:54 theseb how fix?
20:54 theseb i only have 2 of those
20:54 theseb that's the entire "conflict"
20:54 theseb which should i keep?
20:54 theseb end_form version?
20:55 goehle it depends on the code, there isn't a set rule.  IN this case it is the end_form version
20:55 theseb so replace everything in snippet above with the 1 line...   $result .= CGI::end_form() . "\n";  ?
20:55 goehle should work
20:56 theseb ok done..do i need to do anything after i edit that file
20:56 theseb ?
20:56 goehle restart your server
20:56 theseb like say "ok git..try to merge again" ?
20:56 goehle nope, thats the merge
20:56 goehle normally you would commit your changes
20:56 goehle so t hat could be a good idea
20:57 goehle git commit -a
20:57 theseb ah thank goodness...all looks good now
20:57 theseb thank god
20:57 theseb i got like 11 classes that rely on this server!
20:57 theseb over 100 students
20:57 theseb you've been a great help
20:57 goehle np

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