Thursday, April 7, 2011

Table Data Creating Another Table--beta

This exercise is a study in content management using JSON, jQuery, and PHP.

The best way to get a quick overview of the functionality is to click the example links below.

The idea is to create a grading rubric in the form of an HTML table on a Web page to be used by an instructor to grade individual student assignments. The new page containing the rubric, then, will output and write individual grading files to the server.

The first part creates the grading rubric. The data generated in this process is then written by PHP as a JSON file, and stored on the server

The working grading page  uses jQuery to populate in the content data from the JSON file.

The page that creates the rubric is located here. This page has as subsidiary files, setupRubric.js, a jQuery fie, and grading111.css. When the instructor creating the rubric submits the form data, a PHP file, createJSONrubric.php, puts all of the form data into a JSON file, an example of which is located here.

The actual grading page is populated from the JSON file. The grading page is here. Subsidiary files include the same grading111.css used by the rubric creation page, and the jQuery file, grading111.js.

An example of the final output, what the student receiving the grade would see, is located here.

All of the code is commented. Please note that the deployed code that actually writes the JSON files has been commented out to prevent readers from creating files. The code is here.

0 comments: