0

Hi all, Andy here and a newbie to this *great* site and first post so here it goes...

Pretty new to PHP, been coding for about half a year now and loving it. To help get a better skill set and knowledge of the language I've decided to build a small marking system where teachers in my fantasy world could go around the class marking work by logging in on their tablet, picking the group and respective student they are sitting with and go ahead to submit a grade. It's purely a way of learning and a fun project to work on.

I'd like to sort of track my progress in here and it also allows me to ask for help, which will definitely be needed, and show others how with a bit of hard work you can achieve something.

Basically I want a system where the teacher logs in, is able to create a group, add a student to the database and also tie it in with a group, so the two are linked.

I'd like some feedback on the idea and how I'm doing my database (it's not my strongest area and I'm not sure how right it is)

user: id, name, username, password, date, admin
group: id, modulecode, groupname
user_grade_for_group: id, user_id (FK to user.id), group_id (FK to group.id)

The user table is to combine teachers and students. If it's a teacher the admin is set to 1 and they are able to add groups, students etc. if it's 0 they are a student.

The group table is for all the groups available which is why there's the module code and group name.

User_grade_for_group is where they are tied in, so after all the groups are created, while adding a student you can include one of the groups to "attach" them to.

However in my head I'm not sure if this works? I think I'm missing a link maybe in the user table or group table?

As I say, feedback appreciated. Go easy on me ;)

4
Contributors
16
Replies
17
Views
5 Years
Discussion Span
Last Post by webblar
0

THat's OK AFAIK.
You can display groups per student or student per group, it shouldn't matter, as you have normalized data.

0

Brilliant, thanks ardav.

I'm hoping to work on it quite a lot this week so should have some more progress by Friday :)

0

OK come back with any probs. My main work is creating school-based systems (assessment / booking / timetabling / comms). I'm no pro, but will undoubtedly have experienced the same problems that you're going to face.

0

Seems like a good start. If the database is efficient in creation it makes things a lot easier later on in terms of using it.

I've been developing in php for a similar amount of time to you and i can say that i have learnt a lot on here as well as in other places. You sometimes have to get things wrong at first to get them right in the future.

Don't hesitate to ask for help :)

0

Nice one guys, really appreciate it.

Agree BenzZz, imo the best way to get better and learn more is to do something, see what went right, what didn't and continue to build on it. Especially in this area I think continually practising is how you improve.

Projects like this help keep focus too I find, set out a structure and learn elements of it.

Looking forward to it. Thanks once again!

0

Minor delayed update, but here it is nonetheless!

I've gone for a slightly different database to what I said, but I've got to a point now where I feel it's coming along nicely.

I've got a users table with id, name, username, password, date.
A group table with group_id, user_id, group_name, module_code, description.
And a students table with student_id, group_id, user_id, fullname, student_number, email.

At this stage so far I can register a user, log in, create a group that is assigned to that user, then add a student to an individual group on that user's list where they are attached to. It might not sound like a lot but I can see it building slowly but surely and I'm quite pleased with the progress so far.

Couple of questions I had really - is it ok for me to post a link to it? I've got it on my own testing web host where I like to run projects and stuff and would love feedback where it's actually tested by people who know what they're on about.

Also, in order to give a student a grade now, I'm leaning towards going with a grade table of grade, student_id, group_id, user_id, notes. In my mind with the way I've linked the students to a group of a user, I can link a grade to a student in the group in an identical fashion? Can anyone foresee any problems with this?

Thanks. :)

0

grade table fields?
I'd say:

grade_id (PK, optional)
grade
user_id (FK, student)
assessment_id (FK)

obviously that requires an assessment table. You groups will be set in the group_user table so you don't need to make the same relationship again.

WRT publishing a work in progress. How about securing it with a login and only allowing invitees to check it out. Ensure that all passwords and secure info is stored above the document root directory (usually public_html folder).

If you provide a peekaboo version for a select number of users, ensure that they provide you with useful feedback. You may even find an online questionnaire useful for this?

0

I've got a users table with id, name, username, password, date.
A group table with group_id, user_id, group_name, module_code, description.
And a students table with student_id, group_id, user_id, fullname, student_number, email.

might be worth planning for each student to be allowed in multiple groups
something like
student:
student_id
user_id
first_name } i always break them out for
last_name } easier searches/display
student_number -> any reason this cant be primary key?
email

studentXgroup:
sxg_id
student_id
group_id

it seems likely that you will have a teacher table also might make querying simpler if you use teacher_id in group table instead of user_id
user table would be just for logging in with a type field that could be used for setting permissions as well as knowing which table to grab more information from

0

Thanks guys.

What would be in the assessment table Ardav? I can't see what the need would be for it.

@jstfsklh211 - I'm thinking of looking into students being in multiple groups later down the line, just looking for a prototype working model at the moment. The student number is merely something like 0474921, we had one assigned to us in college so I'm trying to model it realistically. The user table is effectively the teacher table, should've cleared that up sorry.

0

The user table is effectively the teacher table, should've cleared that up sorry.

?
that sounds a little odd seeing as there will be students in that table also
what different teacher/student information are you storing
why a separate table for one and not the other for additional info

that number in college would have been you unique identifier in the system aka your user_id you don't need to have 2 unique numbers

while you may not actually be using multiple groups now it would suck to have to rewrite half your program because you didn't want to plan for it

0

splitting your teacher/students is a problem, as login procedure will be different. You want as streamlined an interface as possible.

Anyway. Your assessment table will be anything you really want! It depends on how you envisage assessments being setup. Who is allowed to create them? Must they belong to a module of work or fall within a whole-institution framework. Are trivial assessments allowed to be setup (like a teacher's markbook) on only assessments that will count to the overall grade at the end of the course?

They are questions only you can answer, so providing an useful example is almost impossible. If I were to set up such a system,I suppose I'd do something like this:

Course
course_id PK int/tinyint
course_name varchar (20)
course_code varchar(5) [or whatever your institution uses]
course_type_id FK tinyint [e.g. what sort of level this could be an enumerated type]
active tinyint (boolean 0/1)

Course_Types
course_type_id PK tinyint
course_type_label varchar (20)
course_type_description text

Course_Teachers
course_id FK
user_id FK
permissions int

Modules
module_id PK int
module_title varchar (32)
module_description text

Course_Modules (optional if module can only belong to one course - just add course_id to Modules table)
course_module_id PK (possibly useful for further join tables)
course_id FK
module_id FK

Activity
activity_id PK
activity_title varchar (20)
activity_description text
activity_type_id FK

Activity_Type
activity_type_id PK
activity_label varchar (20)
activity_explanation text

... sorry I'm losing the will to live with this ... you get the idea, I'm sure

0

If I wanted to have the ability for uploads, say a word doc of a marking sheet of some sort, what are your thoughts on having that table linked to the group so if I clicked on marking page of a particular student it loads up the marking sheet for that group, or...

have the option where the teacher could choose how many rows they may want (with columns set for the grade options of A, B, C, D, E) and that loads a template where they edit the text inside, save it and then that will be visible if they want to mark something. Which would negate the need for the use of uploading a document.

I hope that makes sense, it does to me but I'm not great at explaining stuff like this and I can imagine it comes across as very newb-ish :D

that sounds a little odd seeing as there will be students in that table also
what different teacher/student information are you storing
why a separate table for one and not the other for additional info

that number in college would have been you unique identifier in the system aka your user_id you don't need to have 2 unique numbers

while you may not actually be using multiple groups now it would suck to have to rewrite half your program because you didn't want to plan for it

I was only planning on having the teachers log in, it's not (in my mind) a system a student logs in to, it would just be say a teacher where they can submit grades and pull grades from the db.

Good point on the college number, didn't think that one through.

Definitely need to do some more planning on this. :)

0

Have you looked at Moodle? This pretty much does what you want. Students anrol onto a course and you can set up an assignment. The assignment can take many forms, including submit a file. The marking can also be limited to a type, e.g. grade, yes/no. You can also set up a deadline and repeat submissions.

You may be reinventing the wheel when a suitable solution exists.

0

Thanks for the link, I'll definitely check it out.

I'm not trying to create this to like distribute or anything, just a project for me to work on to enhance my knowledge and experience. Best way to learn this sort of thing is by practising so I find if I set myself a project I tend to stick to it and have a plan in place of sorts.

0

OK, I see, I thought you were a teacher in a school trying to create a system for assessment. No worries. If you download Moodle (free). It's a bit of a monster, but you may get an idea of how it works and perhaps take the good bits and improve upon the rubbish bits. Our school uses it, but I'm not overly keen on it as it's a bit clunky and there seems to be a lot clicking to get where you want.

0

Ah no sorry, should've cleared that up! Currently a final year student at University so alongside my modules I want to do projects like this to get me one step ahead of people. :)

Thanks mate will do. Over the weekend/week I plan on trying to get the grade table integrated with the student table and have it submit a grade to the db and able to pull it from it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.