Changes

Jump to navigation Jump to search
m
moved Print Support to Summer of Code/2009/Print Support: Moved to the correct ns to make room for proper documentation
Line 22: Line 22:  
:'''6 Where are you located, and what hours do you tend to work? (We also try to match mentors by general time zone if possible.) '''
 
:'''6 Where are you located, and what hours do you tend to work? (We also try to match mentors by general time zone if possible.) '''
   −
:I am located in india (5:30+ GMT), I usually work in the night, from my 7 pm to 2:30 am
+
:I am located in India (5:30+ GMT), I usually work in the night, from my 7 pm to 2:30 am
 
:So any mentor should be ideal.
 
:So any mentor should be ideal.
   Line 63: Line 63:       −
:'''1)''' (this is no way related to abiword's print to pdf ability)
+
:'''1)'''
:The right click menu of an item in the journal will have a new option, i.e. send for network printing. When clicked, the item will be sent to a local virtual CUPS-PDF printer for PDF conversion, and the pdf will have metadata attached stating its details (this PDF plus metadata wont be visible to the user).The object is then said to be marked for printing and can be unmarked for printing too.(That is by again right clicking on the parent journal item and clicking cancel for network printing).
+
:The right click menu of an item in the journal will have a new option, i.e. "print!". When clicked, the item will be opened with Read and if its not a recognized format, convert it with cups-pdf and open with Read. and the pdf will have metadata attached stating its details (this PDF plus metadata wont be visible to the user).The user can have a preview of his print, save it as a pdf in the journal, and send a PDFed version to moodle.
:Also a similar button will be provided for saving to PDF. Which will result in a PDF file of the same parent in journal;the pdf will be tangible. (plus text will be mapped as text only)
+
:advantage cups-pdf (text will be mapped as text only)
 +
:Later on we can extend this to have a print button in every activity, so that the default activity which opens the object can print from itself.
 +
 
 
:The usecase would be, distinction of saving a pdf and sending it to printing. And the conversion is mandatory so as to prevent a scenario where the sugar file type might not be recognized by the teacher's machine.
 
:The usecase would be, distinction of saving a pdf and sending it to printing. And the conversion is mandatory so as to prevent a scenario where the sugar file type might not be recognized by the teacher's machine.
   Line 80: Line 82:       −
: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).And print our file as a PDF in the datastore. Which is pretty much the same for saving as PDF, or sending to moodle.(in the latter we just dont display it, in the former we do)
+
:For step-1,We hack into Read and create a new print toolbar, one with direct printing, one with moodle printing, and one with export as pdf. For all things other than direct printing a dummy pdf is created.
: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 Read to send jobs to moodle and get the queue details we use xmlrpclib , and send only as much as the number of free slots . (Or a simpler way will be to bypass the dialog automatically). The execution part of this will take place dynamically as soon as the user requests the print page. And also, once the pdf is read, it is destroyed.
 
+
:We will also provide a way so the user can send only pdf files through the moodle user page, which will be based on the upload many number of files module.
:For the second part of it when ever the print page url is accessed, we make browse communicate with the moodle print queue through xmlrpclib to get the queue details, and upload that many slots (as the number of slots will also be dependent on the print queue through a php trick). This would mean a rainbow hack so that browse can communicate with journal without a dialog (Or a simpler way will be to bypass the dialog automatically). The execution part of this will take place dynamically as soon as the user requests the print page. And also, once the pdf is read, it is destroyed.
      
: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 for his group.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.  
 
