*** dlobo has quit IRC | 00:11 | |
*** jelkner has quit IRC | 00:14 | |
*** dlobo has joined #schooltool | 00:56 | |
*** dlobo has quit IRC | 01:58 | |
*** replaceafill has quit IRC | 01:59 | |
*** dlobo has joined #schooltool | 02:04 | |
*** dlobo has quit IRC | 02:47 | |
*** replaceafill has joined #schooltool | 03:16 | |
*** dlobo has joined #schooltool | 03:21 | |
*** dlobo has quit IRC | 03:29 | |
*** replaceafill has quit IRC | 03:38 | |
*** replaceafill has joined #schooltool | 04:47 | |
*** dlobo has joined #schooltool | 04:48 | |
*** dlobo has quit IRC | 05:26 | |
*** ignas has quit IRC | 06:06 | |
*** dlobo has joined #schooltool | 06:50 | |
*** th1a has quit IRC | 07:26 | |
*** dlobo has quit IRC | 08:31 | |
*** replaceafill has quit IRC | 08:45 | |
*** alga has joined #schooltool | 09:15 | |
*** eMBee has joined #schooltool | 09:44 | |
eMBee | good afternoon | 09:44 |
---|---|---|
eMBee | i am trying to read about schooltool. butthe website seems to be down. i can not connect to it | 09:45 |
yvl | apologies, the server is indeed down at the moment | 09:51 |
eMBee | ok | 09:51 |
eMBee | is there developer documentation on the site? (or should i be looking for that elsewhere? in the code?) | 09:52 |
yvl | there's documentation how to set up the branches for development on your PC | 09:52 |
yvl | and documentation on using ST | 09:53 |
yvl | dev. documentation is not written as such yet | 09:53 |
eMBee | ok | 09:53 |
yvl | but the code is both unit and functional tested | 09:53 |
yvl | in doctest format | 09:53 |
yvl | so it's basically self-describing at many points | 09:53 |
eMBee | if i readthe tests, that is? | 09:54 |
yvl | yes | 09:54 |
eMBee | ok, i'll look there then | 09:54 |
yvl | are you familiar with bzr and LP? | 09:54 |
yvl | (LaunchPad in general) | 09:54 |
yvl | if so, you can get and build the book from bzr+ssh://bazaar.launchpad.net/~schooltool-owners/schooltool/st-book/ | 09:54 |
eMBee | ah, yes, that is helpful | 09:55 |
eMBee | thanks | 09:55 |
eMBee | i am mostly interested to find out how section-events are created so i can manipulate them in different ways | 09:56 |
yvl | ah, ok | 09:57 |
yvl | what are your exact needs? | 09:57 |
yvl | just so you know, we are going to refactor some of the event code in the near future | 09:58 |
eMBee | well, 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 end | 09:58 |
yvl | ah, then I'd recommend patience ;) | 09:58 |
yvl | and filing a LP bug | 09:59 |
eMBee | don't have patience, client wants the feature now | 09:59 |
yvl | section start/term date uncoupling from terms is a very hot topic now | 09:59 |
eMBee | i know, i have seen the bug discussion | 10:00 |
yvl | if you need *just* the deletion of the events, you might get away with it rather well | 10:00 |
eMBee | yes, that's what i thought | 10:00 |
yvl | assuming you don't change term dates after that | 10:00 |
eMBee | we'd simply set the term long enough (like for the whole year) and delete any events that don't fit | 10:01 |
eMBee | i looked at the page where the section is scheduled, but i could not follow the code to the point where the actual events are created | 10:02 |
yvl | yeah, the code is a bit murky there | 10:04 |
yvl | lemme get me my morning coffee, I'll see how I can help | 10:04 |
eMBee | thanks | 10:04 |
yvl | ok, you might want to look at schooltool/timetable/model.py | 10:13 |
yvl | PersistentTimetableCalendarEvent | 10:13 |
yvl | and especially removeEventsFromCalendar subscriber | 10:14 |
eMBee | ok | 10:14 |
eMBee | how would i get a list of events? | 10:24 |
yvl | you need to iterate the section's calendar | 10:25 |
yvl | say: | 10:27 |
yvl | section_calendar = ISchoolToolCalendar(event.object) | 10:27 |
yvl | for cal_event in list(section_calendar): | 10:27 |
yvl | these two lines obtain the calendar, and list all the events | 10:27 |
yvl | then events are checked for: if ITimetableCalendarEvent.providedBy(cal_event) | 10:27 |
yvl | (because section calendars can have manually added events | 10:27 |
yvl | ) | 10:27 |
eMBee | ah yes | 10:28 |
eMBee | also found addEventsToCalendar, slowly getting the picture | 10: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 |
eMBee | since you say that a section can have manualy added events, does the webinterface provide access to that? | 10:31 |
yvl | I meant that the "new Event" link adds manual events | 10:32 |
yvl | and when a timetable is assigned to a section, a bunch of PersistentTimetableCalendarEvent events are added | 10:32 |
yvl | it's executed Zope's event subscriber | 10:33 |
yvl | when a timetable is assigned to a section | 10:35 |
yvl | through some code, roughly this gets executed: zope.event.notify(TimetableReplacedEvent(...)) | 10:36 |
eMBee | ok, 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 link | 10:36 |
yvl | if you navigate to a section | 10:37 |
yvl | and click the [calendar] action button | 10:37 |
yvl | (the row of links that look like buttons roughly on the top of the page) | 10:37 |
yvl | you get to the section's calendar - as opposed to school's calendar | 10:37 |
eMBee | yes | 10:37 |
yvl | calendars are basically a set of events | 10:38 |
eMBee | yes, i figured that | 10:38 |
yvl | ok, then I didn't understand your question | 10:39 |
yvl | when dealing with the section, the events added trough UI and events created through assigning timetable - all of them live in the same section's calendar | 10:39 |
yvl | just that the PersitentTimetableCalendarEvent class inherits CalendarEvent (the one you add through UI) | 10:41 |
eMBee | ok, but there still seems to be a difference. the assigned events contain a journal link, and the manual events do not | 10:44 |
eMBee | means the manual events can not track attendance, etc | 10:44 |
yvl | yes | 10:45 |
yvl | oh, and there's that naming thing | 10:46 |
eMBee | hmm? | 10:47 |
yvl | in UI timetables are reachable under [Schedule] | 10:47 |
yvl | I always get confused by that name, so... ;) | 10:48 |
eMBee | can 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 |
yvl | that's a good question... | 10:51 |
yvl | looking 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 |
eMBee | thanks | 10:55 |
eMBee | i'd be happy to just replace the current function as we don't need events without attendance tracking | 10:56 |
yvl | hmm | 11:10 |
yvl | you will need to work with timetable events anyway | 11:11 |
yvl | there are few ways to achieve what you want currently | 11:11 |
yvl | the harder path is to develop a new TimetableModel | 11:12 |
yvl | and register it to ST, provide UI, etc. | 11:12 |
yvl | basically what you'd want then is to modify behaviour of createCalendar | 11:13 |
yvl | no, wait, scrap what I said | 11:13 |
yvl | there's actually a relatively easy way | 11:13 |
eMBee | there seem to be only two event types: TimetableCalendarEvent and PersistentTimetableCalendarEvent | 11:15 |
yvl | yes | 11:15 |
eMBee | is TimetableCalendarEvent the one with attendane tracking? | 11:15 |
yvl | yes | 11:15 |
yvl | and you want to control the creation process of those events | 11:15 |
yvl | in handleTimetableAddedEvent | 11:15 |
eMBee | right | 11:16 |
yvl | there's: timetable.model.createCalendar(..., ...) | 11:16 |
yvl | you actually want to pass two more parameters there | 11:16 |
yvl | first=xxx, last=xxx | 11:16 |
yvl | see BaseTimetableMode.createCalendar | 11:16 |
yvl | that's where the events are actually generated | 11:17 |
eMBee | hmm | 11:17 |
yvl | you can write your own browser page | 11:18 |
yvl | that, say, allows to input start and end dates | 11:18 |
yvl | (the page should be registered on a section) | 11:18 |
eMBee | ah | 11:18 |
yvl | then get all active timetables | 11:18 |
yvl | and execute code, similar to: | 11:18 |
yvl | handleTimetableRemovedEvent | 11:18 |
yvl | then, handleTimetableAddedEvent | 11:18 |
yvl | for each timetable | 11:19 |
yvl | just when calling createCalendar, also past first and last dates from the view | 11:19 |
yvl | events still cannot go outside the term date range, but you don't care about that anyway :) | 11:19 |
eMBee | so that is the function called when a section is scheduled... | 11:20 |
yvl | call stack looks roughly like this: | 11:20 |
yvl | TimetableDict executes zope.event.notify | 11:21 |
eMBee | ah, 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 through | 11:22 |
yvl | then handleTimetableReplacedEvent | 11:22 |
yvl | yes | 11:22 |
yvl | basically the result of such page would be like this | 11:22 |
yvl | when an user modifies section schedule | 11:22 |
yvl | events will be re-created for the whole term | 11:22 |
eMBee | ok | 11:23 |
yvl | the he must go to the new UI page | 11:23 |
yvl | and you can re-create same timetables, but now with specified time span | 11:23 |
yvl | if you have a checked out ST branch | 11:24 |
eMBee | the new ui page is one i need to create, right? | 11:24 |
yvl | yes | 11:24 |
eMBee | ok | 11:24 |
yvl | just edit schooltool/timetables/model.py | 11:24 |
yvl | add line: "import pdb; pdb.set_trace()" | 11:24 |
yvl | as the first line of handleTimetableReplacedEvent | 11:24 |
yvl | do | 11:25 |
yvl | $make run | 11:25 |
yvl | from terminal | 11:25 |
yvl | go to UI, schedule | 11:25 |
yvl | do stuff | 11:25 |
yvl | you'll get the interactive pdb debugger in your terminal | 11:25 |
eMBee | yes, i have used pdb before. great, thank you!! | 11:26 |
yvl | it may help you see what is actually happening | 11:26 |
yvl | you're welcome ;) | 11:26 |
eMBee | i'll have to play with this | 11:26 |
yvl | if you get stuck, just drop a mail to schooltool-developers@lists.launchpad.net | 11:27 |
eMBee | thank you | 11:27 |
yvl | in case you can't get help at IRC | 11:27 |
eMBee | :-) | 11:28 |
eMBee | ok, getting late here. time to go, thank you again | 11:37 |
* eMBee waves | 11:37 | |
yvl | good luck, eMBee :) | 11:38 |
*** ignas has joined #schooltool | 12:01 | |
*** menesis has quit IRC | 12:51 | |
*** menesis has joined #schooltool | 14:02 | |
*** yvl has quit IRC | 14:40 | |
*** menesis has quit IRC | 16:00 | |
*** menesis has joined #schooltool | 16:05 | |
*** menesis has quit IRC | 16:12 | |
*** dlobo has joined #schooltool | 16:32 | |
Lumiere | ignas: do you have a phone number for menesis? | 16:32 |
Lumiere | schooltool.org seems down | 16:33 |
eMBee | it has been down since at least 12 hours | 16:33 |
*** th1a has joined #schooltool | 16:48 | |
*** dlobo has quit IRC | 16:48 | |
Lumiere | th1a: schooltool.org is down | 16:50 |
Lumiere | still | 16:50 |
th1a | Yes, I sent an email about it. | 16:50 |
th1a | The server probably needs a kick. | 16:50 |
* Lumiere hands th1a a steel toe boot | 16:50 | |
*** alga has quit IRC | 17:11 | |
*** alga has joined #schooltool | 18:21 | |
*** ignas has quit IRC | 18:35 | |
*** menesis has joined #schooltool | 18:49 | |
*** menesis has quit IRC | 19:07 | |
*** dlobo has joined #schooltool | 19:10 | |
*** menesis has joined #schooltool | 20:07 | |
*** menesis has quit IRC | 20:38 | |
*** menesis has joined #schooltool | 20:39 | |
*** dlobo has quit IRC | 22:16 | |
*** aelkner has quit IRC | 22:35 | |
*** aelkner has joined #schooltool | 22:53 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!