Tuesday, November 29, 2011

Student Financial Aid Software System - A Drupal tech note

This is my tech. follow up on the article 'Student Financial Aid Software System' before I can formally suggest ideas to the open source Drupal community.

After complete the article, I sit down and think about how can I contribute to the open source Drupal community. I try to formulate what I did regarding to the 'registration code' and 'workflow' into a clear and generalized ideas so that, once implemented, it can have greater use. After navigating the Drupal module site, I think I am not quite ready to submit my idea as extensions to those modules.

As reasoned above, idea presented here will be rough and unpolished.

Registration Code
I did not deployed the 'registration code' module for couple of reasons. In the beginning, I think it is a module I should use. But I run into some difficulties because of using the Drupal 6. The bug was soon fixed and I was very impressed by the 'registration code' team. Before the code is fixed, I have moved along and implemented some features I need and which may not be well supported in the 'registration code' module yet - I did not spend enough time looking around in that module to see if this is totally true.

While forming my idea on how to implement the Financial Aid Software System, the Workflow module seems to be a no-brainer. However, after taking a closer look, I realized that I will have to make some modifications so that it is practical in using the module. Through the work, I did find the Workflow, together with its related modules, provide a lot of flexibilities that I may never think of implementing them if I were to development the Financial Aid Software System from scratch and I believe this is an unspoken advantage of the open source development model - The competition between similar projects are based on services provided to adopters, be it be the functionality, the documentation ... etc, and not the business muscle.

The major modification is the content based workflow instead of role based workflow. In our Student Financial Aid System, all high school counselors perform the same task so are all our college registrars. However, they do not perform the task on all contents. They only perform these tasks on content with special values.

Student Financial Aid software system with Drupal workflow

The purpose of this article is to report my experience with the open source Drupal Content Management System while I am building a Student Grant/Financial Aid system.

The project
The Financial Aid system is to allow high school students to apply for Aids while they enrolled in college courses. The process requires multiple reviews by multiple organizations. High school counselor need to review the eligibility of the students and verify the information provided and college personnel need to verify the number of credit hours enrolled. Finally, the Financial Aid administrator need to approve the application and award the grant.

Open Source Route
When I looked at the project, I realized that if I want to build the whole thing from ground up it will take me a while to build all the components. Since we are cheap and I am not married to any proprietary platforms, I think I might find something in the open source world. I began by searching the web for open source Financial Aid management system and was not able to find one. However, there were hints that Drupal might provide the basic framework that could work. Personally, I had been reading about Drupal for a while at that point but haven't have time to practice and play with it.

A word about Drupal
Drupal is often referred to as an open source Content Management System. It is, however, designed quite differently from other Content Management System. At its core, it provides only 2 basic types of content: story/article and (web) page. Story, as the name implied, is intended to be contribute by multiple users and can be listed one by one. Page, on the other hand, is to provide static web pages like the 'About US' or 'Company Info' pages seen on most web sites. The Drupal core is, therefore, not a content heavy system, but a layer or system that supports the creation, the display and the management of contents. Various content type and management module have been created on top of the Drupal system and it is these added modules that made the Drupal so powerful and content rich.

Back to the Grant/Financial Aid project
Reading through books on Drupal, it appear clearly that the Workflow module is a likely candidate for handling the multiple review requirement. The module, following open source's spirits, is designed to be both adaptive and adoptive. To facilitate the grant application process, it is also found that the Registration Code module is a good module to adopt.

The Workflow module
The power of the Workflow module is it's ability to move/convey contents from stage to stage. This fits our review stages well. When creating a new workflow, Drupal administrator will be asked to specify a content/document type and all the states/stages that are needed. Roles can be created and be given rights to move contents from some stages to other stages. All users can then be assigned roles that can move content from one stage to the other. In our case, for example, high school students can create financial aid applications and move their applications from the draft stage to the counselor reviewing stage. However, since high school counselors only reviewing applications created by their own students, we are forced to create different roles for students and counselors from different high schools and different workflows for each high school. Even though, there are Workflow extensions (for organic groups) that can solve this particular problem, there is another problem that can only be solved by customized code.

Since high school students can enrolled in various colleges and be reviewed by that college, each college will need have a role in each workflow or in each organic group. The number of roles are many and made managing them quite difficult. Beside that, applications will need be examined and conveyed to the corresponding college for review.