: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 for his group.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.  
Line 156: Line 157:     
:'''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 buttons to the item right click menu of journal.  
+
:: Start work on Read and add printing buttons to it (see that they do their jobs), and write minimal journal code.
:Start working on browse hack to parse file paths to the print page's forum input box.
+
           
 
   
:'''Week 2 : '''
 
:'''Week 2 : '''
:Finish with browse. get community feedback
+
:: hack on browse so it can save html files, and see to it that read can convert and save all files to pdf and send to moodle.
    
:''Milestone 1 result : Sugar side of our code will be done. ''
 
:''Milestone 1 result : Sugar side of our code will be done. ''
Line 167: Line 167:     
:'''Week 3 : '''
 
:'''Week 3 : '''
:Start working on moodle's userpage.
+
:Start working on moodle's userpage.(Hack the 'upload several assignments' code and make a new plugin out of it.)
:Hack the 'upload an assignment' code and make a new plugin out of it.
+
:Use xml-rpc to link moodle's datastore with Read code
    
:'''Week 4 '''
 
:'''Week 4 '''
 
:start working on moodles teacher page, and see that he/she can review only his group's assignments
 
:start working on moodles teacher page, and see that he/she can review only his group's assignments
  −
:'''Week 5'''
   
:And start working on a php script for shell commands to directly print to the network printer.Get mentor and community feedback.   
 
:And start working on a php script for shell commands to directly print to the network printer.Get mentor and community feedback.   
    
:Milestone 2 result :'' The teacher review feature and student upload features are working  
 
:Milestone 2 result :'' The teacher review feature and student upload features are working  
   −
:'''Milestone 3'''
+
:'''Milestone 3''':
 +
:'''Week 5'''
 +
:Start working on creating a nice html layout for the page, get feedback and make corrections accordingly.
 +
: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 and that we have thousands of happy XO user's faces''
    +
:'''Milestone 4'''
 
:'''Week 6'''
 
:'''Week 6'''
:Start working on creating a nice html layout for the page, get feedback and make corrections accordingly.
+
:Make an extended print dialog activity (use gtkprint dialog), which has options such as select printer and pages for local and pdf printing and moodle added as printer option.
    
:'''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. 
+
:Replicate the features in each activity, so that when opened with default activity in journal, they can print.
 +
 
 +
:Milestone 4 result : '' Well we have everything set up folks! APART from wifi printing! get feedback
   −
: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 and that we have thousands of happy XO user's faces''
+
:'''Then''':
 +
:Fix last minute bugs, check with a sample deployment.
    
:'''Beyond GSoC:'''
 
:'''Beyond GSoC:'''
 
:''primary focus'':
 
:''primary focus'':
:*Add a direct network printing mechanism ( avahi if not the CUPS provided Bonjour for DNS-SD/mDNS) and print directly to the print server through wi-fi.This will be in the form of a new button in the journal item's menu.This will be disabled when ever an XS is connected.
+
:*Add a direct network printing mechanism ( avahi if not the CUPS provided Bonjour for DNS-SD/mDNS) and print directly to the print server through wi-fi. This will be .This will be disabled when ever an XS is connected.
 
:I have written a sample program http://pastebin.be/17562  
 
:I have written a sample program http://pastebin.be/17562  
 
:What this does is, it gets the list of printers from the print server, and prints to the default configured one.
 
:What this does is, it gets the list of printers from the print server, and prints to the default configured one.
:It can be extended to select the print server automatically, traverse through the printers, select appropriate one. And also implement a local queue, cancel option.
+
:It can be extended to select the print server automatically, traverse through the printers, select appropriate one. And also implement a local queue, cancel option.
 
  −
:''Secondary focus:''
  −
:*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====
Line 276: Line 279:  
I asked them which of the following was their current biggest problem:
 
I asked them which of the following was their current biggest problem:
   −
  #  The printers are too busy, you have to wait for your documents to print out.
+
  #1 The printers are too busy, you have to wait for your documents to print out.
  #  There is not enough money to buy toner and paper.
+
  #2 There is not enough money to buy toner and paper.
  # The printers are too far away, the teachers have to waste time walking to get their printouts.
+
  #3 The printers are too far away, the teachers have to waste time walking to get their printouts.
  #  The printing system is too confusing or broken and people can't get their stuff to print on the printer they want to use.
+
  #4 The printing system is too confusing or broken and people can't get their stuff to print on the printer they want to use.
    
#3 is definitely this schools biggest issue.
 
#3 is definitely this schools biggest issue.
Line 285: Line 288:  
We will be collecting used computers for the SoaS project.  We could probably easily also get donations of small printers for each classroom and it sounds like they would want that.
 
We will be collecting used computers for the SoaS project.  We could probably easily also get donations of small printers for each classroom and it sounds like they would want that.
    +
====Possible User Interface Designs====
 +
 +
{|
 +
|[[Image:print_device_mockup_for_vamsi_1.png|thumb|350px|Example print device palette showing one active print job. Job can be cancelled via (x) icon]]
 +
|[[Image:print_device_mockup_for_Vamsi_2.png|thumb|350px| Example print device palette showing several print job items with different states in the print queue.]]
 +
|}
    
[[Category:2009_GSoC_applications]]
 
[[Category:2009_GSoC_applications]]
31

edits

Navigation menu