Move copying of basic properties to a helper.

This includes only properties that are boolean or strings, and not
those that are arrays (as these may want additional per-item handling).

Change-Id: Iba32896d57fdc355c26a94c516ae4f9542212f73
Avoid showing students the Register Users button.

The backend already blocks registration requests from students, this
just avoids showing them a button that is ultimately useless.

Change-Id: Id24841f524ec6691d025f897f0622b455b0a5691
Fix #2170: Prevent Students changing their names.

Add support in the backend for ignoring attempts to change the name
of a user by a student (which covers the case of student self-edits,
and any other cases of edits by a student aren't allowed anyway) as
well as a note in the spec about this. It follows the existing pattern
of just ignoring these attempts, rather than actively failing, so
that other changes are allowed.

While this is non-ideal, it will do for now as this commit also
modifies the front-end to disable the name fields when students are
logged in.

Change-Id: I6b0e091f37067f38dd8fc52faf3e49905fd37735
2161: Allow teachers to create teachers.

Adds an extra setting to the edit user interface to allow changing them to teacher.

Also fix the template expander.