UP Computer Science Interns' Blog

April 27, 2010

first assignment = TCG printing

Filed under: crs_200746488 — joanne m. @ 4:55 pm
Tags: , , ,

Is that even part of CRS? Contrary to what most students know, CRS does not consist of ONLY viewing your student profile and grades and pre-enlistment. There are lots of features that we are not able to access, and one of them is TCG printing.

I was assigned to do this module on the new/maroon CRS. But first, i was shown the old module on the blue crs (the output only, no code 😦 ). I had to address a major complaint on the printing of the grades, which is the unpleasant breaking of the tables as the page ends. If a table won’t fit in the current page, the whole table should be moved to the next page. In other words, I had to transform this  to this .

First Step: learning FPDF. According to the website, “FPDF is a PHP class which allows to generate PDF files with pure PHP.” Cool. But what’s more interesting is getting to see the code that generates our Form 5’s and Form 5A’s. Before, I thought that these forms just had templates and the student’s name, student number, and other information are printed on top of it. (My sister said that’s how it’s done in UPM). To think that each line, each blank on our Form5’s are well-thought of and printed at the same time as our information! And that I can have a soft copy of my Form5! Amazing. =))

After a lot of studying and a little copy-pasting consulting from the existing codes, I was able to make my own TCG printing module! 😀 But it’s not yet connected to the database (aww. Can’t access everyone’s grades yet. YET. ;P), since I was just in charge of the view and the controller (learn more about Model-View-Controller here). So I had to use dummy data. Mr/Ms. 2007-01234 and 2007-12345! I borrowed your student numbers. Don’t worry, all your grades are 1.0 but you only took two subjects in four years =P

As of today, this module is on hold. Because I was assigned another, more urgent, it’s-gonna-be-used-on-Friday module. Good luck Ü

-joanne ü

Advertisements

Blog at WordPress.com.

%d bloggers like this: