dealy14 / LearningFox-LMS

0 stars 0 forks source link

Additional fields for students table #60

Closed ccalvert closed 12 years ago

ccalvert commented 12 years ago

David indicated via email that he'd like to add the following fields to the students table:

Organization Location Domain Manager

These should not be required.

ccalvert commented 12 years ago

I responded to David via email:

I would like to add the following two fields:

Organization

There is already a field "organization_name" that was added by Murali. Might this be the same thing?

Location

What information is this intended to hold?

These should not be required.

Noted.

Domain

What information would this hold?

Manager

This would be the manager's name, I suppose?

ccalvert commented 12 years ago

After some back and forth, David and I have established the following:

  1. We'll determine if the organization_name field is what David wants. If not, we'll add one.
  2. Location will hold text describing the student's location. Let's call it varchar(255).
  3. The domain field will also hold text and should allow for 50 characters, so varchar(50).
  4. The manager field will hold the manager's name. varchar(100) should do it.
ccalvert commented 12 years ago

Note that the fields should also be added to the student details form and the add/edit student form.

jstuckle commented 12 years ago

Charles, did we ever decide how we were going to handle the student details field?

Also, which items are displayed in the registration form are currently stored in the reg_form table. But right now I don't see any way to change the contents of this table.

ccalvert commented 12 years ago

Jerry Stuckle wrote:

Charles, did we ever decide how we were going to handle the student details field?

It's my understanding from David that these four field are going to be standard fields, not user-defined fields.

Also, which items are displayed in the registration form are currently stored in the reg_form table. But right now I don't see any way to change the contents of this table.

I haven't seen one either. I'll ask David about it.

ccalvert commented 12 years ago

Email sent to David.

ccalvert commented 12 years ago

Charles Calvert wrote:

Jerry Stuckle wrote:

Also, which items are displayed in the registration form are currently stored in the reg_form table. But right now I don't see any way to change the contents of this table.

I haven't seen one either. I'll ask David about it.

David replied that there is no management facility for this in the admin panel.

ccalvert commented 12 years ago

Jerry, what is your ETA for completing this, please?

jstuckle commented 12 years ago

I'm testing not, Charles. I'll upload the changes later this evening.

jstuckle commented 12 years ago

The fields are added, committed and changed on the server. I had thought the form was completely handled by the reg_form table, but that does not seem to be the case - only the display is handled. Looking at the code there's also a lot of work which needs to be done in the form handling, but that's beyond the scope of this issue. I'll make the necessary changes to implement the new fields and open a new issue for the other problems.

jstuckle commented 12 years ago

I uploaded the code fixes for this problem. I changed the code in both the create student and display/edit student routines to be generic. The code should now allow administrators to add new columns simply by adding the appropriate columns to the students table, then adding the reference information to the reg_form table.

jstuckle commented 12 years ago

After thinking about this, I made a couple of minor changes to the code:

1) Unless both username and password are supplied, a new password hash is not created. 2) Administrator update student profile no longer requires a username (which can't be changed anyway).

Code uploaded and tested. Closing this issue.