IRC log of #schooltool for Monday, 2010-11-15

*** alga has quit IRC02:47
*** ignas has quit IRC04:26
*** menesis has joined #schooltool08:39
*** alga has joined #schooltool09:30
*** ignas has joined #schooltool11:52
*** ignas has quit IRC12:07
*** menesis has quit IRC12:09
*** menesis has joined #schooltool12:49
*** ignas has joined #schooltool13:08
*** Aiste has joined #schooltool14:51
*** Aiste_ has joined #schooltool14:51
*** th1a has joined #schooltool15:20
*** yvl has joined #schooltool16:16
yvlmorning th1a16:21
th1aHi yvl.16:21
yvlsome pre-meeting drama... I managed to get sick16:21
th1aI see.16:22
th1aHow are you feeling?16:22
yvlquite... sick, for the lack of a better word16:22
th1aRandom virus?16:23
th1aSomething specific?16:23
yvlprobably common cold that went to later stages16:23
yvlI don't know english names for them16:24
yvlfor some reason it hit me hard16:24
th1aI understand.16:24
yvlI mean - nose, throat, ears :)16:24
yvlwell, I'm actually at the point where (I hope) I'm getting better16:25
yvlso that's at least some comfort16:26
th1aBetter than getting worse!16:26
*** replaceafill has joined #schooltool16:27
th1aHi replaceafill, aelkner, menesis.16:31
replaceafillgood morning/afternoon16:31
th1aOK... one thing I want to make sure and discuss is
th1aIt seems like we should be able to quickly save these guys a lot of bother by hacking in demographics support.16:33
th1aEven if it is not pretty.16:33
th1aEsp. since it isn't for human readability.16:34
yvlthe least we can do is add another randomly named sheet to the xls16:35
yvl"Additional demographics data"16:35
th1aDoes this use our standard xls otherwise?16:35
yvlST importer sould ignore sheets it doesn't recognises16:35
yvlanother way would be first adding demographics import/export16:36
th1aSo to do it "right," we'd just have to have the script first look at the fields, and generate columns first?16:36
th1aI thought we did?16:36
yvlhmm, let me check16:36
th1aWell, you have to set up the demographics manually.16:36
th1aIt doesn't create the custom demographics based on the spreadsheet.16:37
th1aIf they match it works.16:37
th1aSo it is finicky.16:37
replaceafillthe importer looks for the default demographics i guess16:37
yvlI think the demographics import is limited16:37
yvlno ethnicity, for example16:37
th1aBased on the spreadsheet or the code?16:37
yvlthe importer code16:38
th1aMy recollection was that you could customize the demographics, export it, recreate the same custom demographics in a clean database, and import it.16:38
menesisThe XLS exporter does export Gender, Language, and even custom demographic fields16:38
yvland here are the old demographics fields:16:39
yvl        fields = (16:39
yvl            'User Name', 'Prefix',16:39
yvl            'First Name', 'Middle Name', 'Last Name',16:39
yvl            'Suffix', 'Preferred Name', 'Birth Date', 'Gender',16:39
yvl            'Password', 'ID', 'Ethnicity', 'Language',16:39
yvl            'Place of birth', 'Citizenship' )16:39
yvlno, wait, I think that's our exported fields16:40
menesisbut the importer does not support custom fields. it is fragile, some time ago prefix and suffix were added and an older XLS could not be imported16:41
th1aWell, that ought to be improved regardless.16:42
th1aOK, let's table that for the moment and see if we can jam it in this week -- either a quick hack or real fix.16:43
th1areplaceafill, how was your week?16:44
replaceafillth1a, i'm almost done with the preferences work, i just have to make the changes i asked you about on friday16:44
replaceafillabout where to put the buttons and stuff16:45
replaceafillrenaming a view, etc16:45
replaceafillyvl, i have a question16:45
replaceafillit's mostly about the way we code16:46
replaceafillif i have a method in a class like:16:46
replaceafilland later in GradebookOverview I see the call self.processColumnPreferences()16:47
replaceafilland then i get some self.* attributes on my class object16:47
replaceafillso i was wondering16:47
replaceafillif it would be easier to set up each attribute in a single call16:48
replaceafilllike self.total_hide = self.getTotalHidePref()16:49
replaceafillso i dont have to follow another method to find out which attributes have been set16:49
aelknereasier?  sounds REALLY inconvenient16:49
replaceafillaelkner, if i'm reading GradebookOverview, and processColumnPreferences does a lot of setting16:50
replaceafilli have to track down what it does16:50
replaceafilli mean, it's not a big deal16:50
replaceafillit was just kind of annoying16:50
aelkneri'm not sure how having a convenience function like that could be annoting16:51
aelknerit does the job that needs doing16:51
yvlI'm still trying to grasp the reason for that part...16:51
replaceafillto me, it does too much16:51
replaceafillbut as you say, it does what it has to do16:51
yvlfrom the first glance (though I'm probably wrong)16:52
yvlit seems that you want an IColumnPreferencesSomething adapter16:52
yvlthat does that part16:52
aelknerthat would be better zope practice, but just as complicated (if not more) to follow16:53
aelkneri wouldn't be against it though16:53
replaceafillagain, it was just a feeling i had while i was working on that part16:53
replaceafilljust wanted to mention it16:54
aelknermight be a good idea to replace the method with an adapter16:54
replaceafillaelkner, yes16:54
aelknerand the class would just then have one attribute for the adapted context16:54
replaceafillthe method also does a little view login with the apply_all_colspan part16:54
yvlthere are just those weird places16:55
yvllike this one: self.average_hide = prefs.get('hide', False)16:55
aelkneryes, it calculates colspans based on absence/presence of colcs16:55
yvlwouldn't it be easier if some class just had an attribute: average_hide = False16:55
yvloh, no16:56
yvlok, don't mind me :)16:57
replaceafillth1a, other than that, i have no more questions, will work on the remaining part today16:57
yvlseriously, Alan, this type of code is hard to follow for a developer that didn't wrote it16:57
aelkneri agree it needs refactoring16:58
replaceafillwell, i'm in that part, so i will give a try16:58
aelknergo for it16:58
replaceafilland ask your opinion when i16:58
replaceafill'm done16:58
th1areplaceafill: Do you think you could do this demo export at the same time?16:58
th1aNot literally at the same time.16:59
aelknerbtw, it's not just that part that needs refactoring16:59
th1aI meant also this week.16:59
aelknerthe whole view and Gradebook context is really old code16:59
replaceafillth1a, sure16:59
th1areplaceafill:  could you do the demo stuff first?17:00
replaceafillth1a, just to be clear, we have to put demographics in the database exporter, correct?17:00
replaceafillthe one Trevor (from launchpad) is using17:00
th1aYes, there are two questions, I guess.17:00
yvlumm, first check what data is actually there17:00
th1aWe need to import it,17:01
yvlthen get the exporter bzr+ssh://
th1aimmediately get the database recovery script to export it,17:01
replaceafillyvl, thanks17:01
th1aand then in the medium term get the regular exporter to export it.17:01
yvland see mock_0_11_4.py17:01
yvlfor some reason I can't find ethnicity data in old databases17:02
replaceafillwill be interesting to see 0.11 code :)17:03
replaceafillth1a, will do that, and if i get some time, i'd like to continue the active statuses (or enrollment statuses) work17:03
th1aYes, those are all things we need.17:04
replaceafillok th1a, that's it from me17:04
replaceafillthanks yvl and aelkner17:04
th1aThanks replaceafill.17:05
th1aOK, aelkner, I looked at your screenshots.17:05
th1aI'm a bit confused.17:06
th1aAre there separate student and teacher edit views?17:06
aelknerwhat does cambodia do, the same thing, right?17:06
th1aI suppose we should talk about the way this should end up in core.17:07
th1aI'm thinking that we'll definitely want to move to "Add Student" "Add Teacher"17:07
th1aBut those are for convenience.17:08
th1aSo *in core* at least, subsequently you should be able to view and edit them with a generic add and edit person view.17:09
th1aMake sense?17:09
th1aIs that what you're thinking?17:09
th1aIn a more customized configuration, we can maintain separate edit views.17:10
aelknerkeep in mind that amogst the stuff that i stole from cambodia was the person container views as well17:10
aelkneralso, navigation17:10
th1aI'm just trying to sort out the core from the custom parts here.17:10
replaceafillaelkner, do your forms put people in groups?17:11
replaceafilli mean the Add Student in Students and so on?17:11
aelkneryes, like cambodia17:11
replaceafillth1a, i wonder if that's ok for core17:11
aelkneri think those views make a lot of sense for the core user17:11
replaceafillit's an assumption17:11
replaceafill(if that's the right word) :(17:12
aelkneralso, demos by group which i created in my new schooltool branch17:12
aelknerdid my note to the developers list go though?17:12
th1aEven if you want someone to be a student and teacher, they don't have to be both at the moment of creation.17:12
th1aSo that's why I'm saying we don't in core want to have completely separate view and edit views for the two groups.17:13
th1aI mean, in a sense, allowing someone to be a student and teacher is a dubious decision, it makes things more complicated for us.17:14
th1aIt is a significant sunk cost.17:14
th1aBut at this point, we should at least maintain the advantage of it in core.17:14
aelknerth1a, could i broach one concept a second17:14
aelkneri think we can support more than one group membership, but come up with a17:15
aelknerrule for which group really applies, like if you're a teacher, you're a teacher17:15
aelknerif you're not a teacher and you are a student, then you are a student17:16
aelknerif you are neither, and you are an admin, then you're that17:16
aelknerbut as for which demos to show in person forms17:16
aelknerteacher, then student, then admin17:17
aelkneri mean one OR the other17:17
th1aWell, that's all completely unnecessary.17:17
th1aBecause you can just create a form which checks to see which fields are relevant to that person.17:17
th1aNo problem.17:17
th1aIt just keeps you from doing a custom layout in our current system.17:18
replaceafillstudent + admin! (we have a use case for that one?)17:18
th1aWell, look.17:18
th1aLet's only talk about demographics here.17:18
th1aWe have no custom demographic forms in core right now anyway17:18
th1aSo there is no reason not to keep it very simple and just have the form check to see if the field is relevant.17:19
th1aEssentially, I wanted to do it that way to  avoid opening up this can of worms.17:19
th1aWhich is generally NOT A PROBLEM.17:20
aelknerwhen you say, "check to see if the field is relevant", how do you mean?17:20
th1aPerson is a student.17:20
th1aFor example.17:21
aelknera student and a teacher?17:21
th1aJust a student.17:21
th1aWhen the edit form is rendering it checks each field to see if that field is relevant to a student.17:22
th1aPlace of Birth, yes.17:22
aelknerthat's what my forms do17:22
th1aI hope so!17:22
aelknerthey use the new filter_group_id method i made in my schooltool branch17:22
aelkneryvl, did you have a chance to look at that?17:22
th1aMy whole point here is that it doesn't *require* two separate forms.17:22
aelknerth1a, that's part of what i did in niepa, i made the forms very table-driven17:23
aelknerso the same base class/template applies to both case17:23
yvlno, aelkner17:24
yvlI didn't yet17:24
aelkneri understand, you're not feeling well17:24
aelkneranyway, the edit view classes set the group that is used by the base class17:25
aelknerto dynamically generate the fieldset with the demos17:25
aelknerusing the filter_group_id method on the demo fields container17:26
aelkneralso, the add views do the same17:26
aelknerthe add views must know the group in question in order to set it17:26
aelknerhaving separate links to get to the add forms accomplishes that17:27
yvloh, sorry aelkner, but please remake the core part17:27
aelknerthe edit forms are called up from the custom person container views17:27
yvluse relationships instead of ids17:27
th1aNot to hammer this into the ground, but you could just do a generic version of that as well.17:27
aelknerno, it's a good point, but what about the container views in cambodia which i put in niepa?17:28
th1aThat just looked at what groups the person was a member of?17:28
aelknerthey are specific to group17:28
th1aI'm not immediately worried about that.17:28
th1aI'm just trying to make sure we aren't marching off in different directions, and we seem to be ok.17:28
th1aSo let's move on.17:28
th1aaelkner, you may go ahead with your report.17:29
aelknerwell, we';re kind of in the middle of it already :)17:29
th1aOf course.17:30
aelkneri added two features to core, BoolFieldDescription17:30
aelknerand limit_group_ids, filter_group_id17:30
aelknerthen i used them in niepa in the person views we were just discussing17:30
aelknerso that the demo fields come out onm the form according to the group17:31
aelkneri poached the person container/navigation code from cambodia to help the user add17:31
aelknerteachers/students more conveniently17:31
aelkneralso, i think that kind of functionality would be useful in core17:32
aelknerso that's part of what i thought we would discuss today17:32
th1aDid we?17:32
aelknerwe did, but that discussion still feels like an open one17:33
aelkneranyway, as for niepa17:33
aelknerthere is only one part left to do for them to have forms for entering census data17:33
aelknerthat is the classroom part17:33
th1aFor resources.17:34
aelknerif we want niepa to add attributes to classroom resources that are not in core17:34
aelkneri will need to write a custom view class, but also i would need to have a place to put17:35
aelknerthe additional attributes in a classroom resource object, like in annotations?17:35
yvl(btw, aelkner, you accidentally committed import pdb; pdb.set_trace in src/schooltool/niepa/person/
th1aaelkner:  Or we could just do user customizable "demographics" for resources.17:36
aelkneryvl, does the failed test get there?17:36
aelknerth1a, i thought you might be thinking that, but how?17:36
*** alga has quit IRC17:36
yvldidn't check17:36
aelkneryvl, i guess i commited a pdb, but i still have tests to fix anyway, so i'll get rid of that in tme17:37
yvlok then :)17:37
aelkneri was just hoping you could help me with the schoolyear add problem17:37
yvljust trying to help ;)17:37
aelknerthat was REALLY helpful :)17:37
aelknerth1a, demographics are linked to basicperson objects in core17:38
aelknerthere are adapters and all that17:38
th1aI mean, we have customizable demographics for person, so the same basic approach should work for resources, right?17:38
aelknerwould we want to keep resource demos in a separate container off of the root?17:39
yvlthe approach - yes :)17:39
aelkneror would we want to add them to the existing container17:39
aelknerand have a flag that tells us that the demo field is for classroom resources?17:39
yvloh, I so know how I want that to be done in the future :)17:40
yvldevelopers should not care where the container lies in such cases17:40
aelknerif by developer, you mean me, then i will need to worry about making the adapters17:41
aelknerand where the data is kept17:41
yvland I wish you wouldn't need to17:41
aelknerbut you are very busy with other core projects, and i'm only too happy to help :)17:42
aelknerthough i need you guidance on decisions to made here17:43
yvlthen use th1a 's suggestion I guess :)17:44
th1aThat seems safest.17:44
yvladd to schooltool/recourses17:44
yvlsimply import field descriptions from basicperson17:44
yvland a big fat XXX:  why is this dependency on basicperson necessary????17:44
aelkneryeah, why?17:45
aelknerwhy are those classes in basicperson in the first place?17:45
aelknerwhy not in the demograpics package?17:45
yvloh, just don't ask17:45
aelkneralso, basicperson defines (and initializes in AppInit)17:45
aelknerthe IDemograpicsFields container that is off of the root17:46
yvljust name it IResourceCustomFields or something17:46
aelknerso for resources, what to do about the container and AppInit stuff17:47
*** Aiste_ has quit IRC17:47
yvlmake your own (I mean specific for resources)17:47
aelknerwhere do we house the ResourceCustomFields objects?17:48
aelknerin a spearate continer off of root?17:48
yvlmake everything identical to IBasicPerson17:48
yvljust use resources17:48
yvlso yes, separate container in root17:48
aelknerso a separate container then?17:48
yvl'schooltool.resource.custom_fields' and 'schooltool.resource.custom_data'17:48
aelkneroh, sorry, already answered17:49
yvlIt should be easier to refactor this out once we develop a mechanism to add extra fields to objects17:49
yvl(say - courses - why not??? )17:50
aelknerdemo fields could all live in one container in the future with flags on the demo fields17:50
aelknerthat tell which type of demo and the adapters could find the appropriate fields, right?17:51
yvlprobably something like that17:51
yvlbut that's in the future...17:51
aelknerfor now, create the new container in the resource package17:52
aelknerthat will be my work for this week17:52
aelknerin the meantime, could you please look at my branches and respond to the thread17:53
aelkneri started in the developers list?17:53
aelkneryvl, that's when you're felling better, of course17:53
th1aThanks, aelkner.17:54
yvlumm, I already asked to change ids to relationships17:54
yvlas for adding new <...>, sure, just gonna lie down for a while17:54
aelkneryvl, can't use relationships in limit_group_ids17:55
aelknerthe filter applies year over year17:55
aelknerbut groups live within a given school year17:55
aelknerso putting a relationship to a transitory object like a group within a school year17:55
aelknerwould not work17:55
aelknerwhereas saying17:56
yvlyes, of course17:56
aelkner"this demo field is for teachers, regardless of year"17:56
yvlthis implementation is good for the grant project17:56
aelknerworks well in my opinion17:56
yvlnot good enough for core, sorry17:56
aelknerhow would it be done otherwise?17:56
yvlthe UI part?17:57
aelknerthe limit_group_ids data model part17:57
yvldata model - simple17:57
yvladd a relationship between field an all groups in specific years17:57
yvlif you want it in all years17:58
yvlit's not that insane to think that *specific* demographics tracked for students or teachers will *change* over the years17:59
yvlso on the data model, it strictly must be a group-field relationship18:00
aelknerand the UI?18:00
yvlthat is another, and a very good question18:01
yvlone of the simplest things you can do, is filter by the active school year18:01
yvl(and probably add the year to the titles in the dropdown)18:02
yvl[  2009 / teachers ]18:02
yvl[  2009 / students ]18:02
aelknerand when we are in the AppInit method, creating custom demo fields by group18:02
aelknerand there is no active school year yet?18:03
yvlwhen is the default year created?18:03
aelknerwhat default year?18:03
yvlby users, manually, doh.18:03
th1aI generally prefer using relationships, but I don't know if the year by year aspect makes sense here.18:04
aelkneri understand preferring relationships, but can't ids be useful in some cases18:05
aelknerlike 'teachers', 'students', 'admin...' which are special18:05
yvlhmm, you can write hooks to events18:05
yvlas in group created events18:05
yvlif the group is special, just relate it to the desired fields18:06
yvlin the event subscriber, instead of AppInit18:06
aelknerwhen i'm in AppInit, trying to create custom demo fields for students but there is no students group yet18:06
aelknerwhat do i do there?18:06
yvlsee InitGroupsForNewSchoolyear18:06
aelknerthat gets called later18:06
yvljust create the custom demo fields18:06
aelkneri don't want to create custom demo fields each time a schoolyear is added18:07
aelknerjust once, when the app is created18:07
yvlcreate the demo fields when app is started18:07
yvlbut relate them to groups when the groups are being created18:08
aelknerhow would i know which group to relate to which demo field at that time?18:08
yvlah, I see your point now :)18:08
yvlguesswork is ok there18:08
yvlI thought that your point was - people enter persons before creating the schoolyear18:09
aelknerbtw, this by no means seems SIMPLER18:09
aelknerno the app creates demos in AppInit18:09
aelknerth1a, do you think we need to have different student demos by school year?18:10
aelknerif so, i can see the need for all this complexity18:10
th1aI think that's pretty obscure.18:10
th1aIt is more likely that you'd add than subtract.18:11
aelkneras it s, i already have a working implementation for group_id specific demos18:11
th1aWell, here's the other thing.18:11
th1aWe can also remove things from the add/edit fields but still display deprecated fields that aren't associated currently with the group but that have old values.18:12
th1aThat's easy enough.18:12
aelknerwhat about the group_id (already working) versus active schoolyear group relationship qustion?18:13
yvllet's go with group_id's18:13
yvlI'll have to refactor this out some time18:13
yvlif I'm to ever fix the default groups mess18:13
yvlbut it's a good point18:14
aelknerdefault groups mess?18:14
yvlteachers, admins, etc.18:14
aelknerwhat's the mess?18:14
yvldon't want to get into it now18:14
aelkneroh, touched a sore nerve? :)18:14
yvlno, I'm just sick ;))))18:15
th1aThat could go on for another hour.18:15
th1amenesis:  Still awake?18:15
th1aThanks aelkner.18:15
menesisth1a: yes18:16
th1aSo we're waiting for a reply from Mathias now?18:16
menesisJonathan replied me two times saying that he talked to Daniel, then that Matthias should help us, but I got no replies from either of them18:17
replaceafillyvl, do you have a 0.11 database with data?18:17
replaceafillyvl, or i could install edubuntu 6 and fill it out, correct?18:18
replaceafilloopss sorry for interrupting menesis18:18
menesisI have worked on the packages a little to catch up with ZTK 1.0, but am not uploading them since they contain no noteworthy changes, but be less work when I know where to upload18:19
th1aOK.  Sounds good.18:20
th1aI'll poke people if we get stuck at this point.18:21
th1aAny last words?18:21
th1aHave a great week, gentlemen!18:22
th1aGet better, yvl.18:22
* th1a drops the bag of gravel.18:22
replaceafillthanks everybody18:22
replaceafillget well yvl18:22
aelknergreate week everyone18:22
aelkneryes, feel better yvl18:22
yvlthanks guys18:22
yvlgood week to you18:23
yvland replaceafill  - I'll send a small db I made when I had 0.11 running18:23
replaceafillyvl, great! thanks18:23
yvlthere you go :)18:25
replaceafillthanks yvl18:25
yvlreplaceafill, by the way if you want to run the old ST18:33
yvlyou just need python 2.5 or lower18:33
yvlor, on gutsy, it should work out-of-the box18:34
replaceafilli was thiking of edubuntu 6 (the first time i saw schooltool) :D18:34
yvlaelkner, I just checked out schooltool.niepa18:46
yvland at least manually, school year add view works18:47
yvlah, I see, it's the tests :)18:50
*** ignas has quit IRC19:01
yvlaelkner, by the way, the add view crashes when you enter invalid data19:04
yvl'01-01-2010' is incorrect, you need to use ISO format: '2010-01-01'19:04
replaceafillyvl, out of blue question: does you have any experience with solid state drives?19:05
replaceafilli want to buy a new laptop19:05
yvlumm, I'm going to go with... no, I've no experience with that :)19:09
replaceafillah ok19:09
* replaceafill wonders if they're worth it or they're just buzz19:10
* th1a has used a USB stick.19:29
*** yvl has quit IRC19:36
th1aI wouldn't have any concerns about getting a solid state drive.19:38
replaceafillth1a, i wonder about the performance benefit vs storage space19:42
replaceafilli mean, like is it worth to have 80 GB SSD vs a 500 GB SATA?19:43
replaceafilli don't use much space anyway19:43
th1aThat would be the case for me -- I don't need that much space anyhow.19:44
th1aParticularly for my work computer.19:45
*** menesis has quit IRC20:13
*** menesis has joined #schooltool20:55
*** replaceafill has quit IRC21:01
*** alga has joined #schooltool21:20
*** replaceafill has joined #schooltool21:29
*** menesis has quit IRC22:39
*** menesis has joined #schooltool22:53
*** menesis1 has joined #schooltool22:58
*** menesis has quit IRC22:58
*** menesis has joined #schooltool23:15
*** menesis1 has quit IRC23:17
*** replaceafill has quit IRC23:21

Generated by 2.15.1 by Marius Gedminas - find it at!