Welcome! Log In Create A New Profile

Advanced

Final Task

Posted by gregorian 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Re: Final Task
May 16, 2007 09:28PM
gregorian Wrote:
-------------------------------------------------------
> That seems pretty simple. Do we need to create the
> database tables using code or may we manually
> create the tables in phpmyadmin? I did not see
> mention of a login requirement for registered
> students? May we vary our approach to the
> assignment or do we strictly have to follow the
> guidelines?

I have implemented a login system because it makes no sense without it on a project of this nature. Anyone going to publicly display their assignment?

www.newshost.za.net
avatar
Mac
Re: Final Task
May 17, 2007 08:22AM
Prospective students register on the same registration page, but they access it from outside the admin system, i.e. one would copy the form to a page outside the admin system OR the better route, the admin interface links to this page which exists outside the admin network.

It is here because admin may want to register a student who phones in. And it makes it easier to access all the forms for purposes of testing from one interface which has links to all the pages smiling smiley

Login/password not required. Do not add one to access the admin interface (then you have to send us the login and password an then it gets tedious).

We'd like to think that there is enough here to keep you busy for a while smiling smiley
Re: Final Task
May 17, 2007 11:54AM
So, regarding the admin/student user interface...

Can it look something like this:
(Main page)

Prospective students
Admin


...with 'prospective students' linking to a registration form only, and Admin linking to an 'Admin Home' with links for:

Register a student
Manage Courses
Manage Students
View Registrations

Edit: without passwords, of course.
Re: Final Task
May 17, 2007 12:04PM
Hi Mac

How would you like us to handle the relationship between the Student information and the course data.

For example:

If I delete a course from the "Managing Courses Page", do I then delete the student(s) data from the students table? Do I put a constraint on "Managing Courses Page, stating something like "You can not delete this course because "student Name" is registered for this course!"

Completed the "Managing Courses Page" and everything seems to be working just fine. Now for the student side of things...

Cheers...
Re: Final Task
May 19, 2007 09:14PM
Woops , too late , i put an admin login !

Oh well , hard coded the user name and password to admin , admin so sure it wont be too hectic. I designed the ability to edit courses and student details around the fact that you were logged in, so its a bit hard to pull out now ! Sorry !

I like the idea about a warning when deleting courses - % students are registered to this course, are you sure you want to continue. Maybe email the students that were registered to that course to let them know their course has been cancelled !! haha !

J
Re: Final Task
May 20, 2007 11:54PM
jclamp Wrote:
-------------------------------------------------------
> Woops , too late , i put an admin login !
>
> Oh well , hard coded the user name and password to
> admin , admin so sure it wont be too hectic. I
> designed the ability to edit courses and student
> details around the fact that you were logged in,
> so its a bit hard to pull out now ! Sorry !


I 2nd that.

