IRC log of #schooltool for Friday, 2010-04-16

*** dlobo has quit IRC00:11
*** jelkner has quit IRC00:14
*** dlobo has joined #schooltool00:56
*** dlobo has quit IRC01:58
*** replaceafill has quit IRC01:59
*** dlobo has joined #schooltool02:04
*** dlobo has quit IRC02:47
*** replaceafill has joined #schooltool03:16
*** dlobo has joined #schooltool03:21
*** dlobo has quit IRC03:29
*** replaceafill has quit IRC03:38
*** replaceafill has joined #schooltool04:47
*** dlobo has joined #schooltool04:48
*** dlobo has quit IRC05:26
*** ignas has quit IRC06:06
*** dlobo has joined #schooltool06:50
*** th1a has quit IRC07:26
*** dlobo has quit IRC08:31
*** replaceafill has quit IRC08:45
*** alga has joined #schooltool09:15
*** eMBee has joined #schooltool09:44
eMBeegood afternoon09:44
eMBeei am trying to read about schooltool. butthe website seems to be down. i can not connect to it09:45
yvlapologies, the server is indeed down at the moment09:51
eMBeeok09:51
eMBeeis there developer documentation on the site? (or should i be looking for that elsewhere? in the code?)09:52
yvlthere's documentation how to set up the branches for development on your PC09:52
yvland documentation on using ST09:53
yvldev. documentation is not written as such yet09:53
eMBeeok09:53
yvlbut the code is both unit and functional tested09:53
yvlin doctest format09:53
yvlso it's basically self-describing at many points09:53
eMBeeif i readthe tests, that is?09:54
yvlyes09:54
eMBeeok, i'll look there then09:54
yvlare you familiar with bzr and LP?09:54
yvl(LaunchPad in general)09:54
yvlif so, you can get and build the book from bzr+ssh://bazaar.launchpad.net/~schooltool-owners/schooltool/st-book/09:54
eMBeeah, yes, that is helpful09:55
eMBeethanks09:55
eMBeei am mostly interested to find out how section-events are created so i can manipulate them in different ways09:56
yvlah, ok09:57
yvlwhat are your exact needs?09:57
yvljust so you know, we are going to refactor some of the event code in the near future09:58
eMBeewell, i'd like to start or end a section at adifferent date than the term. i figured i can do that by simply deleting eventsfrom the beginning or end09:58
yvlah, then I'd recommend patience ;)09:58
yvland filing a LP bug09:59
eMBeedon't have patience, client wants the feature now09:59
yvlsection start/term date uncoupling from terms is a very hot topic now09:59
eMBeei know, i have seen the bug discussion10:00
yvlif you need *just* the deletion of the events, you might get away with it rather well10:00
eMBeeyes, that's what i thought10:00
yvlassuming you don't change term dates after that10:00
eMBeewe'd simply set the term long enough (like for the whole year) and delete any events that don't fit10:01
eMBeei looked at the page where the section is scheduled, but i could not follow the code to the point where the actual events are created10:02
yvlyeah, the code is a bit murky there10:04
yvllemme get me my morning coffee, I'll see how I can help10:04
eMBeethanks10:04
yvlok, you might want to look at schooltool/timetable/model.py10:13
yvlPersistentTimetableCalendarEvent10:13
yvland especially removeEventsFromCalendar subscriber10:14
eMBeeok10:14
eMBeehow would i get a list of events?10:24
yvlyou need to iterate the section's calendar10:25
yvlsay:10:27
yvl    section_calendar = ISchoolToolCalendar(event.object)10:27
yvl    for cal_event in list(section_calendar):10:27
yvlthese two lines obtain the calendar, and list all the events10:27
yvlthen events are checked for: if ITimetableCalendarEvent.providedBy(cal_event)10:27
yvl(because section calendars can have manually added events10:27
yvl)10:27
eMBeeah yes10:28
eMBeealso found addEventsToCalendar, slowly getting the picture10:29
eMBee ok, now on the webinterface in a calendar view there is a 'new Event' link, but that doesseem to create events that are not associated with a section.10:30
eMBeesince you say that a section can have manualy added events, does the webinterface provide access to that?10:31
yvlI meant that the "new Event" link adds manual events10:32
yvland when a timetable is assigned to a section, a bunch of PersistentTimetableCalendarEvent events are added10:32
yvlit's executed Zope's event subscriber10:33
yvlwhen a timetable is assigned to a section10:35
yvlthrough some code, roughly this gets executed:  zope.event.notify(TimetableReplacedEvent(...))10:36
eMBeeok, how are the manual events related to the section? are they the same as regular section events? when i create a new one, the event does not contain a link10:36
yvlif you navigate to a section10:37
yvland click the [calendar] action button10:37
yvl(the row of links that look like buttons roughly on the top of the page)10:37
yvlyou get to the section's calendar - as opposed to school's calendar10:37
eMBeeyes10:37
yvlcalendars are basically a set of events10:38
eMBeeyes, i figured that10:38
yvlok, then I didn't understand your question10:39
yvlwhen dealing with the section, the events added trough UI and events created through assigning timetable - all of them live in the same section's calendar10:39
yvljust that the PersitentTimetableCalendarEvent class inherits CalendarEvent (the one you add through UI)10:41
eMBeeok, but there still seems to be a difference. the assigned events contain a journal link, and  the manual events  do not10:44
eMBeemeans the manual events can not track attendance, etc10:44
yvlyes10:45
yvloh, and there's that naming thing10:46
eMBeehmm?10:47
yvlin UI timetables are reachable under [Schedule]10:47
yvlI always get confused by that name, so... ;)10:48
eMBeecan i make manual events behave like assigned events with attendance tracking etc? (my hope is that the manual event code just needsto create a different event type)10:49
yvlthat's a good question...10:51
yvllooking at the code...10:51
yvl(eventually, after refactoring, yes, you will be able to do that, I'm just rummaging around if it is possible to do that now)10:52
eMBeethanks10:55
eMBeei'd be happy to just replace the current function as we don't need events without attendance tracking10:56
yvlhmm11:10
yvlyou will need to work with timetable events anyway11:11
yvlthere are few ways to achieve what you want currently11:11
yvlthe harder path is to develop a new TimetableModel11:12
yvland register it to ST, provide UI, etc.11:12
yvlbasically what you'd want then is to modify behaviour of createCalendar11:13
yvlno, wait, scrap what I said11:13
yvlthere's actually a relatively easy way11:13
eMBeethere seem to be only two event types: TimetableCalendarEvent and PersistentTimetableCalendarEvent11:15
yvlyes11:15
eMBeeis TimetableCalendarEvent the one with attendane tracking?11:15
yvlyes11:15
yvland you want to control the creation process of those events11:15
yvlin handleTimetableAddedEvent11:15
eMBeeright11:16
yvlthere's: timetable.model.createCalendar(..., ...)11:16
yvlyou actually  want to pass two more parameters there11:16
yvlfirst=xxx, last=xxx11:16
yvlsee BaseTimetableMode.createCalendar11:16
yvlthat's where the events are actually generated11:17
eMBeehmm11:17
yvlyou can write your own browser page11:18
yvlthat, say, allows to input start and end dates11:18
yvl(the page should be registered on a section)11:18
eMBeeah11:18
yvlthen get all active timetables11:18
yvland execute code, similar to:11:18
yvlhandleTimetableRemovedEvent11:18
yvlthen, handleTimetableAddedEvent11:18
yvlfor each timetable11:19
yvljust when calling createCalendar, also past first and last dates from the view11:19
yvlevents still cannot go outside the term date range, but you don't care about that anyway :)11:19
eMBeeso that is the function called when a section is scheduled...11:20
yvlcall stack looks roughly like this:11:20
yvlTimetableDict executes zope.event.notify11:21
eMBeeah, yes, createCalendar taks the default start and end from theterm, but it can override it, that is exactly what i need, just need an ui element to get those dates and passthem through11:22
yvlthen handleTimetableReplacedEvent11:22
yvlyes11:22
yvlbasically the result of such page would be like this11:22
yvlwhen an user modifies section schedule11:22
yvlevents will be re-created for the whole term11:22
eMBeeok11:23
yvlthe he must go to the new UI page11:23
yvland you can re-create same timetables, but now with specified time span11:23
yvlif you have a checked out ST branch11:24
eMBeethe new ui page is one i need to create, right?11:24
yvlyes11:24
eMBee ok11:24
yvljust edit schooltool/timetables/model.py11:24
yvladd line:  "import pdb; pdb.set_trace()"11:24
yvlas the first line of handleTimetableReplacedEvent11:24
yvldo11:25
yvl$make run11:25
yvlfrom terminal11:25
yvlgo to UI, schedule11:25
yvldo stuff11:25
yvlyou'll get the interactive pdb debugger in your terminal11:25
eMBeeyes, i have used pdb before. great, thank you!!11:26
yvlit may help you see what is actually happening11:26
yvlyou're welcome ;)11:26
eMBeei'll have to play with this11:26
yvlif you get stuck, just drop a mail to schooltool-developers@lists.launchpad.net11:27
eMBeethank you11:27
yvlin case you can't get help at IRC11:27
eMBee:-)11:28
eMBeeok, getting late here. time to go, thank you again11:37
* eMBee waves11:37
yvlgood luck, eMBee :)11:38
*** ignas has joined #schooltool12:01
*** menesis has quit IRC12:51
*** menesis has joined #schooltool14:02
*** yvl has quit IRC14:40
*** menesis has quit IRC16:00
*** menesis has joined #schooltool16:05
*** menesis has quit IRC16:12
*** dlobo has joined #schooltool16:32
Lumiereignas: do you have a phone number for menesis?16:32
Lumiereschooltool.org seems down16:33
eMBeeit has been down since at least 12 hours16:33
*** th1a has joined #schooltool16:48
*** dlobo has quit IRC16:48
Lumiereth1a: schooltool.org is down16:50
Lumierestill16:50
th1aYes, I sent an email about it.16:50
th1aThe server probably needs a kick.16:50
* Lumiere hands th1a a steel toe boot16:50
*** alga has quit IRC17:11
*** alga has joined #schooltool18:21
*** ignas has quit IRC18:35
*** menesis has joined #schooltool18:49
*** menesis has quit IRC19:07
*** dlobo has joined #schooltool19:10
*** menesis has joined #schooltool20:07
*** menesis has quit IRC20:38
*** menesis has joined #schooltool20:39
*** dlobo has quit IRC22:16
*** aelkner has quit IRC22:35
*** aelkner has joined #schooltool22:53

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