> > Topic (new)

test

Jun 17, 2011 / guest
Jun 17, 2011 / guest
suggested
 

Attached files

No files uploaded
 
= Site Fields =

Site fields specify standard and non-standard fields that are recorded
for students on a per site basis. This information is used in self
registration of students /student/seflreg.asp and where they update
their details /student/settings.asp.

Site fields are also in the admin equivalent of those pages
/admin/user.asp as well as when searching for users in admin
/admin/filterusers.asp and importing users in /admin/importusers.asp

Site Fields Table π

Most but not all of the data in this table is editable (by us) when
logged in as super admin from the customise menu. See code in
/admin/customise/userfieldsadmin.asp

{|
|SiteFieldID || Primary key
|-
|SiteFieldID_tablemove || Ought to be removed (mistakenly added by the
sitemove file)
|-
|SiteID || The site e.g. brent or vlc
|-
|TableName || Really a misnomer. If this is 'other' then the field is in
UserCustomFields, otherwise this is the name of the field in the Users
table.
|-
|StudentFieldName || The description of this field as it appears to the
user, primarily in self registration
|-
|AdminFieldName || The description of this field as it appears to an
administrator
|-
|PreFieldText || Helpful text shown in self reg --on line above field
|-
|FieldType || One of list, text or checkbox
|-
|ListID || If this is a list it will either link to an ID in CustomLists
or be 0
|-
|ListText || if ListID is 0 then this contains SQL to generate the list
|-
|Action || Always save — was an attempt to cater for exceptions
(e.g.Enrolment Key) but those are mostly hard-coded now
|-
|Editable || a bitfield! (Couldn't have used anything human readable
obviously, sigh) See #Editable section (NY: a 'bit' of
indulgence on my behalf!)
|-
|Required || mandatory field
|-
|UniqueVal || if 1 the data in this field msut be unique among users if
this site e.g. log book number
|-
|Verified || if 1 the data must be entered twice for verification e.g.
password or email address
|-
|VerifyLabel || the label displayed if verified is 1
|-
|StudentAddDisplay || An ordering value indicating the position to
display this field in self registration
|-
|StudentEditDisplay || An ordering value for update details
|-
|AdminAddDisplay || An ordering value for the add user page in admin
|-
|AdminEditDisplay || An ordering value for the update user page in admin
|-
|DefaultValue || A default value for this field
|-
|IsInfo || What is this for?? (NY: no idea!)
|}


Editable π

<pre>
select case thisdisplay
    case "StudentAddDisplay"
        if (thesitefields("Editable") OR 13) = 15 then '-->
thesitefields("Editable") a 4-bit value indicating if field is editable
on this page

            sitefields(ic, 6) = 1
        else
            sitefields(ic, 6) = 0
        end if
    case "StudentEditDisplay"
        if (thesitefields("Editable") OR 14) = 15 then
            sitefields(ic, 6) = 1
        else
            sitefields(ic, 6) = 0
        end if
    case "AdminAddDisplay"
        if (thesitefields("Editable") OR 7) = 15 then
            sitefields(ic, 6) = 1
        else
            sitefields(ic, 6) = 0
        end if
    case "AdminEditDisplay"
        if (thesitefields("Editable") OR 11) = 15 then
            sitefields(ic, 6) = 1
        else
            sitefields(ic, 6) = 0
        end if
end select

Bit 8 4 2 1 DB Field Decimal Inverse (OR value in
above code)

     1 0 0 0 AdminAddDisplay 8 7
     0 1 0 0 AdminEditDisplay 4 11
     0 0 1 0 StudentAddDisplay 2 13
     0 0 0 1 StudentEditDisplay 1 14

</pre>

No Comments