Dear AllIts been a while since i visited Sitepoint... Since its old design thumbs up for the new design

Im working on a small system the system main job is registering students attendance

Im having some issues on how to go about it

so far i managed to code these modelsAuthentication ModelProfile ModelStudents ModelSubjects ModelNow im facing issues on how to make lecturers add students attendance with ease

I tried to make a page where the lecturer select his/her subjects from Select Box and the students list would be populated using AJAX

However i faced several issues with submitting multiple forms on the same page(Every student name has his on form) and due to my limited knowledge in JS and AJAX.

Please how would you design such a model ?

Your expertise would be a great help

Thanks everyone

Cups
—
2012-10-05T07:32:18Z —
#2

Without seeing any code it is difficult to say, but it sounds as if your Models contain just 1:1 object to single database entities, and you need something with JOINS.

If I have completely misunderstood then can you show us what you mean by a Students Model? (just show the stubs of the methods if you like).

newguy99
—
2012-10-05T11:06:34Z —
#3

Cups thank you for the replyMy application is simpler then that i do not need joinMore Explanation:Students Table-id-fname-sname-lname-level

Subjects Table-id-code-name-hrsweek-level-lecturer_id

Lecturers Table-id-name-user_access_id

All students model does is view all students based on their level (LEVEL)Any students who miss 3% of the class total hours get 1st warningIf he she reaches 7% then a second warning and so on

Now im trying to achieve that so far by making a table called attendanceWhere it will containStudents ID, subject ID, total hours missed so far,And maybe another table which will have the percentage allowed

Some issues im facing[B]Issue #1How to make the input of attendance as easy as possible for the lecturer.Possible AnswerList all students and there will be a form for each student (similar to face book comments)Lecturer look for that particular student from the list right his her hours missed and if there is a reason or not then submit form it will be updated using Ajax.I faced so many problems with that due to my limitation with JS.

Another solution im working on is list all students click on the student a pop up will show with a form where a lecture can add the students hours missed and the reason then the 2nd …. So on[/B]

How big do you expect this to get? (No. of students, no. of classes, etc.). Unless you're talking hundreds of thousands of records then it seems to me you'd be better having the 3%, 7% etc. checks configured as reports (perhaps PHP files run as a daily cron task), rather than configuring the results in the database. (Or perhaps just have a recording table that the cron task writes the results to).

The attendance table seems to me to need:

ID* | Student_ID | Class_ID** | Lecturer_ID

The Lecturer_ID should be known from the lecturer being logged in. He would then define the Class_ID by choosing the Class** from a list. (AJAX could then be used to define the list of students expected to attend that class - see next sentence). He could then multi-select the students attending (either via a combobox list, or checkboxes). All these items would be in a single form, so that when the form is submitted it has all the data ready to be processed.

*Autonumber type of thing**I would have a table of Classes. And also a table of StudentsPerClass containing Class_ID | Student_ID

newguy99
—
2012-10-06T14:12:14Z —
#6

Siteguru Simply WOW

there are 9 subjects for every yearThere are 4 yearscurrently there are an average of 25 student in every yearwhen a student reach 3% of the subject total hours then he gets a first warning7% second warning10% bard from the classIF With reason then it get extended to 15%Every Subject has different hours per weekeach subject teached in 28 weeksEach lecturer has 1 or more then 1 subjecteach student has few subjects

I MANAGED TO DO ALL OF THE ABOVE except for the reports still working on it

siteGuruWhats crun jobsmy skills of PHP is limitedhowever im googleing about it now

I got disconnected yesterday from the net so i did something on my ownits as followsUI Wisestep one = the lecturer select attendance then a subjects will be listed (Subjects belong to this particular lecturer)step two = The lecturer select the subject he want to add attendance from the list then the subject details get displayed and the list of student under itstep three = Lecturer Selects the student who missed the class or part of a class A new PAGE (my weakness with JS) will display with the student information and his total hours missed so far...etc and a FORMstep four = The lecturer fill in the form with ClassDate Missed, Hours Missed, and with Reason or not then submit. Lecturer close page and so on

Note that this process does not happen for all students only for the students who missed the class or particular hours of the class

Attendance Registration (PHP Side)

When the lecturer fill up the form and click add attendance for a particular student this what happen

Step 1

Check this particular student if exist in the attendance table based on LecturerID, Student_ID, Subject_IDif NOTthen add new recordif Yes then continue

Step 2Select student attendance (It could be 0 or more)

Step 3

Update the table based on the student previous attendance if 0 then 0+current hours missed (With reason OR without Reason)

Step 4I created new table called Attendance Details where i add the details for the student who missed the classidattendance_idsubject_idstudent_idreasondate_missedhours

Step 5

Promp the user that the record has been added Pleas close the window and go back to the list

The software utility Cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like connecting to the Internet and downloading email at regular intervals. The name cron comes from the Greek word