Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts

    School Grading system - is it possible with php?

    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

  • #2
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    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/
    Last edited by Rowsdower!; 11-17-2010 at 05:31 PM.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • Users who have thanked Rowsdower! for this post:

    eliyia (11-17-2010)

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts
    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?
    Last edited by eliyia; 11-17-2010 at 06:42 PM.

  • #4
    Senior Coder djm0219's Avatar
    Join Date
    Aug 2003
    Location
    Wake Forest, North Carolina
    Posts
    1,303
    Thanks
    4
    Thanked 204 Times in 201 Posts
    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.
    Dave .... HostMonster for all of your hosting needs

  • Users who have thanked djm0219 for this post:

    eliyia (11-17-2010)

  • #5
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    Quote Originally Posted by eliyia View Post
    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.
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting

  • Users who have thanked Rowsdower! for this post:

    eliyia (11-17-2010)

  • #6
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    3
    Thanked 0 Times in 0 Posts
    everything is crystal clear to me now ,
    thank you both .


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •