As the title speaks, Printing from Moodle just works.
A few things to note, the thing is still messed up. There is quite a lot of work to be done.
1) Add a settings page for the administrator (global File upload limit*)
2) Clean the UI messages
3) Get the messy XML-RPC code working! ( I cant figure out how to save the sent binary data as a pdf…)

If that’s done 85%-90% of this project will be done.

Tim (from Moodle) and Martin had suggested I redo my module as a block, BUT my idea was before I pull out something new, get at least this working completely so I have a backup.
So anyway, apologies for the late update, but fighting with xml-rpc is taking longer, and I had been travelling too.


What is this about?

The last ODFTOPS script was pretty generic, it was done keeping in mind only the abiword 2.6.8 version. So here we have a pretty efficient script which works checking for capabilities a specific version of abiword would have, and writes the PostScript accordingly for maximum efficiency.

Did I stumble into any glitches while making this?

Yes, in fact the problem was I didn’t realize that CUPS and its executioner the lp user write to their own special TMPDIR, and when I was debugging defining it to /tmp/ , it wouldn’t work. Also the new script invites subshells, so we dont have to mess with system specific messages like “Aborted” and/or abiword specific messages. But SubShells could not write in the lp user’s TMPDIR, so I had to make define a TMPDIR1 in /tmp/, so as to perform the subshell related operations there.

Do we have an algorithm for the approach?

Yes, we do.
1) Check if abiword can output to different folders other than the one in which the input file is in. Meaning we would be checking if our abiword is 2.6.6+
for that output to .doc, so that we wouldnt be crossing out 2.6.8, as it can write to other folders, but not output directly as .ps
2) if true, check if its abiword 2.6.8, so that we do an intermediate doc conversion and then proceed
3) Else, just convert to ps directly
4) if 2.6.6–, then do a cp into the cups defined tmp dir and then perform operations

Where is the code?

The filter code

Thats about it.

Current Activities
* I am currently reading the D-BUS Specification, so I get a grip on how our IPC model works, and how objects are handled in read.

Current Design scheme for the fork of Read, i.e. The Print Activity, that I am following is,
1) Abandon edit, as the print activity is meant only for preview purposes, the parent activity is better imo for editing
2) Make a new toolbar to Open and close documents from within the journal. Also make a Print toolbar
3) Implement a module which converts odt to pdf using pycups code, and in the end results in that pdf being displayed
4) Add pycups code as a handler to another print button, and save that already converted pdf into journal as the execution for the PDFify button
5) As a bonus configure the pycups print configuration features realistically based on how our document looks in the Print activity. Essentially this would mean, add pycups code in each module of the Print activity for configuring.

I’m open for suggestions on this design scheme. Also, I’ve started work only on the most generic features, I will proceed with the actual design once we agree on it.

Hello world!

April 26, 2009

Hello, folks! Well here it is, the blog where I will be writing up all my updates on the project I am working on, i.e. Add Print Support to the XOs.

Well the proposal is now final Print Support

Thanks to homunq, aa, and bemasc for valuable input. Read will now be a victim of lot of abuse :p

And, I hope to work on moodle the first thing I am done with my exams which end on 7th. php is a new beast to me, so I need to fine tune myself to it. Although I have been hacking moodle a while back too, I still dont find enough confidence. Thankfully my mentor is good at it.

Thanks to ajuonline, who recommended wordpress.