Registration Code module
Registration Code module allows Drupal administrator to generate random registration code for roles. A new user can then create an account using the given registration code and be assigned with the associated role. When used with the Financial Aid project, registration codes were generated for each high school, so that students can create accounts to be used for creating applications. However, since our implementation of the Financial Aid system also use the registration code to establish some profile field, we take the idea but did not use the Registration Code module.

Success Story
With the help of the Drupal, I was able to establish a very flexible and useful system with minimum customized code. I attribute my success to the Drupal community. Thanks.

What's next
Even though the system is implemented to the customer's satisfaction, the code is not organized into a clean module and requires manual installation and setups. One think I am considering doing is to re-think the code and see if there are better way of organizing them. Also, since I did not really use the Registration Code module and did extend/modify the Workflow module, I feel it is my duty and my desire to provide feed back to the Drupal community in terms of suggesting features to be added to the Registration Code and Workflow module.

Tuesday, September 20, 2011

Place spreadsheet side by side - an idea

This is an idea piece.

Spreadsheet is a wonderful program for handling data. Now a day, almost all spreadsheet programs allows multiple sheets. Spreadsheet program usually offered facilities to allow user to see various part of a spreadsheet simultaneously.

One thing I haven't seen is to allow user to see different sheet of the same spreadsheet file at the same time. As we all know, data can be processed and passed/linked through various sheets and it is very likely that one would like to look at the original data to see if the data processing process is doing the right thing. The idea is, hence, to allow user to see various sheets side by side.

This idea can be extended to other kind of programs. For example, browsers today are becoming a dominant viewer. Again, almost all browsers provide the tabbing ability. But not many of them allow user to view tabs side by side, even though, most of the time, you can open a tab in a different window.

phpbb relative url howto - bbcode

Forum can host a lot of information and, from time to time, same or similar topics can be asked again and again. It is, therefore, not unusual, that forums contain links to pointed to one of its other threads - just like links in web pages that pointed to pages in the same web site.

Lot of times, relative URLs are used for these links for various reasons. For one, if the site is to be moved from a developing host to the production server, with the relative URL, none of those links need to be updated. From time to time, we also see companies got purchased and need to moved to a new domain and, hence the new URL. All of these justify the use of relative URL in web pages.

For the phpBB, up to version 3.0, the [url=][/url] BBCode does not support the use of relative URL. To overcome that, one solution is to create a customized BBCode called, say, [rel=][/rel].

Customized BBCode can be defined through the phpBB's administrator panel. Log into the forum as an administrator and click the 'Administration Control Panel' at the bottom. Re-confirm the administrator password. Click the 'POSTING' tab at the top menu bar and click the BBCodes link under the MESSAGE title in the left side bar. Click Add a new BBCode and enter the following information. In BBCode usage textbox, enter '[rel={LOCAL_URL}]{TEXT1}[/rel]' and, in HTML replacement textbox, enter <a href="{LOCAL_URL}">{TEXT1}</a>. Click the submit button.

If you would like to save the typing even more you could use <a href="/phpBB/{LOCAL_URL}">{TEXT1}</a> instead. In this case, all you need is the the URL part that run off your phpBB root directory.

Monday, August 1, 2011

MS Word mail merge using MS Access LIKE operator

Mail merge refer to the process of using/linking data from an external source to fill out an otherwise static document. An example can be a formal letter that send to all board members. The content of the letter is the same (static), but the title/address-block and greeting can be pulled from a database so that letters are with proper greeting and title of the addressed board member.

For most part, Microsoft's (MS) word processing (Word) and databbase (Access) works well with each other. However, under one situation, the normal way of linking MS Word and MS Access failed to work correctly. This article is to report a work around for that situation.

In general, database can hold a lot of information and it is not uncommon that a mail merge incident only need a small part of those information stored in the database. For example, the database may hold the contact information for all employee, while the letter is addressed only to board members. In database, queries are used to filtered out unwanted information and MS Word can use queries to obtained the needed information. For most of queries, MS Word worked well with MS Access.

The Problem:
When a query uses the LIKE operator/keyword, the normal way of linking MS Word and Access could fail. The Word will return results that would be produced with the '=' operator instead of the 'LIKE' operator. This problem had been reported dated back to 2005 and still exist today (Aug. 2011) in Word 2007.

