*** th1a has quit IRC | 04:41 | |
*** aks has joined #schooltool | 05:03 | |
*** yvl_ has joined #schooltool | 07:40 | |
*** yvl_ has quit IRC | 08:26 | |
*** aks has quit IRC | 08:29 | |
*** aks has joined #schooltool | 09:20 | |
*** aks has joined #schooltool | 09:20 | |
*** menesis has joined #schooltool | 09:39 | |
yvl | hi aelkner | 11:23 |
---|---|---|
aelkner | hey yvl | 11:30 |
yvl | there: http://schooltool.pov.lt/irclogs/%23schooltool.2011-03-15.log.html#t2011-03-15T09:48:47 | 11:32 |
yvl | if I understood you question correctly, that is the answer :) | 11:32 |
aelkner | yeah, i was looking at that, but i don't think the problem is as simple as you think | 11:33 |
aelkner | you see, i don't want to react to relationship events | 11:33 |
yvl | hmm | 11:33 |
yvl | why? | 11:33 |
aelkner | for instance, let's remember that persons_responsible is set by the view calss | 11:33 |
yvl | so? | 11:34 |
aelkner | and that in turn, fires off all the add (or remove) calls to _persons_responsible and at_one_time_responsible | 11:34 |
yvl | yes | 11:34 |
aelkner | so i'm supposed to reindex the message or goal 10 times if ten contacts were selected in the view? | 11:35 |
yvl | yes | 11:36 |
aelkner | also, generally i'm confused about catalogs | 11:36 |
aelkner | when are the indeces updated right now? | 11:36 |
aelkner | only on adding a message or goal? | 11:36 |
yvl | adding, removing message or goal | 11:36 |
aelkner | it's happening magically somewhere, right? | 11:37 |
yvl | also, when ObjectModifiedEvent is fired | 11:37 |
aelkner | ah, object modifed | 11:37 |
yvl | app/catalog.py , three last methods | 11:37 |
aelkner | so if _person_responsible changes, doestn't that event get fired? | 11:37 |
aelkner | i looked at those, too, not understanding completely how they are fired | 11:38 |
aelkner | what is IIntIdAddedEvent? | 11:38 |
aelkner | or i should say when? | 11:38 |
aelkner | also, what are those events for, a specific type of object, or do they take care of all objects | 11:40 |
aelkner | it calls ICatalogs(app) which is every catalog | 11:41 |
aelkner | then it indexes the object against each catalog wth the intid | 11:41 |
yvl | good questions :) | 11:42 |
aelkner | i thought indeces vary, some indexed with attribute, some with adapted values | 11:42 |
yvl | yes | 11:42 |
yvl | we currently use only extent catalogs | 11:42 |
aelkner | what is an extent catalog anyway? | 11:43 |
yvl | exent basically controls which objects can be indexed | 11:43 |
yvl | An extent catalog is very similar to a normal catalog except that it | 11:43 |
yvl | only indexes items addable to its extent. | 11:43 |
yvl | As discussed at the beginning of this document, extents can not only help | 11:44 |
yvl | with index operations, but also act as a filter, so that a given catalog | 11:44 |
yvl | can answer questions about a subset of the objects contained in the intids. | 11:44 |
aelkner | ah hell, what is all that supposed to mean? | 11:45 |
yvl | from zc/catalog/extentcatalog.txt | 11:45 |
yvl | extent is basically a smart set | 11:45 |
yvl | if you add intid to it, bot it doesn't want it for some reason, it throws exception | 11:46 |
yvl | extent catalogs have their extents and index only documents accepted by the extent | 11:46 |
yvl | for filter extents, we pass our own filters | 11:47 |
yvl | say, only index objects that implement IBasicPerson | 11:47 |
yvl | as for events | 11:47 |
yvl | IntIdAdded events are fired when a new int id is added to the int id utility | 11:48 |
aelkner | only when an object is created | 11:48 |
yvl | usually this happens as a consequence of IObjectAddedEvent | 11:48 |
aelkner | container fired | 11:48 |
yvl | you should not think this way | 11:49 |
yvl | that's why there are different events | 11:49 |
yvl | IObjectAddedEvent may caus IntIdAdded event | 11:49 |
yvl | cause | 11:49 |
aelkner | but here's the thing | 11:50 |
aelkner | i just need to react to the fact that _persons_responsible has changed | 11:51 |
aelkner | and reindex that object , right? | 11:51 |
yvl | yes | 11:51 |
aelkner | How does IIntIdAdded event have any relationship to that? | 11:51 |
aelkner | the user can add a teacher to the list | 11:52 |
aelkner | then remove them | 11:52 |
yvl | do you mean IntIdAddedEvent, or schooltool.relationship.interfaces.IRelationshipAddedEvent | 11:52 |
aelkner | schooltool.relationship.interfaces.IRelationshipAddedEvent sound like the event that i would care about | 11:53 |
yvl | yes | 11:53 |
yvl | again: http://schooltool.pov.lt/irclogs/%23schooltool.2011-03-15.log.html#t2011-03-15T09:48:47 | 11:53 |
aelkner | yeah, so that is a subscriber, not an adaptersubscriber, right? | 11:54 |
aelkner | i mean, the way it's registered | 11:55 |
aelkner | <subcriber handler=... | 11:55 |
yvl | yes, at the moment | 11:55 |
aelkner | so if i have my own in schooltool.intervention | 11:56 |
aelkner | it would need that presky providedBy call because it will be called for any object undergong a relationship change | 11:57 |
yvl | as it turns out, no | 11:57 |
yvl | as I said before | 11:58 |
yvl | you do need to check if this relationship event is right by checking URIs | 11:58 |
yvl | event.rel_type | 11:58 |
yvl | and so on | 11:58 |
yvl | see schooltool/relaitonship/RADME.txt, section Events | 11:59 |
aelkner | so i filter out any event that is not for updating responsible for message or goal by using the URIRelationship | 11:59 |
aelkner | it's called URIResponsible | 12:00 |
yvl | ok | 12:00 |
yvl | if event.rel_type == URIResponsible | 12:00 |
aelkner | right | 12:01 |
aelkner | actually, if != return | 12:01 |
aelkner | but anyway | 12:01 |
yvl | yes | 12:02 |
yvl | so you check that | 12:04 |
yvl | then you try to get the message or the goal | 12:04 |
yvl | try: | 12:04 |
yvl | obj = event[URIMessage] | 12:04 |
yvl | except KeyError: | 12:05 |
yvl | pass | 12:05 |
yvl | try: | 12:05 |
yvl | obj = event[URIGoal] | 12:05 |
yvl | except KeyError | 12:05 |
yvl | pass | 12:05 |
yvl | if obj is None, return | 12:05 |
yvl | obj_intid = getIntId(object) | 12:05 |
yvl | catalog = InterventionCatalog.get.() | 12:05 |
aelkner | ah, i can just make that call | 12:05 |
yvl | if obj_intid in catalog.extent: | 12:05 |
yvl | catalog.index_doc(obj_intid, object) | 12:05 |
aelkner | so that's it | 12:06 |
yvl | and you would need to register this method for IRelationShipAdded and IRelationshipRemoved | 12:06 |
yvl | yep | 12:06 |
aelkner | i'm going to exactly the same thing for both events, so i don't even need providedBy | 12:07 |
yvl | yes | 12:07 |
aelkner | updateStudentCalendars is loaded with provideBy calls | 12:07 |
yvl | yes it is | 12:08 |
aelkner | and you're suggesting i use try: except: to avoid using providedBy it would seem | 12:08 |
aelkner | why is it better to force exceptions? | 12:09 |
yvl | you are in a different situation here | 12:09 |
yvl | you use the same relationship type | 12:09 |
yvl | to link different uris | 12:09 |
yvl | hmm | 12:09 |
yvl | well, you can use providedBy | 12:10 |
aelkner | i guess i'm gong to keep questioning this aversion to providedBy | 12:10 |
aelkner | espcially because i see it all over schooltool and zope for that matter | 12:11 |
yvl | you don't know of course, which of the two objects is a message | 12:11 |
yvl | because relationships are bi-directional | 12:11 |
aelkner | ok, anyway, i thibk i know what i need to do now | 12:12 |
aelkner | can you look at my latestest commit while i sleep? | 12:12 |
yvl | if IGoal.providedBy(event.participant1) or IMessage.providedBy(event.participant2): | 12:12 |
yvl | object = event.participant1 | 12:13 |
aelkner | i like it :) | 12:13 |
yvl | oh, typo | 12:13 |
yvl | if IGoal.providedBy(event.participant1) or IMessage.providedBy(event.participant1): | 12:13 |
yvl | object = event.participant1 | 12:13 |
yvl | elif IGoal.providedBy(event.participant2) or IMessage.providedBy(event.participant2): | 12:13 |
yvl | object = event.participant2 | 12:13 |
aelkner | it's explicit and doesn't require throwing an exception | 12:13 |
yvl | yes | 12:13 |
yvl | both approaches point to API design flaws | 12:13 |
yvl | IMHO | 12:14 |
aelkner | yeah, well, sometimes you have time to design an API (or update it) | 12:14 |
yvl | anyway | 12:14 |
aelkner | and some times you only have time to use the one you have | 12:14 |
yvl | true | 12:14 |
aelkner | that's just the reality of programming from my experience | 12:15 |
yvl | just please don't use updateStudentCalendars as an example... It's horrible :) | 12:15 |
aelkner | but i will try to come up with adapters to avoid using provideBy when i can | 12:15 |
aelkner | but you poojted me to it :) | 12:15 |
aelkner | pointed | 12:15 |
yvl | ok ok :) | 12:16 |
yvl | I meant - don't use it as justification | 12:16 |
yvl | of the coding style | 12:16 |
aelkner | i'm trying to :) | 12:16 |
aelkner | anyway, enough said | 12:16 |
yvl | true :) | 12:16 |
aelkner | can you look at the diff while i sleep | 12:16 |
yvl | sure | 12:16 |
aelkner | it has all the catlog stuff | 12:16 |
yvl | I already looked at it briefly | 12:17 |
yvl | I'll look more closely soon | 12:17 |
yvl | good night aelkner ;) | 12:17 |
aelkner | thanks yvl | 12:17 |
aelkner | godd day to you | 12:18 |
aelkner | good | 12:18 |
yvl | thanks | 12:21 |
*** yvl has quit IRC | 12:22 | |
*** yvl has joined #schooltool | 12:24 | |
*** ignas has joined #schooltool | 12:37 | |
*** aks has quit IRC | 13:20 | |
*** menesis has quit IRC | 14:11 | |
*** menesis has joined #schooltool | 15:08 | |
*** alga has joined #schooltool | 15:15 | |
*** th1a has joined #schooltool | 15:49 | |
*** menesis has quit IRC | 16:01 | |
*** menesis has joined #schooltool | 16:05 | |
*** replaceafill has joined #schooltool | 16:38 | |
*** alga has quit IRC | 17:35 | |
*** replaceafill has quit IRC | 18:11 | |
*** ignas has quit IRC | 18:17 | |
*** replaceafill has joined #schooltool | 18:24 | |
*** alga has joined #schooltool | 18:36 | |
*** replaceafill has quit IRC | 18:52 | |
*** replaceafill has joined #schooltool | 18:52 | |
replaceafill | th1a, zyt? | 19:30 |
th1a | una momento | 19:33 |
th1a | uno? | 19:33 |
replaceafill | un | 19:33 |
replaceafill | :P | 19:33 |
th1a | OK. | 19:36 |
replaceafill | ok | 19:36 |
replaceafill | as yvl said once, it would be good to have blob support for pictures | 19:36 |
th1a | Right. I say we hold off on that project. | 19:37 |
replaceafill | hhmm ok | 19:37 |
replaceafill | (i remember is not difficult to enable blobs in the zodb configuration) | 19:37 |
th1a | Oh. | 19:38 |
replaceafill | (you just have to add the right directives to the instance's schooltool.conf) | 19:38 |
th1a | Well, ok. | 19:38 |
th1a | Still, I don't want to do that first. | 19:38 |
replaceafill | yes, i agree | 19:38 |
replaceafill | from chandara's email on march 15 | 19:38 |
replaceafill | i guess i got the most part, except for the national exam stuff | 19:39 |
replaceafill | Examination of Upper secondary education: | 19:39 |
replaceafill | Examination of Lower secondary education: | 19:39 |
th1a | Yeah... we need a little more guidance of what they want SchoolTool to do there. | 19:39 |
replaceafill | i understand it's the score system they need, but not the "Maximum of Score x 0.9" part | 19:40 |
replaceafill | i'll ask | 19:40 |
replaceafill | - fields for filling information of 9th grade exam such as: | 19:40 |
replaceafill | - Date of examination - Center of examination | 19:40 |
replaceafill | - No. of Classroom - No. of Seat | 19:40 |
th1a | For 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 |
th1a | If what they're really doing is mailing paper to the ministry. | 19:41 |
th1a | It is hard to tell without the context. | 19:41 |
replaceafill | - field for filling “number of times of attend correcting 12th grade exam” | 19:42 |
replaceafill | that is another one i dont get well | 19:42 |
replaceafill | it's for teachers | 19:42 |
th1a | Just ask for that one. ;-) | 19:42 |
replaceafill | and i guess chandaras' email on the 16th is clear | 19:43 |
replaceafill | just some new fields for the forms | 19:43 |
replaceafill | and from the 3 reports he sent: | 19:43 |
replaceafill | the slip of personal data for the teacher is straightforward i guess | 19:44 |
th1a | y | 19:44 |
replaceafill | from the document for the 9 grade exam: | 19:44 |
replaceafill | as 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 |
replaceafill | i'm referring to the Individual Memorandum Slip here | 19:46 |
th1a | Right, that's what I meant. | 19:46 |
* replaceafill is looking at the rest of pages for 9 grade | 19:48 | |
replaceafill | most of the lists in that document can be generated | 19:49 |
replaceafill | from demographics and the gradebook | 19:49 |
replaceafill | we cannot generate Attendant Register for Examination of Semester on page 11 | 19:49 |
th1a | Hm. | 19:50 |
replaceafill | unless we store the (center of examination, classroom, etc) info | 19:50 |
replaceafill | which again, i have to ask :) | 19:51 |
th1a | We could fudge it a few different ways, but I wouldn't consider it a priority right now. | 19:51 |
th1a | It might literally be handled as a section in itself meeting for one day. | 19:51 |
replaceafill | ah | 19:51 |
* replaceafill likes the way th1a tweaks the system :D | 19:52 | |
replaceafill | one thing i'm afraid about is: i layout the forms in english and then when they're translated to khmer, they could break | 19:53 |
th1a | If the exam sessions are different than other student groupings, it is definitely the way to do it. | 19:53 |
replaceafill | if the exam sessions are stored as sections we can tweak the gradebook as we need | 19:54 |
replaceafill | and not store just a single score | 19:54 |
th1a | Yes. | 19:55 |
replaceafill | the rest of the 12 grade stuff looks the same | 19:56 |
replaceafill | ok, 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 stored | 19:58 |
replaceafill | and of course ask for the fields that i dont understand well, like the score system for the exams | 19:59 |
th1a | Yes. | 20:00 |
*** menesis has quit IRC | 20:01 | |
replaceafill | all right, i'm going to start writing that email | 20:02 |
th1a | Cool. Thanks. | 20:02 |
replaceafill | and i'll be working on this on the week of: 28/3 - 3/4 | 20:02 |
replaceafill | i hope i can finish it in one week :( | 20:03 |
th1a | Makes sense. Let Chandara know that. | 20:03 |
replaceafill | ok | 20:03 |
replaceafill | btw, i preregistered for the uruguay meeting | 20:03 |
th1a | OK. | 20:04 |
replaceafill | now i have to pay the registration fee: $100 | 20:04 |
replaceafill | wire transfer they said | 20:04 |
th1a | Ah... when's the deadline? | 20:04 |
replaceafill | i also asked for the right address for the event, so i can book a hotel near | 20:04 |
replaceafill | they havent specified a deadline, at least i havent seen one in the page | 20:05 |
th1a | OK. | 20:05 |
replaceafill | but they do recommend to book the flight soon | 20:05 |
replaceafill | because that price tends to go up | 20:05 |
th1a | True. | 20:06 |
replaceafill | and i talked to some of the guys in the treehouse group, and bernie innocenti is coming for sure | 20:06 |
th1a | OK, well, I guess go ahead and book it. | 20:06 |
replaceafill | and stefan (dogi), says now he knows i'm coming he'll try to go | 20:06 |
replaceafill | :) | 20:06 |
replaceafill | great i will | 20:06 |
replaceafill | and jelkner says thanks for sending me and he and his teams will help me setting a demo server | 20:07 |
th1a | OK, good. | 20:08 |
th1a | You need a PandaBoard! | 20:08 |
replaceafill | !!! | 20:08 |
th1a | I guess I could mail you the SheevaPlug. | 20:08 |
th1a | Not that it really matters... | 20:08 |
replaceafill | but it would be nice ;) | 20:08 |
th1a | I'll think about it... | 20:09 |
replaceafill | cool, i've been trying to run ST in the XO, but i've always had version mismatches | 20:10 |
th1a | Now that I have the PandaBoard to play with anyhow. | 20:10 |
replaceafill | i'll definitely add your experiments to the things i want to talk about there | 20:10 |
*** menesis has joined #schooltool | 20:35 | |
replaceafill | menesis, are you around? | 21:21 |
*** menesis has quit IRC | 23:05 | |
*** menesis has joined #schooltool | 23:06 | |
*** menesis has quit IRC | 23:12 | |
*** replaceafill has quit IRC | 23:55 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!