Summer of Code/2009/Print Support: Difference between revisions
| Line 61: | Line 61: | ||
:A step by step abstraction: | :A step by step abstraction: | ||
: | :(The first step would essentially mean a Save as PDF hack and put the jobs for processing on moodle ) | ||
:'''1)''' (this is no way related to abiword's print to pdf ability) | |||
:The right click menu of an item in the journal will have a new option, i.e. create PDF. When clicked, the item will be sent to a local virtual CUPS-PDF printer, and the pdf will be marked with metadata attached stating its details.The PDF can be marked for printing or unmarked for printing. We will be using moodle as our interface for sending print requests on the network. The interface will have a user page and a teacher page. The page will have a report of his print jobs and a status report of his live jobs. And the ability to put 3 live jobs on queue. The no of upload slots will be dynamically updated according to his live jobs pending for teacher's approval. And the number of free slots will automatically be filled up by the browser with the to print PDFs. And then these objects can be sent to the moodle web folder. | |||
:'''3)''' | :'''3)''' Through moodle the teacher will have a page displaying the contents of the print datastore along with user names attached, and he/she will be able to download them to his remote system, and check them and approve them for printing if he/she wishes. After his/her approval or disapproval (that is a delete along with an option why) the information is held in the datastore, and the user can view it in the form of history transactions pertaining to his id, and teacher can view a finite list of previous transactions pertaining to all. : | ||
: | :'''4)''' The no School Server case. The simple solution to this case is to print directly through usb. And this won't be counter productive to the idea of teacher moderated printing, as the printer won't be available for just anyone; this is only a quick alternative to the 'save to portable drive and do the printing' method. | ||
:'''In-Depth analysis:''' | :'''In-Depth analysis:''' | ||
:for step-1, We use CUPS. The API has a nice array of functions, one of which is to get the printer's name (the cups-pdf virtual printer).( Since we know the name is CUPS-PDF, we can check it) and print our file as a PDF in the journal. For the sake of our python convenience we will be using a python wrapper to cups, pycups. The print objects will have metadata attached to them through the sugar datastore API. | |||
For the second part of it when ever the print page url is found, we make browse communicate with the moodle print queue through xmlrpc get the details, and upload to that many slots (as the number of slots will also be dependent on the print queue) | |||
This would essentially mean a rainbow hack so that browse can communicate with journal without a dialog. The execution part of this will take place as the | |||
:for step- | :for step-2, We will be using the interface already created, but for the teacher we will issue global access privileges enabling him/her to access all the sent requests, and the approve button will initiate shell commands to send the particular file to a network printer through CUPS installed on the server.This can again be achieved through hacking into moodle and understanding how notifications are sent to the students from teacher. The notifications would be relating to whether the teacher has approved or disapproved the print. case a, we would just make | ||
:for step-3, no new code is required, just a slight modification of the cp activity to select the type of printing. A few more dependencies, Which wont exceed 17mb. | |||
:''Is there a disadvantage in relying upon moodle for network printing?'' | :''Is there a disadvantage in relying upon moodle for network printing?'' | ||
:Since the whole concept relies upon network printing, it will be feasible for moodle to coexist with the system on the school server. We will just be adding moodle as a | :Since the whole concept relies upon network printing, it will be feasible for moodle to coexist with the system on the school server. We will just be adding moodle as a requirement for network printing. | ||
| Line 105: | Line 91: | ||
:* Will be able to print to any USB printer | :* Will be able to print to any USB printer | ||
:* Will be able to output a print as a PDF | :* Will be able to output a print as a PDF | ||
:* Includes a local queue and a teacher queue | |||
:* Includes a local queue | :* automatically parses print requests to the print page | ||
:* | |||
:* Uses moodle as interface for teacher moderated printing | :* Uses moodle as interface for teacher moderated printing | ||
:* A 3 live/pending jobs at a time queue. | :* A 3 live/pending jobs at a time queue. | ||
:* Teacher can approve/ disapprove printing from the queue. | :* Teacher can approve/ disapprove printing from the queue. | ||
:* Student will have status updates in his page | :* Student will have status updates in his page. | ||
:* Has a | :* Has a no school server case. | ||
| Line 146: | Line 129: | ||
:'''4 What is the timeline for development of your project? The Summer of Code work period is 7 weeks long, May 23 - August 10; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it's good to have a plan at the beginning so you have an idea of where you're headed.) Note that you should probably plan to have something "working and 90% done" by the midterm evaluation (July 6-13); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.''' | :'''4 What is the timeline for development of your project? The Summer of Code work period is 7 weeks long, May 23 - August 10; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it's good to have a plan at the beginning so you have an idea of where you're headed.) Note that you should probably plan to have something "working and 90% done" by the midterm evaluation (July 6-13); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.''' | ||
| Line 159: | Line 143: | ||
:'''Week 1 : ''' | :'''Week 1 : ''' | ||
:Write code which prints to any selected printer. (CUPS-pdf will be the primary case till gsoc), and add the print button to the item right click menu of journal. | |||
:Write code which prints to any selected printer. | :Start working on code browse hack to parse file paths to a specific pages forum input box. | ||
:'''Week 2 : ''' | :'''Week 2 : ''' | ||
: | :Finish with browse. | ||
Mile stone 1 result : Sugar side of our code will be done. get community feedback | |||
'''Milestone 2''' | |||
:'''Week 3 : ''' | :'''Week 3 : ''' | ||
: | :Start working on moodle's userpage. | ||
:Hack the 'upload an assignment' code and make a new plugin out of it. | |||
: | |||
| Line 174: | Line 161: | ||
:'''Week 4 ''' | :'''Week 4 ''' | ||
: | :start working on moodles teacher page, and see that he/she can review only his group's assignments | ||
:'''Week 5''' | :'''Week 5''' | ||
:And start working on a php script for shell commands to directly print to the | |||
:And start working on a php script for shell commands to directly print to the network printer. | network printer. | ||
:Mile stone 2 result :'' The teacher review feature and student upload features are working | |||
Get mentor and community feedback. | |||
'''Milestone 3''' | |||
:'''Week 6''' | :'''Week 6''' | ||
: | :Start working on creating a nice html layout for the page, get feedback and make corrections accordingly. | ||
:'''week 7''' | :'''week 7''' | ||
:Test code on a server with a printer, and test if everything works, get mentor and community feedback, and if any integration bugs remain, drill them out. | :Test code on a server with a printer, and test if everything works, get mentor | ||
and community feedback, and if any integration bugs remain, drill them out. | |||
:Milestone 3 result: '' It would be to finish the moodle plugin, and see to it that | |||
printing can be done through it by the teacher'' | |||
Beyond GSoC: | |||
Make the printing feature an integral part of the API so that printing can be done directly without the journal UI's intervention | |||
Make a CP activity to select the default printer. | |||
====You and the community==== | ====You and the community==== | ||