IRC log of #schooltool for Wednesday, 2012-02-29

th1aI have http://69.164.203.135/d3/flourish/comp_report.json00:00
th1aWhich I've made pretty terse since these are big files.00:00
th1ahttp://69.164.203.135/d3/flourish/comp_report.js00:00
th1aIs the script.00:00
th1aSo I read the json and then have this callback.00:01
th1aAnd I go down through and loop through the metadata, but then essentially I'm stuck.00:01
th1aI don't know how to "back up"00:02
th1aAnd add the cell for my graph.00:02
* replaceafill goes see00:02
replaceafilldatum lol00:04
th1aWell... they just call it "d" mostly in the examples, which was so terse it confused me.00:05
replaceafill:D00:05
th1aI kept thinking "function d, what is function d?!?"00:06
th1aSo that reminds me that it is a parameter.00:06
th1aI'm not sure how much of that makes any sense compared to jquery.00:08
replaceafillit does00:08
th1aDoes it have something like "enter?"00:09
replaceafillno00:09
th1aenter() basically loops through the data.00:10
replaceafilli think in jquery you get that automatically00:10
th1aSo the problem is that once I get down to the point of looping through the metadata, I don't know how to get "back" up a level in my data structure.00:11
th1aAnd all this is so context dependent.00:11
replaceafillif i understand your script correctly:00:13
th1aI just don't know how I need to break this up sanely.00:13
replaceafilli'd think so00:13
replaceafillat least from the beginning00:13
replaceafillonce you have have it working you could chain things together00:13
replaceafillth1a, do you have this in your branch?00:14
th1aYes.00:14
replaceafillso i can modify the code and see00:14
replaceafillok00:14
th1aI just need to add the last cell in the row and start adding svg based on the remaining numbers in the json record.00:15
replaceafillth1a, it seems like you haven't pushed these changes yet00:15
replaceafillyour last revision is 200:15
replaceafillhttps://code.launchpad.net/~tom-hoffman/+junk/d300:15
th1aOK... make upload doesn't do that?00:16
th1aOK, pushed.00:16
replaceafillkk00:16
th1aIt might be easier to add the svg first and insert the other stuff in front of it.00:17
replaceafilldid you add comp_report.js to the branch?00:17
replaceafillcan't see it00:17
th1aOK, try now.00:18
th1aI knew the HTML part would screw me up...00:19
replaceafill:D00:19
th1aThis part could be done with jquery.00:20
th1aMaybe you should just do that.00:20
th1aOr... just javascript for that matter.00:20
th1aThat's probably the solution to this problem.00:20
replaceafillyes we could do that00:20
th1aWhy don't you do that.00:21
th1aI don't need you looking up d3 stuff to make a table.00:21
th1aJust give me a another cell in each row with the class "chart" and with an id matching the section.00:22
th1aMake sense?00:22
replaceafillthe section?00:22
th1aThe section id.00:22
replaceafilltcs00:23
replaceafilletc00:23
replaceafill?00:23
th1aThe third thing in meta00:23
replaceafillhhmm00:23
replaceafillyou'd have two ids with that value ,right?00:23
replaceafillone for the tr00:23
th1ameta is [Program Area, Course, Section, Instructor]00:23
replaceafilland one for that cell00:23
replaceafillid should be unique00:23
th1aPick one.00:24
th1aI should be able to get the right cell either way.00:24
replaceafillright00:24
th1aselect row than cell by class should work.00:24
replaceafillok00:24
* replaceafill adds jquery to the branch00:25
replaceafillah! we already have it :D00:25
th1aThat's the nice thing about jquery in 2012.00:26
th1aOK, I have to go start supper.00:27
replaceafillok, i'll send you an email when i'm done00:27
th1aHopefully this will be pretty easy for you... I think you can just pass me the parsed json as a variable.00:27
th1aWhich is the nice thing about json in 2012.00:28
th1aThanks replaceafill.00:28
replaceafilllast question00:28
replaceafillso you want me to change the table generation from d3 to jquery completely?00:29
replaceafilli was going to use part of what you've done already00:29
replaceafillbut that would mix things up00:29
replaceafillth1a, never mind00:31
*** alga has quit IRC01:00
*** ignas has quit IRC01:18
*** th1a has quit IRC01:33
*** replaceafill has quit IRC03:02
*** ignas has joined #schooltool03:15
*** ignas has quit IRC04:01
*** th1a has joined #schooltool04:18
*** aks has joined #schooltool05:19
*** aks has quit IRC05:23
*** aks has joined #schooltool05:23
*** th1a has quit IRC07:07
*** yvl has joined #schooltool09:17
*** yvl has quit IRC10:32
*** yvl has joined #schooltool10:45
*** ignas has joined #schooltool11:29
*** menesis has quit IRC11:31
*** ignas has quit IRC12:01
*** alga has joined #schooltool12:23
*** menesis has joined #schooltool13:20
*** alga has quit IRC13:54
*** alga has joined #schooltool14:06
*** aks has quit IRC14:16
*** th1a has joined #schooltool15:09
*** alga has quit IRC15:59
*** replaceafill has joined #schooltool16:19
th1ahi replaceafill, aelkner_, yvl, menesis.16:30
yvlmorning!16:30
menesishi16:31
replaceafillgood morning/afternoon16:31
aelkner_morning16:32
th1areplaceafill:  Do you see what I was doing wrong with HTML ID's?16:32
replaceafillth1a, ah yes16:32
th1a(I was using numbers)16:32
replaceafillth1a, d3 seems very picky about it :)16:32
th1aThat only cost me half a day.16:32
th1aYes, I guess everything else might not be that pedantic about it.16:33
th1aThe good news is that my understanding of d3 in general is probably not as broken as I thought!16:34
replaceafill:D16:34
th1aOK, yvl, would you like to start us off?16:34
yvlok16:34
yvlI finished AJAXy work yesterday16:35
yvland pushed to trunk16:35
yvland started looking at Selenium today16:35
yvland yes, replaceafill, they do break on my machine! \o/16:35
replaceafillyay!!16:35
replaceafill:016:35
replaceafill:)16:35
yvlthat's it from me, th1a16:36
th1aSo... do you want to work on this until next Wednesday?16:36
th1aI don't want you to go beyond that point.16:36
th1aAnd perhaps it would be better to just start the CanDo stuff now, which hopefully has a fair amount of slack time for you.16:37
* yvl would like to work on tests Thu16:37
yvland maybe Fri16:37
yvljust to move the most annoying things out of the way16:38
yvlor I can start on CanDo tomorrow16:38
yvlyour call :)16:38
th1aGathering low hanging fruit this week sounds perfect.  Start on CanDo monday.16:38
yvldeal :)16:39
th1aOK. aelkner_?16:39
aelkner_ok, i finished the changes to the server tabs view16:40
aelkner_and then i reacted to the intervention email bug report16:41
aelkner_it lead me to learn more about our existing email utility16:41
aelkner_and i decided that with our queue explaining any mail delivery problems16:41
aelkner_i didn't need to block email from being sent to the utility myself due to email addresses issing16:42
aelkner_so i got rid of the whole EmailMessage class from sendmail16:42
aelkner_i realized something was missing in doing this that i need to attend to16:43
aelkner_i still need to get rid of the message and goal added subscribers16:43
aelkner_and use the form elements that we created for flourish, Email, Yes/No16:44
aelkner_instead to determine whether to send the email16:44
aelkner_i'll change that today16:44
th1aUh... ok.16:45
aelkner_oh, and i added a mail icon to flourish resources for use in displaying which intervention person has emial16:45
th1aI definitely want to make sure that it is clearer to the users who actually has email in the system.16:45
th1aOK.16:45
aelkner_it's light gray so it doesn't show up very well against the darker gray backround16:45
aelkner_but you can decide after you've seen it16:46
th1aMaybe we could have a confirmation message listing who was sent the email.16:46
aelkner_the form disappears when you add a message or goal16:46
aelkner_so i don't know where we would put a conform message in that case16:46
th1aDialog?16:46
aelkner_dialog?16:47
th1aConfirmation dialog?16:47
th1a"Emails sent to: Alan Elkner, Jeff Elkner."16:47
aelkner_a popup modal that has just an Ok button16:48
th1aYes.16:48
aelkner_hitting ok makes the modal and the view behind it disappear16:48
th1aIt is just that having people think that emails have been sent when they haven't is bad.16:48
th1aEspecially in this kind of situation.16:49
th1aSo a little more intrusive notification might be justified.16:50
aelkner_replaceafill, send() returns True if all went well and False if there was an error16:50
aelkner_whenever it returns false, the email is queued16:50
replaceafillyes16:50
aelkner_th1a, should i just say in that case that there was an error sending the email?16:51
aelkner_i mean, i can't say which error it is, but i can instruct them to consult the queue16:51
th1aWe should notify the user, yes.16:52
replaceafill"there was an error, please check the email queue"16:52
replaceafill(or something like that) :)16:52
th1aThat's a pretty shitty error message.16:52
aelkner_can users other than manager check the email queue16:52
th1aDoes the queue automatically try to resend later?16:52
replaceafillth1a, no16:52
th1aSo... it isn't much of a queue then.16:53
replaceafillthat needs background processing16:53
replaceafilliirc16:53
th1aI think we just tell the user it failed and ideally why.16:53
aelkner_if the failure is related to missing email addresses then resending is fruitless16:53
aelkner_replaceafill, if we wanted to be able to tell the user what failed, the utility would need to change16:54
replaceafillgo ahead16:54
aelkner_send() would need to return a pointer to the queued message, not just True/False16:54
th1aIf we're thinking of not having an email address as representing a failed attempt to send an email, we're doing it wrong.16:55
aelkner_one ting that's weird is that not having a sender email address is ok in the case of using google as smtp server16:57
aelkner_because the google email account ends up as the sender address in the email16:57
th1aThe sender address is entirely irrelevant.16:57
aelkner_not the email setting of the user16:57
aelkner_ok, so i'll not worry about the sender address as we agreed yesterday, but i can not bother trying to send an email with no recipient addresses16:58
th1aOK, so what about if the form had a [ ] send email copies of the message to: field16:58
th1awhich updated whenever you checked a person with an email address.16:58
aelkner_do you mean add that to the Email Yes/No field?17:00
th1aYes.17:00
aelkner_also, that field can be inactive until at least one email address is filled in17:01
th1aYes.17:01
aelkner_sounds helpful, interactive17:01
aelkner_what about if there is an error sending the email, do we need to change the utility?17:01
th1aWe don't need to report not having an email as an "error" here.  We should reserve that for actual email processing errors.17:02
aelkner_not having anything more at the moment, we could only say 'there was an error sending...'17:03
aelkner_all i can think of for that is to change send() to return the __name__ of the queued error17:04
aelkner_and return 0 as success17:04
aelkner_doing so would require us to change anyone who calls send() in schooltool to change the logic17:04
aelkner_for interpreting the return value17:05
th1aWe don't use it anywhere else at this point, right?17:05
aelkner_i suppose it is only used by the send test emial view17:05
aelkner_but replaceafill may know otherwise17:05
replaceafillnope17:06
replaceafillthat's the only part where it's used17:06
aelkner_ok, so noone has an objection to changing send() in this way17:06
th1aNo.  It seems like something that is necessary anyhow.17:07
yvlyes aelkner_17:07
yvldoesn't email have a status_code ?17:07
aelkner_queued email does17:08
yvland it has a __name__17:09
yvlonce you do utility.send(email)17:09
yvlemail has a __name__17:09
aelkner_actually, perhaps it would be better to return None for success and the email itself for failure17:10
yvland status_code not None, if .send returned False17:10
yvlyou can use status_messages to get the message for error code17:10
aelkner_yvl, actually, if the email send succeeds, there is no queued emial, so no __name__ of status17:11
aelkner_but if it fails, then the queued email will have a status code17:11
yvlright17:11
yvlno such thing as __name__ of queued error17:11
yvlthere's __name__ of email for reference17:11
aelkner_so i suggest returning the email itself on failure17:11
yvlbut I don't think you need that17:11
yvlwhy return?17:12
aelkner_it's the email itself that matters17:12
yvlyou create it, right?17:12
aelkner_if i don't return it, then how does the caller of send() get it?17:12
yvlthe caller passes the email to send() ?17:12
yvlor am I missing something17:12
replaceafillyvl is right17:12
aelkner_ah, yes17:13
aelkner_so the caller of send can just check the email for the status17:13
aelkner_i see, it is updated in place17:13
yvlif send returned false17:13
aelkner_so nothing needs to change in the utility, got it17:13
yvlgreat :)17:14
aelkner_th1a, what should the error message say?17:14
yvland you can check email/browser/email.py17:14
aelkner_the email message failed to send with status code: n?17:14
yvlfor how to handle status_code17:14
th1aaelkner_:  Perhaps something meaningful to the user.17:14
yvlsee flourishemailview17:14
yvlupdate17:14
yvlif self.context.status_code is not None17:15
yvlthat part17:15
yvlself.context is email there17:15
yvlthere it shows how to use email.message_parameters17:16
yvlto obtain messages like:17:16
yvl"The server XXXXXXX.org rejected the From: address "bob@fake.org""17:16
aelkner_if self.context.status_code is not None:17:17
aelkner_that part, right?17:17
yvlyes17:17
yvlvalue=translate(...)17:17
yvlreplaceafill did a good job with emails :)17:17
replaceafillit's obviously yvl's design :P17:18
yvl:P17:18
aelkner_nice work guys!17:18
aelkner_ok, i can use that logic for the status error message17:18
yvlcool17:18
th1aOK, so I guess that will probably keep you busy.17:19
aelkner_yeah, and i can return to the section locations when i'm dne with that17:20
aelkner_yvl, your last changes are pretty final, right?17:20
yvlyes17:20
aelkner_cool17:20
aelkner_that's it for me17:20
th1aOK.17:21
th1aI'd note that my time estimates later in the project chart were increasingly generous, so I'm not super worried about getting a bit behind right now.17:22
th1amenesis?  What would you think about a release in a week?17:23
menesis...17:24
menesiscan make one17:24
menesisif tests pass17:24
th1aI guess I'm mainly saying I don't think we should start one in less than a week.17:24
th1aWe've got several fixes in progress.17:25
th1aWell, perhaps not "several."17:25
* th1a has thrown menesis off track...17:29
menesisI haven't yet finished reviewing/testing all the new code/features you all committed in last week17:31
th1aOK, that's fine.17:31
menesisI am working on the scripts to support ubuntu instances17:33
menesiscommands to reset password, pack db17:33
th1aOK.  I want those too...17:34
th1aI think menesis is experiencing time dilation.17:36
menesisdid I miss a question?17:37
th1aAre you done menesis?17:37
menesisyes17:37
* th1a was just waiting for the next comment.17:37
th1aOK, thanks menesis!17:37
th1areplaceafill?17:37
replaceafillok17:38
replaceafilli finished and merged the id card changes17:38
replaceafilland yesterday i started reviewing yvl's new stuff on ajax tables17:38
replaceafillmy next task is to make the gradebooks "ajaxy"17:38
replaceafilli think understanding the new table.js resource has been the most difficult part17:39
replaceafillseveral new jquery concepts for me :)17:39
replaceafilldeferred, promisses, success on jqxhr17:39
replaceafillbut i think i'm getting it17:40
replaceafillmy question for yvl17:40
yvllistening17:40
replaceafillhow do you think your ajax table work can be used for ajaxing the gradebooks?17:41
replaceafilli mean17:41
replaceafillcan you recommend to focus on a specific part of your work that i can reuse?17:41
yvlskin/flourish/ajax.py I think17:41
replaceafilli (kind of) understand the new contents for creating the tables, filters, etc17:41
replaceafillbut i can't see how to use them in this new task17:42
yvlwell, they're a bit... whats the opposite of underkill? ;)17:42
replaceafill:D17:42
yvlI don't think you can reuse anything from schooltool.table17:42
yvlat least I wouldn't bother17:43
replaceafillah ok17:43
yvlbut you can look at how that's done17:43
yvland you can use the AJAXPart things17:43
yvlif you find them useful17:44
yvlbasically, if you need a viewlet that you can POST into17:44
yvlas opposed to posting to the page itself17:44
yvlthan you can do an AJAXPart17:44
replaceafillthat's what i still don't see in the "ajaxify the gradebook" task yet17:44
replaceafillthe submit part17:44
replaceafillwell, i see it for the "Save" button and all17:45
replaceafillbut not for building the actual gradebook17:45
* yvl waves hands :D17:46
replaceafillalthough you create the table tables (persons, sections, etc)  in a similar fashion i guess17:46
yvlin my case, I needed two or more tables per page17:46
yvlthat had to be independent17:46
yvladding submit on-grade-changed and doing the gradebook view update sounds a bit... heavy17:47
* yvl would probably add something like gradebook.html/ajax/grades17:47
yvlthat handles the grade saving part17:48
replaceafillright17:48
replaceafillbut all the js will need to be coded, right?17:49
yvlyes17:49
replaceafilli mean, we cannot reuse yours17:49
replaceafillgot it17:49
yvlcopy-paste! :)17:49
replaceafillthat's what i thought :P17:49
yvlif it's useful in any way17:49
yvlyou'll likely end up with quite different js anyway17:49
replaceafillyes17:49
replaceafillcool, now it's clearer for me17:50
replaceafilli was trying hard to fit my idea on using the same resources17:50
yvlah17:50
replaceafilli'd probably end up with ST.gradebook or something17:50
yvlcopy-remake, then unify if there is common ground17:50
replaceafilli mean, for the js17:50
yvl(which I doubt)17:50
yvlsure!17:51
yvlgradebook is something that deserves that17:51
replaceafillone last question17:51
replaceafillthe request.success(...) calls assume the .ajax(...) call is asyncronous, right?17:51
replaceafillis that what they do?17:52
replaceafillrequest.success(function(){ update_all_table_spinners(container_id); }17:53
replaceafillfor example17:53
yvlI'm gonna go with... yes17:53
replaceafill:)17:53
replaceafillok, thanks yvl17:54
replaceafillth1a, i'm done, i hope to have something to show for monday17:54
th1aOK.  Sounds good.  I agree that trying too hard to share code here is probably a waste of time.17:54
th1aOK gentlemen, thanks.17:55
th1aHave a great week and weekend!17:55
* th1a drops the bag of gravel.17:55
yvlsee you soon guys!17:57
replaceafillyvl, "The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callbacks will be deprecated in jQuery 1.8"18:25
replaceafill:O18:25
*** ignas has joined #schooltool18:29
*** alga has joined #schooltool19:01
*** paulproteus has quit IRC19:08
*** paulproteus has joined #schooltool19:09
*** th1a has quit IRC19:19
*** alga has quit IRC19:19
aelkner_replaceafill, ayt?19:27
replaceafillyes19:28
aelkner_a question about email sender19:28
aelkner_if it can just as well be blank, why should we have it?19:28
aelkner_i mean, i sent an email with a sender address set, but the gmail smtp server19:29
aelkner_put it's info in the sent part of the email19:29
replaceafillthat's because you're using gmail as smtp server19:29
replaceafillyou could be using a local smtp server19:29
replaceafillin which case the from address does matter19:30
replaceafillor could matter19:30
aelkner_that's a bit of a sticky matter because tom had said that the sender was not important19:30
replaceafilli think it's ok to say that in the gmail smtp server example, the from email address is not needed19:30
replaceafillbut i dont think that's the general case19:31
aelkner_so in my intervention view, i need to check the email utility for the type of server?19:31
replaceafillno, that's what smtplib does19:31
aelkner_and not allow the email send to be attempted if the user has no email?19:31
aelkner_ah, yes19:32
aelkner_i could just relay the email queue error19:32
aelkner_so basically catch the user email empty situation after trying to send the email19:32
replaceafillagain, in the gmail particular example, you end up using the username + gmail smtp domain as the sender19:33
replaceafillbut again, it's not a general case19:33
replaceafilla school could have its own smtp server19:33
replaceafillwhich doesn't use username + smtp domain as a sender19:34
aelkner_the email filled in for the user in that case would have the domain in it19:34
replaceafillright19:34
aelkner_i don't think we intend to add username + domain name to get email addresses19:34
replaceafillno, i'm saying that's what you get with the gmail example19:35
aelkner_i tried sending an email through gmail with a particular sender address19:35
aelkner_it was ignored, and only the gmail account for the smtp setup was in the sender part19:35
replaceafillright19:36
aelkner_so i'm not sure what you mean by 'you end up using the username + gmail smtp domain as the sender'19:36
aelkner_because as was saying, it didn't matter what i put in for the sender19:37
replaceafilli mean, for gmail what it matters is the username you set for the utility19:37
replaceafillreplaceafill@gmail.com19:37
aelkner_ah, yes, in the utility config19:37
aelkner_i thought you were talking about the email19:37
replaceafillah19:38
replaceafillno, i meant the email settings19:38
replaceafillbut suppose you set up your own postfix or sendmail server19:38
replaceafillit's possible to not set up a user or password for it19:39
replaceafilland just let the server pass the email based on ip addresses and such19:39
replaceafilli remember i tried that once in my former job19:39
replaceafillmy point is, gmail is not the general case19:40
aelkner_understood19:40
aelkner_seeing that there are various cases that i can't predict from the intervention views19:40
aelkner_when i call send(), i will pass whatever is in the user's email setting19:40
aelkner_if it's blank and that's not a problem (the gmail case)19:40
aelkner_then it will get through19:41
*** menesis has quit IRC19:41
aelkner_if it is a problem, then i'll give the error message to the user in the intervention view19:41
replaceafillright, and it will use what's configured in the utility settings19:41
aelkner_based on what the email utility returns19:41
replaceafillcorrect19:41
aelkner_cool, i got a plan, thanks19:41
replaceafillnp19:41
*** th1a has joined #schooltool20:08
*** menesis has joined #schooltool20:38
th1areplaceafill:  I can cut out your jquery now.  ;-)21:21
replaceafill:)21:21
replaceafilldid you upload it?21:21
replaceafillso i can see21:21
replaceafilli mean, your new d3 script21:21
th1aI just started again, so not yet.21:22
replaceafillah ok21:22
replaceafilljust curious :)21:22
th1aOh, this might be what I need to know: http://bl.ocks.org/118399821:52
th1aNot really.  ;-)21:54
th1aI think I need to try to write this without using method chaining.22:16
replaceafillit is easier22:16
replaceafillyou later chain what you think it's appropriate22:16
replaceafillto chain22:16
th1aI think that's what's bending my mind.22:16
*** replaceafill has quit IRC23:14
*** replaceafill has joined #schooltool23:15
*** alga has joined #schooltool23:18
th1areplaceafill:  I think I'm unstuck.  Thanks to less method chaining magic.23:28
replaceafill:)23:28
th1aThat was starting to remind me too much of my early days with Zope 2...23:28

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!