Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2014-02-19

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

All times shown according to UTC.

Time Nick Message
01:27 mgage joined #webwork
02:10 hotdogs joined #webwork
02:11 hotdogs hello, doing a huge upgrade from 2.4.x to master, trying to run OPL-Update and getting lots of "Invalid subject" messages, any pointers?
02:19 hotdogs I found some IRC logs about it, but nothing conclusive
03:04 mgage joined #webwork
04:21 mgage hotdogs:
04:21 mgage hi
04:21 hotdogs hello
04:22 mgage did you update the library to webwork-open-problem-library?
04:22 hotdogs yeah, using master from that too
04:23 mgage did you set the version to 2.5 (as opposed to 2.0  in the config files? (I think 2.5 is the default now)
04:24 hotdogs yeah, I had to fiddle with those settings because I put it at a different path
04:24 mgage the path isn't a problem although make sure you are pointed at the new library and not some old copy
04:25 mgage there is a file that lists the valid tags -- there is probably a conflict between that and some of the tags in the problems themselves.
04:27 mgage I think they are the taxonomy files at the top level
04:28 hotdogs I'll check it out tomorrow, I'm at home right now
04:31 mgage ok -- I think your error is coming from line 510 of OPL-update -- - and it's some kind of mismatch between the taxonomy and the problems.  John Jones at ASU is the expert on this.  You might run the update twice
04:31 mgage here is the most relevant reference:  http://webwork.maa.org/pipermail/webwork-devel/2013-October/001310.html
04:34 hotdogs heh, I found that post, but since I pulled the repo down today I didn't think it was relevant.  Didn't think about running it twice, though... :)
08:48 v101 joined #webwork
08:48 v101 left #webwork
13:38 goehle joined #webwork
15:21 shdw_work joined #webwork
15:47 rbeezer joined #webwork
16:09 aubreyja joined #webwork
16:09 aubreyja joined #webwork
17:32 shdw_work ugh I think I'm completely lost.  Trying to modify StudentProgress.pm to provide a third view for our instructors
17:34 shdw_work basically they want a list by student name (like the 'progress by sets' shows), and for each student they want to show their total score (percentage based on score/out of), and then the score for each homework set
17:35 shdw_work and the list is filtered by section number
17:35 shdw_work I'm just lost as to how to get the right fields from the database and put it all together
17:36 shdw_work so far all I've managed to do is update the front student progress page so it has a third column with the selections sorted by section number
18:27 hotdogs hmmm, nope, still floods invalid subjects, time to look at the script
19:05 goehle shdw_work:  dealing with the database has a pretty steep learning curve
19:05 goehle if you look ing
19:05 goehle in
19:05 goehle lib/WeBWorK/DB/Records
19:05 goehle that has .pm files for each of the tables in the database
19:05 goehle and what fields they contain
19:05 goehle the DB.pm file
19:06 goehle has the accessor methods for actually getting those records
19:09 shdw_work ah cool, a starting point, thanks!
19:09 goehle np
19:09 goehle you are going to have to do a lot of the "work" yourself.
19:09 goehle so for example
19:09 shdw_work this is how I typically learn... jump in with both feet, drown for days, claw my way back to the surface... :-)
19:11 goehle getMergedSet will get you the set information for a user
19:11 goehle where any default set info will have been replaced by any user specific overrides
19:11 goehle but that doesn't have any information about the grade of the set in it
19:11 goehle for that you will need to do
19:12 goehle listUserProblems to get a list of userProblems (user specific problem data) for a specific user/set combo
19:12 goehle and then you will need to getUserProblem on each problem
19:12 goehle to get the score
19:12 goehle then add it all together
19:13 goehle you can use listUserSets to get a list the userSet objects (set objects associated to a particular user)
19:13 goehle and use those to get the setids, which you use to get the problems
19:13 goehle so for the page you are envisioning to work you will need to access every problem from every set for a particular user.  (Its not as bad as it sounds)
19:16 shdw_work yeah I just need a subset of the data, but I figured it was going to be a 2-dimensional iteration through all the students/sets to get the full info I need
19:16 goehle to get the total score for a student I think you would need to go through all of the problems and add everythign up
19:16 shdw_work but the instructors are willing to deal with lags in the page response if it gets them all this data in one page
19:17 goehle the lag isnt going to be any worse than, say, vising the Scoring Tools page and generating a csv
19:17 goehle since thats basically whats going on there
19:17 shdw_work hmm it would have been helpful if there had been a final score field in the db :-)
19:17 goehle too much work to maintain
19:17 goehle every time you change a problem you have to get and update that
19:17 goehle its easy to get out of sync, especially with random people contributing
19:18 goehle its much safer to do it this way, and since calculating total grades is a relatively infrequent thing, its not a big issue
19:18 shdw_work hmm actually, I wonder if I could just look at the code that generates the csv's?  That's essentially the data I need, so why couldn't I just pull the same info into a 2-dimensional array?
19:19 goehle thats probably the best way to do it
19:19 goehle I was forgeting gatway sets
19:20 goehle those have to be dealt with seperately
19:20 goehle https://github.com/openwebwork/webwork2/blob/master/lib/WeBWorK/ContentGenerator/Instructor/Scoring.pm
19:20 goehle it looks like this file has a bunch of helper methods
19:20 goehle that you could make use of
19:20 goehle in particular scoreSet and sumScores
19:20 shdw_work cool
19:21 shdw_work grabbing lunch right now, so I'll have a look later
19:21 shdw_work what are gateway sets?
19:21 goehle gateway sets are a special kind of homework set which students can redo
19:21 goehle they click a button and it generates a new version (with new numbers and possibly new problems)
19:21 goehle they get a certain number of attempts
19:22 goehle and then they can retry with a new version
19:22 shdw_work hmm
19:22 shdw_work not sure if we're using that here
19:22 shdw_work as far as I know, they just give a limited number of attempts to each problem, and that's it
19:22 goehle if you want to contribute this back to the WeBWorK core it should work with Gateway sets
19:23 shdw_work hah you might not like my code, its quite a hack so far
19:24 shdw_work I'm only starting to learn perl, so a lot of it is pasting together bits from other files
19:25 goehle its something to consider in any case.  We are moving away from this interface and the whole ContentGenerator thing into a more modern model/view type setup so don't feel obliged.
19:26 shdw_work yeah I saw that
19:26 shdw_work but we'll probably be using 2.8 for several years before we upgrade again
19:27 goehle 2.9 will be a reasonably incremental upgrade
19:27 shdw_work I just upgraded from 2.5.0, hopefully be testing 2.8 during the Summer
21:41 hotdogs so I'm poking around in a clone of master from a couple days ago, and the Library Browser doesn't update the Chapter pull down when I select a Subject
21:42 goehle are you using ie?
21:42 hotdogs no, firefox 26
21:42 goehle hmm
21:42 goehle did you run OPL-update
21:42 hotdogs yeah
21:42 goehle any js errors
21:42 hotdogs if I hit "view problems", the pull down is now populated
21:43 hotdogs where should I look for that?
21:43 goehle open up a debugging window
21:44 goehle right click on any old thing
21:44 goehle click inspect element
21:44 goehle then click on console
21:44 goehle that should have any errors
21:45 hotdogs SyntaxError: JSON.parse: unexpected character
21:45 goehle hmm
21:46 goehle do you have anything nonstandard in your library
21:46 goehle it sounds a little bit like when you ran the opl update something got into the json trees for the library
21:46 hotdogs nope, just the OPL master from yesterday
21:46 hotdogs I'll re-run the OPL script right now, just in case
21:46 goehle try running opl update again
21:46 goehle yeah
21:46 goehle if its still broken
21:47 hotdogs though when I press view problems, the chapter populates.  If I select one and press view problems, the section populates...
21:47 goehle then my guess is something in the opl (one of the subject /chapter/ tags etc...) is messing with things
21:47 goehle hmm
21:47 hotdogs so it looks like the data is right somewhere, but gets handed to jquery wrong.  I wonder if I can grab the json...
21:48 goehle I believe thats stored in
21:49 goehle htdocs/library-tree.json
22:00 hotdogs is that what gets sent to jquery? the perl JSON module doesn't complain about it. Hmmm
22:01 goehle i'm not entirely sure.  John Jones knows more about it than I do
22:01 goehle however I think that that is what the library browser is reading in order to build those drop downs
22:04 goehle although
22:04 goehle yeah, it looks like the right data
22:05 hotdogs oh, I think I figured out out with firebug
22:05 hotdogs the response to the jquery is a 404 :)
22:06 goehle ?
22:06 goehle so it cant get the json file?
22:06 hotdogs 404 Not Found at /opt/webwork/webwork2/lib/WebworkClient.pm line 158
22:07 hotdogs it's requesting /webwork2/instructorXMLHandler
22:07 hotdogs so I don't think it's pulling the json directly
22:08 goehle can you get to that sige
22:08 goehle site
22:08 goehle rather
22:08 goehle webwork.yourschool.edu/webwork2/instructorXMLHandler
22:09 hotdogs no, that doesn't exist at all
22:09 goehle ah it should
22:09 goehle thats where the webwork webservice lives
22:10 goehle which the new js based library browser uses to do all of its fancy interactivity
22:10 hotdogs ah, it's a 404, but the real error might be: Can't call method "result" on an undefined value at /opt/webwork/webwork2/lib/WebworkClient.pm line 164.
22:10 goehle maybe
22:11 goehle although result might be undefined because of the 404
22:11 goehle because it didnt get anything back from its request
22:12 goehle so you really cant get to the /webwork2/instructorXMLHandler
22:12 goehle page
22:13 goehle thats a standard content generator page
22:13 goehle I dont see how its dying
22:13 goehle unless something is wrong with
22:13 goehle ContentGenerator/InstructorXMLHandler.pm
22:17 goehle so I just pulled the latest library
22:17 goehle and did an opl update
22:17 goehle and it works for me
22:18 hotdogs what branch of webwork are you using?
22:18 goehle 2.9
22:18 hotdogs or should I be using
22:18 goehle which is really close to master
22:18 hotdogs master or 2.9?
22:18 goehle it shouldnt matter
22:18 goehle I dont hink
22:18 goehle 2.9 has everything that master does
22:18 goehle and I dont recall this as being a bug someones fixed
22:18 hotdogs I looked at the trees, master looked pretty slow and like it got everything anyway
22:19 hotdogs seemed safe enough :)
22:19 goehle well hopefully master is safe
22:20 goehle my guess is this is a server specific thing
22:22 hotdogs is this related to the ########### WebworkWebservice XMLRPC handler ##########
22:22 hotdogs in the apache2 config?
22:22 hotdogs it wasn't clear if that was required or not since it says "for integration with external editor"
22:23 goehle there are a couple of webwork webservices
22:23 goehle why did you remove that ?
22:24 goehle I just removed it from my conf file
22:24 hotdogs yeah, that made it work again
22:24 goehle and I'm getting exactly the same behavior you describe.
22:24 goehle ok
22:24 goehle so the new library browser uses that webservice to populate its lists
22:24 goehle and to add problems
22:25 goehle if you dont want to have that on
22:25 goehle then you should go back to the nojs browser
22:25 hotdogs I thought those parts were for optional integrations, actually
22:25 hotdogs after seeing the moodle one
22:25 goehle some are some art
22:26 hotdogs also, it specifies the location as /mod_xmlrpc, which didn't seem right
22:26 goehle are nto
22:26 goehle it is optional in the sense that there is a library browser that works aroudn it
22:26 hotdogs how do you switch to the other one, out of curiosity?
22:27 goehle got to the localoverrides.conf file
22:27 goehle and uncomment librarybrowsernojs
22:27 goehle from the showeditors hash
22:27 goehle and comment
22:27 hotdogs ahhh
22:27 goehle librarybrowser1
22:27 goehle out
22:28 goehle I dont know about the apache stuff, other than it must be part of the xml request pathway
22:28 goehle so the
22:28 goehle webwork2/instructorXMLHandler
22:29 goehle is just an html front end
22:29 goehle for the mod_xmlrpc service
22:29 goehle that is an address that takes xml requests for renderign problems and other things
22:29 goehle I'll admit the comment is misleading
22:32 goehle i've got to head off
22:32 goehle good luck
22:32 hotdogs thanks for the help
22:32 goehle np
22:32 hotdogs that's pretty much sorted it out

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