The work around:
To work around the problem, we can have Word linked to Access through an ODBC (Open Database Connectivity), which defines a standard protocol to be implemented by middle-layer software to allow applications (e.g. Word) to connect to various database.

To proceed, in Windows environment, you proceed by defining a DSN (Data Source Name) through the ODBC manager ( -Start -Control Panel -Administrative Tools -Data Sources) with 'Driver do Microsoft Access' as the middle-layer software and the Access database file (.mdb) as the database file.

Once the DSN is in place, you can now use it as the mail merge data source. In Word, when prompt to select the data source, click the 'New Source...' button, Select ODBC DSN and click Next. Select the DSN you created, click Next, select the query using the LIKE keyword, click Next and you are prompt to save these settings in a data connection file to be used later. Click 'Finish'.

Now you can highlight the connection file and click open. The query should work correctly.

Saturday, February 5, 2011

Prior Art Initiative

Well. I was working on a program and is, again, considering the value of my solution. At this moment it takes me about 10 hours to come-up with something I think is workable. I intended to some amount of time in programming to implement that idea.

Aware of my earlier advocates[1] on urging people to public posting their crazy idea as a counter measure in defeating some of the crazy software patents, I am ready to write up a blog on Prior Art Initiative. Just then, I googled the web and found that there is Prior Art Initiative at here. Unfortunately, following their FAQ, it seems there isn't a definite mechanism in place yet.

At this moment, I will continue as follow:
1. I will create IDs with a form similar to: PA GUID.
- So that it is easier to refer to the prior art.
2. I will document the idea behind the code.
- This is intended to give some idea on the limit of the idea.
3. I will document the efforts in terms of work hours.
- This is intended to provide some effort-measures information that can , hopefully, used to gauge the value of some of today's software patents.
4. I will setup terms that should be followed when implement the idea.
- This is mimic to the general open source terms that given credits to the creator.

I will monitor the progress of the "Open Source as Prior Art" movement and adjust my terms accordingly.

[1] My first attempt on this is an email to Richard Stallman. In his response, he talked about the criteria of a prior art and is not very postive on what can be done with just an idea. My latest attempt is my comment on an article, possibly, related to Apple - I hope I can find those references. But I am not going to make a big deal out of it.

Friday, January 14, 2011

USB drive write protected error

Well. I was copying files from my hard disk to a flash drive. In the middle of it, I click the cancel button. After that, I was not able to copy any file to it or delete file from it. I can't even format it.
The message I got is 'write protected'.

I googled for solutions, there are basically two kind of posting:
1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies
2. diskpart

I tried both, but neither one worked.

I did followed the diskpart instruction and was able to play it with a new USB flash drive. The diskpart is basically a text based utility. Once you type the diskpart in the Run or DOS Command window, a terminal like window is popped up and you can issue text commands. Type help and hit enter will show you all the command available. Typing help and a command name will show you how a given command is for and how it is used.

In my USB case, it seems that my USB is dead - I can issue the clear read-only status command and be notified the successful of the command. But when I check status, the read-only status is still set. With my new USB, the diskpart worked like a charm.

Note: There are status for both the 'disk' and 'volume'. You need to check/reset both.

Now - did cancel a copy command killed my USB drive? I don't know. But at this point, I have broken quite few USB drive with no obvious reason - it seems to me it is really un-reliable - worst than the 3.5 inch floppy disk.

I really wondering if there are any statistics about the reliability of the USB drive.

Added on Feb. 5, 2011=============
I actually read some articles about how the USB drive works and a report on the usability of the USB drive. It seems to me that USB drive suppose to be quite reliable - especially for reading only operation. At this moment, I attributed my problem to my frequent writing to the USB drive. I constantly bring work home with the USB drive and, therefore, writing to the USB drive quite often. Based on some articles, the writing to USB is in blocks. So, a single change in a file could result in a lot of writings. My proposal is to keep adding to the USB until it is full. I will then deleted the oldest content and reuse that part of the memory. My hope is that by adding to the USB, I am writing across the USB and distribute my writing over the whole USB instead of writing to the same area over and over again. Hopefully this will extend the life of the USB.