benrothwell Posted September 29, 2010 Share Posted September 29, 2010 Hi, Trying to build a simple homework manager for the school I am Head of ICT in, using PHP and MySQL. Currently at the design stage - so no code to share yet. But I will share with you how I intend to get it working, and the issue I have... I anticipate having 5 tables Table 1 Student_ID | Student_name Table 2 Class_ID | Teacher_name Table 3 Student_ID | Class_ID Table 4 Class_ID | Class_name Table 5 Class_ID | Activity | Date_set | Date_due | Visible So, at its simplest it should be possible to select from the database all classes that match your student_id and show the homework set for those. Also, I have a visible tag set so that teachers can pseudo delete homeworks using a small control panel. But what I would like to do, is allow the students to set whether or not they have done the homework (kind of like a task in remember the milk) - but obvioulsy they cant have access to the database. Anyone got any idea how this could be achieved? Link to comment https://forums.phpfreaks.com/topic/214742-to-do-list-homework-manager/ Share on other sites More sharing options...
the182guy Posted September 29, 2010 Share Posted September 29, 2010 I would change that design slightly and have a new table to store teachers e.g. Teachers ( id, firstname, lastname, gender ) Then there is no need for your table #2 Then finally in table #4 I would add the teacher like Table 4 (id, teacher_id, classname ) As for the homework part, I'd have this structure Homework ( id, class_id, description, duedate ) Homework_Assoc ( id, homework_id, student_id, completed ) So you'll need a login system to allow the student to login, then have a page that lists out all their homework and let them declare when a homework is complete using something like a checkbox. In the backend you'd be inserting a row into Homework_Assoc and setting completed to 1 (or 0 if the student decided they in fact haven't completed it after declaring they had, or just delete the row instead of setting to 0). Link to comment https://forums.phpfreaks.com/topic/214742-to-do-list-homework-manager/#findComment-1117261 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.