www.newshost.za.net
avatar
Mac
Re: Final Task
May 21, 2007 05:35PM
You know what? This is a first. I'm going to leave all your questions for you to solve smiling smiley In whatver way you think is most appropriate. And I won't penalise you. What I require most from you is logic (and the coding to go with it smiling smiley. You add whatever you want to add in whatever way you want to add it - as long as it is EASY for me (the user) to use. This course is NOT about "this is correct", "this is not".

It's about sensitizing you to PHP. And if that means marking your prac takes 3X longer, so be it. I don't want to put you in a box, i.e do this, I mark this, penalise that. You just keep to the database structure we've provided you, you can do what you want....

Just make sure you send me an explanation of what you did (not a 5-page word doc on ins out and outs). I want to change the db connection details in one file, then peruse your app.
avatar
Mac
Re: Final Task
May 22, 2007 07:20AM
Oh yes - one rarely deletes a student's info when deleting a course - in case he/she registers for another course, and for historical value.
Re: Final Task
May 22, 2007 10:36AM
Perfect - the idea is not to make it more work , but to make it easier to view / mark and of course to use and navigate.

Im about 70% so far , will host it on the 9th with URL.

All Good
J
Re: Final Task
June 01, 2007 08:25AM
Hi
i should put my final project at CD or lode it to where ? and also
i see at timetable final project (Manual + textbook + Forum) what this mean ?
thank you
Re: Final Task
June 03, 2007 03:54PM
Hi Mac

Battling on but I suppose this is all about the learning curve...

The more I test my application the more bugs and errors I find. One word of advice to everyone out there doing this course...test, test and test some more!

I decided to seperate the course information from the student registration form. It just made more sense to me at the time and still does. I have a slight problem with a delete SQL statement at the moment.

On my "MANAGE STUDENT" page I display two sets of information. The students details (SNO, FNAME SNAME, EMAIL) and then the course details (SNO, CNAME, YEAR) of the student. Both are in seperate tables which have options to edit and delete next to each entry.

If I delete a student on the student display then I delete the course details as well. No need to keep course details for the student. That works fine - see code below:

$sql = "DELETE student, course_student " .
"FROM student, course_student " .
"WHERE student.sno='$id' AND course_student.sno='$id'";

but...

If I delete a course from the student course display, which I am able to do and then try delete the student details information for that SNO - then I am not able to.

I know why it is happening. The statement above is looking for the SNO in both tables and it seems that if the SNO is not in the COURSE_STUDENT table then it wont delete. Is there a different SQL statement that I could use? I feel I don't know enough about MySQL yet...

I hope my explanation paints a bit of a picture for you...

Look forward to your reply!

Chow, Carl
avatar
Mac
Re: Final Task
June 04, 2007 07:53AM
The could be a link to this page from the student side. Or this page could be copied and used student side. But most likely, the admin side links to this page, which is located on the student side. It does not matter for purposes of this prac - we just include it here since admin may want to register a student, and they will use the same page to register that a student would.
Re: Final Task
June 05, 2007 07:51PM
Im done , hosted and ready. Mac , will mail u the link with my code.

I had a few mates test it out , so please excuse the interesting student names when you edit !! hehe.

From not knowing how to type a single line of code to now already developing for my company, think this course for me has been a major stepping point. About that advanced course now . . . . smile
avatar
Mac
Re: Final Task
June 06, 2007 08:28AM
Trust me, you can do a lot of admin automation for your company using PHP web-based application, which you let loose om the company network. And never forget open source PHP apps - there are thousands ps available for download, which may require some configuration, but you'll manage with all the help available on the forums.

I would not rush doing an advanced course yet - take a year to get to know what exactly you can do, and then start thinking about how can I code it better and faster.

I'm playing with achievo-atk now. It's an advanced rapid development tool that allows you to create apps in no time. With no moret han five lines of code, one can create a form that updates, deletes, adds information. But be warned, the documentation is not great and there are lots of rules to follow. But keep it in the back of your head for one day.
Re: Final Task
June 06, 2007 09:27PM
Hi Mac , i have problem when i send email to u , it come to me back with this massage:


This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

vdmertmt@icon.co.za
SMTP error from remote mail server after RCPT TO:<vdmertmt@icon.co.za>:
host mx-home1.worldonline.co.za [196.2.42.81]:
550 5.1.1 <vdmertmt@icon.co.za>: Recipient address rejected:
User unknown in relay recipient table


so how i can send my assignment to u
thank you
avatar
Mac
Re: Final Task
June 07, 2007 08:34AM
My email address is as per the tut letter - not the forum one.... @#$%&
Re: Final Task
June 07, 2007 10:11PM
Hi Mac

Just to make sure... can I send you my code on Saturday night? I need all the last minute tweaking time I can get. hot smiley

Regards
Therese
Re: Final Task
June 07, 2007 11:01PM
Hi Mac

3 Questions if i can,

Are we required to provide program documentation or will comments in the code be sufficient?

When is the latest we can submit our zip file on Saturday (ditto Theresegrinning smiley)

What areas about the project count the most towards a passingthumbs up grade?

Thanks. smile
Re: Final Task
June 08, 2007 10:22PM
K, im done. Mac, i have mailed you the relevant details.

Thanks very much everyone for a cool course.

All the best for the future.

Greg

www.newshost.za.net
Re: Final Task
June 09, 2007 09:39AM
I have sent the Assignmet at @#$%&

Thnak you
eye rolling smiley
Re: Final Task
June 09, 2007 01:07PM
Hi Mac

Project zip has been mailed.

Thanks hot smiley Wooooooohoooo! *fingers crossed*
Re: Final Task
June 09, 2007 03:59PM
Hi mac

Mailed my project!
Thanks
Johan
Re: Final Task
June 09, 2007 05:08PM
Hi Mac, I emailed my project to you. Regards. Reinie
Re: Final Task
June 09, 2007 05:53PM
I am getting this warning message....any ideas Mac? Anyone? Assistance gratly appreciated if you can....

Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Re: Final Task
June 09, 2007 05:58PM
I have completed my prac but the only thing I cannot get to work is this;


$newrecord = ("UPDATE IGNORE `student` SET `sname`='$sname', `init`='$init', `fname`='$fname', `title`='$title', `msname`=$msname', `dob`='$dob', `sex`='$sex', `lang`='$lang', `idno`='$idno', `telh`='$telh', `telw`='$telw', `cel`='$cel', `fax`='$fax', `email`='$email', `address`='$address' WHERE `student`.`sno` =$sno"winking smiley;

All the variables are passed and available.

AND whats more confusing.....it works in PHP MyAdmin when I enter it manually as an SQL statement...(Obviously enetering the variables in manually).

It also works when I update the course....

i.e. This works and looks the same to me.......,

$newrecord = ("UPDATE IGNORE `course` SET `cname`='$cname' WHERE `course`.`cid` = $cid"winking smiley;


Can anyone help please? What am I doing wrong?
Re: Final Task
June 09, 2007 09:14PM
SEEEEEEENT!!!!!!!!!! *nervous and relieved*

See y'all on the flip side... I think I'm going to sleep like a baby tonight.

Mackgray, when you say that you enter in the variables manually, do you mean that you enter values directly?

Have you checked every possible link of the chain that supplies $sno, i.e. that you have @extract($_POST); and @extract($_GET); at the top of the pages where needed, that you didn't leave out a '$' somewhere, that if you pass the variable as a parameter in an URL you used the same names on both pages (e.g. not id=$sno on the form page and $sno on the processing page instead of $id)?

Good luck, it sucks having to fix things at the last minute. tongue sticking out smiley
avatar Re: Final Task
June 10, 2007 12:01AM
Hi,

I am Busy uploading...

I got Most things to work okay. just some minor snags...

I will send the Zip file and URL ASAP!

Cheers

A Successful Nature Inspires Other People...
Re: Final Task
June 10, 2007 03:06PM
Hey Mackgrey

I did this - i presume you are editing a student , and not trying to insert - else u would uset the "Insert Into Student . . . "

$query = sprintf("UPDATE student SET sname = '%s', init = '%s', name = '%s', title = '%s', msname = '%s', dob = '%s', sex = '%s', lang = '%s', idno = '%s', telh = '%s', telw = '%s', cel = '%s', fax = '%s', email = '%s', address = '%s'
WHERE sno = '%s'",
$_SESSION['surname'],
$_SESSION['init'],
$_SESSION['fname'],
$_SESSION['title'],
$_SESSION['msname'],
$_SESSION['dob'],
$_SESSION['sex'],
$_SESSION['lang'],
$_SESSION['idno'],
($_SESSION['telh1']."-".$_SESSION['telh2']),
($_SESSION['telw1']."-".$_SESSION['telw2']),
($_SESSION['cel1']."-".$_SESSION['cel2']),
($_SESSION['fax1']."-".$_SESSION['fax2']),
$_SESSION['email'],
($_SESSION['add1'].",".$_SESSION['add2'].",".$_SESSION['add3']),
$_SESSION['sno']);

//echo $query; // debug

$result = mysql_query($query);
Re: Final Task
June 10, 2007 04:01PM
Hi

I have submitted my project! Finally done! I just hope I used the correct email address.

Cheers, Carl
Re: Final Task
June 10, 2007 05:54PM
Today is the 10th, due date was 9 June. confused smiley

www.newshost.za.net
Sorry, only registered users may post in this forum.

Click here to login