...

View Full Version : School Grading system - is it possible with php?



eliyia
11-17-2010, 05:44 PM
hello ,
i have an old dos school grading application written in c , from witch i can print the gradebooks of a whole class , say the grade reports of 15 students of class A , separately . at once.

im thinking of transitioning my application to the internet and rewrite it from scratch. Knowing that php and html go hand in hand , i need to be assured if with this technology , i can accomplish such command like the one i mentioned above .

thank you

Rowsdower!
11-17-2010, 06:29 PM
That depends on what you mean by "print" and what sort of interaction you expect the web-based application to have with your machine.

Without a doubt, PHP can be used to create, maintain, and display records in conjunction with MySQL or another similar database. You can use PHP/MySQL to display data based on any parameters you like, so long as you have built your database properly. You can set up your PHP to send back CSV files, which are viewable/editable in MS Excel, you can serve up customized PDF files of the gradebook(s), or you can output them in HTML for browser viewing. The only limitation is in desktop automation on the user's end (your end). If you are expecting to run off batches of printing without having to click on any buttons then you will be disappointed. This is not because of PHP, but rather because of javascript and browser security features.

Javascript is what you would need to automate any processes on the client side (your side) of the application and javascript cannot access anything outside of the browser and its cache. This means that, at best, your javascript could ask the browser to open a print dialog box where you could select a printer, format your printing, and would then *have to* click "OK" to actually print each file (note that separate files would not be necessary as simple page breaks could be inserted between records - but if separate pages need to be printed you would have to manually approve each page's print dialog). This would be the same as going to File > Print in your browser's menu.

On the other hand... If you hook your web application up to a C program (executable) on your computer you could automate things that way, while only pulling database information from your web application (which, yes, could be done with PHP in conjunction with MySQL or some other similar database). But then you lose your portability which is, presumably, the whole reason for transitioning in the first place.

So yes, PHP/MySQL can create/store/display/manipulate your data in just about any way you would ever need it to do so. Actually printing grades to paper would be up to you/your browser/your local executable files.

There seems to be at least one open source project already out there that might fit your needs:

http://sourceforge.net/projects/php-gradebook/

eliyia
11-17-2010, 07:35 PM
After reading your thorough reply , i understand that indeed it can be applied through php But on the one condition/option that the printing facility isn't direct or automated.

lets say a school principal wants to print out the gradebooks of a whole school ; the grade reports for more then 1000 students ; at once , and a page per student .
the principal will go thru a scenario of 'user process' in my web application , finally arriving at the button "print" (or "output") , from there the data will either be sent as file(s) (CVS , PDF ..) or displayed in browser (html) , for then and ONLY then, the principal could explicatively do the printing (select File >Print)

(assuming the web app is pure php , no c)

Am i right?

djm0219
11-17-2010, 07:41 PM
Your web application may build a page, or pages, suitable for directing to a printer complete with page breaks as required. Doesn't matter if it is one page to be printed or 1000. How the output is created depends on whether you want to print it or download it as a CVS or whatever. It all comes down to formatting.

Rowsdower!
11-17-2010, 09:13 PM
After reading your thorough reply , i understand that indeed it can be applied through php But on the one condition/option that the printing facility isn't direct or automated.

lets say a school principal wants to print out the gradebooks of a whole school ; the grade reports for more then 1000 students ; at once , and a page per student .
the principal will go thru a scenario of 'user process' in my web application , finally arriving at the button "print" (or "output") , from there the data will either be sent as file(s) (CVS , PDF ..) or displayed in browser (html) , for then and ONLY then, the principal could explicatively do the printing (select File >Print)

(assuming the web app is pure php , no c)

Am i right?

The principal in this scenario could, for example, download a single PDF file that is 1,000 pages long (pages broken out to one student's grades per page). The principal could then open the PDF using any PDF reader software and print those 1,000 pages as normal.

OR

The principal could download a *.zip file with an individual PDF file for each student's grades. The principal could then open/print/e-mail these out as needed. Printing is, again, manual.

OR

The principal could be presented with a web page displaying all 1,000 students' grades. When the principal chose to print the page the resulting print item would be 1,000 pages long (pages broken out to one student per page).

OR... just about any other method you might like to choose. As djm0219 said, your choice of formatting can be applied.

But yes, without something in C, Java, or some other script that runs outside of the browser's constraints the principal would actually have to choose to print and/or open a file before any printing would occur.

eliyia
11-17-2010, 09:37 PM
everything is crystal clear to me now ,
thank you both .



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum