IRC log of #schooltool for Thursday, 2011-03-17

*** th1a has quit IRC04:41
*** aks has joined #schooltool05:03
*** yvl_ has joined #schooltool07:40
*** yvl_ has quit IRC08:26
*** aks has quit IRC08:29
*** aks has joined #schooltool09:20
*** aks has joined #schooltool09:20
*** menesis has joined #schooltool09:39
yvlhi aelkner11:23
aelknerhey yvl11:30
yvlthere: http://schooltool.pov.lt/irclogs/%23schooltool.2011-03-15.log.html#t2011-03-15T09:48:4711:32
yvlif I understood you question correctly, that is the answer :)11:32
aelkneryeah, i was looking at that, but i don't think the problem is as simple as you think11:33
aelkneryou see, i don't want to react to relationship events11:33
yvlhmm11:33
yvlwhy?11:33
aelknerfor instance, let's remember that persons_responsible is set by the view calss11:33
yvlso?11:34
aelknerand that in turn, fires off all the add (or remove) calls to _persons_responsible and at_one_time_responsible11:34
yvlyes11:34
aelknerso i'm supposed to reindex the message or goal 10 times if ten contacts were selected in the view?11:35
yvlyes11:36
aelkneralso, generally i'm confused about catalogs11:36
aelknerwhen are the indeces updated right now?11:36
aelkneronly on adding a message or goal?11:36
yvladding, removing message or goal11:36
aelknerit's happening magically somewhere, right?11:37
yvlalso, when ObjectModifiedEvent is fired11:37
aelknerah, object modifed11:37
yvlapp/catalog.py , three last methods11:37
aelknerso if _person_responsible changes, doestn't that event get fired?11:37
aelkneri looked at those, too, not understanding completely how they are fired11:38
aelknerwhat is IIntIdAddedEvent?11:38
aelkneror i should say when?11:38
aelkneralso, what are those events for, a specific type of object, or do they take care of all objects11:40
aelknerit calls ICatalogs(app) which is every catalog11:41
aelknerthen it indexes the object against each catalog wth the intid11:41
yvlgood questions :)11:42
aelkneri thought indeces vary, some indexed with attribute, some with adapted values11:42
yvlyes11:42
yvlwe currently use only extent catalogs11:42
aelknerwhat is an extent catalog anyway?11:43
yvlexent basically controls which objects can be indexed11:43
yvlAn extent catalog is very similar to a normal catalog except that it11:43
yvlonly indexes items addable to its extent.11:43
yvlAs discussed at the beginning of this document, extents can not only help11:44
yvlwith index operations, but also act as a filter, so that a given catalog11:44
yvlcan answer questions about a subset of the objects contained in the intids.11:44
aelknerah hell, what is all that supposed to mean?11:45
yvlfrom zc/catalog/extentcatalog.txt11:45
yvlextent is basically a smart set11:45
yvlif you add intid to it, bot it doesn't want it for some reason, it throws exception11:46
yvlextent catalogs have their extents and index only documents accepted by the extent11:46
yvlfor filter extents, we pass our own filters11:47
yvlsay, only index objects that implement IBasicPerson11:47
yvlas for events11:47
yvlIntIdAdded events are fired when a new int id is added to the int id utility11:48
aelkneronly when an object is created11:48
yvlusually this happens as a consequence of  IObjectAddedEvent11:48
aelknercontainer fired11:48
yvlyou should not think this way11:49
yvlthat's why there are different events11:49
yvlIObjectAddedEvent may caus IntIdAdded event11:49
yvlcause11:49
aelknerbut here's the thing11:50
aelkneri just need to react to the fact that _persons_responsible has changed11:51
aelknerand reindex that object , right?11:51
yvlyes11:51
aelknerHow does IIntIdAdded event have any relationship to that?11:51
aelknerthe user can add a teacher to the list11:52
aelknerthen remove them11:52
yvldo you mean IntIdAddedEvent, or schooltool.relationship.interfaces.IRelationshipAddedEvent11:52
aelknerschooltool.relationship.interfaces.IRelationshipAddedEvent sound like the event that i would care about11:53
yvlyes11:53
yvlagain: http://schooltool.pov.lt/irclogs/%23schooltool.2011-03-15.log.html#t2011-03-15T09:48:4711:53
aelkneryeah, so that is a subscriber, not an adaptersubscriber, right?11:54
aelkneri mean, the way it's registered11:55
aelkner<subcriber handler=...11:55
yvlyes, at the moment11:55
aelknerso if i have my own in schooltool.intervention11:56
aelknerit would need that presky providedBy call because it will be called for any object undergong a relationship change11:57
yvlas it turns out, no11:57
yvlas I said before11:58
yvlyou do need to check if this relationship event is right by checking URIs11:58
yvlevent.rel_type11:58
yvland so on11:58
yvlsee schooltool/relaitonship/RADME.txt, section Events11:59
aelknerso i filter out any event that is not for updating responsible for message or goal by using the URIRelationship11:59
aelknerit's called URIResponsible12:00
yvlok12:00
yvlif event.rel_type == URIResponsible12:00
aelknerright12:01
aelkneractually, if != return12:01
aelknerbut anyway12:01
yvlyes12:02
yvlso you check that12:04
yvlthen you try to get the message or the goal12:04
yvltry:12:04
yvlobj = event[URIMessage]12:04
yvlexcept KeyError:12:05
yvlpass12:05
yvltry:12:05
yvlobj = event[URIGoal]12:05
yvlexcept KeyError12:05
yvlpass12:05
yvlif obj is None, return12:05
yvlobj_intid = getIntId(object)12:05
yvlcatalog = InterventionCatalog.get.()12:05
aelknerah, i can just make that call12:05
yvlif obj_intid in catalog.extent:12:05
yvlcatalog.index_doc(obj_intid, object)12:05
aelknerso that's it12:06
yvland you would need to register this method for IRelationShipAdded and IRelationshipRemoved12:06
yvlyep12:06
aelkneri'm going to exactly the same thing for both events, so i don't even need providedBy12:07
yvlyes12:07
aelknerupdateStudentCalendars is loaded with provideBy calls12:07
yvlyes it is12:08
aelknerand you're suggesting i use try: except: to avoid using providedBy it would seem12:08
aelknerwhy is it better to force exceptions?12:09
yvlyou are in a different situation here12:09
yvlyou use the same relationship type12:09
yvlto link different uris12:09
yvlhmm12:09
yvlwell, you can use providedBy12:10
aelkneri guess i'm gong to keep questioning this aversion to providedBy12:10
aelknerespcially because i see it all over schooltool and zope for that matter12:11
yvlyou don't know of course, which of the two objects is a message12:11
yvlbecause relationships are bi-directional12:11
aelknerok, anyway, i thibk i know what i need to do now12:12
aelknercan you look at my latestest commit while i sleep?12:12
yvlif IGoal.providedBy(event.participant1) or IMessage.providedBy(event.participant2):12:12
yvlobject = event.participant112:13
aelkneri like it :)12:13
yvloh, typo12:13
yvlif IGoal.providedBy(event.participant1) or IMessage.providedBy(event.participant1):12:13
yvl object = event.participant112:13
yvlelif IGoal.providedBy(event.participant2) or IMessage.providedBy(event.participant2):12:13
yvlobject = event.participant212:13
aelknerit's explicit and doesn't require throwing an exception12:13
yvlyes12:13
yvlboth approaches point to API design flaws12:13
yvlIMHO12:14
aelkneryeah, well, sometimes you have time to design an API (or update it)12:14
yvlanyway12:14
aelknerand some times you only have time to use the one you have12:14
yvltrue12:14
aelknerthat's just the reality of programming from my experience12:15
yvljust please don't use updateStudentCalendars as an example... It's horrible :)12:15
aelknerbut i will try to come up with adapters to avoid using provideBy when i can12:15
aelknerbut you poojted me to it :)12:15
aelknerpointed12:15
yvlok ok :)12:16
yvlI meant - don't use it as justification12:16
yvlof the coding style12:16
aelkneri'm trying to :)12:16
aelkneranyway, enough said12:16
yvltrue :)12:16
aelknercan you look at the diff while i sleep12:16
yvlsure12:16
aelknerit has all the catlog stuff12:16
yvlI already looked at it briefly12:17
yvlI'll look more closely soon12:17
yvlgood night aelkner ;)12:17
aelknerthanks yvl12:17
aelknergodd day to you12:18
aelknergood12:18
yvlthanks12:21
*** yvl has quit IRC12:22
*** yvl has joined #schooltool12:24
*** ignas has joined #schooltool12:37
*** aks has quit IRC13:20
*** menesis has quit IRC14:11
*** menesis has joined #schooltool15:08
*** alga has joined #schooltool15:15
*** th1a has joined #schooltool15:49
*** menesis has quit IRC16:01
*** menesis has joined #schooltool16:05
*** replaceafill has joined #schooltool16:38
*** alga has quit IRC17:35
*** replaceafill has quit IRC18:11
*** ignas has quit IRC18:17
*** replaceafill has joined #schooltool18:24
*** alga has joined #schooltool18:36
*** replaceafill has quit IRC18:52
*** replaceafill has joined #schooltool18:52
replaceafillth1a, zyt?19:30
th1auna momento19:33
th1auno?19:33
replaceafillun19:33
replaceafill:P19:33
th1aOK.19:36
replaceafillok19:36
replaceafillas yvl said once, it would be good to have blob support for pictures19:36
th1aRight.  I say we hold off on that project.19:37
replaceafillhhmm ok19:37
replaceafill(i remember is not difficult to enable blobs in the zodb configuration)19:37
th1aOh.19:38
replaceafill(you just have to add the right directives to the instance's schooltool.conf)19:38
th1aWell, ok.19:38
th1aStill, I don't want to do that first.19:38
replaceafillyes, i agree19:38
replaceafillfrom chandara's email on march 1519:38
replaceafilli guess i got the most part, except for the national exam stuff19:39
replaceafillExamination of Upper secondary education:19:39
replaceafillExamination of Lower secondary education:19:39
th1aYeah... we need a little more guidance of what they want SchoolTool to do there.19:39
replaceafilli understand it's the score system they need, but not the "Maximum of Score x 0.9" part19:40
replaceafilli'll ask19:40
replaceafill- fields for filling information of 9th grade exam such as:19:40
replaceafill    - Date of examination        - Center of examination19:40
replaceafill    - No. of Classroom            - No. of Seat19:40
th1aFor some of this stuff it may literally make sense for us to just print out forms that have all the data that's internal to schooltool and they just write in the rest.19:40
th1aIf what they're really doing is mailing paper to the ministry.19:41
th1aIt is hard to tell without the context.19:41
replaceafill- field for filling “number of times of attend correcting 12th grade exam”19:42
replaceafillthat is another one i dont get well19:42
replaceafillit's for teachers19:42
th1aJust ask for that one.  ;-)19:42
replaceafilland i guess chandaras' email on the 16th is clear19:43
replaceafilljust some new fields for the forms19:43
replaceafilland from the 3 reports he sent:19:43
replaceafillthe slip of personal data for the teacher is straightforward i guess19:44
th1ay19:44
replaceafillfrom the document for the 9 grade exam:19:44
replaceafillas you said, i have to ask if theyre ok with us just printing the form with the student data and they fill the rest (center of examination, classroom, etc)19:45
replaceafilli'm referring to the Individual Memorandum Slip here19:46
th1aRight, that's what I meant.19:46
* replaceafill is looking at the rest of pages for 9 grade19:48
replaceafillmost of the lists in that document can be generated19:49
replaceafillfrom demographics and the gradebook19:49
replaceafillwe cannot generate Attendant Register for Examination of Semester on page 1119:49
th1aHm.19:50
replaceafillunless we store the (center of examination, classroom, etc) info19:50
replaceafillwhich again, i have to ask :)19:51
th1aWe could fudge it a few different ways, but I wouldn't consider it a priority right now.19:51
th1aIt might literally be handled as a section in itself meeting for one day.19:51
replaceafillah19:51
* replaceafill likes the way th1a tweaks the system :D19:52
replaceafillone thing i'm afraid about is: i layout the forms in english and then when they're translated to khmer, they could break19:53
th1aIf the exam sessions are different than other student groupings, it is definitely the way to do it.19:53
replaceafillif the exam sessions are stored as sections we can tweak the gradebook as we need19:54
replaceafilland not store just a single score19:54
th1aYes.19:55
replaceafillthe rest of the 12 grade stuff looks the same19:56
replaceafillok, so what i have to do now, is to carefully look at the lists, tell chandara what we currently store in the system and ask him if they are just sending paper to the ministry or if he need all this new stuff stored19:58
replaceafilland of course ask for the fields that i dont understand well, like the score system for the exams19:59
th1aYes.20:00
*** menesis has quit IRC20:01
replaceafillall right, i'm going to start writing that email20:02
th1aCool.  Thanks.20:02
replaceafilland i'll be working on this on the week of: 28/3 - 3/420:02
replaceafilli hope i can finish it in one week :(20:03
th1aMakes sense.  Let Chandara know that.20:03
replaceafillok20:03
replaceafillbtw, i preregistered for the uruguay meeting20:03
th1aOK.20:04
replaceafillnow i have to pay the registration fee: $10020:04
replaceafillwire transfer they said20:04
th1aAh... when's the deadline?20:04
replaceafilli also asked for the right address for the event, so i can book a hotel near20:04
replaceafillthey havent specified a deadline, at least i havent seen one in the page20:05
th1aOK.20:05
replaceafillbut they do recommend to book the flight soon20:05
replaceafillbecause that price tends to go up20:05
th1aTrue.20:06
replaceafilland i talked to some of the guys in the treehouse group, and bernie innocenti is coming for sure20:06
th1aOK, well, I guess go ahead and book it.20:06
replaceafilland stefan (dogi), says now he knows i'm coming he'll try to go20:06
replaceafill:)20:06
replaceafillgreat i will20:06
replaceafilland jelkner says thanks for sending me and he and his teams will help me setting a demo server20:07
th1aOK, good.20:08
th1aYou need a PandaBoard!20:08
replaceafill!!!20:08
th1aI guess I could mail you the SheevaPlug.20:08
th1aNot that it really matters...20:08
replaceafillbut it would be nice ;)20:08
th1aI'll think about it...20:09
replaceafillcool, i've been trying to run ST in the XO, but i've always had version mismatches20:10
th1aNow that I have the PandaBoard to play with anyhow.20:10
replaceafilli'll definitely add your experiments to the things i want to talk about there20:10
*** menesis has joined #schooltool20:35
replaceafillmenesis, are you around?21:21
*** menesis has quit IRC23:05
*** menesis has joined #schooltool23:06
*** menesis has quit IRC23:12
*** replaceafill has quit IRC23:55

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