*** replaceafill has joined #schooltool | 00:33 | |
*** menesis has quit IRC | 02:09 | |
*** replaceafill has quit IRC | 03:04 | |
*** menesis has joined #schooltool | 13:43 | |
*** replaceafill has joined #schooltool | 14:17 | |
*** yvl has quit IRC | 14:19 | |
*** ignas has joined #schooltool | 14:50 | |
*** yvl has joined #schooltool | 14:51 | |
replaceafill | yvl, you around? | 14:55 |
---|---|---|
yvl | hey man | 14:56 |
replaceafill | hey yvl | 14:56 |
yvl | it's 3 PM here, so... :) | 14:56 |
yvl | yes | 14:56 |
replaceafill | just wanted to inform you that i was able to convert the section scr report | 14:56 |
replaceafill | no issues | 14:56 |
yvl | cool | 14:56 |
replaceafill | just added a custom report task again | 14:56 |
replaceafill | and everything went fine | 14:57 |
replaceafill | except | 14:57 |
replaceafill | an issue generating the html id | 14:57 |
yvl | it expects an actual view with an actual __name__? | 14:58 |
replaceafill | yes | 14:58 |
replaceafill | but i think it's my fault | 14:58 |
replaceafill | see, this report is a hack | 14:58 |
replaceafill | http://bazaar.launchpad.net/~schooltool-owners/schooltool.cando/trunk/view/head:/src/schooltool/cando/browser/gradebook.py#L2010 | 14:58 |
replaceafill | the scr_table method tries to reuse an existing rml table | 14:59 |
replaceafill | but in a really weird way | 14:59 |
replaceafill | so i wanted to ask you | 14:59 |
replaceafill | how do you recommend to approach it? | 14:59 |
replaceafill | we already have a scr pdf report | 14:59 |
replaceafill | for a single student | 14:59 |
replaceafill | that works, with no hacks :) | 15:00 |
replaceafill | this section report needs to do the same in a single pdf for every student in the section | 15:00 |
replaceafill | so what i did is that i created a custom pdfstory manager | 15:00 |
replaceafill | and applied the same viewlet on every student | 15:01 |
replaceafill | to get the rml | 15:01 |
replaceafill | works, but again, hack :( | 15:01 |
yvl | hmm | 15:02 |
yvl | it does look hacked up a bit | 15:02 |
yvl | first, querying for student_competency_report.html looks wrong | 15:02 |
replaceafill | i agree | 15:03 |
yvl | seems you need it only to get a view? | 15:03 |
replaceafill | yes, the registrations of the single student pdf are too specific | 15:03 |
yvl | I wonder how much work would it be to write zcml that binds the table to the report view | 15:03 |
replaceafill | my question is, how do you apply the table to each single student | 15:04 |
replaceafill | in my head you need some look up to do that | 15:04 |
yvl | yep | 15:04 |
replaceafill | i mean, a getMultiAdapter of some kind | 15:04 |
replaceafill | so the pdfstory manager is "kind of" a valid approach? | 15:05 |
yvl | grades table does not necessarily must be a viewlet | 15:05 |
yvl | it could be done as a content provider | 15:05 |
yvl | then you can get that in rml directly | 15:06 |
yvl | <tal:block repeat="student students"> | 15:06 |
yvl | <tal:block content="student/schooltool:content/the_table" /> | 15:06 |
yvl | (it will adapt context, request, student | 15:06 |
yvl | ) | 15:06 |
replaceafill | i thought a content provider was similar to a viewlet | 15:07 |
yvl | well, that was the intended usage | 15:07 |
yvl | it is | 15:07 |
yvl | but it does not have a manager | 15:07 |
replaceafill | !!! | 15:07 |
yvl | managers are content providers usually | 15:07 |
yvl | some of the managers are viewlets themselves | 15:08 |
yvl | whoops, I lied a bit | 15:08 |
replaceafill | :D | 15:08 |
yvl | that would adapt student, request, view | 15:09 |
yvl | not context, request, student :) | 15:09 |
replaceafill | ah right, you scared me for a while :D | 15:09 |
replaceafill | i was thinking "how do you define a context and the student at the same time?" ;) | 15:09 |
replaceafill | the advantage is that you can call the provider from anywhere in the same view? | 15:10 |
replaceafill | as long as you have the student and the view | 15:10 |
yvl | yes | 15:10 |
yvl | also, you can have many students | 15:10 |
yvl | and call it for each of them | 15:10 |
replaceafill | ah!!! moment :D | 15:10 |
replaceafill | i think cleaning this will probably get rid of my html_id problem in the remote pdf | 15:11 |
replaceafill | but i wanted to ask you first about a way to solve it | 15:11 |
yvl | can you try something quickly? | 15:12 |
replaceafill | sure | 15:12 |
yvl | edit the view class, | 15:12 |
yvl | the one that renders the pdf | 15:12 |
yvl | and add | 15:12 |
yvl | __name__ = 'foo' | 15:12 |
yvl | there | 15:12 |
replaceafill | i did | 15:12 |
replaceafill | didn't work | 15:12 |
replaceafill | i also tried putting __name__ in the objects in the scr_table method | 15:13 |
replaceafill | view, grades_table and rml_table | 15:13 |
yvl | do you have a traceback? | 15:13 |
replaceafill | i remember i printed the parents | 15:13 |
replaceafill | in the generate html id method | 15:13 |
replaceafill | and i got None for the pdf view | 15:14 |
replaceafill | hhmm | 15:14 |
replaceafill | i didn't do self.view.__name__ actually | 15:14 |
replaceafill | but again, i thought "instead of hack __name__s, fix this mess you created" :( | 15:14 |
yvl | well | 15:15 |
yvl | frankly, there's something for me to fix too | 15:15 |
yvl | I now think it would be better | 15:15 |
yvl | if instead of pointing task to the report pdf class directly | 15:16 |
yvl | we did a proper view lookup | 15:16 |
yvl | with the name and all | 15:16 |
replaceafill | ah true | 15:16 |
replaceafill | i kind of "sensed" that :) | 15:16 |
yvl | :) | 15:16 |
yvl | in hindsight - it's kind of obvious | 15:16 |
yvl | let me add that ;) | 15:16 |
replaceafill | :D | 15:17 |
replaceafill | yaya | 15:18 |
replaceafill | i mean, yay! | 15:19 |
replaceafill | :D | 15:19 |
replaceafill | self.view.__name__ did the trick | 15:19 |
replaceafill | wrong trick, but works :P | 15:19 |
replaceafill | and the report is slow enough to see the STARTED message under tasks :( | 15:19 |
yvl | :D | 15:24 |
yvl | here | 15:38 |
yvl | pushed | 15:38 |
replaceafill | pulling | 15:38 |
yvl | replaceafill, just replace the PDF view class with "somethingsomething.pdf" | 15:38 |
yvl | in report_builder | 15:38 |
yvl | well, you can see what changed anyway ;) | 15:39 |
replaceafill | :D | 15:39 |
replaceafill | ah, you can use *both* now | 15:39 |
replaceafill | class name and view name | 15:39 |
yvl | :D | 15:40 |
replaceafill | nice, it works | 15:44 |
replaceafill | it feels more like rml tables now :) | 15:44 |
replaceafill | (where you specify the name of the original table) | 15:44 |
yvl | true :) | 15:45 |
*** menesis has quit IRC | 16:29 | |
*** menesis has joined #schooltool | 16:43 | |
*** menesis has quit IRC | 17:44 | |
*** crayston has joined #schooltool | 18:09 | |
*** crayston has quit IRC | 18:10 | |
*** crayston has joined #schooltool | 18:10 | |
*** muniak has joined #schooltool | 18:15 | |
muniak | Hello, I was wondering if anyone could help me find the sample data for schooltool. I am looking to write a script to modify our current system's exported data to the schooltool fomat but have been unable to find it. | 18:16 |
replaceafill | muniak, do you have schooltool installed? | 18:18 |
muniak | Currently in the process of doing so, are they included in the install? | 18:20 |
muniak | I tried looking through the source but couldn't find anything that seemed sampley | 18:20 |
replaceafill | yes, if you log in as manager, go to the School tab and then to Import XLS option in the sidebar | 18:20 |
replaceafill | then you'll see a What is This? sidebar | 18:21 |
replaceafill | with three sample xls (the first one is empty) | 18:21 |
muniak | Ahh, then I can just export to a file after I've imported the sample data? | 18:21 |
replaceafill | sure, or fill the empty one with your own data | 18:22 |
replaceafill | using the sample ones as... sample :D | 18:22 |
replaceafill | http://book.schooltool.org/spreadsheet.html | 18:22 |
muniak | ^^ Thanks so much! I'll probably be back once I have schooltool installed... I'm trying to talk the admins at this school to switch from their crazy-bad and expensive SIMS to SchoolTool | 18:28 |
replaceafill | :D | 18:28 |
*** muniak has quit IRC | 18:29 | |
*** yvl has quit IRC | 18:38 | |
*** khildin has joined #schooltool | 18:41 | |
*** ignas has quit IRC | 19:01 | |
*** menesis has joined #schooltool | 19:12 | |
*** menesis has quit IRC | 21:50 | |
*** khildin has quit IRC | 21:56 | |
replaceafill | hhmm i should move report related stuff out of gradebook.* in cando... | 23:27 |
replaceafill | py and zcml are getting big | 23:28 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!