A6: Survey List/View
- Due Feb 20, 2014 by 1pm
- Points 100
- Submitting a website url
For this assignment you'll build List & View pages of Surveys for our SurveySez project.
The List page will:
- Provide loaded links to the View page for every survey
- Identify the Date Created, Title, Description and Creator's Name (Admin's First & Last Name) of each survey
The View page will:
- Implement the Survey classes on a Survey_inc.php page for data access
- Defend itself from invalid entry by redirecting users back to the List page
List/View Demo: Here's a link to the Demo List/View that gives you some code that could be of assistance: Demo List/View Links to an external site.
List/View SQL: Consider the following SQL statement for your List page:
$sql =
"
select CONCAT(a.FirstName, ' ', a.LastName) AdminName, s.SurveyID, s.Title, s.Description,
date_format(s.DateAdded, '%W %D %M %Y %H:%i') 'DateAdded' from "
. PREFIX . "surveys s, " . PREFIX . "Admin a where s.AdminID=a.AdminID order by s.DateAdded desc
";
SurveySez Initial SQL: Here's a copy of our initial SurveySez SQL Links to an external site.
Start with the initial SQL above and be prepared to add seed data as identified next.
Seed Data: To more fully test these pages you'll be required to create additional SQL to insert more seed data. Specifically you'll need to create enough seed data to have at minimum:
- 3 Total Surveys
- 2 questions per survey
- 2 answers per question
The additional seed data should be stored in a new SurveySez SQL that you will store and maintain.
Survey_inc.php: Move all code to a an include file named Survey_inc.php (note the capital "S" - this is for autoload!!)
View the survey_test_final.php example to see how the prototypes for the classes are wired: survey version 1 zip file Links to an external site.
So what is ACTUALLY due for this assignment?:
- Functional List & View pages, with List page linked on your construction/homework page and client protosite
- All Survey object code must be moved to a new include file named Survey_inc.php
- Add 2 total surveys of seed data per specifications (with one existing makes 3 total surveys)
- Link to your version of SurveySez SQL script to create said seed data